Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StereoscopicGamepadCamera

Camera used to simulate stereoscopic rendering (based on GamepadCamera)

see

https://doc.babylonjs.com/features/cameras

Hierarchy

Index

Constructors

constructor

  • Creates a new StereoscopicGamepadCamera

    Parameters

    • name: string

      defines camera name

    • position: Vector3

      defines initial position

    • interaxialDistance: number

      defines distance between each color axis

    • isStereoscopicSideBySide: boolean

      defines is stereoscopic is done side by side or over under

    • Optional scene: Scene

      defines the hosting scene

    Returns StereoscopicGamepadCamera

Properties

applyGravitySearch playground for applyGravity

applyGravity: boolean

Enable or disable gravity on the camera.

cameraDirectionSearch playground for cameraDirection

cameraDirection: Vector3

Define the current direction the camera is moving to

cameraRotationSearch playground for cameraRotation

cameraRotation: Vector2

Define the current rotation the camera is rotating to

checkCollisionsSearch playground for checkCollisions

checkCollisions: boolean

Enable or disable collisions of the camera with the rest of the scene objects.

ellipsoidSearch playground for ellipsoid

ellipsoid: Vector3

Define the collision ellipsoid of the camera. This is helpful to simulate a camera body like the player body around the camera

see

https://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#arcrotatecamera

ellipsoidOffsetSearch playground for ellipsoidOffset

ellipsoidOffset: Vector3

Define an offset for the position of the ellipsoid around the camera. This can be helpful to determine the center of the body near the gravity center of the body instead of its head.

ignoreParentScalingSearch playground for ignoreParentScaling

ignoreParentScaling: boolean

Gets or sets a boolean indicating that the scaling of the parent hierarchy will not be taken in account by the camera

inputsSearch playground for inputs

Define the input manager associated to the camera.

inverseRotationSpeedSearch playground for inverseRotationSpeed

inverseRotationSpeed: number

Speed multiplier for inverse camera panning

invertRotationSearch playground for invertRotation

invertRotation: boolean

Reverses mouselook direction to 'natural' panning as opposed to traditional direct panning

lockedTargetSearch playground for lockedTarget

lockedTarget: any

Define the current target of the camera as an object or a position.

noRotationConstraintSearch playground for noRotationConstraint

noRotationConstraint: boolean

Add constraint to the camera to prevent it to move freely in all directions and around all axis.

onCollideSearch playground for onCollide

onCollide: (collidedMesh: AbstractMesh) => void

Event raised when the camera collide with a mesh in the scene.

Type declaration

rotationSearch playground for rotation

rotation: Vector3

Define the current rotation of the camera

rotationQuaternionSearch playground for rotationQuaternion

rotationQuaternion: Quaternion

Define the current rotation of the camera as a quaternion to prevent Gimbal lock

speedSearch playground for speed

speed: number

Define the current speed of the camera

updateUpVectorFromRotationSearch playground for updateUpVectorFromRotation

updateUpVectorFromRotation: boolean

When set, the up vector of the camera will be updated by the rotation of the camera

Accessors

angularSensibility

  • get angularSensibility(): number
  • set angularSensibility(value: number): any
  • Gets the input sensibility for a mouse input. (default is 2000.0) Higher values reduce sensitivity.

    Returns number

  • Sets the input sensibility for a mouse input. (default is 2000.0) Higher values reduce sensitivity.

    Parameters

    • value: number

    Returns any

collisionMask

  • get collisionMask(): number
  • set collisionMask(mask: number): any
  • Define a collision mask to limit the list of object the camera can collide with

    Returns number

  • Define a collision mask to limit the list of object the camera can collide with

    Parameters

    • mask: number

    Returns any

gamepadAngularSensibility

  • get gamepadAngularSensibility(): number
  • set gamepadAngularSensibility(value: number): any
  • Defines the gamepad rotation sensiblity. This is the threshold from when rotation starts to be accounted for to prevent jittering.

    Returns number

  • Defines the gamepad rotation sensiblity. This is the threshold from when rotation starts to be accounted for to prevent jittering.

    Parameters

    • value: number

    Returns any

gamepadMoveSensibility

  • get gamepadMoveSensibility(): number
  • set gamepadMoveSensibility(value: number): any
  • Defines the gamepad move sensiblity. This is the threshold from when moving starts to be accounted for for to prevent jittering.

    Returns number

  • Defines the gamepad move sensiblity. This is the threshold from when moving starts to be accounted for for to prevent jittering.

    Parameters

    • value: number

    Returns any

keysDown

  • get keysDown(): number[]
  • set keysDown(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the backward move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the backward move of the camera.

    Parameters

    • value: number[]

    Returns any

keysDownward

  • get keysDownward(): number[]
  • set keysDownward(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the downward move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the downward move of the camera.

    Parameters

    • value: number[]

    Returns any

keysLeft

  • get keysLeft(): number[]
  • set keysLeft(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the left strafe move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the left strafe move of the camera.

    Parameters

    • value: number[]

    Returns any

keysRight

  • get keysRight(): number[]
  • set keysRight(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the right strafe move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the right strafe move of the camera.

    Parameters

    • value: number[]

    Returns any

keysRotateLeft

  • get keysRotateLeft(): number[]
  • set keysRotateLeft(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the left rotation move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the left rotation move of the camera.

    Parameters

    • value: number[]

    Returns any

keysRotateRight

  • get keysRotateRight(): number[]
  • set keysRotateRight(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the right rotation move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the right rotation move of the camera.

    Parameters

    • value: number[]

    Returns any

keysUp

  • get keysUp(): number[]
  • set keysUp(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the forward move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the forward move of the camera.

    Parameters

    • value: number[]

    Returns any

keysUpward

  • get keysUpward(): number[]
  • set keysUpward(value: number[]): any
  • Gets or Set the list of keyboard keys used to control the upward move of the camera.

    Returns number[]

  • Gets or Set the list of keyboard keys used to control the upward move of the camera.

    Parameters

    • value: number[]

    Returns any

target

  • Defines the target point of the camera. The camera looks towards it form the radius distance.

    Returns Vector3

  • Defines the target point of the camera. The camera looks towards it form the radius distance.

    Parameters

    Returns any

touchAngularSensibility

  • get touchAngularSensibility(): number
  • set touchAngularSensibility(value: number): any
  • Defines the touch sensibility for rotation. The higher the faster.

    Returns number

  • Defines the touch sensibility for rotation. The higher the faster.

    Parameters

    • value: number

    Returns any

touchMoveSensibility

  • get touchMoveSensibility(): number
  • set touchMoveSensibility(value: number): any
  • Defines the touch sensibility for move. The higher the faster.

    Returns number

  • Defines the touch sensibility for move. The higher the faster.

    Parameters

    • value: number

    Returns any

Methods

attachControlSearch playground for attachControl

  • attachControl(noPreventDefault?: boolean): void
  • attachControl(ignored: any, noPreventDefault?: boolean): void
  • Attach the input controls to a specific dom element to get the input from.

    Parameters

    Returns void

  • Attach the input controls to a specific dom element to get the input from.

    Parameters

    • ignored: any

      defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

    • Optional noPreventDefault: boolean

      Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) BACK COMPAT SIGNATURE ONLY.

    Returns void

detachControlSearch playground for detachControl

  • detachControl(): void
  • detachControl(ignored: any): void
  • Detach the current controls from the specified dom element.

    Returns void

  • Detach the current controls from the specified dom element.

    Parameters

    • ignored: any

      defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

    Returns void

disposeSearch playground for dispose

  • dispose(): void
  • Destroy the camera and release the current resources hold by it.

    Returns void

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Gets camera class name

    Returns string

    StereoscopicGamepadCamera

getFrontPositionSearch playground for getFrontPosition

  • getFrontPosition(distance: number): Vector3
  • Gets the position in front of the camera at a given distance.

    Parameters

    • distance: number

      The distance from the camera we want the position to be

    Returns Vector3

    the position

getTargetSearch playground for getTarget

  • Return the current target position of the camera. This value is expressed in local space.

    Returns Vector3

    the target position

setTargetSearch playground for setTarget

  • Defines the target the camera should look at.

    Parameters

    • target: Vector3

      Defines the new target as a Vector

    Returns void

storeStateSearch playground for storeState

  • Store current camera state of the camera (fov, position, rotation, etc..)

    Returns Camera

    the camera

Legend

  • Constructor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static property
  • Static method