📄 ricoanimation.js.svn-base
字号:
Rico.Effect.Animation = Class.create();Rico.Effect.Animation.prototype = { initialize : function(duration, steps, options) { this.duration = duration; this.stepsLeft = steps; this.options = options this.animateMethod = this.animate.bind(this); this.start(); }, start: function() { this.animate(); }, animate: function() { if (this.stepsLeft <=0) { if (this.options.onFinish) this.options.onFinish(); return; } if (this.timer) clearTimeout(this.timer); this.options.step(this.stepsLeft); this.startNextStep(); }, startNextStep: function() { var stepDuration = Math.round(this.duration/this.stepsLeft) ; this.duration -= stepDuration; this.stepsLeft--; this.timer = setTimeout(this.animateMethod, stepDuration); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -