Node in Anark Studio 2.5
Inheritance class specifying common functionality for various objects.
Instance Properties
name | type | description |
---|---|---|
active | Boolean | Should this asset be drawn? [from Asset] |
behaviors | Collection | (read only) All Behavior objects attached under this asset. [from Asset] |
cameras | Collection | (read only) All cameras attached to this object. |
clickable | Boolean | Can this object be clicked on? |
constructor | Object | A reference to the constructor class for the current object instance. [from Object] |
context | TimeContext | (read only) The asset's local TimeContext object. [from Asset] |
contextType | Number | Type of the TimeContext for this asset. [from Asset] |
endLifeTime | Number | Ending time of the asset. [from Asset] |
groups | Collection | (read only) All groups attached to this object. |
id | Number | (read only) Unique ID for the asset. [from Asset] |
lastGlobalTransform | Matrix | (read only) Cumulative transformation applied to this object. |
lights | Collection | (read only) All lights attached to this node. |
models | Collection | (read only) All models attached to this node. |
music | Collection | (read only) All Music objects attached under this asset. [from Asset] |
name | String | User-defined name for the asset. [from Asset] |
opacity | Number | Opacity of the object. |
parent | Object | (read only) Parent object of this asset. [from Asset] |
pivot | Vector | Pivot point location. |
position | Vector | Location of the object. |
prototype | Object | The prototype for a class. [from Object] |
rotation | Rotation | Rotation of the object. |
scale | Vector | Scale of the object. |
sounds | Collection | (read only) All Sounds objects attached under this asset. [from Asset] |
startLifeTime | Number | Starting time of the asset. [from Asset] |
type | String | (read only) Type of the asset. [from Asset] |
Instance Methods
name | returns | description |
---|---|---|
attach(assetObject) | (none) | Attach the argument underneath the asset. [from Asset] |
copy() | Asset | Create a copy of the asset. [from Asset] |
detach(assetObject) | (none) | Remove an asset from this asset. [from Asset] |
hasOwnProperty(propertyOrMethodName) | Boolean | Determines if the object/instance itself has the named property or method. [from Object] |
isPrototypeOf(instanceToTest) | Boolean | Determines if the calling object prototype is in the inheritance chain for the supplied argument. [from Object] |
propertyIsEnumerable(propertyOrMethodName) | Boolean |
Determines if the object/instance itself has a property or method of the supplied name which will appear in a for (prop in obj) enumeration.
[from Object]
|
removeChildren() | (none) | Remove all children from this node. |
toLocaleString() | String |
For most objects, the same as toString() unless explicitly overridden.
[from Object]
|
toString() | String | Returns a string representation of the object. [from Object] |
valueOf() | String |
Returns the internal this value of the object.
[from Object]
|
Description
Nodes represent the basis for all objects that may be attached to the layers in the scene. All objects that are types of nodes have the above properties and methods, allowing them to be placed in the scene and their position and rotation manipulated.
Node Examples
// Create two nodes, a light and camera, and set some basic properties for them.
this.theLight = new Light( "KeyLight" );
this.theCamera = new Camera( "MainCamera" );
// Attach the nodes to the scene
scene.layer.attach( this.theLight );
scene.layer.attach( this.theCamera );
// Set some properties.
this .theLight.position.x = 10;
this .theLight.position.y = 20;