Prechádzať zdrojové kódy

Correctly apply normal matrix to attribute

WestLangley 5 rokov pred
rodič
commit
89c4b06d3e

+ 2 - 1
examples/js/loaders/FBXLoader.js

@@ -1616,7 +1616,8 @@ THREE.FBXLoader = ( function () {
 				var normalAttribute = new THREE.Float32BufferAttribute( buffers.normal, 3 );
 
 				var normalMatrix = new THREE.Matrix3().getNormalMatrix( preTransform );
-				normalMatrix.applyToBufferAttribute( normalAttribute );
+
+				normalAttribute.applyNormalMatrix( normalMatrix );
 
 				geo.setAttribute( 'normal', normalAttribute );
 

+ 2 - 1
examples/jsm/loaders/FBXLoader.js

@@ -1664,7 +1664,8 @@ var FBXLoader = ( function () {
 				var normalAttribute = new Float32BufferAttribute( buffers.normal, 3 );
 
 				var normalMatrix = new Matrix3().getNormalMatrix( preTransform );
-				normalMatrix.applyToBufferAttribute( normalAttribute );
+
+				normalAttribute.applyNormalMatrix( normalMatrix );
 
 				geo.setAttribute( 'normal', normalAttribute );