Can I control a item with two different easing?
See original GitHub issueI want to move an item in an arc. So I should control the ‘top’ to be moved by ease-in, the ‘left’ to be moved by ease-out. I have no idea about how to control an item with two different easing type. Is there a simple way to do this?
Here is my code.
const animate = new scenejs({
'.hand-img': {
0: {
top: 830 * 0.005 + 'rem'
},
0.8: {
top: 950 * 0.005 + 'rem'
},
2: {
top: 950 * 0.005 + 'rem'
}
}
}, {
selector: true,
easing: 'ease-in',
iterationCount: 'infinite'
});
const animate2 = new scenejs({
'.hand-img': {
0: {
left: 500 * 0.005 + 'rem'
},
0.8: {
left: 620 * 0.005 + 'rem'
},
2: {
left: 620 * 0.005 + 'rem'
}
}
}, {
selector: true,
easing: 'ease-out',
iterationCount: 'infinite'
});
animate.play();
animate2.play();
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
<easing-function> - CSS: Cascading Style Sheets | MDN
This example provides an easy comparison between the different easing functions using an animation. From the drop-down menu, you can select an ...
Read more >ease-out, in; ease-in, out | CSS-Tricks
Easing is important stuff when it comes to animations and transitions. Combined with the duration, it has a huge effect on the feel...
Read more >Understanding Easing Functions For CSS Animations And ...
Easing functions can change the look and feel of an animation by affecting the rate, or speed, of an animation.
Read more >Easing in After Effects Ep10/48 [Adobe After Effects ... - YouTube
In this tutorial, I am going to demonstrate how you can add easing to your keyframes in After Effects.Enjoy!
Read more >Easing In After Effects - YouTube
Your browser can 't play this video. Learn more. Switch camera ... We'll go in-depth on how easy ease affects each frame in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alonprince I’m sorry. Scene is based on css, so only one easing can be used simultaneously per element.
There are ways to use the different selector as shown below.
@daybrush
i just did that, but it doesn’t work either. it just seems to play the first animation…