For internal usage.
Indicates whether to enable premultiplied alpha. You should disable this option when image's transparent area appears to have opaque pixels, or enable this option when image's half transparent area appears to be darken.
The time scale of this skeleton.
The name of default animation.
The name of default skin.
Enabled batch model, if skeleton is complex, do not enable batch, or will lower performance.
TODO
The node this component is attached to. A component is always attached to a node.
The skeletal animation is paused?
The component stencil stage (please do not any modification directly on this object)
The render data assembler
The blend factor enums
The post render data assembler
Returns a value which used to indicate the onLoad get called or not.
The name of current playing animation.
The name of current playing animation.
Main color for rendering, it normally multiplies with texture color.
Main color for rendering, it normally multiplies with texture color.
Indicates whether open debug bones.
Indicates whether open debug bones.
Indicates whether open debug mesh.
Indicates whether open debug mesh.
Indicates whether open debug slots.
Indicates whether open debug slots.
Indicates whether this component is enabled or not.
Indicates whether this component is enabled or not.
Indicates whether this component is enabled and its node is also active in the hierarchy.
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.
The materials of the model.
The materials of the model.
dstBlendFactor
The skeleton data contains the skeleton information (bind pose bones, slots, draw order,
attachments, skins, etc) and animations but does not hold any state.
Multiple skeletons can share the same skeleton data.
dstBlendFactor
The skeleton data contains the skeleton information (bind pose bones, slots, draw order,
attachments, skins, etc) and animations but does not hold any state.
Multiple skeletons can share the same skeleton data.
The bone sockets this animation component maintains.
Sockets have to be registered here before attaching custom nodes to animated bones.
The bone sockets this animation component maintains.
Sockets have to be registered here before attaching custom nodes to animated bones.
Enabled two color tint.
Enabled two color tint.
The uuid for editor.
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; } } }
If the component's bounding box is different from the node's, you can implement this method to supply a custom axis aligned bounding box (AABB), so the editor's scene view can perform hit test properly.
The rect to store the result bounding rect
Adds an animation to be played delay seconds after the current or last queued animation.
Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry object.
Adds a component class to the node. You can also add component to node by passing in the name of the script.
The class of component to be retrieved or to be created
Adds a component class to the node. You can also add component to node by passing in the name of the script.
A string for the class name of the component
Clears track of animation state by trackIndex.
Clears all tracks of animation state.
Find animation with specified name.
Finds a bone by name.
This does a string comparison for every bone.
Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Bone object.
Finds a slot by name. This does a string comparison for every slot.
Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Slot object.
Returns the attachment for the slot and attachment name.
The skeleton looks first in its skin, then in the skeleton data’s default skin.
Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Attachment object.
Returns the component of supplied type if the node has one attached, null if it doesn't.
You can also get component in the node by passing in the name of the script.
The class of component to be retrieved or to be created
Returns the component of supplied type if the node has one attached, null if it doesn't.
You can also get component in the node by passing in the name of the script.
A string for the class name of the component
Returns the component of supplied type in any of its children using depth first search.
The class of component to be retrieved
Returns the component of supplied type in any of its children using depth first search.
A string for the class name of the component
Returns all components of supplied type in the node.
The class of components to be retrieved
Returns all components of supplied type in the node.
A string for the class name of the components
Returns all components of supplied type in self or any of its children.
The class of components to be retrieved
Returns all components of supplied type in self or any of its children.
A string for the class name of the components
Returns track entry by trackIndex.
Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry object.
Get the shared material asset of the specified sub-model.
Get the material instance of the specified sub-model.
Get the actual rendering material of the specified sub-model. (material instance if there is one, or the shared material asset)
Get the animation state object
state
Return the renderer of attachment.
Invalidates the animation cache, which is then recomputed on each frame..
Whether in cached mode.
LateUpdate is called every frame, if the Component is enabled.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
the delta time in seconds it took to complete the last frame
Marks the render data of the current component as modified so that the render data is recalculated.
Marked necessary to update or not
When attaching to an active node or its node first activated.
onLoad is always called before any start functions, this allows you to order initialization of scripts.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
Post render data submission procedure, it's executed after assembler updated for all children. It may assemble some extra render data to the geometry buffers, or it may only change some render states. Don't call it unless you know what you are doing.
Request new render data object.
The new render data
Called to initialize the component or node’s properties when adding the component the first time or when the Reset command is used.
This function is only called in editor.
Schedules a custom task.
If the task is already scheduled, then the interval parameter will be updated without scheduling it again.
The callback function of the task
The time interval between each invocation
The repeat count of this task, the task will be invoked (repeat + 1) times, use macro.REPEAT_FOREVER to repeat a task forever
The delay time for the first invocation, Unit: s
Schedules a task that runs only once, with a delay of 0 or larger.
The callback function of the task
The delay time for the first invocation, Unit: s
Set the current animation. Any queued animations are cleared.
Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry object.
It's best to set cache mode before set property 'dragonAsset', or will waste some cpu time. If set the mode in editor, then no need to worry about order problem.
Sets animation state data.
The parameter type is {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.AnimationStateData.
Sets the attachment for the slot and attachment name. The skeleton looks first in its skin, then in the skeleton data’s default skin.
Sets the bones to the setup pose,
using the values from the BoneData
list in the SkeletonData
.
Set the complete event listener.
Set the dispose event listener.
Set the end event listener.
Set the animation event listener.
Set the interrupt event listener.
Set the shared material asset of the specified sub-model, new material instance will be created automatically if the sub-model is already using one.
Set the material instance of the specified sub-model.
Mix applies all keyframe values, interpolated for the specified time and mixed with the current values.
Sets runtime skeleton data to sp.Skeleton.
This method is different from the skeletonData
property. This method is passed in the raw data provided by the
Spine runtime, and the skeletonData type is the asset type provided by Creator.
Finds a skin by name and makes it the active skin.
This does a string comparison for every skin.
Note that setting the skin does not change which attachments are visible.
Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Skin object.
Sets slots visible range.
Sets the slots to the setup pose,
using the values from the SlotData
list in the SkeletonData
.
Set the start event listener.
Sets the bones and slots to the setup pose.
Set the complete event listener for specified TrackEntry.
Set the dispose event listener for specified TrackEntry.
Set the end event listener for specified TrackEntry.
Set the event listener for specified TrackEntry.
Set the interrupt event listener for specified TrackEntry.
Set the start event listener for specified TrackEntry.
Sets vertex effect delegate.
Called before all scripts' update if the Component is enabled the first time.
Usually used to initialize some logic which need to be called after all components' onload
methods called.
This is a lifecycle method. It may not be implemented in the super class.
You can only call its super class method inside it. It should not be called manually elsewhere.
Un-schedules a custom task.
The callback function of the task
unschedule all scheduled tasks.
Updating an animation cache to calculate all frame data in the animation is a cost in performance due to calculating all data in a single frame. To update the cache, use the invalidAnimationCache method with high performance.
Render data submission procedure, it update and assemble the render data to 2D data buffers before all children submission process. Usually called each frame when the ui flow assemble all render data to geometry buffers. Don't call it unless you know what you are doing.
Computes the world SRT from the local SRT for each bone.
Generated using TypeDoc
The skeleton of Spine
(Skeleton has a reference to a SkeletonData and stores the state for skeleton instance, which consists of the current pose's bone SRT, slot colors, and which slot attachments are visible.
Multiple skeletons can use the same SkeletonData which includes all animations, skins, and attachments.)