Panorama

Panorama

Base Panorama

Constructor

new Panorama()

Source:

Methods

add(object)

Source:

Adding an object

Parameters:
Name Type Description
object THREE.Object3D

The object to be added

createGeometry()

Source:

Create a skybox geometry

createMaterial(repeatopt, offsetopt)

Source:

Create equirectangular shader material

Parameters:
Name Type Attributes Default Description
repeat THREE.Vector2 <optional>
new THREE.Vector2( 1, 1 )

Texture Repeat

offset THREE.Vector2 <optional>
new THREE.Vector2( 0, 0 )

Texture Offset

dispose()

Source:

Dispose panorama

fadeIn()

Source:

Start fading in animation

Fires:

fadeOut()

Source:

Start fading out animation

getZoomLevel() → {number}

Source:

Get zoom level based on window width

Returns:

zoom level indicating image quality

Type
number
Source:

Link one-way panorama

Parameters:
Name Type Attributes Default Description
pano Panorama

The panorama to be linked to

position THREE.Vector3

The position of infospot which navigates to the pano

imageScale number <optional>
300

Image scale of linked infospot

imageSrc string <optional>
DataImage.Arrow

The image source of linked infospot

onClick(event)

Source:

Click event handler

Parameters:
Name Type Description
event object

Click event

Fires:

onEnter()

Source:

This will be called when entering a panorama

Fires:

onError()

Source:

This will be called when panorama loading has error

Fires:

onLeave()

Source:

This will be called when leaving a panorama

Fires:

onLoad()

Source:

This will be called when panorama is loaded

Fires:

onProgress()

Source:

This will be called when panorama is in progress

Fires:

setContainer(data)

Source:

Set container of this panorama

Parameters:
Name Type Description
data HTMLElement | object

Data with container information

Fires:

setLinkingImage(url, scale)

Source:

Set image of this panorama's linking infospot

Parameters:
Name Type Description
url string

Url to the image asset

scale number

Scale factor of the infospot

toggleInfospotVisibility(isVisible, delay)

Source:

Toggle visibility of infospots in this panorama

Parameters:
Name Type Description
isVisible boolean

Visibility of infospots

delay number

Delay in milliseconds to change visibility

Fires:

updateTexture(texture)

Source:

Update texture of a panorama

Parameters:
Name Type Description
texture THREE.Texture

Texture to be updated

Events

enter

Source:

Enter panorama event

Type:
  • object

enter-complete

Source:

Enter panorama and animation complete event

Type:
  • object

enter-fade-complete

Source:

Enter panorama fade complete event

Type:
  • object

enter-fade-start

Source:

Enter panorama fade in start event

Type:
  • object

enter-start

Source:

Enter panorama and animation starting event

Type:
  • object

error

Source:

Loading panorama error event

Type:
  • object

fade-in

Source:

Fade in event

Type:
  • object

fade-out

Source:

Fade out event

Type:
  • object

infospot-animation-complete

Source:

Complete toggling infospot visibility

Type:
  • object

leave

Source:

Leave panorama event

Type:
  • object

leave-complete

Source:

Leave panorama complete event

Type:
  • object

leave-start

Source:

Leave panorama and animation starting event

Type:
  • object

load

Source:

Alias of loaded event

Type:
  • object

load-start

Source:

Start loading panorama event

Type:
  • object

loaded

Source:

Loaded panorama event

Type:
  • object

panolens-viewer-handler

Source:
Properties:
Name Type Description
method string

Viewer function name

data *

The argument to be passed into the method

Infospot focus handler event

Type:
  • object

panolens-viewer-handler

Source:
Properties:
Name Type Description
method string

Viewer function name

data *

The argument to be passed into the method

Viewer handler event

Type:
  • object

panolens-viewer-handler

Source:
Properties:
Name Type Description
method string

Viewer function name

data *

The argument to be passed into the method

On panorama dispose handler

Type:
  • object

progress

Source:
Properties:
Name Type Description
progress object

The progress object containing loaded and total amount

Loading panorama progress event

Type:
  • object

ready

Source:

Panorama is ready to be animated

Type:
  • object

ready

Source:

Panorama is ready to go

Type:
  • object