Browse Source

removed unused vector3

Cedric Guillemet 4 năm trước cách đây
mục cha
commit
7ecebe77e3
1 tập tin đã thay đổi với 1 bổ sung7 xóa
  1. 1 7
      src/Cameras/arcRotateCamera.ts

+ 1 - 7
src/Cameras/arcRotateCamera.ts

@@ -500,8 +500,7 @@ export class ArcRotateCamera extends TargetCamera {
      * Defines the allowed panning axis.
      * Defines the allowed panning axis.
      */
      */
     public panningAxis: Vector3 = new Vector3(1, 1, 0);
     public panningAxis: Vector3 = new Vector3(1, 1, 0);
-    protected _localDirection: Vector3;
-    protected _transformedDirection: Vector3;
+    protected _transformedDirection: Vector3 = new Vector3();
 
 
     // Behaviors
     // Behaviors
     private _bouncingBehavior: Nullable<BouncingBehavior>;
     private _bouncingBehavior: Nullable<BouncingBehavior>;
@@ -886,11 +885,6 @@ export class ArcRotateCamera extends TargetCamera {
 
 
         // Panning inertia
         // Panning inertia
         if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) {
         if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) {
-            if (!this._localDirection) {
-                this._localDirection = Vector3.Zero();
-                this._transformedDirection = Vector3.Zero();
-            }
-
             this._viewMatrix.invertToRef(this._cameraTransformMatrix);
             this._viewMatrix.invertToRef(this._cameraTransformMatrix);
             this._transformedDirection.set(this._cameraTransformMatrix.m[0], this._cameraTransformMatrix.m[1], this._cameraTransformMatrix.m[2]);
             this._transformedDirection.set(this._cameraTransformMatrix.m[0], this._cameraTransformMatrix.m[1], this._cameraTransformMatrix.m[2]);