Asset in Anark Studio 2.5
Base object for all nonutility classes.
Instance Properties
name | type | description |
---|---|---|
active | Boolean | Should this asset be drawn? |
behaviors | Collection | (read only) All Behavior objects attached under this asset. |
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. |
contextType | Number | Type of the TimeContext for this asset. |
endLifeTime | Number | Ending time of the asset. |
id | Number | (read only) Unique ID for the asset. |
music | Collection | (read only) All Music objects attached under this asset. |
name | String | User-defined name for the asset. |
parent | Object | (read only) Parent object of this asset. |
prototype | Object | The prototype for a class. [from Object] |
sounds | Collection | (read only) All Sounds objects attached under this asset. |
startLifeTime | Number | Starting time of the asset. |
type | String | (read only) Type of the asset. |
Instance Methods
name | returns | description |
---|---|---|
attach(assetObject) | (none) | Attach the argument underneath the asset. |
copy() | Asset | Create a copy of the asset. |
detach(assetObject) | (none) | Remove an asset from this 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]
|
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
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.
Arguments that are a Asset
name | in method | of object | description |
---|---|---|---|
assetObject | attach(assetObject) | Asset | The asset object to attach und |
assetObject | detach(assetObject) | Asset | The Asset object that will be< |