babylon.stereogramCamera.ts 1.2 KB

1234567891011121314151617181920212223
  1. module BABYLON {
  2. export class StereogramFreeCamera extends FreeCamera {
  3. constructor(name: string, position: Vector3, eyeSpace: number, isVertical: boolean, scene: Scene) {
  4. super(name, position, scene);
  5. this.setSubCameraMode(isVertical ? Camera.SUB_CAMERA_MODE_VERTICAL_STEREOGRAM : Camera.SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM, eyeSpace);
  6. }
  7. }
  8. export class StereogramArcRotateCamera extends ArcRotateCamera {
  9. constructor(name: string, alpha: number, beta: number, radius: number, target, eyeSpace: number, isVertical: boolean, scene:Scene) {
  10. super(name, alpha, beta, radius, target, scene);
  11. this.setSubCameraMode(isVertical ? Camera.SUB_CAMERA_MODE_VERTICAL_STEREOGRAM : Camera.SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM, eyeSpace);
  12. }
  13. }
  14. export class StereogramGamepadCamera extends GamepadCamera {
  15. constructor(name: string, position: Vector3, eyeSpace: number, isVertical: boolean, scene: Scene) {
  16. super(name, position, scene);
  17. this.setSubCameraMode(isVertical ? Camera.SUB_CAMERA_MODE_VERTICAL_STEREOGRAM : Camera.SUB_CAMERA_MODE_HORIZONTAL_STEREOGRAM, eyeSpace);
  18. }
  19. }
  20. }