Constructor
new Templet()
Extends
Member
(static) TEMPLET_DICTIONARY :Object
aniSectionDic :Object
bindBoneBoneSlotDic :Object
A dictionary that binds slot data
boneSlotArray :Array
An array of store drop data
boneSlotDic :Object
A dictionary that stores slot data
deformAniArr :Array
Vertex animation data
drawOrderAniArr :Array
Render sequential animation data
eventAniArr :Array
Event animation data
ikArr :Array
IK data
isParseFail :Boolean
Failed to resolve?
isParserComplete :Boolean
mBoneArr
mRootBone :Bone
pathArr :Array
Path data
rate :Number
skinDataArray :Array
Skin data
skinDic :Object
Skin dictionary data
skinSlotDisplayDataArr
List of actual display objects for destruction
srcBoneMatrixArr :Array
Storing raw skeleton information
subTextureDic :Object
Storing texture data
tfArr :Array
Transform data
Methods
buildArmature(aniModeopt) → {Skeleton}
Create animation
0, using template buffered data, template buffering data is not allowed to modify (small memory overhead, small computational overhead, and no support for reloading)
1, using animation's own buffer, each animation will have its own buffer, quite expensive memory (memory overhead, low computational overhead, support reloading)
2, the use of dynamic way to real-time painting (memory cost is small, computing overhead, support for reloading, not recommended)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
aniMode |
int
|
<optional> |
0 | aniMode 0 animation mode, 0: does not support reloading, 1,2 supports reloading |
Returns:
- Type:
-
Skeleton
destroy()
Release texture
dispose()
- Inherited From:
getAniDuration()
- Inherited From:
getAnimation()
- Inherited From:
getAnimationCount()
- Inherited From:
getAnimationDataWithCache()
- Inherited From:
getAniNameByIndex(index) → {String}
Get an animation name by index
Parameters:
Name | Type | Description |
---|---|---|
index |
int
|
Returns:
- Type:
-
String
getNodeCount()
- Inherited From:
getNodeIndexWithName()
- Inherited From:
getNodes()
- Inherited From:
getNodesCurrentFrameIndex()
- Inherited From:
getOriginalData()
- Inherited From:
getOriginalDataUnfixedRate()
- Inherited From:
getPublicExtData()
- Inherited From:
getSkinIndexByName(skinName) → {int}
Get skin index by skin name
Parameters:
Name | Type | Description |
---|---|---|
skinName |
String
|
Skin name |
Returns:
- Type:
-
int
getTexture(name) → {Texture}
Gets the specified texture
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
Texture name |
Returns:
- Type:
-
Texture
getTotalkeyframesLength()
- Inherited From:
load(url)
Load animation template.
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
url |
String
|
Animation template address. |
loadAni()
onAsynLoaded()
- Inherited From:
parseData(texture, skeletonData, playbackRateopt)
Analyzing skeleton animation data
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
texture |
Texture
|
Texture used in skeletal animation | ||
skeletonData |
ArrayBuffer
|
Skeletal animation information and texture block information | ||
playbackRate |
int
|
<optional> |
30 | playbackRate Buffer frame rate data (frames are divided according to frame rate) |
setAnimationDataWithCache()
- Inherited From:
Event
complete
数据解析完成后的调度
- See:
-
- events.Event.COMPLETE
error
数据解析错误后的调度
- See:
-
- events.Event.ERROR