Git Product home page Git Product logo

animte-js's Introduction

animate-js

JS 动画

Usage

const JSAnimate = require("animate-js")

JSAnimate(draw, 10000)

Hooks

import { easeIn, useAnimate } from 'animate-js'

const [animate] = useAnimate(draw, 10000, {
    count: 1,
    timing: easeIn
})

API

JSAnimate(draw, duration, option)
属性 说明 类型 默认值 必选 版本
draw 绘画函数 (progress: number) => void - true v1.0.0
duration 动画时间(毫秒) number - true v1.0.0
option 动画参数 option 对象 - false v1.0.0

option

属性 说明 类型 默认值 必选 版本
timing 缓动函数 (progress: number) => number - false v1.0.0
onStart 开始钩子函数(不包括延迟) () => void - false v1.0.0
onEnd 结束钩子函数 () => void - false v1.0.0
delay 延迟时间(毫秒) number 0 false v1.0.0
count 执行次数 number, "infinite" 1 false v1.0.0

animate 对象

属性 说明 类型 版本
reset 重置 () => void v1.0.0
pause 暂停 () => state v1.0.0
play 播放 () => state v1.0.0
state 动画状态 'playing' , 'paused' , 'start' , 'end' v1.0.0
progress 动画进度 number v1.0.0

animte-js's People

Contributors

frattinor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.