Asset in Anark Studio 2.5
Base object for all nonutility classes.
Inherits from:
Instance Properties
| name | type | description |
|---|---|---|
| prototype | Object | The prototype for a class. [from Object] |
| constructor | Object | A reference to the constructor class for the current object instance. [from Object] |
| id | Number | (read only) Unique ID for the asset. |
| type | String | (read only) Type of the asset. |
| name | String | User-defined name for the asset. |
| parent | Object | (read only) Parent object of this asset. |
| active | Boolean | Should this asset be drawn? |
| startLifeTime | Number | Starting time of the asset. |
| endLifeTime | Number | Ending time of the asset. |
| behaviors | Collection | (read only) All Behavior objects attached under this asset. |
| sounds | Collection | (read only) All Sounds objects attached under this asset. |
| music | Collection | (read only) All Music objects attached under this asset. |
| context | TimeContext | (read only) The asset's local TimeContext object. |
| contextType | Number | Type of the TimeContext for this asset. |
Instance Methods
| name | returns | description |
|---|---|---|
| toLocaleString() | String |
For most objects, the same as toString() unless explicitly overridden.
[from Object]
|
| valueOf() | String |
Returns the internal this value of the object.
[from Object]
|
| hasOwnProperty() | Boolean | Determines if the object/instance itself has the named property or method. [from Object] |
| isPrototypeOf() | Boolean | Determines if the calling object prototype is in the inheritance chain for the supplied argument. [from Object] |
| propertyIsEnumerable() | 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]
|
| attach() | (none) | Attach the argument underneath the asset. |
| detach() | (none) | Remove an asset from this asset. |
| copy() | Asset | Create a copy of the asset. |
| toString() | String | Returns a string representation of the object. [from Object] |
Description
The Asset object is the basis for all nonutility classes within the Anark Studio system. Examples of assets include Image, Material and all Nodes. Assets have the power to make copies of themselves, as well as have Behaviors attached for interactivity. You can create dynamic properties for assets using dot syntax.