Properties
DotLottieAnimation
instances expose the following properties:
Property | Type | Description |
---|---|---|
currentFrame() | Float | Represents the animation’s currently displayed frame number. |
duration() | Float | Specifies the animation’s total playback time in milliseconds. |
totalFrames() | Float | Denotes the total count of individual frames within the animation. |
loop() | Bool | Indicates if the animation is set to play in a continuous loop. |
speed() | Float | Represents the playback speed factor; e.g., 2 would mean double speed. |
loopCount() | Int | Tracks how many times the animation has completed its loop. |
mode() | Mode | Reflects the current playback mode. |
isPaused() | Bool | Reflects whether the animation is paused or not. |
isStopped() | Bool | Reflects whether the animation is stopped or not. |
isPlaying() | Bool | Reflects whether the animation is playing or not. |
manifest() | Manifst | Returns the .lottie’s manifest file. |
segment() | (Float, Float) | Reflects the frames range of the animations. where segment[0] is the start frame and segment[1] is the end frame. |
backgroundColor() | CIImage | Gets the background color of the canvas. |
autoplay() | Bool | Indicates if the animation is set to auto play. |
useFrameInterpolation() | Bool | Determines if the animation should update on subframes. If set to false, the original AE frame rate will be maintained. If set to true, it will refresh with intermediate values. The default setting is true. |
markers() | Marker | The Lottie markers contained inside the animation if any. |