new PluginEngine(viewer)
A plugin Engine handle the javascript files to load, and the constructor.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
FORGE.Viewer | FORGE.Viewer reference. |
- Source:
- To Do:
-
- In the sources list (in plugin manifest), add possibility to specify type (script or css) for special cases.
Extends
Members
(static, constant) reserved :Object
List of reserved keys for specific cache.
Type:
- Object
- Source:
(readonly) actions :Array.<String>
Get the available actions of the plugin engine.
Type:
- Array.<String>
- 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) defaultConfig :PluginConfiguration
Get the default plugin configuration that contains (data + options + actions + events).
Type:
- PluginConfiguration
- Source:
(readonly) events :Object
Get the available events of the plugin engine.
Type:
- Object
- Source:
(readonly) fullUrl :string
Get the base url of the plugin engine.
Type:
- string
- Source:
(readonly) loaded :boolean
Get the loaded status of this plugin engine.
True if the plugin is considered as loaded.
Type:
- boolean
- Source:
(readonly) name :string
Get the name of this plugin engine.
Type:
- 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 on load complete FORGE.EventDispatcher of the plugin engine.
Type:
- Source:
(readonly) options :Object
Get the options of the plugin engine.
Type:
- Object
- 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) url :string
Get the base url of the plugin engine.
Type:
- string
- Source:
warning :boolean
Get and set the warning flag.
Type:
- boolean
- Inherited From:
- Source:
Methods
destroy()
Destroy method.
- Overrides:
- Source:
getNewInstance(viewer, plugin) → (nullable) {PluginStructure}
Get a new instance of the engine and associate it to a FORGE.Plugin Object.
Parameters:
Name | Type | Description |
---|---|---|
viewer |
FORGE.Viewer | The viewer attached to this instance. |
plugin |
FORGE.Plugin | The plugin who will represent this instance. |
- Source:
Returns:
Returns the instance of the engine.
- Type
- PluginStructure
load(config) → {boolean}
Load a configuration for the plugin engine,
the config describes the manifest url and the engine identification.
the config describes the manifest url and the engine identification.
Parameters:
Name | Type | Description |
---|---|---|
config |
PluginEngineConfig | The config of the plugin engine. |
- Source:
Returns:
Returns true if the engine is loaded.
- Type
- boolean
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:
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: