Clears all active registrations.
Returns all tracked entries sorted by size (largest first).
Sorted array of tracked VRAMEntry items.
Extracts a concise summary count detailing active resource types and total byte sizes.
Metrics summary object.
Estimates the total VRAM consumption across all registered entries.
Total estimated VRAM in bytes.
Registers a newly created GPU resource allocation, caching timing and size details.
Native WebGPU buffer or texture object.
Resource classification category.
Resource description label.
Resource size in bytes.
Name of the owning class.
Unregisters a GPU resource that has been released or destroyed.
Native WebGPU buffer or texture reference.
StaticformatFormats raw byte counts into human-readable strings (e.g. "4.25 MB").
Size value in bytes.
Formatted string.
VRAMTracker tracks GPU memory allocations (buffers and textures) created by the engine. WebGPU does not expose a native API for querying total VRAM, so this uses manual bookkeeping — every createBuffer/createTexture in the engine calls
ctx.vramTracker.register(), and every.destroy()callsctx.vramTracker.unregister(). An instance class stored on Context to support multiple canvases and testability.