mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:47:44 +00:00
LibWeb: Add the AnimationEffect IDL object
This commit is contained in:
parent
e03e710d1b
commit
0df06ce273
7 changed files with 336 additions and 1 deletions
46
Userland/Libraries/LibWeb/Animations/AnimationEffect.idl
Normal file
46
Userland/Libraries/LibWeb/Animations/AnimationEffect.idl
Normal file
|
@ -0,0 +1,46 @@
|
|||
// https://www.w3.org/TR/web-animations-1/#the-effecttiming-dictionaries
|
||||
dictionary EffectTiming {
|
||||
double delay = 0;
|
||||
double endDelay = 0;
|
||||
FillMode fill = "auto";
|
||||
double iterationStart = 0.0;
|
||||
unrestricted double iterations = 1.0;
|
||||
(unrestricted double or DOMString) duration = "auto";
|
||||
PlaybackDirection direction = "normal";
|
||||
DOMString easing = "linear";
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dictdef-optionaleffecttiming
|
||||
dictionary OptionalEffectTiming {
|
||||
double delay;
|
||||
double endDelay;
|
||||
FillMode fill;
|
||||
double iterationStart;
|
||||
unrestricted double iterations;
|
||||
(unrestricted double or DOMString) duration;
|
||||
PlaybackDirection direction;
|
||||
DOMString easing;
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-fillmode-enumeration
|
||||
enum FillMode { "none", "forwards", "backwards", "both", "auto" };
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-playbackdirection-enumeration
|
||||
enum PlaybackDirection { "normal", "reverse", "alternate", "alternate-reverse" };
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-computedeffecttiming-dictionary
|
||||
dictionary ComputedEffectTiming : EffectTiming {
|
||||
unrestricted double endTime;
|
||||
unrestricted double activeDuration;
|
||||
double? localTime;
|
||||
double? progress;
|
||||
unrestricted double? currentIteration;
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-animationeffect-interface
|
||||
[Exposed=Window]
|
||||
interface AnimationEffect {
|
||||
EffectTiming getTiming();
|
||||
ComputedEffectTiming getComputedTiming();
|
||||
undefined updateTiming(optional OptionalEffectTiming timing = {});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue