Cocos Creator API

1.0.0

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

SpriteAtlas

Extends RawAsset
Module: cc

Class for sprite atlas handling.

Properties

_uuid String private

Inherited from RawAsset:

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

Methods

getTexture ( ) cc.Texture2D

Returns the texture of the sprite atlas

returns:

type: cc.Texture2D

getSpriteFrame
(
  • key
)
cc.SpriteFrame

Returns the sprite frame correspond to the given key in sprite atlas.

name type description
key String

returns:

type: cc.SpriteFrame

createNodeByInfo
(
  • Info
  • callback
)

Inherited from RawAsset:

Create a new node in the scene.
If this type of asset dont have its corresponding node type, this method should be null.

name type description
Info Object
callback Function
  • error String

    null or the error info

  • node Object

    the created node or null

isRawAssetType
(
  • ctor
)
Boolean private

Inherited from RawAsset:

name type description
ctor Function

returns:

type: Boolean

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index