UNPKG

jsdk-offical

Version:

JSDK is the most comprehensive TypeScript framework, like JDK.

24 lines (23 loc) 657 B
/// <reference path='../../dist/jsdk.d.ts' /> JS.imports('$jsan').then(() => { let anim = new TweenAnim({ keys: { left: '+=250', backgroundColor: ['#FFF', '#D2691E'], scale: function (el, i, l) { return (l - i) / l * 1.25 }, translateY: function (el, i) { return 50 * i }, rotate: function(el, i) { return 360 * ++i } }, direction: 'alternate', loop: true, duration: 1500, easing: 'EXPO_IN_OUT' }).targets($L('.el')); $1('#demo').on('click', () => { anim.play() }) })