瀏覽代碼

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