-
addImage(image, fastInsert){utils.TextureAtlasNode}
-
Adds image to the atlas and returns creted node with texture coordinates of the stored image.
Name |
Type |
Description |
image |
Object
|
Input javascript image object. |
fastInsert |
boolean
|
optional
If it's true atlas doesnt restore all images again
and store image in the curent atlas sheme. |
Returns:
Type |
Description |
utils.TextureAtlasNode
|
- |
-
-
Sets openglobus gl handler that creates gl texture.
Name |
Type |
Description |
handler |
Handler
|
WebGL handler. |
-
-
Clear atlas with black.
-
-
Creates atlas gl texture.
-
-
Returns canvas object.
Returns:
-
getDiagonal(image){number}
-
Returns image diagonal size.
Name |
Type |
Description |
image |
Object
|
JavaSript image object. |
Returns:
Type |
Description |
number
|
- |
-
-
Returns atlas javascript image object.
Returns:
-
-
Asynchronous function that loads and creates image to the image cache, and call success callback when it's done.
Name |
Type |
Description |
src |
string
|
Image object src string. |
success |
Object~successCallback
|
The callback that handles the image loads done. |