Animation

class Animation(cdp: CDP) : Domain

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class Animation(val id: String, val name: String, val pausedState: Boolean, val playState: String, val playbackRate: Double, val startTime: Double, val currentTime: Double, val type: String, val source: Animation.AnimationEffect? = null, val cssId: String? = null, val viewOrScrollTimeline: Animation.ViewOrScrollTimeline? = null)

Animation instance.

Link copied to clipboard
@Serializable
data class AnimationCanceledParameter(val id: String)

Event for when an animation has been cancelled.

Link copied to clipboard
@Serializable
data class AnimationCreatedParameter(val id: String)

Event for each animation that has been created.

Link copied to clipboard
@Serializable
data class AnimationEffect(val delay: Double, val endDelay: Double, val iterationStart: Double, val iterations: Double, val duration: Double, val direction: String, val fill: String, val backendNodeId: Int? = null, val keyframesRule: Animation.KeyframesRule? = null, val easing: String)

AnimationEffect instance

Link copied to clipboard
@Serializable
data class AnimationStartedParameter(val animation: Animation.Animation)

Event for animation that has been started.

Link copied to clipboard
@Serializable
data class AnimationUpdatedParameter(val animation: Animation.Animation)

Event for animation that has been updated.

Link copied to clipboard
@Serializable
data class GetCurrentTimeParameter(val id: String)
Link copied to clipboard
@Serializable
data class GetCurrentTimeReturn(val currentTime: Double)
Link copied to clipboard
@Serializable
data class GetPlaybackRateReturn(val playbackRate: Double)
Link copied to clipboard
@Serializable
data class KeyframesRule(val name: String? = null, val keyframes: List<Animation.KeyframeStyle>)

Keyframes Rule

Link copied to clipboard
@Serializable
data class KeyframeStyle(val offset: String, val easing: String)

Keyframe Style

Link copied to clipboard
@Serializable
data class ReleaseAnimationsParameter(val animations: List<String>)
Link copied to clipboard
@Serializable
data class ResolveAnimationParameter(val animationId: String)
Link copied to clipboard
@Serializable
data class ResolveAnimationReturn(val remoteObject: Runtime.RemoteObject)
Link copied to clipboard
@Serializable
data class SeekAnimationsParameter(val animations: List<String>, val currentTime: Double)
Link copied to clipboard
@Serializable
data class SetPausedParameter(val animations: List<String>, val paused: Boolean)
Link copied to clipboard
@Serializable
data class SetPlaybackRateParameter(val playbackRate: Double)
Link copied to clipboard
@Serializable
data class SetTimingParameter(val animationId: String, val duration: Double, val delay: Double)
Link copied to clipboard
@Serializable
data class ViewOrScrollTimeline(val sourceNodeId: Int? = null, val startOffset: Double? = null, val endOffset: Double? = null, val subjectNodeId: Int? = null, val axis: DOM.ScrollOrientation)

Timeline instance

Properties

Link copied to clipboard

Event for when an animation has been cancelled.

Link copied to clipboard

Event for each animation that has been created.

Link copied to clipboard

Event for animation that has been started.

Link copied to clipboard

Event for animation that has been updated.

Functions

Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)

Disables animation domain notifications.

Link copied to clipboard
suspend fun enable(mode: CommandMode = CommandMode.DEFAULT)

Enables animation domain notifications.

Link copied to clipboard

Returns the current time of the an animation.

Link copied to clipboard
suspend fun getPlaybackRate(mode: CommandMode = CommandMode.DEFAULT): Animation.GetPlaybackRateReturn

Gets the playback rate of the document timeline.

Link copied to clipboard
suspend fun releaseAnimations(animations: List<String>)
suspend fun releaseAnimations(args: Animation.ReleaseAnimationsParameter, mode: CommandMode = CommandMode.DEFAULT)

Releases a set of animations to no longer be manipulated.

Link copied to clipboard

Gets the remote object of the Animation.

Link copied to clipboard
suspend fun seekAnimations(args: Animation.SeekAnimationsParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun seekAnimations(animations: List<String>, currentTime: Double)

Seek a set of animations to a particular time within each animation.

Link copied to clipboard
suspend fun setPaused(args: Animation.SetPausedParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun setPaused(animations: List<String>, paused: Boolean)

Sets the paused state of a set of animations.

Link copied to clipboard
suspend fun setPlaybackRate(playbackRate: Double)
suspend fun setPlaybackRate(args: Animation.SetPlaybackRateParameter, mode: CommandMode = CommandMode.DEFAULT)

Sets the playback rate of the document timeline.

Link copied to clipboard
suspend fun setTiming(args: Animation.SetTimingParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun setTiming(animationId: String, duration: Double, delay: Double)

Sets the timing of an animation node.