-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathAnimation.json
More file actions
183 lines (183 loc) · 8.34 KB
/
Animation.json
File metadata and controls
183 lines (183 loc) · 8.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
{
"domain": "Animation",
"description": "Domain for tracking/modifying Web Animations, as well as CSS (declarative) animations and transitions.",
"debuggableTypes": ["web-page"],
"targetTypes": ["page"],
"types": [
{
"id": "AnimationId",
"type": "string",
"description": "Unique Web Animation identifier."
},
{
"id": "AnimationState",
"type": "string",
"enum": ["ready", "delayed", "active", "canceled", "done"]
},
{
"id": "PlaybackDirection",
"type": "string",
"enum": ["normal", "reverse", "alternate", "alternate-reverse"]
},
{
"id": "FillMode",
"type": "string",
"enum": ["none", "forwards", "backwards", "both", "auto"]
},
{
"id": "Animation",
"type": "object",
"properties": [
{ "name": "animationId", "$ref": "AnimationId" },
{ "name": "name", "type": "string", "optional": true, "description": "Equal to `Animation.prototype.get id`." },
{ "name": "cssAnimationName", "type": "string", "optional": true, "description": "Equal to the corresponding `animation-name` CSS property. Should not be provided if `transitionProperty` is also provided." },
{ "name": "cssTransitionProperty", "type": "string", "optional": true, "description": "Equal to the corresponding `transition-property` CSS property. Should not be provided if `animationName` is also provided." },
{ "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "Backtrace that was captured when this `WebAnimation` was created." }
]
},
{
"id": "Effect",
"type": "object",
"properties": [
{ "name": "startDelay", "type": "number", "optional": true },
{ "name": "endDelay", "type": "number", "optional": true },
{ "name": "iterationCount", "type": "number", "optional": true, "description": "Number of iterations in the animation. <code>Infinity</code> is represented as <code>-1</code>." },
{ "name": "iterationStart", "type": "number", "optional": true, "description": "Index of which iteration to start at." },
{ "name": "iterationDuration", "type": "number", "optional": true, "description": "Total time of each iteration, measured in milliseconds." },
{ "name": "timingFunction", "type": "string", "optional": true, "description": "CSS timing function of the overall animation." },
{ "name": "playbackDirection", "$ref": "PlaybackDirection", "optional": true },
{ "name": "fillMode", "$ref": "FillMode", "optional": true },
{ "name": "keyframes", "type": "array", "items": { "$ref": "Keyframe" }, "optional": true }
]
},
{
"id": "Keyframe",
"type": "object",
"properties": [
{ "name": "offset", "type": "number", "description": "Decimal percentage [0,1] representing where this keyframe is in the entire duration of the animation." },
{ "name": "easing", "type": "string", "optional": true, "description": "CSS timing function for how the `style` is applied." },
{ "name": "style", "type": "string", "optional": true, "description": "CSS style declaration of the CSS properties that will be animated." }
]
},
{
"id": "TrackingUpdate",
"type": "object",
"properties": [
{ "name": "trackingAnimationId", "$ref": "AnimationId" },
{ "name": "animationState", "$ref": "AnimationState" },
{ "name": "nodeId", "$ref": "DOM.NodeId", "optional": true },
{ "name": "animationName", "type": "string", "optional": true, "description": "Equal to the corresponding `animation-name` CSS property. Should not be provided if `transitionProperty` is also provided." },
{ "name": "transitionProperty", "type": "string", "optional": true, "description": "Equal to the corresponding `transition-property` CSS property. Should not be provided if `animationName` is also provided." }
]
}
],
"commands": [
{
"name": "enable",
"description": "Enables Canvas domain events."
},
{
"name": "disable",
"description": "Disables Canvas domain events."
},
{
"name": "requestEffect",
"description": "Gets the `Effect` for the animation with the given `AnimationId`.",
"parameters": [
{ "name": "animationId", "$ref": "AnimationId" }
],
"returns": [
{ "name": "effect", "$ref": "Effect", "optional": true, "description": "This is omitted when there is no effect." }
]
},
{
"name": "requestEffectTarget",
"description": "Gets the `DOM.NodeId` for the target of the effect of the animation with the given `AnimationId`.",
"parameters": [
{ "name": "animationId", "$ref": "AnimationId" }
],
"returns": [
{ "name": "effectTarget", "$ref": "DOM.Styleable" }
]
},
{
"name": "resolveAnimation",
"description": "Resolves JavaScript `WebAnimation` object for given `AnimationId`.",
"parameters": [
{ "name": "animationId", "$ref": "AnimationId" },
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
],
"returns": [
{ "name": "object", "$ref": "Runtime.RemoteObject" }
]
},
{
"name": "startTracking",
"description": "Start tracking animations. This will produce a `trackingStart` event."
},
{
"name": "stopTracking",
"description": "Stop tracking animations. This will produce a `trackingComplete` event."
}
],
"events": [
{
"name": "animationCreated",
"description": "Dispatched whenever a `WebAnimation` is created.",
"parameters": [
{ "name": "animation", "$ref": "Animation" }
]
},
{
"name": "nameChanged",
"description": "Dispatched whenever `Animation.prototype.set id` is called.",
"parameters": [
{ "name": "animationId", "$ref": "AnimationId" },
{ "name": "name", "type": "string", "optional": true, "description": "Equal to `Animation.prototype.get id`." }
]
},
{
"name": "effectChanged",
"description": "Dispatched whenever the effect of any animation is changed in any way.",
"parameters": [
{ "name": "animationId", "$ref": "AnimationId" }
]
},
{
"name": "targetChanged",
"description": "Dispatched whenever the target of any effect of any animation is changed in any way.",
"parameters": [
{ "name": "animationId", "$ref": "AnimationId" }
]
},
{
"name": "animationDestroyed",
"description": "Dispatched whenever a `WebAnimation` is destroyed.",
"parameters": [
{ "name": "animationId", "$ref": "AnimationId" }
]
},
{
"name": "trackingStart",
"description": "Dispatched after `startTracking` command.",
"parameters": [
{ "name": "timestamp", "type": "number" }
]
},
{
"name": "trackingUpdate",
"description": "Fired for each phase of Web Animation.",
"parameters": [
{ "name": "timestamp", "type": "number" },
{ "name": "event", "$ref": "TrackingUpdate" }
]
},
{
"name": "trackingComplete",
"description": "Dispatched after `stopTracking` command.",
"parameters": [
{ "name": "timestamp", "type": "number" }
]
}
]
}