import TextureAtlas from 'three-nebula/src/renderer/GPURenderer/common/TextureAtlas/index.js'
TextureAtlas
Dynamic texture atlas for performant support of systems with multiple emitters and textures.
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
atlasIndex: * |
|
public |
atlasTexture: * |
|
public |
canvas: * |
|
public |
entries: *[] |
|
public |
indexData: * |
|
public |
|
|
public |
rendererType: * |
|
public |
shouldDebug: * |
Method Summary
Public Methods | ||
public |
addTexture(texture: *) Adds a texture to the texture atlas and flags that the atlas needs to be updated. |
|
public |
debug() Debugs the texture atlas by rendering it to a canvas in the DOM. |
|
public |
destroy(): * Disposes of the textures used by the texture atlas. |
|
public |
log(args: ...*) Logs to the console when in dev mode. |
|
public |
update() Updates the texture atlas. |
Public Constructors
public constructor() source
Public Members
public atlasIndex: * source
public atlasTexture: * source
public canvas: * source
public entries: *[] source
public indexData: * source
public rendererType: * source
public shouldDebug: * source
Public Methods
public addTexture(texture: *) source
Adds a texture to the texture atlas and flags that the atlas needs to be updated.
Params:
Name | Type | Attribute | Description |
texture | * |
public log(args: ...*) source
Logs to the console when in dev mode.
Params:
Name | Type | Attribute | Description |
args | ...* |
public update() source
Updates the texture atlas. Will only rebuild the atlas if all images are loaded.