Browse Source

Merge pull request #2

Apply cachedTransform matrix
alex-lancer 4 years ago
parent
commit
58de2ed629
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/three/TilesRenderer.js

+ 4 - 2
src/three/TilesRenderer.js

@@ -617,10 +617,12 @@ export class TilesRenderer extends TilesRendererBase {
 			// rotation fix which is why "multiply" happens here.
 			// rotation fix which is why "multiply" happens here.
 			if ( extension !== 'pnts' ) {
 			if ( extension !== 'pnts' ) {
 
 
-				scene.matrix.multiply( tempMat ).premultiply( cachedTransform );
-				scene.matrix.decompose( scene.position, scene.quaternion, scene.scale );
+				scene.matrix.multiply( tempMat );
 
 
 			}
 			}
+
+			scene.matrix.premultiply( cachedTransform );
+			scene.matrix.decompose( scene.position, scene.quaternion, scene.scale );
 			scene.traverse( c => {
 			scene.traverse( c => {
 
 
 				c[ INITIAL_FRUSTUM_CULLED ] = c.frustumCulled;
 				c[ INITIAL_FRUSTUM_CULLED ] = c.frustumCulled;