Просмотр исходного кода

improve SkinnedMesh.boneTransform docs (#23422)

makc 4 лет назад
Родитель
Сommit
d2fae357d7
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      docs/api/en/objects/SkinnedMesh.html

+ 7 - 1
docs/api/en/objects/SkinnedMesh.html

@@ -148,9 +148,15 @@
 		This method sets the skinned mesh in the rest pose (resets the pose).
 		This method sets the skinned mesh in the rest pose (resets the pose).
 		</p>
 		</p>
 
 
-		<h3>[method:Vector3 boneTransform]( [index:Integer], [target:Vector3] )</h3>
+		<h3>[method:Vector3 boneTransform]( [param:Integer index], [param:Vector3 target] )</h3>
 		<p>
 		<p>
 		Calculates the position of the vertex at the given index relative to the current bone transformations.
 		Calculates the position of the vertex at the given index relative to the current bone transformations.
+		Target vector must be initialized with the vetrex coordinates prior to the transformation:
+		<code>
+const target = new THREE.Vector3();
+target.fromBufferAttribute( mesh.geometry.attributes.position, index );
+mesh.boneTransform( index, target );
+		</code>
 		</p>
 		</p>
 
 
 		<h2>Source</h2>
 		<h2>Source</h2>

粤ICP备19079148号