AnaglyphFreeCamera

Camera used to simulate anaglyphic rendering (based on FreeCamera)

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates a new AnaglyphFreeCamera

    Parameters

    • name: string

      defines camera name

    • position: Vector3

      defines initial position

    • interaxialDistance: number

      defines distance between each color axis

    • scene: Scene

      defines the hosting scene

    Returns AnaglyphFreeCamera

Properties

angularSensibility

angularSensibility: number

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

animationPropertiesOverride

animationPropertiesOverride: Nullable<AnimationPropertiesOverride>

Gets or sets the animation properties override

animations

animations: Animation[]

Gets a list of Animations associated with the node

applyGravity

applyGravity: boolean

behaviors

behaviors: Behavior<Node>[]

Gets the list of attached behaviors

see

http://doc.babylonjs.com/features/behaviour

cameraDirection

cameraDirection: Vector3

cameraRigMode

cameraRigMode: number

cameraRotation

cameraRotation: Vector2

checkCollisions

checkCollisions: boolean

collisionMask

collisionMask: number

customRenderTargets

customRenderTargets: RenderTargetTexture[]

doNotSerialize

doNotSerialize: boolean

Gets or sets a boolean used to define if the node must be serialized

ellipsoid

ellipsoid: Vector3

ellipsoidOffset

ellipsoidOffset: Vector3

fov

fov: number

FOV is set in Radians. (default is 0.8)

fovMode

fovMode: number

fovMode sets the camera frustum bounds to the viewport bounds. (default is FOVMODE_VERTICAL_FIXED)

globalPosition

globalPosition: Vector3

id

id: string

Gets or sets the id of the node

inertia

inertia: number

inputs

interaxialDistance

interaxialDistance: number

isIntermediate

isIntermediate: boolean

isStereoscopicSideBySide

isStereoscopicSideBySide: boolean

keysDown

keysDown: number[]

keysLeft

keysLeft: number[]

keysRight

keysRight: number[]

keysUp

keysUp: number[]

layerMask

layerMask: number

Restricts the camera to viewing objects with the same layerMask. A camera with a layerMask of 1 will render mesh.layerMask & camera.layerMask!== 0

leftCamera

leftCamera: Nullable<FreeCamera>

lockedTarget

lockedTarget: any

maxZ

maxZ: number

metadata

metadata: any

Gets or sets an object used to store user defined information for the node

minZ

minZ: number

mode

mode: number

name

name: string

Gets or sets the name of the node

noRotationConstraint

noRotationConstraint: boolean

onAfterCheckInputsObservable

onAfterCheckInputsObservable: Observable<Camera>

onCollide

onCollide: function

Type declaration

onDispose

onDispose: function

Sets a callback that will be raised when the node will be disposed

Type declaration

    • (): void
    • Returns void

onDisposeObservable

onDisposeObservable: Observable<Node>

An event triggered when the mesh is disposed

onProjectionMatrixChangedObservable

onProjectionMatrixChangedObservable: Observable<Camera>

onReady

onReady: function

Callback raised when the node is ready to be used

Type declaration

    • (node: Node): void
    • Parameters

      Returns void

onRestoreStateObservable

onRestoreStateObservable: Observable<Camera>

onViewMatrixChangedObservable

onViewMatrixChangedObservable: Observable<Camera>

orthoBottom

orthoBottom: Nullable<number>

orthoLeft

orthoLeft: Nullable<number>

orthoRight

orthoRight: Nullable<number>

orthoTop

orthoTop: Nullable<number>

parent

parent: Nullable<Node>

Gets or sets the parent of the node

position

position: Vector3

rigCameras

rigCameras: Camera[]

rigPostProcess

rigPostProcess: Nullable<PostProcess>

rightCamera

rightCamera: Nullable<FreeCamera>

rotation

rotation: Vector3

rotationQuaternion

rotationQuaternion: Quaternion

speed

speed: number

state

state: string

Gets or sets a string used to store user defined state for the node

uniqueId

uniqueId: number

Gets or sets the unique id of the node

upVector

upVector: Vector3

The vector the camera should consider as up. (default is Vector3(0, 1, 0) aka Vector3.Up())

viewport

viewport: Viewport

Static FOVMODE_HORIZONTAL_FIXED

FOVMODE_HORIZONTAL_FIXED: number

This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.

Static FOVMODE_VERTICAL_FIXED

FOVMODE_VERTICAL_FIXED: number

This is the default FOV mode for perspective cameras. This setting aligns the upper and lower bounds of the viewport to the upper and lower bounds of the camera frustum.

Static ForceAttachControlToAlwaysPreventDefault

ForceAttachControlToAlwaysPreventDefault: boolean

Static ORTHOGRAPHIC_CAMERA

ORTHOGRAPHIC_CAMERA: number

Static PERSPECTIVE_CAMERA

PERSPECTIVE_CAMERA: number

Static RIG_MODE_NONE

RIG_MODE_NONE: number

Static RIG_MODE_STEREOSCOPIC_ANAGLYPH

RIG_MODE_STEREOSCOPIC_ANAGLYPH: number

Static RIG_MODE_STEREOSCOPIC_OVERUNDER

RIG_MODE_STEREOSCOPIC_OVERUNDER: number

Static RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED

RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED: number

Static RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL

RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL: number

Static RIG_MODE_VR

RIG_MODE_VR: number

Static RIG_MODE_WEBVR

RIG_MODE_WEBVR: number

Static UseAlternateWebVRRendering

UseAlternateWebVRRendering: boolean

Methods

addBehavior

attachControl

  • attachControl(element: HTMLElement, noPreventDefault?: boolean): void

attachPostProcess

beginAnimation

  • beginAnimation(name: string, loop?: boolean, speedRatio?: number, onAnimationEnd?: function): Nullable<Animatable>
  • Will start the animation sequence

    Parameters

    • name: string

      defines the range frames for animation sequence

    • Optional loop: boolean

      defines if the animation should loop (false by default)

    • Optional speedRatio: number

      defines the speed factor in which to run the animation (1 by default)

    • Optional onAnimationEnd: function

      defines a function to be executed when the animation ended (undefined by default)

        • (): void
        • Returns void

    Returns Nullable<Animatable>

    the object created for this animation. If range does not exist, it will return null

clone

computeWorldMatrix

  • computeWorldMatrix(): Matrix

createAnimationRange

  • createAnimationRange(name: string, from: number, to: number): void
  • Creates an animation range for this node

    Parameters

    • name: string

      defines the name of the range

    • from: number

      defines the starting key

    • to: number

      defines the end key

    Returns void

createRigCamera

  • createRigCamera(name: string, cameraIndex: number): Nullable<Camera>

deleteAnimationRange

  • deleteAnimationRange(name: string, deleteFrames?: boolean): void
  • Delete a specific animation range

    Parameters

    • name: string

      defines the name of the range to delete

    • Optional deleteFrames: boolean

      defines if animation frames from the range must be deleted as well

    Returns void

detachControl

  • detachControl(element: HTMLElement): void

detachPostProcess

dispose

  • dispose(): void

freezeProjectionMatrix

  • freezeProjectionMatrix(projection?: Matrix): void

getActiveMeshes

getAnimationByName

  • Get an animation by name

    Parameters

    • name: string

      defines the name of the animation to look for

    Returns Nullable<Animation>

    null if not found else the requested animation

getAnimationRange

  • Get an animation range by name

    Parameters

    • name: string

      defines the name of the animation range to look for

    Returns Nullable<AnimationRange>

    null if not found else the requested animation range

getBehaviorByName

getChildMeshes

  • getChildMeshes(directDescendantsOnly?: boolean, predicate?: function): AbstractMesh[]
  • Get all child-meshes of this node

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered

    • Optional predicate: function

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): boolean
        • Parameters

          Returns boolean

    Returns AbstractMesh[]

    an array of {BABYLON.AbstractMesh}

getChildTransformNodes

  • getChildTransformNodes(directDescendantsOnly?: boolean, predicate?: function): TransformNode[]
  • Get all child-transformNodes of this node

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered

    • Optional predicate: function

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): boolean
        • Parameters

          Returns boolean

    Returns TransformNode[]

    an array of {BABYLON.TransformNode}

getChildren

  • getChildren(predicate?: function): Node[]
  • Get all direct children of this node

    Parameters

    • Optional predicate: function

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): boolean
        • Parameters

          Returns boolean

    Returns Node[]

    an array of {BABYLON.Node}

getClassName

  • getClassName(): string

getDescendants

  • getDescendants(directDescendantsOnly?: boolean, predicate?: function): Node[]
  • Will return all nodes that have this node as ascendant

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered

    • Optional predicate: function

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): boolean
        • Parameters

          Returns boolean

    Returns Node[]

    all children nodes of all types

getDirection

getDirectionToRef

getEngine

getForwardRay

getFrontPosition

  • getFrontPosition(distance: number): Vector3

getLeftTarget

getProjectionMatrix

  • getProjectionMatrix(force?: boolean): Matrix

getRightTarget

getScene

  • Gets the scene of the node

    Returns Scene

    a {BABYLON.Scene}

getTarget

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

    Returns Vector3

getTranformationMatrix

  • getTranformationMatrix(): Matrix

getViewMatrix

  • getViewMatrix(force?: boolean): Matrix

getWorldMatrix

isActiveMesh

  • isActiveMesh(mesh: Mesh): boolean

isCompletelyInFrustum

  • isCompletelyInFrustum(target: ICullable): boolean

isDescendantOf

  • isDescendantOf(ancestor: Node): boolean
  • Is this node a descendant of the given node? The function will iterate up the hierarchy until the ancestor was found or no more parents defined

    Parameters

    • ancestor: Node

      defines the parent node to inspect

    Returns boolean

    a boolean indicating if this node is a descendant of the given node

isDisposed

  • isDisposed(): boolean
  • Gets a boolean indicating if the node has been disposed

    Returns boolean

    true if the node was disposed

isEnabled

  • isEnabled(checkAncestors?: boolean): boolean
  • Is this node enabled? If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true

    Parameters

    • Optional checkAncestors: boolean

      indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors

    Returns boolean

    whether this node (and its parent) is enabled

isInFrustum

isReady

  • isReady(completeCheck?: boolean): boolean
  • Is this camera ready to be used/rendered

    Parameters

    • Optional completeCheck: boolean

      defines if a complete check (including post processes) has to be done (false by default)

    Returns boolean

    true if the camera is ready

removeBehavior

restoreState

  • restoreState(): boolean
  • Restored camera state. You must call storeState() first

    Returns boolean

serialize

  • serialize(): any
  • May need to be overridden by children

    Returns any

serializeAnimationRanges

  • serializeAnimationRanges(): any

setCameraRigMode

  • setCameraRigMode(mode: number, rigParams: any): void

setCameraRigParameter

  • setCameraRigParameter(name: string, value: any): void

setEnabled

  • setEnabled(value: boolean): void
  • Set the enabled state of this node

    Parameters

    • value: boolean

      defines the new enabled state

    Returns void

setTarget

storeState

toString

  • toString(fullDetails?: boolean): string
  • Parameters

    • Optional fullDetails: boolean

      support for multiple levels of logging within scene loading

    Returns string

unfreezeProjectionMatrix

  • unfreezeProjectionMatrix(): void

update

  • update(): void

Static GetConstructorFromName

  • GetConstructorFromName(type: string, name: string, scene: Scene, interaxial_distance?: number, isStereoscopicSideBySide?: boolean): function

Static Parse

Static ParseAnimationRanges

  • ParseAnimationRanges(node: Node, parsedNode: any, scene: Scene): void
  • Parse animation range data from a serialization object and store them into a given node

    Parameters

    • node: Node

      defines where to store the animation ranges

    • parsedNode: any

      defines the serialization object to read data from

    • scene: Scene

      defines the hosting scene

    Returns void

Generated using TypeDoc