项目作者: totalizer-js

项目描述 :
JavaScript Animation Engine For DOM & SVG.
高级语言: JavaScript
项目地址: git://github.com/totalizer-js/totalizer.git
创建时间: 2020-09-13T16:47:29Z
项目社区:https://github.com/totalizer-js/totalizer

开源协议:

下载



Totalizer JS

totalizer-js.github.io


Downloads
Version
License

The current version is 0.1.x, and the project is in the trial run stage of production environment

Totalizer JS provides a simple DOM & SVG animation description, and a mechanism for managing multiple animation descriptions. It was originally designed to create a core animation
abstraction layer for building complex animation interaction components.


totalizer

Installation

  1. npm i -S totalizer

Usage

Import totalizer

  1. import Totalizer from 'totalizer';

Create a Totalizer instance

  1. conat animation = new Totalizer();

Add an animation description

  1. animation.add({
  2. el: document.getElementById("div"), // the target node
  3. props: {
  4. translateX: [0, 300], // translateX from '0px' to '300px'
  5. scale: [0.4, 1], // scale from 0.4 to 1
  6. rotate: [0, 720], // rotate from 0deg to 720deg
  7. background: ["#ddd", "#08c"], // background from '#ddd' to '#08c'
  8. },
  9. delay: 300, // delay
  10. endDelay: 300, // endDelay
  11. duration: 2000, // duration
  12. easing: 'easeOutBounce', // easing
  13. })

Control the animation instance

  1. animation.loop().alternate().play();

Documents

For more, visit the official documentation

totalizer-js.github.io

License

MIT

Copyright (c) 2020-present, Z8264