Class: HotspotCollection

HotspotCollection

A hotspot collection object is an object that renders a collection of hotspots. A bu.street.Hotspot is a marker point that links when clicked to another location. The new location can be a cubic panorama, a text in a popup, or a webpage.


new HotspotCollection(options)

Parameters:
Name Type Description
options bu.street.threejs.SceneObjectOptions

Options.

Source:
bu-street/sceneobjects/hotspotcollection.js
Fires:

Extends

Members


children :Array.<SceneObject>

The SceneObjects children of this object. Any SceneObject can have any number of SceneObject children in its own hierachy.

Type:
  • Array.<SceneObject>
Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js

object3D :THREE.Object3D

The THREE.Object3D that contains this SceneObject. Each SceneObject can contain one and only one THREE.Object3D, but any THREE.Object3D can have any number of THREE.Object chidren in its own hierachy.

Type:
  • THREE.Object3D
Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js

Methods


addChild(child)

Adds a child SceneObject to this object.

Parameters:
Name Type Description
child bu.street.threejs.SceneObject

Child SceneObject.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js

findNearestHotspot(coordinate)

Return the nearest bu.street.Hotspot to the given coordinate. The projection of the coordinate must be projected coordinates as returned by bu.street.threejs.SceneManager#getCoordinateAtGroundFromPixel.

Parameters:
Name Type Description
coordinate bu.Coordinate

Coordinate in projected coordinates.

Source:
bu-street/sceneobjects/hotspotcollection.js
Returns:
Type
bu.street.Hotspot

findSceneObjects(raycaster)

Returns an array of SceneObjects that are intersected by given raycaster. Function to be overrided in derived classes.

Parameters:
Name Type Description
raycaster THREE.Raycaster

Raycaster.

Inherited From:
Overrides:
Source:
bu-street/sceneobjects/sceneobject.js
Returns:

Array of SceneObject.

Type
Array.<bu.street.threejs.SceneObject>

findThreeObjects(raycaster)

Returns an array of THREE.Object3D that are intersected by given raycaster. Function to be overrided in derived classes.

Parameters:
Name Type Description
raycaster THREE.Raycaster

Raycaster.

Inherited From:
Overrides:
Source:
bu-street/sceneobjects/sceneobject.js
Returns:

Array of THREE.Object3D.

Type
Array.<THREE.Object3D>

getScene()

Returns the Three.js scene the object3D contained inside this object is attached to.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js
Returns:

The scene.

Type
THREE.Scene

getSceneManager()

Returns the SceneManager this SceneObject is attached to.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js
Returns:

SceneManager.

Type
bu.streetthreejs.SceneManager

getVisible()

Returns the visibility of the objects of this object.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js
Returns:
Type
boolean

highlightClickedHotspot(point)

Updates the value of the intersectedObject using a point in world local coords to set it and changes the color of that object.

Parameters:
Name Type Description
point bu.Coordinate

A three values x, y, z with coordinates at the ground level in local current projection. Local current projection is included in current image metadata as a srid property.

Source:
bu-street/sceneobjects/hotspotcollection.js

highlightHoveredHotspot(raycaster)

Updates the value of the intersectedObject using a raycaster to set it and changes the color of that object.

Parameters:
Name Type Description
raycaster THREE.Raycaster

Raycaster to use for intersection.

Source:
bu-street/sceneobjects/hotspotcollection.js
Returns:

True if the intersected object has changed from previous status.

Type
boolean

removeChild(child)

Removes a child SceneObject from this object.

Parameters:
Name Type Description
child bu.street.threejs.SceneObject

Child SceneObject.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js

rotateAroundWorldAxis(axis, radians)

Rotate the object3D of this SceneObject around an arbitrary axis in world space.

Parameters:
Name Type Description
axis THREE.Vector3

Axis. It is not needed the axis to be normalized.

radians number

Angle in radians.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js

setObject3D(object3D)

Sets the THREE.Object3D of this object.

Parameters:
Name Type Description
object3D THREE.Object3D

The Object3D of this object.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js

setPosition(x, y, z)

Move this object to new coordinates.

Parameters:
Name Type Description
x number

X coord.

y number

Y coord.

z number

Z coord.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js

setVisible(visible)

Change the visibility of this object.

Parameters:
Name Type Description
visible boolean

If object should be visible or not.

Inherited From:
Source:
bu-street/sceneobjects/sceneobject.js