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

Method pause

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

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

()

Source from the content-addressed store, hash-verified

516 * Tell all children entities to also pause.
517 */
518 pause () {
519 var entities;
520 var i;
521 var key;
522
523 if (!this.isPlaying) { return; }
524 this.isPlaying = false;
525
526 // Sleep all components.
527 for (key in this.components) { this.components[key].pause(); }
528
529 // Tell all child entities to pause.
530 entities = this.getChildEntities();
531 for (i = 0; i < entities.length; i++) { entities[i].pause(); }
532
533 this.emit('pause');
534 }
535
536 /**
537 * Deals with updates on entity-specific attributes (i.e., components and mixins).

Callers 11

wasd-controls.jsFile · 0.80
sound.jsFile · 0.80
animation.jsFile · 0.80
pool.jsFile · 0.80
camera.jsFile · 0.80
removeComponentMethod · 0.80
sound.test.jsFile · 0.80
a-entity.test.jsFile · 0.80
component.test.jsFile · 0.80
page-turn.jsFile · 0.80
highlight.jsFile · 0.80

Calls 2

getChildEntitiesMethod · 0.95
emitMethod · 0.80

Tested by

no test coverage detected