DynamicAtlasManager Class
Module: primitive Parent Module: cc
Manager the dynamic atlas.
Index
Properties
enabledBooleanEnabled or Disabled dynamic atlas.maxAtlasCountNumberThe maximum number of atlas that can be created.textureSizeNumberThe size of the atlas that was createdmaxFrameSizeNumberThe maximum size of the picture that can be added to the atlas.minFrameSizeNumberThe minimum size of the picture that can be added to the atlas.
Methods
insertSpriteFrameAppend a sprite frame into the dynamic atlas.resetResets all dynamic atlas, and the existing ones will be destroyed.showDebugDisplays all the dynamic atlas in the current scene, which you can use to view the current atlas state.
Details
Properties
enabled
Enabled or Disabled dynamic atlas.
| meta | description |
|---|---|
| Type | Boolean |
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:41 |
maxAtlasCount
The maximum number of atlas that can be created.
| meta | description |
|---|---|
| Type | Number |
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:64 |
textureSize
The size of the atlas that was created
| meta | description |
|---|---|
| Type | Number |
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:77 |
maxFrameSize
The maximum size of the picture that can be added to the atlas.
| meta | description |
|---|---|
| Type | Number |
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:90 |
minFrameSize
The minimum size of the picture that can be added to the atlas.
| meta | description |
|---|---|
| Type | Number |
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:103 |
Methods
insertSpriteFrame
Append a sprite frame into the dynamic atlas.
| meta | description |
|---|---|
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:116 |
Parameters
spriteFrameSpriteFrame
reset
Resets all dynamic atlas, and the existing ones will be destroyed.
| meta | description |
|---|---|
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:142 |
showDebug
Displays all the dynamic atlas in the current scene, which you can use to view the current atlas state.
| meta | description |
|---|---|
| Defined in | cocos2d/core/renderer/utils/dynamic-atlas/manager.js:166 |
Parameters
showBoolean