Преглед на файлове

Maintain consistent nomenclature (#25178)

WestLangley преди 2 години
родител
ревизия
db1a527d35
променени са 2 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 2 2
      docs/api/en/objects/Mesh.html
  2. 4 4
      src/objects/Mesh.js

+ 2 - 2
docs/api/en/objects/Mesh.html

@@ -72,9 +72,9 @@
 		<h3>[method:Mesh clone]()</h3>
 		<h3>[method:Mesh clone]()</h3>
 		<p>Returns a clone of this [name] object and its descendants.</p>
 		<p>Returns a clone of this [name] object and its descendants.</p>
 
 
-    <h3>[method:Vector3 getVertexPosition]( [param:Integer vert], [param:Vector3 target] )</h3>
+		<h3>[method:Vector3 getVertexPosition]( [param:Integer index], [param:Vector3 target] )</h3>
 		<p>
 		<p>
-		Get the current position of the indicated vertex in local space, taking into account the
+		Get the local-space position of the vertex at the given index, taking into account the
 		current animation state of both morph targets and skinning.
 		current animation state of both morph targets and skinning.
 		</p>
 		</p>
 
 

+ 4 - 4
src/objects/Mesh.js

@@ -98,14 +98,14 @@ class Mesh extends Object3D {
 
 
 	}
 	}
 
 
-	getVertexPosition( vert, target ) {
+	getVertexPosition( index, target ) {
 
 
 		const geometry = this.geometry;
 		const geometry = this.geometry;
 		const position = geometry.attributes.position;
 		const position = geometry.attributes.position;
 		const morphPosition = geometry.morphAttributes.position;
 		const morphPosition = geometry.morphAttributes.position;
 		const morphTargetsRelative = geometry.morphTargetsRelative;
 		const morphTargetsRelative = geometry.morphTargetsRelative;
 
 
-		target.fromBufferAttribute( position, vert );
+		target.fromBufferAttribute( position, index );
 
 
 		const morphInfluences = this.morphTargetInfluences;
 		const morphInfluences = this.morphTargetInfluences;
 
 
@@ -120,7 +120,7 @@ class Mesh extends Object3D {
 
 
 				if ( influence === 0 ) continue;
 				if ( influence === 0 ) continue;
 
 
-				_tempA.fromBufferAttribute( morphAttribute, vert );
+				_tempA.fromBufferAttribute( morphAttribute, index );
 
 
 				if ( morphTargetsRelative ) {
 				if ( morphTargetsRelative ) {
 
 
@@ -140,7 +140,7 @@ class Mesh extends Object3D {
 
 
 		if ( this.isSkinnedMesh ) {
 		if ( this.isSkinnedMesh ) {
 
 
-			this.boneTransform( vert, target );
+			this.boneTransform( index, target );
 
 
 		}
 		}