Handle an atlas texture: a texture containing multiple sub-textures. Each sub-texture ID encodes its (row, col) position:
id = (row << 16) | col row = (id >> 16) & 0xFFFF col = id & 0xFFFF
This keeps IDs stable even if the atlas size changes.
Readonly
Add a texture in the atlas
the imageUrl as hash
the dataUrl
Completely clears the atlas:
Free one instance texture
Free one instance texture using the slotId instead of the hash
Handle an atlas texture: a texture containing multiple sub-textures. Each sub-texture ID encodes its (row, col) position:
id = (row << 16) | col row = (id >> 16) & 0xFFFF col = id & 0xFFFF
This keeps IDs stable even if the atlas size changes.