Skip to content
Snippets Groups Projects
Commit 89058ea2 authored by netpro2k's avatar netpro2k
Browse files

Cleanup sticky objects

parent 6dbca03e
No related branches found
No related tags found
No related merge requests found
......@@ -12,11 +12,20 @@ AFRAME.registerComponent("sticky-object", {
this._onGrab = this._onGrab.bind(this);
this._onRelease = this._onRelease.bind(this);
this._onBodyLoaded = this._onBodyLoaded.bind(this);
},
play() {
this.el.addEventListener("grab-start", this._onGrab);
this.el.addEventListener("grab-end", this._onRelease);
this.el.addEventListener("body-loaded", this._onBodyLoaded);
},
pause() {
this.el.removeEventListener("grab-start", this._onGrab);
this.el.removeEventListener("grab-end", this._onRelease);
this.el.removeEventListener("body-loaded", this._onBodyLoaded);
},
setLocked(locked) {
if (!NAF.utils.isMine(this.el)) return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment