Skip to main content

StereoEquiProjection

Since version 4.0.0

Projection based on stereo equirectangular images.

class StereoEquiProjection extends Projection

Extends

Properties

Available stereoscopic modes

Source URL to panorama image/video.

Properties for the video element.
Setting false will treat panorama source as an image, true will use default properties.

Methods

Generate triangle mesh from current projection.

Update camera to match projection's settings.

Update control to match projection's settings.

Constructor

Create new instance
new StereoEquiProjection(options: StereoEquiProjectionOptions): StereoEquiProjection

Parameters

Properties

MODE

>=4.0.0
static
MODE

{ LEFT_RIGHT: "left_right"; TOP_BOTTOM: "top_bottom" }

Available stereoscopic modes

src

>=4.0.0
readonly inherited
src

string | HTMLElement | (string | HTMLElement)[]

Source URL to panorama image/video.

video

>=4.0.0
readonly inherited
video

undefined | boolean | Partial<VideoConfig>

Properties for the video element.
Setting false will treat panorama source as an image, true will use default properties.

Example

Default properties

autoplay: true
muted: true
loop: false
volume: 1

Methods

createMesh

>=4.0.0
createMesh

TriangleMesh<{ uEye: UniformFloat;   uTexScaleOffset: UniformVector4Array;   uTexture: UniformTexture2D }>

createMesh(ctx: WebGLContext, texture: Texture2D): TriangleMesh<{ uEye: UniformFloat; uTexScaleOffset: UniformVector4Array; uTexture: UniformTexture2D }>

Generate triangle mesh from current projection.

Parameters

ctx

WebGLContext

Instance of the WebGLContext helper

texture

Texture2D

New texture to apply

updateCamera

>=4.0.0
inherited
updateCamera

void

updateCamera(camera: Camera): void

Update camera to match projection's settings.

Parameters

camera

Instance of the camera to update

updateControl

>=4.0.0
inherited
updateControl

void

updateControl(control: PanoControl): void

Update control to match projection's settings.

Parameters

Instance of the control to update