FORGE. ViewManager

new ViewManager(viewer)

View manager class
Parameters:
Name Type Description
viewer FORGE.Viewer FORGE.Viewer reference.
Source:

Extends

Members

_ready :boolean

Ready flag
Type:
  • boolean
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:

(readonly) current :FORGE.ViewBase

Get the current view object.
Type:
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) ready :boolean

Get the view ready flag.
Type:
  • boolean
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

type :string

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

destroy()

Destroy sequence
Overrides:
Source:

disableVR()

Disable VR restore the view type.
Source:

enableVR()

Enable VR backup the view type then force to rectilinear
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:

screenToWorld(screenPt) → {THREE.Vector3}

Convert a point from screen space to world space with the current view type.
Parameters:
Name Type Description
screenPt THREE.Vector2 point in screen space
Source:
To Do:
  • Implement screenToWorld
Returns:
Type
THREE.Vector3

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:

worldToScreen(worldPt, parallax) → {THREE.Vector2}

Convert a point from world space to screen space with the current view type.
Parameters:
Name Type Description
worldPt THREE.Vector3 Point in world space
parallax number Parallax factor [0..1]
Source:
To Do:
  • Implement worldToScreen
Returns:
Point in screen coordinates
Type
THREE.Vector2

FORGE. ViewManager

Members
Methods