Explorar o código

Use readonly up vector instead of creating it all the time

michalzr %!s(int64=4) %!d(string=hai) anos
pai
achega
95dea0ad7e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      materialsLibrary/src/sky/skyMaterial.ts

+ 1 - 1
materialsLibrary/src/sky/skyMaterial.ts

@@ -308,7 +308,7 @@ export class SkyMaterial extends PushMaterial {
             this.sunPosition.y = this.distance * Math.sin(phi) * Math.sin(theta);
             this.sunPosition.z = this.distance * Math.sin(phi) * Math.cos(theta);
 
-            Quaternion.FromUnitVectorsToRef(Vector3.Up(), this.up, this._skyOrientation);
+            Quaternion.FromUnitVectorsToRef(Vector3.UpReadOnly, this.up, this._skyOrientation);
             this.sunPosition.rotateByQuaternionToRef(this._skyOrientation, this.sunPosition);
         }