FORGE. PluginManager

new PluginManager(viewer)

The FORGE.PluginManager manages FORGE.PluginEngine and FORGE.Plugin.
Parameters:
Name Type Description
viewer FORGE.Viewer The 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.Plugin>

Get the all plugins.
Type:
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) enabled :boolean

Get the enabled flag of plugins.
Type:
  • boolean
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) onInstanceCreate :FORGE.EventDispatcher

Get the "onInstanceCreate" FORGE.EventDispatcher of the PluginManager.
Type:
Source:

(readonly) prefix :string

Get the global prefix of plugins engines.
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 plugins configuration.
Parameters:
Name Type Description
config PluginsConfig The config to add
Source:

destroy()

Destroy method.
Overrides:
Source:

get(value) → {FORGE.Plugin}

Get a plugin instance by value.
Parameters:
Name Type Description
value number | string The index or uid to search for.
Source:
Returns:
Returns the plugin.
Type
FORGE.Plugin

getById(uid) → {FORGE.Plugin}

Get a plugin instance by uid.
Parameters:
Name Type Description
uid string The uid to search for.
Source:
Returns:
Returns the plugin.
Type
FORGE.Plugin

getByIndex(index) → {FORGE.Plugin}

Get a plugin instance by index.
Parameters:
Name Type Description
index number The index to search for.
Source:
Returns:
Returns the plugin.
Type
FORGE.Plugin

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(uid)

Remove a plugin instance.
Parameters:
Name Type Description
uid string The uid to search for.
Source:

render()

Render main loop for plugins.
Source:

update()

Update main loop for plugins.
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. PluginManager

Members
Methods