Bytes described by every live texture and every live render target — §84's textureMemory (§83).
textureMemory
const before = textureMemoryBytes();const atlas = new Texture({ width: 256, height: 256 });textureMemoryBytes() - before; // === atlas.byteLength === 256 * 256 * 4atlas.dispose();textureMemoryBytes(); // === before Copy
const before = textureMemoryBytes();const atlas = new Texture({ width: 256, height: 256 });textureMemoryBytes() - before; // === atlas.byteLength === 256 * 256 * 4atlas.dispose();textureMemoryBytes(); // === before
Reading it allocates nothing and costs two property reads and an addition, so a diagnostics overlay may sample it every frame.
Bytes described by every live texture and every live render target — §84's
textureMemory(§83).Reading it allocates nothing and costs two property reads and an addition, so a diagnostics overlay may sample it every frame.