PanoControl
Panorama control for View360
class PanoControl
Properties
Whether one of the controls is animating at the moment
Disable context menu which pops up on mouse right click.
Whether the control is enabled or not
A control for camera rotation with gyroscope input.
You can also change options of gyro with this.
When true
, disables rotation slow-down by zoom-value.
A control for camera rotation.
You can also change options of rotate with this.
Disable context menu which pops up on mouse right click.
Apply CSS cursor by current state of input when using mouse.
If true
, this will add CSS style to canvas element. It'll apply cursor: "grab"
by default and cursor: "grabbing"
when holding the mouse button.
Disable context menu which pops up on mouse right click.
A control for camera zoom.
You can also change options of zoom with this.
Methods
Destroy the instance and remove all event listeners attached.
This also will reset CSS cursor to initial.
Disable this control and remove all event listeners
Enable this control and add event listeners.
Resize control to match target size.
Synchronize this control's state to current camera state
Update control by given deltaTime
Constructor
new PanoControl(element: HTMLElement, camera: Camera, options: PanoControlOptions): PanoControl
Parameters
HTMLElement
Canvas element
Camera instance
Options for PanoControl
Properties
animating
animatingboolean
Whether one of the controls is animating at the moment
disableContextMenu
disableContextMenuboolean
Disable context menu which pops up on mouse right click.
enabled
enabledboolean
Whether the control is enabled or not
gyro
gyro
A control for camera rotation with gyroscope input.
You can also change options of gyro with this.
ignoreZoomScale
ignoreZoomScaleboolean
When true
, disables rotation slow-down by zoom-value.
rotate
rotate
A control for camera rotation.
You can also change options of rotate with this.
scrollable
scrollableboolean
Disable context menu which pops up on mouse right click.
useGrabCursor
useGrabCursorboolean
Apply CSS cursor by current state of input when using mouse.
If true
, this will add CSS style to canvas element. It'll apply cursor: "grab"
by default and cursor: "grabbing"
when holding the mouse button.
wheelScrollable
wheelScrollableboolean
Disable context menu which pops up on mouse right click.
zoom
zoom
A control for camera zoom.
You can also change options of zoom with this.
Methods
destroy
destroyvoid
destroy(): void
Destroy the instance and remove all event listeners attached.
This also will reset CSS cursor to initial.
disable
disablevoid
disable(): void
Disable this control and remove all event listeners
enable
enablePromise<void>
enable(): Promise<void>
Enable this control and add event listeners.
resize
resizevoid
resize(width: number, height: number): void
Resize control to match target size.
Parameters
number
New width
number
New height
sync
syncvoid
sync(): void
Synchronize this control's state to current camera state
update
updatevoid
update(delta: number): void
Update control by given deltaTime
Parameters
number
Number of milisec to update