new Panorama(geometry, material)
Skeleton panorama derived from THREE.Mesh
Parameters:
Name | Type | Description |
---|---|---|
geometry |
THREE.Geometry | The geometry for this panorama |
material |
THREE.Material | The material for this panorama |
- Source:
Methods
-
add(object)
-
Adding an object To counter the scale.x = -1, it will automatically add an empty object with inverted scale on x
Parameters:
Name Type Description object
THREE.Object3D The object to be added - Source:
-
dispose()
-
Dispose panorama
- Source:
-
fadeIn()
-
Start fading in animation
- Source:
Fires:
-
fadeOut()
-
Start fading out animation
- Source:
-
getZoomLevel()
-
Get zoom level based on window width
- Source:
Returns:
zoom level indicating image quality- Type
- number
-
link(pano, position [, imageScale] [, imageSrc])
-
Link one-way panorama
Parameters:
Name Type Argument Default Description pano
PANOLENS.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>
PANOLENS.DataImage.Arrow The image source of linked infospot - Source:
-
onClick(event)
-
Click event handler
Parameters:
Name Type Description event
object Click event - Source:
Fires:
-
onEnter()
-
This will be called when entering a panorama
- Source:
Fires:
-
onError()
-
This will be called when panorama loading has error
- Source:
Fires:
-
onLeave()
-
This will be called when leaving a panorama
- Source:
Fires:
-
onLoad()
-
This will be called when panorama is loaded
- Source:
Fires:
-
onProgress()
-
This will be called when panorama is in progress
- Source:
Fires:
-
setContainer(data)
-
Set container of this panorama
Parameters:
Name Type Description data
HTMLElement | object Data with container information - Source:
Fires:
-
setLinkingImage(url, scale)
-
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 - Source:
-
toggleInfospotVisibility(isVisible, delay)
-
Toggle visibility of infospots in this panorama
Parameters:
Name Type Description isVisible
boolean Visibility of infospots delay
number Delay in milliseconds to change visibility - Source:
Fires:
-
updateTexture(texture)
-
Update texture of a panorama
Parameters:
Name Type Description texture
THREE.Texture Texture to be updated - Source:
Events
-
enter
-
Enter panorama event
Type: object
- Source:
-
enter-animation-complete
-
Enter panorama and animation complete event
Type: object
- Source:
-
enter-animation-start
-
Enter panorama and animation starting event
Type: object
- Source:
-
enter-fade-complete
-
Enter panorama fade complete event
Type: object
- Source:
-
enter-fade-start
-
Enter panorama fade in start event
Type: object
- Source:
-
error
-
Loading panorama error event
Type: object
- Source:
-
infospot-animation-complete
-
Complete toggling infospot visibility
Type: object
- Source:
-
leave
-
Leave panorama event
Type: object
- Source:
-
leave-animation-start
-
Leave panorama and animation starting event
Type: object
- Source:
-
leave-complete
-
Leave panorama complete event
Type: object
- Source:
-
load
-
Load panorama event
Type: object
- Source:
-
panolens-viewer-handler
-
Viewer handler event
Type: object
- Source:
Properties:
Name Type Description method
string Viewer function name data
* The argument to be passed into the method -
panolens-viewer-handler
-
Infospot focus handler event
Type: object
- Source:
Properties:
Name Type Description method
string Viewer function name data
* The argument to be passed into the method -
panolens-viewer-handler
-
On panorama dispose handler
Type: object
- Source:
Properties:
Name Type Description method
string Viewer function name data
* The argument to be passed into the method -
progress
-
Loading panorama progress event
Type: object
- Source:
Properties:
Name Type Description progress
object The progress object containing loaded and total amount