Skip to main content

Notifications

Community site session details

Community site session details

Session Id : t4OYYqjX7fL/wxnAZQgb+4
Power Apps - Building Power Apps
Unanswered

EaseOutBack Easing Animations (Maths!)

Like (0) ShareShare
ReportReport
Posted on 4 Aug 2023 11:04:10 by 345

Hi all,

 

Maths was never my strong suit, but I've managed to make this following code work for bringing in a menu from the right hand side of a screen with a button press, and then moving it back off screen, using a Cosine function to smoothly adjust the X property:

 

 

Switch(true,
 flyOut,
//Begins on-screen and moves off-screen, using Cosine to smoothly subtract a fraction of the Rectangle's full width at a time
//Starting Position on-screen

 ((Parent.Width - Self.Width) - 10) +

//Gradually add the width of the rectangle

 (-Self.Width - 10) * Cos(MenuTimer.Value/MenuTimer.Duration * (Pi()/2)) + (Self.Width + 10),


 !flyOut,
//This takes the box from off-screen to on-screen, beginning with it's position being equal to the width of the screen
//Starting position off-screen

 Parent.Width -

//Gradually add the width of the rectangle

 ((-Self.Width - 10) * Cos(MenuTimer.Value/MenuTimer.Duration * (Pi()/2)) + (Self.Width + 10))
)

 

 

I adapted this from the fantastic work of @Mr-Dang-MSFT to make it work on the right-hand side of the screen.

 

What I would like now is to see if I can make it do this with the EaseOutBack version, giving it a little bounce on the way out. Does anyone know at all how to make this happen? I guess it's nowhere near as simple of the Cosine version as we're technically adding a few extra pixels of movement just before it reaches it's final position just on screen.

 

-Edit-

 

I have included a gif of what it currently does:

 

Presentation1.gif

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started