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

5 lines
165 B
JavaScript

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