CubestripProjection
Projection based on cubemap strip.
Slightly more efficient than CubemapProjection as it doesn't copy cubemap image to canvas while rendering.
Accepts only single image.
class CubestripProjection extends Projection
Extends
Properties
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
new CubestripProjection(options: CubestripProjectionOptions): CubestripProjection
Parameters
Options
Properties
src
srcstring | HTMLElement | (string | HTMLElement)[]
Source URL to panorama image/video.
video
videoundefined | boolean | Partial<VideoConfig>
Properties for the video element.
Setting false
will treat panorama source as an image, true
will use default properties.
Default properties
autoplay: true
muted: true
loop: false
volume: 1
Methods
createMesh
createMeshTriangleMesh<{ uTexture: UniformTexture2D }>
createMesh(ctx: WebGLContext, texture: Texture2D): TriangleMesh<{ uTexture: UniformTexture2D }>
Generate triangle mesh from current projection.
Parameters
WebGLContext
Instance of the WebGLContext helper
Texture2D
New texture to apply
updateCamera
updateCameravoid
updateCamera(camera: Camera): void
Update camera to match projection's settings.
Parameters
Instance of the camera to update
updateControl
updateControlvoid
updateControl(control: PanoControl): void
Update control to match projection's settings.
Parameters
Instance of the control to update