@gausszhou/animation
v0.0.3
Published
Make tween easier to use
Downloads
1
Readme
Animation
Make tween easier to use
Live Demo
Preview Address: Transport
Usage
npm i @gausszhou/animation
import animation from "@gausszhou/animation";
const eleBall = document.querySelectorAll("i")[0]
eleBall.onclick = function () {
if (isMoving == true) {
return;
}
animation(
0,
800 - 42,
(value: string | number): void => {
eleBall.style.transform = "translateX(" + value + "px)";
},
animationType,
600
);
};
Code Reference
https://github.com/zhangxinxu/Tween