ladybird/Userland/Libraries/LibWeb/Animations/AnimationEffect.idl
2024-01-18 14:00:06 +01:00

47 lines
1.5 KiB
Plaintext

// 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 = {});
};