new HotspotManager(viewer)
The FORGE.HotspotManager is an object that manages hotspots of the project.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
FORGE.Viewer | FORGE.Viewer reference. |
- Source:
Extends
Members
(readonly) alive :boolean
Get the alive flag value of the object.
Type:
- boolean
- Inherited From:
- Source:
(readonly) all :Array.<(FORGE.Hotspot3D|FORGE.HotspotDOM)>
Get all the hotspots.
Type:
- Array.<(FORGE.Hotspot3D|FORGE.HotspotDOM)>
- Source:
(readonly) className :string
Get the class name of the object.
Type:
- string
- Inherited From:
- Source:
(readonly) count :number
Get the hotspots count.
Type:
- number
- Source:
data :*
Get and set any custom data you want to associate to this object.
Type:
- *
- Inherited From:
- Source:
debug :boolean
Get and set the debug flag.
Type:
- boolean
- Inherited From:
- Source:
(readonly) onDestroy :FORGE.EventDispatcher
Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
- Inherited From:
- Source:
(readonly) tags :Array
Get the tags associated to this object.
Type:
- Array
- Inherited From:
- Source:
(readonly) uid :string
Get the uid of the object.
Type:
- string
- Inherited From:
- Source:
(readonly) uids :Array.<string>
Get all the hotspots uids.
Type:
- Array.<string>
- Source:
warning :boolean
Get and set the warning flag.
Type:
- boolean
- Inherited From:
- Source:
Methods
addConfig(config)
Add a hotspots config to the manager.
Parameters:
Name | Type | Description |
---|---|---|
config |
Array.<HotspotConfig> | The config you want to add. |
- Source:
addTracks(config)
Add a list of tracks for the hotspots.
Parameters:
Name | Type | Description |
---|---|---|
config |
HotspotsConfig | The tracks you want to add. |
- Source:
boot()
Boot sequence.
- Source:
clear(typeopt)
Clear all hotspots from the manager
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string |
<optional> |
the type of hotspots to clear, nothing for all |
- Source:
create(config) → {FORGE.Hotspot3D|FORGE.HotspotDOM|boolean}
Create a hotspot from a hotpsot config object.
Parameters:
Name | Type | Description |
---|---|---|
config |
HotspotConfig | The config of the hotspot you want to create. |
- Source:
Returns:
Returns the hotspot if the hotspot is created, false if not.
- Type
- FORGE.Hotspot3D | FORGE.HotspotDOM | boolean
destroy()
Destroy sequence
- Overrides:
- Source:
dump() → {Array.<HotspotConfig>}
Dump the array of hotspot configurations.
- Source:
Returns:
Return an array of hotspot configurations of the current scene.
- Type
- Array.<HotspotConfig>
getByType(type) → {Array.<(FORGE.Hotspot3D|FORGE.HotspotDOM)>}
Get hotspots by type
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The type of hotspots you want to get. |
- Source:
Returns:
- Type
- Array.<(FORGE.Hotspot3D|FORGE.HotspotDOM)>
log(value)
Basic log method, log a string in the console if debug is enabled.
Parameters:
Name | Type | Description |
---|---|---|
value |
* | The value you want to log in the console. |
- Inherited From:
- Source:
remove(hotspot)
Remove a hotspot from the manager
Parameters:
Name | Type | Description |
---|---|---|
hotspot |
string | FORGE.Hotspot3D | the hotspot or its uid to remove |
- Source:
update()
Update loop
- Source:
warn(valuenullable)
Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
string | Object |
<nullable> |
The value you want to warn in the console. |
- Inherited From:
- Source: