Files
cocos-engine/docs/cocos2d/core/textures/initWithTexture.js

5 lines
165 B
JavaScript

---------------------------
var texture = cc.textureCache.addImage("hello.png");
var textureAtlas = new cc.TextureAtlas();
textureAtlas.initWithTexture(texture, 3);