Constructor
Extends
Methods
enable(value) → {Node}
Set node's state
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | True to enable, false to disable |
- Inherited From:
A reference to the instance
findChild(name) → (nullable) {Node}
Find the child with the given name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | A string |
- Inherited From:
A Node instance of null
isEnabled() → {boolean}
Get state
- Inherited From:
True if the node is enabled, otherwise false
boolean
isRoot() → {boolean}
Indicates if the current node is the scene's root
- Inherited From:
True if it's the root node, otherwise false
boolean
removeChild(node) → {boolean}
Remove a child from the node
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | A Node instance |
- Inherited From:
True if the operation is a success
boolean
setAmbientColor(r, g, b) → {Light}
Set ambient color
Parameters:
Name | Type | Description |
---|---|---|
r |
number | Red value in the range 0 to 255 |
g |
number | Green value in the range 0 to 255 |
b |
number | Blue value in the range 0 to 255 |
A reference to the instance
setChildren(nodes)
Force add children without setting parent node, carefully use this one.
Parameters:
Name | Type | Description |
---|---|---|
nodes |
Array.<Node> | An array of nodes |
- Inherited From:
setDiffuseColor(r, g, b) → {Light}
Set diffuse color
Parameters:
Name | Type | Description |
---|---|---|
r |
number | Red value in the range 0 to 255 |
g |
number | Green value in the range 0 to 255 |
b |
number | Blue value in the range 0 to 255 |
A reference to the instance
setName(name) → {Node}
Set the name to easily retrieve it later
Parameters:
Name | Type | Description |
---|---|---|
name |
string | A string |
- Inherited From:
A reference to the instance
setSpecularColor(r, g, b) → {Light}
Set specular color
Parameters:
Name | Type | Description |
---|---|---|
r |
number | Red value in the range 0 to 255 |
g |
number | Green value in the range 0 to 255 |
b |
number | Blue value in the range 0 to 255 |
A reference to the instance
update(deltaTime, forceUpdatenullable) → {boolean}
Update the node and his children
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
deltaTime |
number | A floating value representing time elapsed between two frames | ||
forceUpdate |
boolean |
<nullable> |
false | Set to true to force an update |
- Inherited From:
True if the node has been updated
boolean
visit(renderTarget) → {boolean}
Visit the node and his children
Parameters:
Name | Type | Description |
---|---|---|
renderTarget |
RenderTarget | Renderer who called this method |
- Overrides:
True if visit was successful, otherwise false
boolean