Selaa lähdekoodia

SkinnedMesh: Use `getVertexPosition()` in bounding volume methods. (#26913)

Michael Herzog 1 vuosi sitten
vanhempi
commit
39db0a40fe
1 muutettua tiedostoa jossa 2 lisäystä ja 4 poistoa
  1. 2 4
      src/objects/SkinnedMesh.js

+ 2 - 4
src/objects/SkinnedMesh.js

@@ -54,8 +54,7 @@ class SkinnedMesh extends Mesh {
 
 
 		for ( let i = 0; i < positionAttribute.count; i ++ ) {
 		for ( let i = 0; i < positionAttribute.count; i ++ ) {
 
 
-			_vertex.fromBufferAttribute( positionAttribute, i );
-			this.applyBoneTransform( i, _vertex );
+			this.getVertexPosition( i, _vertex );
 			this.boundingBox.expandByPoint( _vertex );
 			this.boundingBox.expandByPoint( _vertex );
 
 
 		}
 		}
@@ -78,8 +77,7 @@ class SkinnedMesh extends Mesh {
 
 
 		for ( let i = 0; i < positionAttribute.count; i ++ ) {
 		for ( let i = 0; i < positionAttribute.count; i ++ ) {
 
 
-			_vertex.fromBufferAttribute( positionAttribute, i );
-			this.applyBoneTransform( i, _vertex );
+			this.getVertexPosition( i, _vertex );
 			this.boundingSphere.expandByPoint( _vertex );
 			this.boundingSphere.expandByPoint( _vertex );
 
 
 		}
 		}