Skip to main content

PanoControl

Since version 4.0.0

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

Create new instance.
new PanoControl(element: HTMLElement, camera: Camera, options: PanoControlOptions): PanoControl

Parameters

element

HTMLElement

Canvas element

camera

Camera instance

Options for PanoControl

Properties

animating

>=4.0.0
readonly
animating

boolean

Whether one of the controls is animating at the moment

disableContextMenu

disableContextMenu

boolean

Disable context menu which pops up on mouse right click.

enabled

>=4.0.0
readonly
enabled

boolean

Whether the control is enabled or not

gyro

readonly
gyro

GyroControl

A control for camera rotation with gyroscope input.
You can also change options of gyro with this.

ignoreZoomScale

>=4.0.0
ignoreZoomScale

boolean

When true, disables rotation slow-down by zoom-value.

rotate

readonly
rotate

RotateControl

A control for camera rotation.
You can also change options of rotate with this.

scrollable

scrollable

boolean

Disable context menu which pops up on mouse right click.

useGrabCursor

useGrabCursor

boolean

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

wheelScrollable

boolean

Disable context menu which pops up on mouse right click.

zoom

readonly
zoom

ZoomControl

A control for camera zoom.
You can also change options of zoom with this.

Methods

destroy

>=4.0.0
destroy

void

destroy(): void

Destroy the instance and remove all event listeners attached.
This also will reset CSS cursor to initial.

disable

>=4.0.0
disable

void

disable(): void

Disable this control and remove all event listeners

enable

>=4.0.0
enable

Promise<void>

enable(): Promise<void>

Enable this control and add event listeners.

resize

>=4.0.0
resize

void

resize(width: number, height: number): void

Resize control to match target size.

Parameters

width

number

New width

height

number

New height

sync

>=4.0.0
sync

void

sync(): void

Synchronize this control's state to current camera state

update

>=4.0.0
update

void

update(delta: number): void

Update control by given deltaTime

Parameters

delta

number

Number of milisec to update