|
|
@@ -536,12 +536,7 @@ class TransformControls extends Controls {
|
|
|
|
|
|
this.disconnect();
|
|
|
|
|
|
- this.traverse( function ( child ) {
|
|
|
-
|
|
|
- if ( child.geometry ) child.geometry.dispose();
|
|
|
- if ( child.material ) child.material.dispose();
|
|
|
-
|
|
|
- } );
|
|
|
+ this._root.dispose();
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -811,6 +806,17 @@ class TransformControlsRoot extends Object3D {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ dispose() {
|
|
|
+
|
|
|
+ this.traverse( function ( child ) {
|
|
|
+
|
|
|
+ if ( child.geometry ) child.geometry.dispose();
|
|
|
+ if ( child.material ) child.material.dispose();
|
|
|
+
|
|
|
+ } );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
class TransformControlsGizmo extends Object3D {
|