Documentation
    Preparing search index...

    Function textureMemoryBytes

    • Bytes described by every live texture and every live render target — §84's textureMemory (§83).

      const before = textureMemoryBytes();
      const atlas = new Texture({ width: 256, height: 256 });
      textureMemoryBytes() - before; // === atlas.byteLength === 256 * 256 * 4
      atlas.dispose();
      textureMemoryBytes(); // === before

      Reading it allocates nothing and costs two property reads and an addition, so a diagnostics overlay may sample it every frame.

      Returns number