MCPcopy Index your code
hub / github.com/aframevr/aframe / wrapPause

Function wrapPause

src/core/component.js:720–731  ·  view source on GitHub ↗

* Wrapper for defined pause method. * Pause component by removing tick behavior and calling user's pause method. * * @param {function} pauseMethod * @returns {function}

(pauseMethod)

Source from the content-addressed store, hash-verified

718 * @returns {function}
719 */
720function wrapPause (pauseMethod) {
721 return function pause () {
722 var sceneEl = this.el.sceneEl;
723 if (!this.isPlaying) { return; }
724 pauseMethod.call(this);
725 this.isPlaying = false;
726 this.eventsDetach();
727 // Remove tick behavior.
728 if (!hasBehavior(this)) { return; }
729 sceneEl.removeBehavior(this);
730 };
731}
732
733/**
734 * Wrapper for defined play method.

Callers 1

registerComponentFunction · 0.85

Calls 2

hasBehaviorFunction · 0.85
removeBehaviorMethod · 0.80

Tested by

no test coverage detected