Skip to content

Commit

Permalink
Camera files created and updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jroblak committed Oct 8, 2013
1 parent 359dfe2 commit 36b5faa
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 48 deletions.
29 changes: 29 additions & 0 deletions Typescript/Cameras/babylon.arcRotateCamera.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/// <reference path="../babylon.d.ts" />

declare module BABYLON {
class ArcRotateCamera extends Camera {
alpha: number;
beta: number;
radius: number;
target: Vector3;

_keys: number[];
keysUp: number[];
keysDown: number[];
keysLeft: number[];
keysRight: number[];
_viewMatrix: Matrix;

constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene);

inertialAlphaOffset: number;
interialBetaOffset: number;
lowerAlphaLimit: number;
upperAlphaLimit: number;
lowerBetaLimit: number;
upperBetaLimit: number;
lowerRadiusLimit: number;
upperRadiusLimit: number;
setPosition(position: Vector3): void;
}
}
56 changes: 8 additions & 48 deletions Typescript/Cameras/babylon.camera.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,23 @@ declare module BABYLON {

constructor(name: string, position: Vector3, scene: Scene);

static PERSPECTIVE_CAMERA: number;
static ORTHOGRAPHIC_CAMERA: number;

fov: number;
orthoLeft: number;
orthoRight: number;
orthoBottom: number;
orthoTop: number;
minZ: number;
maxZ: number;
intertia: number;
mode: number;

attachControl(canvas: HTMLCanvasElement): void;
detachControl(canvas: HTMLCanvasElement): void;
_update();
getViewMatrix(): Matrix;
getProjectionMatrix(): Matrix;
}

class FreeCamera extends Camera {
cameraDirection: Vector3;
cameraRotation: Vector2;
rotation: Vector3;
ellipsoid: Vector3;
_keys: number[];
keysUp: number[];
keysDown: number[];
keysLeft: number[];
keysRight: number[];
_collider: Collider;
_needsMoveForGravity: bool;
animations: Animation[];

constructor(name: string, position: Vector3, scene: Scene);

speed: number;
checkCollisions: bool;
applyGravity: bool;

_computeLocalCameraSpeed(): number;
setTarget(target: Vector3): void;
_collideWithWorld(velocity: Vector3): void;
_checkInputs();
}

class TouchCamera extends FreeCamera {
_offsetX: number;
_offsetY: number;
_pointerCount: number;
_pointerPressed: number[];

constructor(name: string, position: Vector3, scene: Scene);
}

class ArcRotateCamera extends Camera {
alpha: number;
beta: number;
radius: number;
target: Vector3;

constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene);

inertialAlphaOffset: number;
interialBetaOffset: number;
setPosition(position: Vector3): void;
}
}
17 changes: 17 additions & 0 deletions Typescript/Cameras/babylon.deviceOrientationCamera.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/// <reference path="../babylon.d.ts" />

declare module BABYLON {
class DeviceOrientationCamera extends FreeCamera {
angularSensibility: number;
moveSensibility: number;

constructor(name: string, position: Vector3, scene: Scene);

_offsetX: number;
_offsetY: number;
_orientationGamma: number;
_orientationBeta: number;
_initialOrientationGamma: number;
_initialOrientationBeta: number;
}
}
29 changes: 29 additions & 0 deletions Typescript/Cameras/babylon.freeCamera.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/// <reference path="../babylon.d.ts" />

declare module BABYLON {
class FreeCamera extends Camera {
cameraDirection: Vector3;
cameraRotation: Vector2;
rotation: Vector3;
ellipsoid: Vector3;
_keys: number[];
keysUp: number[];
keysDown: number[];
keysLeft: number[];
keysRight: number[];
_collider: Collider;
_needsMoveForGravity: boolean;
animations: Animation[];

constructor(name: string, position: Vector3, scene: Scene);

speed: number;
checkCollisions: boolean;
applyGravity: boolean;

_computeLocalCameraSpeed(): number;
setTarget(target: Vector3): void;
_collideWithWorld(velocity: Vector3): void;
_checkInputs();
}
}
14 changes: 14 additions & 0 deletions Typescript/Cameras/babylon.touchCamera.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// <reference path="../babylon.d.ts" />

declare module BABYLON {
class TouchCamera extends FreeCamera {
_offsetX: number;
_offsetY: number;
_pointerCount: number;
_pointerPressed: number[];
angularSensibility: number;
moveSensibility: number;

constructor(name: string, position: Vector3, scene: Scene);
}
}

0 comments on commit 36b5faa

Please sign in to comment.