Browse Source

Merge pull request #6249 from sebavan/master

Mini OPTIM
David Catuhe 6 years ago
parent
commit
4e7a6e640c
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/Meshes/transformNode.ts

+ 1 - 2
src/Meshes/transformNode.ts

@@ -912,12 +912,11 @@ export class TransformNode extends Node {
      * @returns the world matrix
      */
     public computeWorldMatrix(force?: boolean): Matrix {
-        let currentRenderId = this.getScene().getRenderId();
-
         if (this._isWorldMatrixFrozen && !this._isDirty) {
             return this._worldMatrix;
         }
 
+        let currentRenderId = this.getScene().getRenderId();
         if (!this._isDirty && !force && this.isSynchronized()) {
             this._currentRenderId = currentRenderId;
             return this._worldMatrix;