MCPcopy Index your code
hub / github.com/ampproject/amphtml / animate

Method animate

src/utils/animation.js:34–39  ·  view source on GitHub ↗

* Creates and starts animation with a single segment. Returns AnimationPlayer * object that can be used to monitor or control animation. * * @param {!Node} contextNode The context node. * @param {!TransitionDef<?>} transition Transition to animate. * @param {TimestampDef} duration Dur

(contextNode, transition, duration, opt_curve)

Source from the content-addressed store, hash-verified

32 * @return {!AnimationPlayer}
33 */
34 static animate(contextNode, transition, duration, opt_curve) {
35 return new Animation(contextNode)
36 .setCurve(opt_curve)
37 .add(0, transition, 1)
38 .start(duration);
39 }
40
41 /**
42 * @param {!Node} contextNode

Callers 14

BentoLightboxWithRefFunction · 0.80
animateExpandFunction · 0.80
animateCollapseFunction · 0.80
animateFixedElementsMethod · 0.80
animateCollapse_Method · 0.80
set_Method · 0.80
goMethod · 0.80
mutateNewPositionMethod · 0.80
animateScrollLeft_Method · 0.80
set_Method · 0.80
set_Method · 0.80

Calls 3

setCurveMethod · 0.80
startMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected