Jelajahi Sumber

Remove arcFollowCamera.ts/js

Fredrik Bondza 10 tahun lalu
induk
melakukan
e9d1784a42

+ 0 - 38
src/Cameras/babylon.arcFollowCamera.js

@@ -1,38 +0,0 @@
-var __extends = this.__extends || function (d, b) {
-    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
-    function __() { this.constructor = d; }
-    __.prototype = b.prototype;
-    d.prototype = new __();
-};
-var BABYLON;
-(function (BABYLON) {
-    var ArcFollowCamera = (function (_super) {
-        __extends(ArcFollowCamera, _super);
-        function ArcFollowCamera(name, alpha, beta, radius, target, scene) {
-            _super.call(this, name, BABYLON.Vector3.Zero(), scene);
-            this.alpha = alpha;
-            this.beta = beta;
-            this.radius = radius;
-            this.target = target;
-            this._radPerDeg = Math.PI / 180;
-            this._cartesianCoordinates = BABYLON.Vector3.Zero();
-            this.follow();
-        }
-        ArcFollowCamera.prototype._degToRad = function (deg) {
-            return deg * this._radPerDeg;
-        };
-        ArcFollowCamera.prototype.follow = function () {
-            this._cartesianCoordinates.x = this.radius * Math.cos(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
-            this._cartesianCoordinates.y = this.radius * Math.sin(this._degToRad(this.beta));
-            this._cartesianCoordinates.z = this.radius * Math.sin(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
-            this.position = this.target.position.add(this._cartesianCoordinates);
-            this.setTarget(this.target.position);
-        };
-        ArcFollowCamera.prototype._checkInputs = function () {
-            _super.prototype._checkInputs.call(this);
-            this.follow();
-        };
-        return ArcFollowCamera;
-    })(BABYLON.TargetCamera);
-    BABYLON.ArcFollowCamera = ArcFollowCamera;
-})(BABYLON || (BABYLON = {}));

+ 0 - 30
src/Cameras/babylon.arcFollowCamera.ts

@@ -1,30 +0,0 @@
-module BABYLON {
-    export class ArcFollowCamera extends TargetCamera {
-
-        private _radPerDeg:number = Math.PI / 180;
-        private _cartesianCoordinates:Vector3 = Vector3.Zero();
-
-        constructor(name:string, public alpha:number, public beta:number, public radius:number, public target:AbstractMesh, scene:Scene) {
-            super(name, Vector3.Zero(), scene);
-            this.follow();
-        }
-
-        private _degToRad(deg) {
-            return deg * this._radPerDeg;
-        }
-
-        private follow():void {
-            this._cartesianCoordinates.x = this.radius * Math.cos(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
-            this._cartesianCoordinates.y = this.radius * Math.sin(this._degToRad(this.beta));
-            this._cartesianCoordinates.z = this.radius * Math.sin(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
-
-            this.position = this.target.position.add(this._cartesianCoordinates);
-            this.setTarget(this.target.position);
-        }
-
-        public _checkInputs():void {
-            super._checkInputs();
-            this.follow();
-        }
-    }
-}