FORGE. HotspotStates

new HotspotStates(viewer, hotspotUid)

Hotspot states
Parameters:
Name Type Description
viewer FORGE.Viewer The viewer reference.
hotspotUid string The hotspot uid
Source:

Extends

Members

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

(readonly) auto :boolean

Get the auto flag.
Type:
  • boolean
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
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) names :Array.<string>

Get the states names.
Type:
  • Array.<string>
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) onLoadComplete :FORGE.EventDispatcher

Get the onConfigLoadComplete FORGE.EventDispatcher.
Type:
Source:

(readonly) ready :boolean

Get the ready flag.
Type:
  • boolean
Source:

state :string

Get and set the current state
Type:
  • string
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:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

Methods

addConfig(config)

Add a states configuration object.
Parameters:
Name Type Description
config HotspotStatesConfig Configuration object with hotspots states.
Source:

destroy()

Destroy sequence.
Overrides:
Source:

load(nameopt)

Load a state.
Parameters:
Name Type Attributes Description
name string <optional>
the name of the state to load.
Source:

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:

toggle(names)

Toggle from a state to another.
Parameters:
Name Type Description
names Array.<string> the names of the states to loop through.
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:

FORGE. HotspotStates

Members
Methods