Creates a new StereoscopicGamepadCamera
defines camera name
defines initial position
defines distance between each color axis
defines is stereoscopic is done side by side or over under
defines the hosting scene
Sets the input sensibility for a mouse input. (default is 2000.0) Higher values reduce sensitivity.
Gets or sets the animation properties override
Gets a list of Animations associated with the node
Enable or disable gravity on the camera.
Gets the list of attached behaviors
Define the current direction the camera is moving to
Rig mode of the camera. This is useful to create the camera with two "eyes" instead of one to create VR or stereoscopic scenes. This is normally controlled byt the camera themselves as internal use.
Define the current rotation the camera is rotating to
Enable or disable collisions of the camera with the rest of the scene objects.
Define a collision mask to limit the list of object the camera can collide with
Defines the list of custom render target which are rendered to and then used as the input to this camera's render. Eg. display another camera view on a TV in the main scene This is pretty helpfull if you wish to make a camera render to a texture you could reuse somewhere else in the scene.
Gets or sets a boolean used to define if the node must be serialized
Define the collision ellipsoid of the camera. This is helpful to simulate a camera body like the player body around the camera
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.
Field Of View is set in Radians. (default is 0.8)
fovMode sets the camera frustum bounds to the viewport bounds. (default is FOVMODE_VERTICAL_FIXED)
Defines the gamepad rotation sensiblity. This is the threshold from when rotation starts to be accounted for to prevent jittering.
Defines the gamepad move sensiblity. This is the threshold from when moving starts to be accounted for for to prevent jittering.
Gets the current world space position of the camera.
Gets or sets the id of the node
Define the default inertia of the camera. This helps giving a smooth feeling to the camera movement.
Define the input manager associated to the camera.
Defines the distance between both "eyes" in case of a RIG
Define wether the camera is intermediate. This is useful to not present the output directly to the screen in case of rig without post process for instance
Defines if stereoscopic rendering is done side by side or over under.
Gets or Set the list of keyboard keys used to control the backward move of the camera.
Gets or Set the list of keyboard keys used to control the left strafe move of the camera.
Gets or Set the list of keyboard keys used to control the right strafe move of the camera.
Gets or Set the list of keyboard keys used to control the forward move of the camera.
Restricts the camera to viewing objects with the same layerMask. A camera with a layerMask of 1 will render mesh.layerMask & camera.layerMask!== 0
Gets the left camera of a rig setup in case of Rigged Camera
Define the current target of the camera as an object or a position.
Define the maximum distance the camera can see to. This is important to note that the depth buffer are not infinite and the further it end the more your scene might encounter depth fighting issue.
Gets or sets an object used to store user defined information for the node
Define the minimum distance the camera can see from. This is important to note that the depth buffer are not infinite and the closer it starts the more your scene might encounter depth fighting issue.
Define the mode of the camera (Camera.PERSPECTIVE_CAMERA or Camera.PERSPECTIVE_ORTHOGRAPHIC)
Gets or sets the name of the node
Add cconstraint to the camera to prevent it to move freely in all directions and around all axis.
Observable triggered when the inputs have been processed.
Event raised when the camera collide with a mesh in the scene.
Sets a callback that will be raised when the node will be disposed
An event triggered when the mesh is disposed
Observable triggered when the camera Projection matrix has changed.
Callback raised when the node is ready to be used
Observable triggered when reset has been called and applied to the camera.
Observable triggered when the camera view matrix has changed.
Define the current limit on the bottom side for an orthographic camera In scene unit
Define the current limit on the left side for an orthographic camera In scene unit
Define the current limit on the right side for an orthographic camera In scene unit
Define the current limit on the top side for an orthographic camera In scene unit
When set, the camera will render to this render target instead of the default canvas
Gets or sets the parent of the node
Define the current local position of the camera in the scene
For internal use only. Please do not use.
Gets the post process used by the rig cameras
Gets the right camera of a rig setup in case of Rigged Camera
Define the current rotation of the camera
Define the current rotation of the camera as a quaternion to prevent Gimbal lock
Define the current speed of the camera
Gets or sets a string used to store user defined state for the node
Defines the touch sensibility for rotation. The higher the faster.
Defines the touch sensibility for move. The higher the faster.
Gets or sets the unique id of the node
The vector the camera should consider as up. (default is Vector3(0, 1, 0) aka Vector3.Up())
When set, the up vector of the camera will be updated by the rotation of the camera
Define the viewport of the camera. This correspond to the portion of the screen the camera will render to in normalized 0 to 1 unit.
Returns directly the latest state of the mesh World matrix. A Matrix is returned.
This setting aligns the left and right bounds of the viewport to the left and right bounds of the camera frustum.
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.
Defines if by default attaching controls should prevent the default javascript event to continue.
This helps creating camera with an orthographic mode. Orthographic is commonly used in engineering as a means to produce object specifications that communicate dimensions unambiguously, each line of 1 unit length (cm, meter..whatever) will appear to have the same length everywhere on the drawing. This allows the drafter to dimension only a subset of lines and let the reader know that other lines of that length on the drawing are also that length in reality. Every parallel line in the drawing is also parallel in the object.
This is the default projection mode used by the cameras. It helps recreating a feeling of perspective and better appreciate depth. This is the best way to simulate real life cameras.
Custom rig mode allowing rig cameras to be populated manually with any number of cameras
This specifies ther is no need for a camera rig. Basically only one eye is rendered corresponding to the camera.
Simulates a camera Rig with one blue eye and one red eye. This can be use with 3d blue and red glasses.
Defines that both eyes of the camera will be rendered over under each other.
Defines that both eyes of the camera will be rendered side by side with a none parallel target.
Defines that both eyes of the camera will be rendered side by side with a parallel target.
Defines that both eyes of the camera should be renderered in a VR mode (carbox).
Defines that both eyes of the camera should be renderered in a VR mode (webVR).
Attached controls to the current camera.
Defines the element the controls should be listened from
Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Attach a post process to the camera.
The post process to attach to the camera
The position of the post process in case several of them are in use in the scene
the position the post process has been inserted at
Will start the animation sequence
defines the range frames for animation sequence
defines if the animation should loop (false by default)
defines the speed factor in which to run the animation (1 by default)
defines a function to be executed when the animation ended (undefined by default)
the object created for this animation. If range does not exist, it will return null
Clones the current camera.
The cloned camera name
the cloned camera
Compute the world matrix of the camera.
the camera workd matrix
Creates an animation range for this node
defines the name of the range
defines the starting key
defines the end key
Delete a specific animation range
defines the name of the range to delete
defines if animation frames from the range must be deleted as well
Detach the current controls from the camera. The camera will stop reacting to inputs.
Defines the element to stop listening the inputs from
Detach a post process to the camera.
The post process to detach from the camera
Destroy the camera and release the current resources hold by it.
Freeze the projection matrix. It will prevent the cache check of the camera projection compute and can speed up perf if no parameter of the camera are meant to change
Defines manually a projection if necessary
Gets the list of active meshes this frame (meshes no culled or excluded by lod s in the frame)
the active meshe list
Get an animation range by name
defines the name of the animation range to look for
null if not found else the requested animation range
Get all child-meshes of this node
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
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
an array of AbstractMesh
Get all child-transformNodes of this node
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
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
an array of TransformNode
Get all direct children of this node
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
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 (Default: true)
an array of Node
Gets camera class name
StereoscopicGamepadCamera
Will return all nodes that have this node as ascendant
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
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
all children nodes of all types
Gets the engine of the node
a Engine
Gets a ray in the forward direction from the camera.
Defines the length of the ray to create
Defines the transform to apply to the ray, by default the world matrx is used to create a workd space ray
Defines the start point of the ray which defaults to the camera position
the forward ray
Gets the position in front of the camera at a given distance.
The distance from the camera we want the position to be
the position
Gets the current projection matrix of the camera.
forces the camera to recompute the matrix without looking at the cached state
the projection matrix
Gets the scene of the node
a scene
Return the current target position of the camera. This value is expressed in local space.
the target position
Gets the transformation matrix (ie. the multiplication of view by projection matrices)
a Matrix
Gets the current view matrix of the camera.
forces the camera to recompute the matrix without looking at the cached state
the view matrix
Gets the current world matrix of the camera
Check wether a mesh is part of the current active mesh list of the camera
Defines the mesh to check
true if active, false otherwise
Checks if a cullable object (mesh...) is in the camera frustum Unlike isInFrustum this cheks the full bounding box
The object to check
true if the object is in frustum otherwise false
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
defines the parent node to inspect
a boolean indicating if this node is a descendant of the given node
Gets a boolean indicating if the node has been disposed
true if the node was disposed
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
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
whether this node (and its parent) is enabled
Checks if a cullable object (mesh...) is in the camera frustum This checks the bounding box center. See isCompletelyInFrustum for a full bounding check
The object to check
true if the object is in frustum otherwise false
Is this camera ready to be used/rendered
defines if a complete check (including post processes) has to be done (false by default)
true if the camera is ready
Restored camera state. You must call storeState() first.
true if restored and false otherwise
Serialiaze the camera setup to a json represention
the JSON representation
Serialize animation ranges into a JSON compatible object
serialization object
Set the enabled state of this node
defines the new enabled state
Store current camera state of the camera (fov, position, rotation, etc..)
the camera
Gets a string representation of the camera useful for debug purpose.
Defines that a more verboe level of logging is required
the string representation
Unfreeze the projection matrix if it has previously been freezed by freezeProjectionMatrix.
Update the camera state according to the different inputs gathered during the frame.
Add a new node constructor
defines the type name of the node to construct
defines the constructor function
Gets a camera constructor for a given camera type
The type of the camera to construct (should be equal to one of the camera class name)
The name of the camera the result will be able to instantiate
The scene the result will construct the camera in
In case of stereoscopic setup, the distance between both eyes
In case of stereoscopic setup, should the sereo be side b side
a factory method to construc the camera
Generated using TypeDoc
Camera used to simulate stereoscopic rendering (based on GamepadCamera)
http://doc.babylonjs.com/features/cameras