|
@@ -2279,7 +2279,7 @@ class ArcballControls extends EventDispatcher {
|
|
|
this._gizmoMatrixState0.identity().setPosition( tbCenter );
|
|
|
this._gizmoMatrixState.copy( this._gizmoMatrixState0 );
|
|
|
|
|
|
- if ( this.camera.zoom != 1 ) {
|
|
|
+ if ( this.camera.zoom !== 1 ) {
|
|
|
|
|
|
//adapt gizmos size to camera zoom
|
|
|
const size = 1 / this.camera.zoom;
|
|
@@ -2294,8 +2294,23 @@ class ArcballControls extends EventDispatcher {
|
|
|
|
|
|
this._gizmoMatrixState.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale );
|
|
|
|
|
|
+ //
|
|
|
+
|
|
|
+ this._gizmos.traverse( function( object ) {
|
|
|
+
|
|
|
+ if ( object.isLine ) {
|
|
|
+
|
|
|
+ object.geometry.dispose();
|
|
|
+ object.material.dispose();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ } );
|
|
|
+
|
|
|
this._gizmos.clear();
|
|
|
|
|
|
+ //
|
|
|
+
|
|
|
this._gizmos.add( gizmoX );
|
|
|
this._gizmos.add( gizmoY );
|
|
|
this._gizmos.add( gizmoZ );
|