# Animation wx.createAnimation(Object object)
with Promise style call: Not supported
Mini Program plugin: Support, need to Mini Program base library version no less than 1.9.6
Create an animation instance animationCall the methods of the instance to describe the animation. Finally, through the animation instance export Method to export animation data passed to the component animation Property.
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
duration | number | 400 | no | Animation duration, unit ms |
timingFunction | string | 'linear' | no | Animation effect |
delay | number | 0 | no | Animation delay time, unit ms |
transformOrigin | string | '50% 50% 0' | no |
timingFunction Legal value
value | Introductions | Minimum version |
---|---|---|
'linear' | Animation moves at the same speed from start to finish. | |
'ease' | Animation starts at low speed, then speeds up and slows down before ending | |
'ease-in' | Animation begins at low speed | |
'ease-in-out' | Animation starts and ends at low speeds | |
'ease-out' | Animation ends at low speed | |
'step-start' | The first frame of the animation jumps to the end state until the end | |
'step-end' | The animation stays in the start state until the last frame jumps to the end state |