Skip to main content

Notifications

Community site session details

Community site session details

Session Id : dGfxlKea09s0ssDxYWj7so
Power Apps - Building Power Apps
Unanswered

EaseOutBack Easing Animations (Maths!)

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

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 Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 172 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 87

#3
stampcoin Profile Picture

stampcoin 73

Overall leaderboard
Loading started