Constructor
new VRWebgl(videonon-null, playernon-null, canvasnon-null, gl, projectionMode)
Parameters:
- Implements:
- Source:
Members
ANIMATION_DURATION_ :number
Type:
- Source:
canvas_ :HTMLCanvasElement
Type:
- Source:
cont_ :number
Type:
- Source:
currentQuaternion_ :Float32Array
Type:
- Source:
diff_ :Float32Array
Type:
- Source:
fieldOfView_ :number
Type:
- Source:
geometry_ :?{vertices: !Array.<number>, textureCoords: !Array.<number>, indices: !Array.<number>}
Type:
-
?{vertices: !Array.<number>, textureCoords: !Array.<number>, indices: !Array.<number>}
- Source:
gl_ :WebGLRenderingContext
Type:
- Source:
identityMatrix_ :Float32Array
Type:
- Source:
originalQuaternion_ :Float32Array
Type:
- Source:
positionY_ :number
Type:
- Source:
previousCanvasHeight_ :number
Type:
- Source:
previousCanvasWidth_ :number
Type:
- Source:
projectionMatrix_ :Float32Array
Type:
- Source:
projectionMode_ :string
Type:
- Source:
shaderProgram_ :WebGLProgram
Type:
- Source:
stereoscopicMode_ :boolean
Type:
- Source:
texture_ :WebGLTexture
Type:
- Source:
textureCoordAttribute_ :number
Type:
- Source:
vertexPositionAttribute_ :number
Type:
- Source:
verticesBuffer_ :WebGLBuffer
Type:
- Source:
verticesIndexBuffer_ :WebGLBuffer
Type:
- Source:
verticesTextureCoordBuffer_ :WebGLBuffer
Type:
- Source:
video_ :HTMLVideoElement
Type:
- Source:
viewMatrix_ :Float32Array
Type:
- Source:
viewProjectionMatrix_ :Float32Array
Type:
- Source:
Methods
getFieldOfView() → {number}
- Source:
Returns:
-
Type
-
number
getGLShader_(glType) → {WebGLShader}
Read and generate WebGL shader
Parameters:
Name |
Type |
Description |
glType |
number
|
Type of shader requested. |
- Source:
Returns:
-
Type
-
WebGLShader
getNorth() → {number}
- Source:
Returns:
-
Type
-
number
getProjectionMode() → {string}
- Source:
Returns:
-
Type
-
string
isStereoscopicModeEnabled() → {boolean}
Returns true if stereoscopic mode is enabled.
- Source:
Returns:
-
Type
-
boolean
release()
Request that this object release all internal references.
- Implements:
- Source:
renderGL_(textureUpdateopt)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
textureUpdate |
boolean
|
<optional>
|
true
|
|
- Source:
reset(firstTimeopt)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
firstTime |
boolean
|
<optional>
|
true
|
|
- Source:
rotateViewGlobal(yawnon-null, pitchnon-null, rollnon-null)
Rotate the view matrix global
Parameters:
Name |
Type |
Description |
yaw |
number
|
Yaw. |
pitch |
number
|
Pitch. |
roll |
number
|
Roll. |
- Source:
setFieldOfView(fieldOfView)
Parameters:
Name |
Type |
Description |
fieldOfView |
number
|
|
- Source:
toEulerAngles_(quatnon-null) → {{pitch: number, yaw: number, roll: number}}
Parameters:
Name |
Type |
Description |
quat |
Float32Array
|
|
- Source:
Returns:
as radians
-
Type
-
{pitch: number, yaw: number, roll: number}
toggleStereoscopicMode()
Toogle stereoscopic mode
- Source:
updateViewPort_()
- Source:
zoom(amount)
Parameters:
Name |
Type |
Description |
amount |
number
|
|
- Source: