Search completed in 1.20 seconds.
Using the Web Animations API - Web APIs
We can divide her duration in half to get the midpoint for her animation's timeline, setting her to be normal height. Now we can reverse and play her animation in either direction to make her grow smaller or larger! And we can do the same thing when setting the cake and bottle durations: var drinking = document.getElementById('liquid').animat...
...s Animation.effect property, which returns an object containing all the details of the effect(s) active on Alice: aliceChange.currentTime = aliceChange.effect.getComputedTiming().duration / 2; effect lets us access the animation's keyframes and timing properties -- aliceChange.effect.getComputedTiming() points to Alice's timing object (which is of type
ComputedEffectTiming) -- this contains her
ComputedEffectTiming.duration. We can divide her duration in half to get the midpoint for her animation's timeline, setting her to be normal height. Now we can reverse and play her animation in either direction to make her grow smaller or larger! And we can do the same thing when setting the cake and bottle durations: var drinking = document.getElementById('liquid').animate( [ { height: '100%' }, { height: '0' ...
AnimationEffect.getComputedTiming() - Web APIs
of the iteration duration. If EffectTiming.duration is the string auto, this attribute will return 0. fill The auto value is replaced with the appropriate EffectTiming.fill value. These values are comparable to the computed styles of an Element returned using window.getComputedStyle(elem). Syntax var currentTimeValues = animation.getComputedTiming(); Parameters None. Return Value A
ComputedEffectTiming dictionary object, which contains the following properties: endTime The end time of the animation in milliseconds from the animation's start (if the KeyframeEffect is associated with an Animation). (Also includes EffectTiming.endDelay in that calculation.) activeDuration The length of time in milliseconds that the animation's effects will run. This is equal to the iteration duration multipl...