Class ccs.Skin

Class Summary
Constructor Attributes Constructor Name and Description
 
ccs.Skin(fileName, rect)
ccs.Bone uses ccs.Skin to displays on screen.

Method Summary

Class Detail

ccs.Skin(fileName, rect)
ccs.Bone uses ccs.Skin to displays on screen.
Parameters:
{String} fileName Optional
{cc.Rect} rect Optional

Field Detail

{ccs.Bone} bone
- The bone of the skin
{String} displayName
- <@readonly> The displayed name of skin
{Object} skinData
- The data of the skin

Method Detail

  • <static> {ccs.Skin} ccs.Skin.create(fileName, rect)
    allocates and initializes a skin.
    Parameters:
    {String} fileName Optional
    fileName or sprite frame name
    {cc.Rect} rect Optional
    Deprecated:
    since v3.1, please use new construction instead
    Returns:
    {ccs.Skin}
  • <static> {ccs.Skin} ccs.Skin.createWithSpriteFrameName(spriteFrameName)
    allocates and initializes a skin.
    Parameters:
    {String} spriteFrameName
    Deprecated:
    since v3.1, please use new construction instead
    Returns:
    {ccs.Skin}
  • {null} getBone()
    Returns the bone reference of ccs.Skin.
    Returns:
    {null}
  • {String} getDisplayName()
    display name getter
    Returns:
    {String}
  • {cc.AffineTransform} getNodeToWorldTransform()
    Returns skin's world transform.
    Returns:
    {cc.AffineTransform}
  • {ccs.BaseData} getSkinData()
    Returns skin date of ccs.Skin.
    Returns:
    {ccs.BaseData}
  • {Boolean} initWithFile(fileName, rect)
    Initializes with texture file name.
    Parameters:
    {String} fileName
    {cc.Rect} rect
    Returns:
    {Boolean}
  • {Boolean} initWithSpriteFrameName(spriteFrameName)
    Initializes with sprite frame name
    Parameters:
    {String} spriteFrameName
    Returns:
    {Boolean}
  • setBone(bone)
    Sets the bone reference to ccs.Skin.
    Parameters:
    bone
  • setSkinData(skinData)
    Sets skin data to ccs.Skin.
    Parameters:
    {ccs.BaseData} skinData
  • updateArmatureTransform()
    Updates armature skin's transform with skin transform and bone's transform.