dispose method

void dispose()
override

Implementation

dispose() {
  this.domElement.removeEventListener('pointerdown', this._onPointerDown);
  this.domElement.removeEventListener('pointermove', this._onPointerHover);
  this.domElement.removeEventListener('pointermove', this._onPointerMove);
  this.domElement.removeEventListener('pointerup', this._onPointerUp);

  this.traverse((child) {
    if (child.geometry) child.geometry.dispose();
    if (child.material) child.material.dispose();
  });
}