new BaseObject(className)
Most of the ForgeJS objects extends FORGE.BaseObject.
Its main purpose is to name objects with a class name (a type) and to have a destroy method that handles an "alive" flag.
Its main purpose is to name objects with a class name (a type) and to have a destroy method that handles an "alive" flag.
Parameters:
Name | Type | Description |
---|---|---|
className |
string | The class name of the object. |
- Source:
- To Do:
-
- See if we can trace inheritance.
Members
(readonly) alive :boolean
Get the alive flag value of the object.
Type:
- boolean
- Source:
(readonly) className :string
Get the class name of the object.
Type:
- string
- Source:
data :*
Get and set any custom data you want to associate to this object.
Type:
- *
- Source:
(readonly) onDestroy :FORGE.EventDispatcher
Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
- Source:
(readonly) tags :Array
Get the tags associated to this object.
Type:
- Array
- Source:
Methods
destroy()
Basic destroy method, prevent double destroy, change the alive flag.
- 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. |
- 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. |
- Source: