FORGE. HotspotDOM

new HotspotDOM(viewer, config)

A HotspotDOM, to be displayed like a billboard. This hotspot provides a single div positioned at the right position in the scene, without any content in it and any deformation. It is up to the FORGE user to specify those. Two things can be tweaked here: the displayObject property of this hotspot, which is a FORGE.DisplayObjectContainer, and the DOM part of this container, accessible through `displayObject.dom` or more directly using the `dom` property on the object HotspotDOM.
Parameters:
Name Type Description
viewer FORGE.Viewer viewer reference
config HotspotConfig hotspot configuration
Source:
To Do:
  • facingCenter with CSS 3D, rotation values and scale values

Extends

Members

(static) DEFAULT_CONFIG :HotspotConfig

Type:
  • HotspotConfig
Source:

(static) DEFAULT_OFFSET :HotspotDomOffset

Type:
  • HotspotDomOffset
Source:

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
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) dom :Element|HTMLElement

Get the DOM content of the hotspot.
Type:
  • Element | HTMLElement
Source:

interactive :boolean

Get and set the interactive flag for the main hotspot DOM container.
Type:
  • boolean
Source:

offset :HotspotDomOffset

Get/set the offset of the DOM object.
Type:
  • HotspotDomOffset
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:

visible :boolean

Get and set the visible flag.
Type:
  • boolean
Source:

warning :boolean

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

Methods

destroy()

Destroy routine.
Overrides:
Source:

hide()

Hide the hotspot by removing it to the DOM container.
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:

show()

Show the hotspot by appending it to the DOM container.
Source:

update()

Update routine.
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. HotspotDOM

Members
Methods