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. |
isLoaded() | Bool | Indicates if the animation has been loaded successfully. |
manifest() | Manifest | Returns the .lottie’s manifest file. |
markers() | [Marker] | Returns available markers in the animation. |
segments() | (Float, Float) | Reflects the frames range of the animations. where segments[0] is the start frame and segments[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. |
activeThemeId() | String | Returns the currently active theme ID. |
activeAnimationId() | String | Returns the currently active animation ID. |
currentProgress() | Float | Returns the current progress of the animation (0.0 to 1.0). |
error() | Bool | Indicates if there was an error loading or playing the animation. |
errorMessage() | String | Returns the error message if an error occurred. |
isComplete() | Bool | Indicates if the animation has completed playing. |