MCPcopy
hub / github.com/aframevr/aframe / play

Method play

src/core/a-entity.js:495–512  ·  view source on GitHub ↗

* Start dynamic behavior associated with entity such as dynamic components and animations. * Tell all children entities to also play.

()

Source from the content-addressed store, hash-verified

493 * Tell all children entities to also play.
494 */
495 play () {
496 var entities;
497 var i;
498 var key;
499
500 // Already playing.
501 if (this.isPlaying || (!this.hasLoaded && !this.isLoading)) { return; }
502 this.isPlaying = true;
503
504 // Wake up all components.
505 for (key in this.components) { this.components[key].play(); }
506
507 // Tell all child entities to play.
508 entities = this.getChildEntities();
509 for (i = 0; i < entities.length; i++) { entities[i].play(); }
510
511 this.emit('play');
512 }
513
514 /**
515 * Pause dynamic behavior associated with entity such as dynamic components and animations.

Callers 15

wasd-controls.jsFile · 0.45
sound.jsFile · 0.45
layer.jsFile · 0.45
hand-controls.jsFile · 0.45
camera.jsFile · 0.45
component.jsFile · 0.45
loadMethod · 0.45
initComponentMethod · 0.45
sound.test.jsFile · 0.45
pool.test.jsFile · 0.45
a-entity.test.jsFile · 0.45
component.test.jsFile · 0.45

Calls 2

getChildEntitiesMethod · 0.95
emitMethod · 0.80

Tested by

no test coverage detected