Documentation
¶
Overview ¶
Package animation provides type definitions for use with the Chrome Animation protocol
https://chromedevtools.github.io/devtools-protocol/tot/Animation/
Index ¶
- Variables
- type Animation
- type CanceledEvent
- type CreatedEvent
- type DisableResult
- type Effect
- type EnableResult
- type GetCurrentTimeParams
- type GetCurrentTimeResult
- type GetPlaybackRateResult
- type KeyframeStyle
- type KeyframesRule
- type ReleaseAnimationsParams
- type ReleaseAnimationsResult
- type ResolveAnimationParams
- type ResolveAnimationResult
- type SeekAnimationsParams
- type SeekAnimationsResult
- type SetPausedParams
- type SetPausedResult
- type SetPlaybackRateParams
- type SetPlaybackRateResult
- type SetTimingParams
- type SetTimingResult
- type StartedEvent
- type TypeEnum
Constants ¶
This section is empty.
Variables ¶
var Type = typeEnum{
CSSTransition: typeCSSTransition,
CSSAnimation: typeCSSAnimation,
WebAnimation: typeWebAnimation,
}
Type provides named acces to the TypeEnum values.
Functions ¶
This section is empty.
Types ¶
type Animation ¶
type Animation struct {
// Animation's id.
ID string `json:"id"`
// Animation's name.
Name string `json:"name"`
// Animation's internal paused state.
PausedState bool `json:"pausedState"`
// Animation's play state.
PlayState string `json:"playState"`
// Animation's playback rate.
PlaybackRate float64 `json:"playbackRate"`
// Animation's start time.
StartTime int64 `json:"startTime"`
// Animation's current time.
CurrentTime int64 `json:"currentTime"`
// Animation type of Animation. Allowed values:
// - AnimationType.CSSTransition
// - AnimationType.CSSAnimation
// - AnimationType.WebAnimation
Type TypeEnum `json:"type"`
// Optional. Animation's source animation node.
Source *Effect `json:"source,omitempty"`
// Optional. A unique ID for Animation representing the sources that
// triggered this CSS animation/transition.
CSSID string `json:"cssId,omitempty"`
}
Animation instance.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#type-Animation
type CanceledEvent ¶
type CanceledEvent struct {
// ID of the animation that was cancelled.
ID string `json:"id"`
// Error information related to this event
Err error `json:"-"`
}
CanceledEvent represents Animation.animationCanceled event data.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationCanceled
type CreatedEvent ¶
type CreatedEvent struct {
// ID of the animation that was created.
ID string `json:"id"`
// Error information related to this event
Err error `json:"-"`
}
CreatedEvent represents Animation.animationCreated event data.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationCreated
type DisableResult ¶
type DisableResult struct {
// Error information related to executing this method
Err error `json:"-"`
}
DisableResult represents the result of calls to Animation.disable.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-disable
type Effect ¶
type Effect struct {
// Effect's delay.
Delay int64 `json:"delay"`
// Effect's end delay.
EndDelay int64 `json:"endDelay"`
// Effect's iteration start.
IterationStart int64 `json:"iterationStart"`
// Effect's iterations.
Iterations int64 `json:"iterations"`
// Effect's iteration duration.
Duration int64 `json:"duration"`
// Effect's playback direction.
Direction string `json:"direction"`
// Effect's fill mode.
Fill string `json:"fill"`
// Optional. Effect's target node.
BackendNodeID dom.BackendNodeID `json:"backendNodeId,omitempty"`
// Optional. Effect's keyframes.
KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty"`
// Effect's timing function.
Easing string `json:"easing"`
}
Effect instance
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#type-AnimationEffect
type EnableResult ¶
type EnableResult struct {
// Error information related to executing this method
Err error `json:"-"`
}
EnableResult represents the result of calls to Animation.enable.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-enable
type GetCurrentTimeParams ¶
type GetCurrentTimeParams struct {
// ID of animation.
ID string `json:"id"`
}
GetCurrentTimeParams represents Animation.getCurrentTime parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-getCurrentTime
type GetCurrentTimeResult ¶
type GetCurrentTimeResult struct {
// ID of animation.
CurrentTime int64 `json:"currentTime"`
// Error information related to executing this method
Err error `json:"-"`
}
GetCurrentTimeResult represents the result of calls to Animation.getCurrentTime.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-getCurrentTime
type GetPlaybackRateResult ¶
type GetPlaybackRateResult struct {
// Playback rate for animations on page.
PlaybackRate float64 `json:"playbackRate"`
// Error information related to executing this method
Err error `json:"-"`
}
GetPlaybackRateResult represents the result of calls to Animation.getPlaybackRate.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-getPlaybackRate
type KeyframeStyle ¶
type KeyframeStyle struct {
// Keyframe's time offset.
Offset string `json:"offset"`
// Effect's timing function.
Easing string `json:"easing"`
}
KeyframeStyle is the keyframe Style
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#type-KeyframeStyle
type KeyframesRule ¶
type KeyframesRule struct {
// Optional. CSS keyframed animation's name.
Name string `json:"name,omitempty"`
// List of animation keyframes.
Keyframes []*KeyframeStyle `json:"keyframes"`
}
KeyframesRule is the keyframes rule
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#type-KeyframesRule
type ReleaseAnimationsParams ¶
type ReleaseAnimationsParams struct {
// List of animation ids to seek.
Animations []string `json:"animations"`
}
ReleaseAnimationsParams represents Animation.releaseAnimations parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-releaseAnimations
type ReleaseAnimationsResult ¶
type ReleaseAnimationsResult struct {
// Error information related to executing this method
Err error `json:"-"`
}
ReleaseAnimationsResult represents the result of calls to Animation.releaseAnimations.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-releaseAnimations
type ResolveAnimationParams ¶
type ResolveAnimationParams struct {
// Animation ID.
AnimationID string `json:"animationId"`
}
ResolveAnimationParams represents Animation.resolveAnimation parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-resolveAnimation
type ResolveAnimationResult ¶
type ResolveAnimationResult struct {
// Corresponding remote object.
RemoteObject *runtime.RemoteObject `json:"remoteObject"`
// Error information related to executing this method
Err error `json:"-"`
}
ResolveAnimationResult represents the result of calls to Animation.resolveAnimation.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-resolveAnimation
type SeekAnimationsParams ¶
type SeekAnimationsParams struct {
// List of animation ids to seek.
Animations []string `json:"animations"`
// Set the current time of each animation.
CurrentTime int64 `json:"currentTime"`
}
SeekAnimationsParams represents Animation.seekAnimations parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-seekAnimations
type SeekAnimationsResult ¶
type SeekAnimationsResult struct {
// Error information related to executing this method
Err error `json:"-"`
}
SeekAnimationsResult represents the result of calls to Animation.seekAnimations.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-seekAnimations
type SetPausedParams ¶
type SetPausedParams struct {
// Animations to set the pause state of.
Animations []string `json:"animations"`
// Paused state to set to.
Paused bool `json:"paused"`
}
SetPausedParams represents Animation.setPaused parameters
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-setPaused
type SetPausedResult ¶
type SetPausedResult struct {
// Error information related to executing this method
Err error `json:"-"`
}
SetPausedResult represents the result of calls to Animation.setPaused.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-setPaused
type SetPlaybackRateParams ¶
type SetPlaybackRateParams struct {
// Playback rate for animations on page.
PlaybackRate int64 `json:"playbackRate"`
}
SetPlaybackRateParams represents Animation.setPlaybackRate parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-setPlaybackRate
type SetPlaybackRateResult ¶
type SetPlaybackRateResult struct {
// Error information related to executing this method
Err error `json:"-"`
}
SetPlaybackRateResult represents the result of calls to Animation.setPlaybackRate.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-setPlaybackRate
type SetTimingParams ¶
type SetTimingParams struct {
// Animation ID.
AnimationID string `json:"animationId"`
// Duration of the animation.
Duration int64 `json:"duration"`
// Delay of the animation.
Delay int64 `json:"delay"`
}
SetTimingParams represents Animation.setTiming parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-setTiming
type SetTimingResult ¶
type SetTimingResult struct {
// Error information related to executing this method
Err error `json:"-"`
}
SetTimingResult represents the result of calls to Animation.setTiming.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#method-setTiming
type StartedEvent ¶
type StartedEvent struct {
// Animation that was started.
Animation *Animation `json:"animation"`
// Error information related to this event
Err error `json:"-"`
}
StartedEvent represents Animation.animationStarted event data.
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#event-animationStarted
type TypeEnum ¶
type TypeEnum int
TypeEnum represents the type of Animation. Allowed values:
- Type.CSSTransition "CSSTransition"
- Type.CSSAnimation "CSSAnimation"
- Type.WebAnimation "WebAnimation"
https://chromedevtools.github.io/devtools-protocol/tot/Animation/#type-Animation
func (TypeEnum) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*TypeEnum) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler