Files
cocos4/docs/cocos2d/core/textures/TextureAtlas.js
T

8 lines
277 B
JavaScript

--------------------------
1. //creates a TextureAtlas with filename
var textureAtlas = new cc.TextureAtlas("res/hello.png", 3);
2. //creates a TextureAtlas with texture
var texture = cc.textureCache.addImage("hello.png");
var textureAtlas = new cc.TextureAtlas(texture, 3);