diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 3ff4b95..875b1fd 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -793,5 +793,47 @@ this.interactiveDataPool.push( touchData ); }; +/** + * Destroys the interaction manager + */ +InteractionManager.prototype.destroy = function () { + this.renderer = null; + + this.mouse = null; + + this.eventData = null; + + this.interactiveDataPool = null; + + this.interactionDOMElement = null; + + this.onMouseUp = null; + this.processMouseUp = null; + + + this.onMouseDown = null; + this.processMouseDown = null; + + this.onMouseMove = null; + this.processMouseMove = null; + + this.onMouseOut = null; + this.processMouseOverOut = null; + + + this.onTouchStart = null; + this.processTouchStart = null; + + this.onTouchEnd = null; + this.processTouchEnd = null; + + this.onTouchMove = null; + this.processTouchMove = null; + + this._tempPoint = null; + + this.updateBound = null; +}; + core.WebGLRenderer.registerPlugin('interaction', InteractionManager); core.CanvasRenderer.registerPlugin('interaction', InteractionManager);