Constructor
new VRCamera(parameters)
- Source:
Constructor.
Parameters:
Name | Type | Description |
---|---|---|
parameters |
Object | the parameters of the camera. This parameters are
|
Classes
Members
chaseThreeCamera
- Source:
In VR mode the position of the Three.js camera (in the euclidean Three.js scene) is directly controlled by the VR headset. This method update the position of the observer in the geometry accordingly. Every displacement is the Three.js scene is interpreted as a tangent vector. We move the observer by following the geodesic in this direction. The method also update the left and right eyes positions. The method should be called at each frame.
fakeCameras :Array.<Object>
- Source:
Two fake copies of the cameras meant to be passed to the shader as uniforms.
Type:
- Array.<Object>
ipDist
- Source:
Half the interpupillary distance
isStereoOff :boolean
- Source:
True if stereo is off
Type:
- boolean
isStereoOn :boolean
- Source:
True if stereo is on
Type:
- boolean
Methods
(private) _chaseThreeCamera()
- Source:
sidedShader(shaderBuilder, side)
- Source:
build the GLSL code needed to declare the camera
Parameters:
Name | Type | Description |
---|---|---|
shaderBuilder |
ShaderBuilder | the shader builder |
side |
number | the side (left of right) (used for stereographic camera) |
switchStereo()
- Source:
Turn the stereo mode on or off
updateFakeCamerasPosition()
- Source:
Update the fake camera position. Shift the left and right camera from the current position using parallel transport.