Serializable url for native asset. For internal usage.
Associated event data.
Whether the asset is loaded or not
Animation frame rate: frames per second. Note this property is only used for animation editing in Editor.
Animation playback speed.
Animation loop mode.
Indicates whether its native object should be preloaded from native url.
The underlying native asset of this asset if one is available.
This property can be used to access additional details or functionality releated to the asset.
This property will be initialized by the loader if _native
is available.
The underlying native asset of this asset if one is available.
This property can be used to access additional details or functionality releated to the asset.
This property will be initialized by the loader if _native
is available.
此动画的数据。
Animation duration.
Animation duration.
Indicates whether the object is not yet destroyed. (It will not be available after being destroyed)
When an object's destroy
is called, it is actually destroyed after the end of this frame.
So isValid
will return false from the next frame, while isValid
in the current frame will still be true.
If you want to determine whether the current frame has called destroy
, use isValid(obj, true)
,
but this is often caused by a particular logical requirements, which is not normally required.
Frame keys referenced by curves.
Frame keys referenced by curves.
The name of the object.
The name of the object.
Returns the url of this asset's native object, if none it will returns an empty string.
The number of reference
Clear all references in the instance.
NOTE: this method will not clear the getter or setter functions which defined in the instance of CCObject. You can override the _destruct method if you need, for example: _destruct: function () { for (var key in this) { if (this.hasOwnProperty(key)) { switch (typeof this[key]) { case 'string': this[key] = ''; break; case 'object': case 'function': this[key] = null; break; } } }
Set native file name for this asset.
Add references of asset
itself
Create a new node using this asset in the scene.
If this type of asset dont have its corresponding node type, this method should be null.
Reduce references of asset and it will be auto released when refCount equals 0.
itself
Gets the event group shall be processed at specified ratio.
The ratio.
Returns if this animation contains event data.
应 AssetDB 要求提供这个方法。 返回一个序列化后的对象
Returns the string representation of the object.
The Asset
object overrides the toString()
method of the Object
object.
JavaScript calls the toString() method automatically
when an asset is to be represented as a text value or when a texture is referred to in a string concatenation.
For assets of the native type, it will return this.nativeUrl
.
Otherwise, an empty string is returned.
This method may be overwritten by subclasses.
Commit event data update.
You should call this function after you changed the events
data to take effect.
Crate clip with a set of sprite frames
应 AssetDB 要求提供这个方法。
Generated using TypeDoc
The animation clip represents a sequence of key frame animation created with the animation editor or skeletal animation other DCC tools. The data is divided in different levels: tracks, key frames, curves.