Hello all. Just wanted to shed light on an issue that gave me trouble when I was first introduced to Framer Studio.
When I wanted to animate an item on screen, it seemed I had to make a choice between using:
.....2. myAnimation = new Animation .....
Anybody have opinions on which approach is best when? Reminds me of Photoshop when there was 10 ways to do the same thing....which is best???
Thx in advance!
some quick thoughts on these different methods... 1. this approach is good for one time animations that you don't want to reverse. think of things like success checkmarks or something that will only happen once2. this is another way to do #1 for sure, but it has a couple of perks to it like being able to do myAnimation.reverse or myAnimation.stop which could be good for what you're doing. personally i never really use this one that often.3. states are great for animations you wish to toggle. this could be something like animating something onscreen and then offscreen again (like a modal).
hope this helps!
Start with #1. If you end up needing to do .reverse() or .stop() then shift to saving it as an object like #2. If you're building an element that is constantly being interacted with, then #3 will suite you best.
I'm assuming of course you're using Framer as a rapid prototyping tool and not something to build a maintainable project. If the project is going to be going on for a long time, then #3 is probably your best option to start with in almost all cases as it's easier to read and call in the code.