Animation
Animation component uses Lottie files to show Animations.
Props
Attribute | Description | Type |
---|---|---|
src | Sets the source url or path of the animation | [String, Object] |
loop | Specifies whetever the animation should loop indefinitely. | Boolean |
autoplay | Specifies whetever the animation should playing automatically. | Boolean. |
speed | Number Specifies the speed of the animation. (1,2,3,4) | Number |
direction | Specifies direction of the animation (right,left) | String |
Methods
Attribute | Description | Example Code |
---|---|---|
play | Starts playing the animation | components.EdtrComp_28.play() |
stop | Stops the animation completely.(unlike pause() the animation cannot resume where it left off; it starts over when play() is called again) | components.EdtrComp_28.stop() |
pause | Pauses the animation at the current frame | components.EdtrComp_28.pause() |
Events
Attribute | Description |
---|---|
onMessage | Triggered when message is sent inside the frame |
play | Triggered when animation starts playing |
stop | Triggered when animation stops playing |
pause | Triggered when animation is paused |
Example Usage
Src
Users can upload their own lottie json file to Plateau Studio and directly use it via Animation Component src prop.
Speed
Changes the speed of the Animation component
Direction
Changes the direction of the Animation component