Class ccs.Armature
- Defined in: CCArmature.js
- Extends ccs.NodeRGBA
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for ccs.Armature objects.
|
Method Summary
Class Detail
ccs.Armature()
Base class for ccs.Armature objects.
Method Detail
-
addBone(bone, parentName)add a bone
- Parameters:
- {ccs.Bone} bone
- {String} parentName
-
{cc.rect} boundingBox()This boundingBox will calculate all bones' boundingBox every time
- Returns:
- {cc.rect}
-
changeBoneParent(bone, parentName)Change a bone's parent with the specified parent name.
- Parameters:
- {ccs.Bone} bone
- {String} parentName
-
allocates and initializes a armature.
// example var armature = ccs.Armature.create();
- Parameters:
- name
- parentBone
- Returns:
- {ccs.Armature}
-
{ccs.Bone} createBone(boneName)create a bone
- Parameters:
- {String} boneName
- Returns:
- {ccs.Bone}
-
{ccs.ArmatureAnimation} getAnimation()armatureAnimation getter
- Returns:
- {ccs.ArmatureAnimation}
-
{ccs.ArmatureData} getArmatureData()armatureData getter
- Returns:
- {ccs.ArmatureData}
-
{Boolean} getArmatureTransformDirty()armatureTransformDirty getter
- Returns:
- {Boolean}
-
{cc.BlendFunc} getBlendFunc()blendFunc getter
- Returns:
- {cc.BlendFunc}
-
{ccs.Bone} getBone(name)get a bone by name
- Parameters:
- {String} name
- Returns:
- {ccs.Bone}
-
{ccs.Bone} getBoneAtPoint(x, y)when bone contain the point ,then return it.
- Parameters:
- {Number} x
- {Number} y
- Returns:
- {ccs.Bone}
-
{Object} getBoneDic()Get CCArmature's bone dictionary
- Returns:
- {Object}
-
{ccs.Bone} getParentBone()return parent bone
- Returns:
- {ccs.Bone}
-
{Number} getVersion()version getter
- Returns:
- {Number}
-
{Boolean} init(name, parentBone)Initializes a CCArmature with the specified name and CCBone
- Parameters:
- {String} name
- {ccs.Bone} parentBone
- Returns:
- {Boolean}
-
removeBone(bone, recursion)remove a bone
- Parameters:
- {ccs.Bone} bone
- {Boolean} recursion
-
setAnimation(animation)armatureAnimation setter
- Parameters:
- {ccs.ArmatureAnimation} animation
-
setArmatureData(armatureData)armatureData setter
- Parameters:
- {ccs.ArmatureData} armatureData
-
setBlendFunc(blendFunc)conforms to cc.TextureProtocol protocol
- Parameters:
- {cc.BlendFunc} blendFunc
-
setColliderFilter(filter)set collider filter
- Parameters:
- {ccs.ColliderFilter} filter
-
setParentBone(parentBone)parent bone setter
- Parameters:
- {ccs.Bone} parentBone
-
setVersion(version)version setter
- Parameters:
- {Number} version
-
updateBlendType(blendType)update blendType
- Parameters:
- {ccs.BlendType} blendType
-
updateOffsetPoint()Set contentSize and Calculate anchor point.