web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : n+98QMOyGOMPtSNfWpi+95
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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete