-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
lucefer edited this page Jun 2, 2017
·
3 revisions
#安装
npm install bezier-animation
// 使用bezier
var bezier = require('bezier-animation')
//初始化bezier对象
var animation=new bezierAnimation(1,
'linear',
function(p1,p2){console.log("p1,p2",p1,p2)}
);
//播放动画
animation.play();
// 配置 bezier 路径
require.config({
paths: {
bezier: 'https://github.com/lucefer/bezier/dist/bezier-animation.js'
}
})
// 加载 Mock
require(['bezier'], function(bezier){
// 使用 bezier
var animation = new bezier({
1,
"linear",
function(p1,p2){
console.log("p1,p2",p1,p2)
}
})
})