TWEEN ANIMATION
Keys: CSS PROPERTY
Any numeric CSS property or color property can be animated.
Most CSS properties will cause layout changes or repaint, and will result in choppy animation. Prioritize opacity and CSS transforms as much as possible.
Example | Value |
opacity | .5 |
left | '100px' or 100 |
CODE EXAMPLE
new TweenAnim({
keys: {
left: 250,
borderRadius: ['0%', '50%'],
backgroundColor: '#FFF'
}
}).targets('.el');