Parcourir la source

TransformControls: Rename `getGizmo()` to `getHelper()`. (#29398)

Michael Herzog il y a 1 semaine
Parent
commit
8eb25264dd

+ 2 - 2
docs/examples/en/controls/TransformControls.html

@@ -151,9 +151,9 @@
 			Removes the current 3D object from the controls and makes the helper UI invisible.
 		</p>
 
-		<h3>[method:Object3D getGizmo] ()</h3>
+		<h3>[method:Object3D getHelper] ()</h3>
 		<p>
-			Returns the visual representation of the controls. Add the gizmo to your scene to visually transform the attached 
+			Returns the visual representation of the controls. Add the helper to your scene to visually transform the attached 
 			3D object.
 		</p>
 

+ 1 - 1
editor/js/Viewport.js

@@ -142,7 +142,7 @@ function Viewport( editor ) {
 
 	} );
 
-	sceneHelpers.add( transformControls.getGizmo() );
+	sceneHelpers.add( transformControls.getHelper() );
 
 	//
 

+ 1 - 1
examples/jsm/controls/TransformControls.js

@@ -192,7 +192,7 @@ class TransformControls extends Controls {
 
 	}
 
-	getGizmo() {
+	getHelper() {
 
 		return this._root;
 

+ 1 - 1
examples/misc_controls_transform.html

@@ -89,7 +89,7 @@
 
 				control.attach( mesh );
 
-				const gizmo = control.getGizmo();
+				const gizmo = control.getHelper();
 				scene.add( gizmo );
 
 				window.addEventListener( 'resize', onWindowResize );

+ 1 - 1
examples/webgl_animation_skinning_ik.html

@@ -151,7 +151,7 @@
 			transformControls.showX = false;
 			transformControls.space = 'world';
 			transformControls.attach( OOI.target_hand_l );
-			scene.add( transformControls.getGizmo() );
+			scene.add( transformControls.getHelper() );
 
 			// disable orbitControls while using transformControls
 			transformControls.addEventListener( 'mouseDown', () => orbitControls.enabled = false );

+ 1 - 1
examples/webgl_geometry_spline_editor.html

@@ -145,7 +145,7 @@
 					controls.enabled = ! event.value;
 
 				} );
-				scene.add( transformControl.getGizmo() );
+				scene.add( transformControl.getHelper() );
 
 				transformControl.addEventListener( 'objectChange', function () {
 

+ 1 - 1
examples/webgl_modifier_curve.html

@@ -191,7 +191,7 @@
 
 						const target = intersects[ 0 ].object;
 						control.attach( target );
-						scene.add( control.getGizmo() );
+						scene.add( control.getHelper() );
 
 					}
 

+ 1 - 1
examples/webgl_modifier_curve_instanced.html

@@ -221,7 +221,7 @@
 
 						const target = intersects[ 0 ].object;
 						control.attach( target );
-						scene.add( control.getGizmo() );
+						scene.add( control.getHelper() );
 
 					}
 

+ 2 - 2
examples/webgl_shadowmap_progressive.html

@@ -76,7 +76,7 @@
 
 				} );
 				control.attach( lightOrigin );
-				scene.add( control.getGizmo() );
+				scene.add( control.getHelper() );
 
 				// create 8 directional lights to speed up the convergence
 				for ( let l = 0; l < lightCount; l ++ ) {
@@ -142,7 +142,7 @@
 
 					} );
 					control2.attach( object );
-					scene.add( control2.getGizmo() );
+					scene.add( control2.getHelper() );
 					const lightTarget = new THREE.Group();
 					lightTarget.position.set( 0, 20, 0 );
 					for ( let l = 0; l < dirLights.length; l ++ ) {

+ 1 - 1
examples/webgpu_tsl_compute_attractors_particles.html

@@ -118,7 +118,7 @@
 					attractor.controls.attach( attractor.reference );
 					attractor.controls.visible = true;
 					attractor.controls.enabled = attractor.controls.visible;
-					scene.add( attractor.controls.getGizmo() );
+					scene.add( attractor.controls.getHelper() );
 			
 					attractor.controls.addEventListener( 'dragging-changed', ( event ) => {
 

+ 1 - 1
examples/webxr_xr_controls_transform.html

@@ -162,7 +162,7 @@
 
 				controls = new TransformControls( camera, renderer.domElement );
 				controls.attach( group.children[ 0 ] );
-				scene.add( controls.getGizmo() );
+				scene.add( controls.getHelper() );
 
 				//