类 fx.Animation
Extends
fx.Beater.
Defined in: jx.fx.js.
Constructor Attributes | Constructor Name and Description |
---|---|
fx.Animation(element, property, from, to, unit, duration, loop, transition, fps, css属性转换器)
动画类
|
Method Attributes | Method Name and Description |
---|---|
compute(from, to, delta)
|
|
onBeater(progress)
|
|
onCancel()
|
|
onEnd()
|
|
onStart(from, to)
|
|
render(element, property, value, unit)
|
|
set(now)
|
|
setFromTo(from, to)
|
- Methods borrowed from class fx.Beater:
- cancel, check, end, onLoop, pause, resume, setDuration, setOption, start, startTimer, stopTimer, update
类 详解
fx.Animation(element, property, from, to, unit, duration, loop, transition, fps, css属性转换器)
- 功能:
- 动画类
- 参数:
-
- {Element} element
- 动画的dom
- {String} property
- css 属性
- {Mix} from
- 起始值
- {Mix} to
- 到达值
- {String} unit
- 单位
- {Number} duration
- 动画时长,单位毫秒
- {Number} loop
- 循环次数,默认为1,0为无限循环
- {Function} transition
- 变化公式
- {Number} fps
- fps你懂的
- {Function} css属性转换器
- 返回:
- 动画实例
方法详解
compute(from, to, delta)
- 功能:
- 参数:
-
- from
- to
- delta
getTransition()
- 功能:
onBeater(progress)
- 功能:
- 参数:
-
- progress
onCancel()
- 功能:
onEnd()
- 功能:
onStart(from, to)
- 功能:
- 参数:
-
- from
- to
render(element, property, value, unit)
- 功能:
- 参数:
-
- element
- property
- value
- unit
set(now)
- 功能:
- 参数:
-
- now
setFromTo(from, to)
- 功能:
- 参数:
-
- from
- to