MCPcopy
hub / github.com/spritejs/spritejs / animate

Method animate

src/node/node.js:212–224  ·  view source on GitHub ↗
(frames, timing)

Source from the content-addressed store, hash-verified

210 }
211
212 animate(frames, timing) {
213 const animation = new Animation(this, frames, timing);
214 if(this.effects) animation.applyEffects(this.effects);
215 if(this.layer) {
216 animation.baseTimeline = this.layer.timeline;
217 animation.play();
218 animation.finished.then(() => {
219 this[_animations].delete(animation);
220 });
221 }
222 this[_animations].add(animation);
223 return animation;
224 }
225
226 attr(...args) {
227 if(args.length === 0) return this.attributes[attributes];

Callers 2

node.jsFile · 0.45
attrMethod · 0.45

Calls 4

applyEffectsMethod · 0.95
playMethod · 0.95
deleteMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected