Releases context resources, stops render loop, destroys default textures, and shuts down the logical GPU connection.
Configures the HTML5 canvas for WebGPU, requests physical adapter connections, initializes GPUDevice capabilities, and instantiates shared managers.
Target HTMLCanvasElement for WebGPU swapchain presentation.
Executes a standard high-performance requestAnimationFrame render loop. Automatically calculates and supplies delta times while resetting frame-transient inputs.
Callback invoked every render frame, receiving the frame delta time in seconds.
Stops the active requestAnimationFrame render loop.
StaticinitHigh-level initialization routine that resolves a canvas element and boots WebGPU services.
A CSS query selector string or a direct HTMLCanvasElement reference.
A Promise resolving to an initialized Context.
StaticisAssesses whether the active navigator environment implements standard WebGPU interfaces.
True if WebGPU is supported, false otherwise.
The WebGPU-specific canvas rendering context. Configured to represent presentable textures rendered directly into the DOM canvas.
If true, enables extended runtime validation and debug logging. Defaults to false.
Shared fallback textures representing solid white colors and flat normal vectors.
Optionalblack?: ITextureStandard solid black 1x1 pixels texture fallback (used for black emission).
Optionalnormal?: ITextureDefault tangent-space normal map fallback (128, 128, 255).
Optionalwhite?: ITextureStandard solid white 1x1 pixels texture.
The logical GPU device interface representing a connection to the physical GPU. Utilized for resource allocation (buffers, textures, pipelines).
The preferred color format optimized for display on the local system (usually 'bgra8unorm' or 'rgba8unorm').
Local input manager instance for this context.
Asset loader instance associated with this context. Manages network loading, parsing of GLB/GLTF models, textures, and custom formats.
Pipeline manager associated with this context. Manages WebGPU pipeline compilations and cached bind group layouts.
Primitive geometry generator and cache. Avoids redundant pipeline / vertex allocations for standard geometric shapes like cubes, planes, or spheres.
VRAM tracker instance. Monitored inside the context to log, register, and analyze VRAM allocations for debug visualizer purposes.
Context acts as the primary orchestrator for a WebGPU instance on a target HTMLCanvasElement. It encapsulates the GPUDevice connection, the GPUCanvasContext configuration, and aggregates key framework singletons such as the PipelineManager, asset Loader, VRAMTracker, and PrimitivesFactory.