render/PlanetPreviewRenderer.js

render/PlanetPreviewRenderer.js
Classes
class PlanetPreviewRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Generate planet preview showing explored region Calculate bounds of explored chunks in world coordinates Draw starfield background Draw the planet sphere with procedural terrain Get terrain color based on lat/lon using procedural noise Draw atmospheric glow around planet Draw indicator showing explored region on globe Draw info overlay with world stats Simple 2D noise function Seeded random for consistent star placement Linear interpolate between two colors <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/RenderBundleManager.js

render/RenderBundleManager.js
Classes
class RenderBundleManager
class ParticleRenderBundleCache
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Render Bundle Manager Pre record draw commands for massive CPU overhead reduction Based on WebGPU best practices from Toji.dev Reduces draw call overhead by 10x for repeated rendering Method Signature Summary Create a render bundle for repeated draw calls Execute a render bundle in a render pass Create particle rendering bundle Invalidate a bundle (force recreation) Clear all bundles Particle specific render bundle optimization Pre records particle billboard rendering for massive performance gains Method Signature Summary Get or create particle render bundle Bundles are keyed by instance count brackets (powers of 2) Execute particle bundle with dynamic instance count <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all


render/RenderBundleManager.js

access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/RenderingInit.js

render/RenderingInit.js
Functions
async initParticleSystem(options)
async initSmokeRenderer(options)
async initSimulationRendering(options)
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Initialize particle simulation and renderer. Parameters: (Object) — Initialization options (Object) — GPU device wrapper (Object) — Raw WebGPU device (string) — Surface format (Object) — Particle state to populate (number) — Max particle count (default: 20000) (number) — Compute workgroup size (default: 256) (string) — Renderer type ('point' 'billboard') (string) — Blend mode (Function) — Optional logger Initialize volumetric smoke renderer (fluid sim is lazy). Parameters: (Object) — Initialization options (Object) — Raw WebGPU device (string) — Surface format (number) — Room size for volume bounds (Object) — Smoke state to populate (Function) — Optional logger Initialize particle system and optionally smoke renderer. Parameters: (Object) — Combined options <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives.


render/RenderingInit.js

requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/SceneRenderer.js

render/SceneRenderer.js
Functions
encodeEntitiesClusterCulling(options)
renderEntities(options)
renderRoom(options)
renderLightCube(options)
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Render all spawned ECS entities. Parameters: (Object) — Render options (Object) — WebGPU render pass (Array) — Spawned entities array (Object) — Mesh lookup { cube, sphere, cylinder, plane } (Map) — Entity uniform buffers (Map) — Entity bind groups (Function) — Function to get entity transform (Function) — Function to update uniforms (number) — Current light count (number null) — Selected entity for outline Render room geometry (floor, walls, ceiling). Parameters: (Object) — Render options (Object) — WebGPU render pass (Object) — Room meshes and bind groups (Function) — Function to update uniforms (number) — Current light count Render a light cube at a position. Parameters: (Object) — Render options <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an


render/SceneRenderer.js

and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/VolumetricRaymarch.js

render/VolumetricRaymarch.js
Classes
class VolumetricRaymarcher
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Initialize GPU resources Update density texture from CPU data Copy density from GPU buffer (e.g., MPM grid) Update uniforms Render to output texture Set render mode Set color ramp Constants — Default raymarch parameters — Render modes <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/World3DPreviewRenderer.js
Classes
class World3DPreviewRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Initialize WebGPU for the preview Generate heightmap from chunk data Add sci fi orbital ring around planet Add glowing location marker on planet surface Add glowing ring around location marker Start rendering animation Stop rendering Convert float32 to float16 (half precision) Cleanup <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/WorldParticleRenderer.js

render/WorldParticleRenderer.js
Classes
class WorldParticleRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Update frame uniforms Upload particle data Render particles Load configuration from engine.cfg section <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/AerialPerspective.js
Classes
class AerialPerspective
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes AerialPerspective Distance based color shifting Method Signature Summary Initialize GPU resources Update uniform buffer Configure for a specific view distance Set horizon color Set effect strengths Apply aerial perspective to a color (CPU side) Get effect factor for a distance Apply a preset Get bind group entry Load configuration from engine.cfg section Get WGSL shader code Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Calculate recommended Mie asymmetry based on visibility Parameters: (number) — Visibility in meters Returns: Mie asymmetry parameter g (0.76 0.99) Get step size recommendation based on optical depth Parameters: (number) — Local optical depth Returns: Recommended step multiplier (0.1 to 1.0) Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes AtmosphericScattering Physical atmosphere simulation Method Signature Summary Initialize GPU resources Update uniform buffer Set planet radius Set meteorological visibility Set sun direction (normalized) Set camera height above surface Calculate geometric horizon distance Calculate effective horizon with refraction Calculate Rayleigh scattering limit ( 300km on Earth) Calculate Koschmieder visibility Apply atmospheric scattering to a color (CPU side) Get visibility info for debugging Set weather conditions Get bind group entry Load configuration from engine.cfg section Get WGSL shader code Precompute transmittance LUT texture Maps (altitude, view zenith angle) transmittance RGB Reduces per pixel scattering calculation to a single texture fetch Precompute inscattering LUT texture Maps (altitude, sun zenith, view sun angle) inscattered light RGB 3D texture for full angular coverage Compute optical depth and transmittance for LUT Compute inscattered light for LUT Compute ray length through atmosphere Initialize all LUTs for fast runtime sampling Get LUT bind group entries for shader Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it.


device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/AuroraPass.js
Classes
class AuroraPass
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes AuroraPass Volumetric aurora rendering pass Method Signature Summary Initialize GPU resources Update uniform buffer Update per frame (call before rendering) Set sun direction (for night side visibility) Set aurora intensity Set color shift Get uniform buffer for binding Get WGSL shader code Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/BlueNoise.js
Classes
class BlueNoiseTexture
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes BlueNoiseTexture GPU blue noise texture manager Method Signature Summary Initialize blue noise texture Advance frame counter (call once per frame) Get texture view for binding Get sampler for binding Get current frame index Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/CelestialMoon.js
Classes
class Moon
class MoonSystem
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Moon class for orbital mechanics and state management Method Signature Summary Update moon position and phase based on time Get uniform data for GPU Check if moon is above horizon MoonSystem Manages multiple moons Method Signature Summary Add a moon to the system Remove a moon from the system Update all moons Get all visible moons Get uniform data for all moons (up to maxMoons) Load preset moons Constants — Default configurations for different moon types — Preset moon configurations for the world — WGSL shader code for moon rendering <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU


Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/CelestialStars.js
Classes
class StarField
class StarSystem
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes StarField class for managing star rendering Method Signature Summary Add a star layer Remove a star layer Load default layers Get visibility factor based on sun position Get uniform data for GPU Update configuration StarSystem Complete star management system Method Signature Summary Initialize with default settings Add a constellation Load preset constellations Get all uniform data Constants — Star layer types for different visual effects — Star field configuration defaults — Star layer presets — Constellation definitions (named star patterns) — WGSL shader code for star rendering <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations.


reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/CelestialSun.js
Classes
class Sun
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Sun class for orbital mechanics and state management Method Signature Summary Update sun position based on time Get uniform data for GPU Check if sun is above horizon Get day factor (0 = night, 1 = full day) Constants — WGSL shader code for sun rendering <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/DistanceFog.js
Classes
class DistanceFog
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes DistanceFog Distance based fog system Method Signature Summary Initialize GPU resources Update uniform buffer Update camera position Set fog type Set fog color Set fog distances (for linear fog) Set fog density (for exponential fog) Configure based on render distance Calculate fog factor for a position (CPU side) Calculate chunk fade factor Apply fog to color (CPU side) Get bind group entry for uniform buffer Apply a preset Load configuration from engine.cfg section Get WGSL shader code Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/HillaireLUT.js
Classes
class HillaireLUT
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes HillaireLUT Main class for Hillaire style atmospheric LUT system Method Signature Summary Initialize GPU resources Update atmosphere parameters buffer Update camera parameters buffer Update frustum parameters buffer for aerial perspective Generate Transmittance LUT (call when atmosphere params change) Generate Multi Scattering LUT (call when atmosphere params change) Must be called AFTER transmittance LUT is generated Generate Sky View LUT (updated every frame) Must be called AFTER transmittance and multi scatter LUTs are generated Generate Aerial Perspective LUT (updated every frame) Must be called AFTER transmittance and multi scatter LUTs are generated Set planet radius Set sun direction Set camera altitude (for sky view and aerial perspective LUTs) Set frustum parameters for aerial perspective Update LUTs if needed (call once per frame) Sky View and Aerial Perspective are regenerated every frame Get transmittance LUT texture view Get multi scattering LUT texture view Get sky view LUT texture view Get aerial perspective LUT texture view (3D) Get linear sampler for LUT sampling Get atmosphere params buffer Get camera params buffer Get frustum params buffer Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared


one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/PlanetCurvature.js
Classes
class PlanetCurvature
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes PlanetCurvature Planetary curvature simulation Method Signature Summary Initialize GPU resources Recalculate horizon distances Update uniform buffer Set planet radius Set camera height above surface Set refraction coefficient Calculate curvature drop at a distance (CPU side) Calculate hidden height of an object (CPU side) Check if an object is completely below horizon (hull down) Get visible fraction of an object Apply curvature displacement to a world position Get horizon information Comparison with Earth Get bind group entry Load configuration from engine.cfg sections Get WGSL shader code Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check


primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/ProceduralSky.js
Classes
class ProceduralSky
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes ProceduralSky Complete sky system Method Signature Summary Initialize the sky system Create the sky render pipeline Render the sky Update bind group to use Hillaire Sky View LUT when available Invert a 4x4 matrix (simple implementation for projection matrices) Update sky based on world time Update ambient and directional lighting based on sun/moons Get combined moonlight contribution Get the strongest moon currently above horizon Update GPU uniform buffer Set time of day Set time scale Set camera altitude (affects atmosphere rendering) Set planet parameters Connect to Hillaire LUT atmosphere system When connected, sky rendering uses production grade LUTs instead of built in scattering Get Hillaire LUT views for external rendering Get current time info Get sun direction for lighting Get primary light direction (sun during day, moon at night) Get bind group entry Load configuration from engine.cfg sections Get WGSL shader code Destroy resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device


automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/Space.js
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/SpectralWeather.js
Classes
class SpectralWeather
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes SpectralWeather T21 spectral weather simulation Method Signature Summary Initialize GPU resources Initialize coefficient buffer with realistic patterns Get coefficient buffer index Update uniform buffer Evolve weather coefficients (CPU fallback) Rossby wave frequency Sample weather at a point (CPU) Real spherical harmonic Y l^m(θ, φ) Associated Legendre polynomial P l^m(x) Get wind vector for cloud advection Get temperature for cloud formation Get humidity for precipitation Get coefficient buffer for GPU access Get uniform buffer Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU


does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes TemporalAccumulation TAA pass for atmosphere Method Signature Summary Initialize TAA resources Update uniforms Get Halton jitter offset for current frame Advance to next frame (swap buffers) Get jitter offset for applying to projection matrix Get history texture view Get current texture view Get uniform buffer Resize textures Destroy GPU resources Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/index.js
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Re exports , , , , , , , , , , , , , , , , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/atmosphere/sky/index.js
Constants
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Constants Re exports , , , , , , , , , , , , , , , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/debug/GridRenderer.js
Classes
class GridRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: GridRenderer Infinite grid for 3D viewport Now powered by vGPU driver Classes Method Signature Summary Update lighting parameters from LightManager <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/debug/PhysicsLineRenderer.js
Classes
class PhysicsLineRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: PhysicsLineRenderer.js GPU Line Rendering for Physics Objects Renders ropes, wires, hair strands, and chain links using GPU instancing. Supports both line primitives and tube geometry for thicker cables. Classes Method Signature Summary Update line data from physics simulations Render physics lines <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/debug/WireframeBoxRenderer.js
Classes
class WireframeBoxRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: WireframeBoxRenderer Renders wireframe boxes for debug visualization Used to visualize voxel colliders in the editor Now powered by vGPU driver Classes Method Signature Summary Clear boxes for this frame Add a wireframe box to render Render all accumulated boxes <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/debug/index.js
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Debug Renderers GPU debug visualization tools These renderers are useful for both editor and runtime debug visualization. Re exports , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createCapsuleGeometry(radius = 0.3, height = 1.0, radialSegments = 16, hemisphereSegments = 8)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createConeGeometry(radius = 0.5, height = 1.0, segments = 16)


render/geometry/CubeGeometry.js
Functions
createCubeGeometry(size = 1)
Notes & Examples
Shared GPU device


createHollowCylinderGeometry(outerRadius = 0.5, innerRadius = 0.4, height = 1.0, radialSegments = 24,)

createCylinderGeometry(radius = 0.5, height = 1.0, radialSegments = 16, heightSegments = 1,)


render/geometry/GroundGeometry.js
Functions
createGroundGeometry(size = 30)
Notes & Examples
Shared GPU device


render/geometry/PlaneGeometry.js
Functions
createPlaneGeometry(size = 10, y = 0)
Notes & Examples
Shared GPU device


render/geometry/PrimitiveGeometry.js
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Barrel export file for primitive geometry generators Re exports all geometry modules for convenient importing Re exports , , , , , , , , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/geometry/SkyboxGeometry.js
Functions
createSkyboxGeometry(size = 50)
Notes & Examples
Shared GPU device


createSphereGeometry(radius = 0.5, widthSegments = 16, heightSegments = 12)


buildStaticMeshFromGeometry(device, geometry, label, options = {})


createTorusGeometry(majorRadius = 0.4, minorRadius = 0.15, majorSegments = 24, minorSegments = 12)


render/gpu/IndirectDrawSystem.js
Classes
class IndirectDrawSystem
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Upload LOD table data Upload instance data Update culling parameters Create bind group for culling pass Execute GPU culling pass Get buffers for indirect draw call <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/index.js

render/index.js
Exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Engine Render Modules Exports all render related utilities from subfolders Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/lighting/RealtimeGI.js
Classes
class RealtimeGI
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Update params buffer Create bind groups Update probe irradiance (once per frame or less) Get shader code for sampling GI in materials Get probe irradiance buffer for shader binding Get probe grid config buffer for shader binding <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AnimatedMaterialSystem.js Per frame evaluation of animated material node graphs. Materials with Time nodes in their graph get evaluated every frame, producing live PBR values (baseColor, metallic, roughness, emissive) that the viewport renderer uses instead of static material definitions. Functions Initialize the animated material system. Scans all materials for animated node graphs and caches them. Parameters: (Object) — MaterialLibrary instance Evaluate all animated material graphs for this frame. Call once per frame before rendering entities. Get the current frame animated PBR values for a material. Returns null if the material is not animated. Parameters: (string) — No description in source JSDoc. Returns: { baseColor, metallic, roughness, emissive, ... } Check if a material is registered as animated. Parameters: (string) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery:


caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/materials/BindGroupManager.js
Classes
class BindGroupLayoutBuilder
class FrameBindGroup
class MaterialBindGroup
class ObjectBindGroup
class BindGroupCache
Functions
createVoxelBindGroupLayouts(device)
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes BindGroupLayoutBuilder Fluent API for building bind group layouts Method Signature Summary Add a uniform buffer binding Add a storage buffer binding Add a texture binding Add a depth texture binding Add a 3D texture binding Add a sampler binding Add a comparison sampler (for shadow mapping) Add a storage texture binding Build the bind group layout Get entries (for inspection/debugging) FrameBindGroup Manages Group 0 (per frame global data) Method Signature Summary Set a uniform field value Set a matrix uniform Set an additional resource (texture view, sampler) Upload dirty uniforms to GPU Get or create the bind group Bind to render pass Destroy resources MaterialBindGroup Manages Group 1 (per material data) Method Signature Summary Set a uniform field value Set a texture Set a sampler Upload dirty uniforms to GPU Get or create the bind group Bind to render pass Destroy resources ObjectBindGroup Manages Group 2 (per object data like transforms) Method Signature Summary Set a uniform field value Set a matrix uniform Upload and bind in one call (optimized for per draw updates) Destroy resources BindGroupCache Caches bind groups to avoid recreation Method Signature Summary Get or create a bind group Invalidate a cached bind group Clear entire cache Get cache statistics Functions Create the standard voxel renderer bind group layouts Parameters: (GPUDevice) — No description in source JSDoc. Returns: { frameLayout, materialLayout, objectLayout, pipelineLayout } Constants — Bind group frequency tiers <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse


objectLayout, pipelineLayout } Constants — Bind group frequency tiers <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


writeMaterialLibraryRecord(materials, storage = globalThis.localStorage)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MaterialLibrary.js Material CRUD & Persistence Manages a collection of PBR material definitions. Each material has: PBR scalar properties (metallic, roughness, emissive intensity) Color values (baseColor, emissiveColor) Texture slot paths (albedo, normal, metallicRoughness, emissive, ao) Metadata (id, label, tags) Persists to localStorage and can export/import JSON. Functions Normalize a material descriptor, filling missing fields with defaults. Parameters: (Object) — No description in source JSDoc. Create a MaterialLibrary instance. Returns: MaterialLibrary API Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createMaterialSystem(device, options = {})


render/materials/PipelineCache.js
Classes
class RenderStateDescriptor
class PipelineDescriptor
class ComputePipelineDescriptor
class PipelineCache
class ComputePipelineCache
class ShaderModuleCache
class MaterialPipelineManager
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: PipelineCache.js WebGPU Pipeline Caching and Specialization Implements: 1. Pipeline caching with composite keys (shader + overrides + render state) 2. Async pipeline compilation to prevent frame hitches 3. Pipeline specialization via override constants 4. Automatic pipeline invalidation on shader changes Classes RenderStateDescriptor Describes render pipeline state Method Signature Summary Set primitive topology Set cull mode Set depth test configuration Enable alpha blending Disable blending Set color format Set multisample count Generate cache key string Create a copy of this descriptor PipelineDescriptor Complete pipeline configuration Method Signature Summary Set entry points Add vertex buffer layout Set override constants Set render state Set label for debugging Generate cache key Build WebGPU render pipeline descriptor Method Signature Summary PipelineCache Caches compiled pipelines Method Signature Summary Get or create a pipeline synchronously Get or create a pipeline asynchronously Check if a pipeline is cached Check if a pipeline is being compiled Invalidate a specific pipeline Invalidate all pipelines using a shader module Clear entire cache Get cache statistics Precompile a set of pipeline variants Method Signature Summary ShaderModuleCache Caches compiled shader modules Method Signature Summary Get or create a shader module Invalidate a cached module Clear entire cache Get cache size MaterialPipelineManager High level material to pipeline management Method Signature Summary Register a shader for a material type Get pipeline for a material Get cache statistics <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned


Get pipeline for a material Get cache statistics <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/materials/ShaderComposer.js
Classes
class ShaderChunkRegistry
class PipelineOverrides
class ShaderVariant
class UberShaderBuilder
Functions
createDefaultRegistry()
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes ShaderChunkRegistry Central registry for shader code chunks Method Signature Summary Register a shader chunk Register multiple chunks at once Get a chunk by name Check if chunk exists Compose shader from multiple chunks PipelineOverrides Manage WGSL override constants WGSL override constants allow compile time specialization: Method Signature Summary Set an override value Set multiple overrides at once Get override value Check if override is set Clear all overrides Convert to WebGPU constants format For use in pipeline compilation options Generate cache key for pipeline caching Clone overrides ShaderVariant A specific configuration of a shader Method Signature Summary Get compilation options for this variant Generate unique key for this variant UberShaderBuilder Build ubershaders with feature toggles Method Signature Summary Add a base chunk (always included) Define a feature with its override constant and chunks Functions Create a default shader chunk registry with standard chunks Constants — Standard WGSL chunks for voxel rendering <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while


engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/materials/Std140Layout.js
Classes
class Std140StructBuilder
class Std140StructLayout
Functions
alignOffset(currentOffset, alignment)
createFrameUniformsLayout()
createChunkUniformsLayout()
createPBRMaterialLayout()
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Std140StructBuilder Build CPU side structs that match GPU layout exactly Method Signature Summary Add a field to the struct Add explicit padding (useful for matching existing GPU structs) Finalize struct ensures size is multiple of max alignment Std140StructLayout Immutable layout definition with write methods Method Signature Summary Get field info by name Create a typed array buffer for this struct Create a Float32Array view (for uniform writes) Write a value to the buffer at the field's offset Write a 4x4 matrix to the buffer Validate layout against expected offsets (for debugging) Debug: Print layout information Functions Calculate aligned offset for a field Parameters: (number) — Current byte offset (number) — Required alignment Returns: Aligned offset Create a FrameUniforms layout matching the VoxelRenderer Create a ChunkUniforms layout Create a MaterialUniforms layout for PBR materials Constants <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements:


feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


createTextureManager(device, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Create a TextureManager instance. Parameters: (GPUDevice) — No description in source JSDoc. Returns: TextureManager API <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/materials/VoxelMaterial.js
Classes
class VoxelMaterial
Functions
createVoxelFrameLayout()
createVoxelMaterialLayout()
createVoxelChunkLayout()
Constants
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: VoxelMaterial.js Production Voxel Material Implementation Now powered by vGPU driver Demonstrates the complete material system architecture: Frequency based bind groups (Frame/Material/Chunk) std140 compliant uniform layouts Pipeline specialization with override constants Modular shader composition Classes VoxelMaterial Complete material implementation for voxel rendering Method Signature Summary Create bind group layouts Create a frame bind group Create a material bind group with default values Create a chunk bind group Get or create pipeline with specific overrides Get pipeline for transparent rendering Get pipeline statistics Destroy all resources Functions Create the Frame uniforms layout (Group 0) Create the Material uniforms layout (Group 1) Create the Chunk uniforms layout (Group 2) Constants — Standard voxel vertex buffer layout <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports


wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes VoxelMaterialManager Manages voxel materials with the new system Method Signature Summary Register the main voxel shader Register the shadow shader Set quality preset Toggle a specific feature Get current overrides as constants for pipeline creation Get or create pipeline with current overrides Get pipeline for shadow pass Validate uniform buffer against layout Get statistics Clear all caches Functions Create validated Frame uniforms layout matching VoxelRenderer shader Create validated Chunk uniforms layout Create default voxel pipeline overrides Create low quality overrides for performance Integrate material system with existing VoxelRenderer Parameters: (VoxelRenderer) — No description in source JSDoc. (GPUDevice) — No description in source JSDoc. Create frame uniforms buffer with validated layout Parameters: (GPUDevice) — No description in source JSDoc. Returns: } Create chunk uniforms buffer with validated layout Parameters: (GPUDevice) — No description in source JSDoc. Returns: } Constants — Voxel shader features that can be toggled via overrides <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional


Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/materials/index.js
Functions
createVoxelMaterialSystem(device)
Re-exports
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Create a complete material system for voxel rendering Parameters: (GPUDevice) — No description in source JSDoc. Returns: Complete material system Re exports , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/mesh/ClothMeshRenderer.js
Classes
class ClothMeshRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ClothMeshRenderer.js GPU Cloth Mesh Rendering Renders cloth simulations as triangle meshes with proper shading. Reads particle positions from GPU buffer and generates mesh on the fly. Classes Method Signature Summary Update cloth mesh from simulation data Update from all cloth simulations Render cloth mesh <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/mesh/CustomMeshRegistry.js
Functions
registerCustomMesh(meshKey, geo)
unregisterCustomMesh(meshKey)
getCustomMesh(meshKey)
isCustomMesh(meshType)
getRegisteredMeshTypes()
onMeshRegistered(fn)
getCustomMeshCount()
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ CustomMeshRegistry.js Store imported mesh geometry for custom models ============================================================================ Functions Register a custom mesh geometry. Parameters: (string) — e.g. 'custom <uuid ' Unregister a custom mesh. Get geometry data for a custom mesh. Returns: null} Check if a meshType is a custom (imported) mesh. Get all registered custom mesh keys. Subscribe to mesh registration events. Callback: (meshKey, geo) = void Get count of registered custom meshes. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/mesh/EntityMeshRenderer.js
Classes
class EntityMeshRenderer
Functions
entityMaterialParamsData(options = {})
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Call at start of frame to reset instance batches Grow instance buffer to accommodate more entities Create a material bind group from a GPU texture view. Get a cached material bind group, or the default. Invalidate a cached material bind group (e.g. when texture changes). Interleave separate position/normal/uv/tangent arrays into a single vertex buffer. Layout: pos3 + normal3 + uv0 2 + tangent4 + uv1 2 = 14 floats per vertex. Register a custom mesh (imported model) at runtime. Update vertex buffer for a skinned mesh with new positions/normals. Called each frame by the skeletal animation system. Refresh local space animated bounds without replacing static mesh/SDF data. Get raw mesh data for SDF generation Store raw mesh data for SDF generation + compute bounding volumes. Computes both AABB (min/max/center/extents) and bounding sphere radius. The AABB is in local mesh space (before entity transform). Get precomputed bounding sphere radius for a mesh type. Custom/imported meshes that haven't loaded yet get a generous fallback (10.0) to prevent false culling. Built in types default to 0.866 (unit cube diagonal). Get precomputed bounding volumes for a mesh type. Returns AABB { min, max, center, extents } in local mesh space. For entities, the caller must offset center by entity position and scale extents. Queue an entity for instanced rendering (batched by mesh type + material) Call flush() after all entities to issue draw calls Flush all batched instances issues ONE draw call per mesh type Flush using the X ray pipeline — depth test always passes, no


all entities to issue draw calls Flush all batched instances issues ONE draw call per mesh type Flush using the X ray pipeline — depth test always passes, no depth write. Use for skeleton/diagnostic geometry that must show through opaque overlays. Re draw all this frame's batched instances into a shadow depth map. Must be called AFTER flush() (reuses the same GPU instance buffer data). Register a point cloud for rendering. Unregister and release GPU resources for a point cloud. Update the entity space offset and point size for a point cloud. Call each frame with the entity's world position. Render all registered point clouds. Call after flush() in the same render pass. Functions <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/mesh/GPUSkinning.js
Classes
class GPUSkinning
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ GPUSkinning.js — Compute shader skeletal skinning Moves vertex skinning from CPU to GPU. Per skinned mesh: Static buffers (uploaded once): bind pose positions+normals+tangents, UVs, joint indices, joint weights Dynamic buffer (per frame): skin matrices (jointCount × mat4x4) Output: interleaved vertex buffer (pos3+norm3+uv2+tangent4) with STORAGE VERTEX usage so the existing render pipeline reads it directly. The compute shader skins all vertices in parallel (workgroup size=64). ============================================================================ Classes Method Signature Summary Lazy init pipeline + shader (called once on first use) Register a skinned mesh for GPU skinning. Uploads static buffers (bind pose geometry, joint data) once. Creates the output vertex buffer with STORAGE VERTEX usage. Upload skin matrices and dispatch the compute shader for one mesh. Call once per frame per dirty skinned mesh, BEFORE rendering. Check if a mesh is registered for GPU skinning. Get the output vertex buffer for a registered mesh. Unregister a mesh and destroy its GPU resources. Destroy all resources. <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported


Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


generateProceduralSkeleton(positions, normals, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ ProceduralSkeleton.js — Auto generate skeleton + skin weights for arbitrary meshes Uses PCA to find principal axes, places bones along them, and computes smooth distance based vertex weights (4 influences per vertex). Output format matches glTF import so it plugs directly into registerSkinnedMesh() / SkeletalAnimation.js. ============================================================================ Functions Generate a procedural skeleton for an arbitrary mesh. Algorithm: 1. Compute mesh centroid + covariance matrix 2. PCA via Jacobi iteration → 3 principal axes sorted by extent 3. Place bones along principal axis (chain), with optional branches along secondary axis if mesh is wide enough 4. Compute per vertex weights: 4 nearest bones, inverse distance 5. Build inverse bind matrices (identity rotation, translation only) Parameters: (Float32Array number[]) — — flat xyz array (N 3) (Float32Array number[]) — — flat xyz array (N 3) (Object) — No description in source JSDoc. (number) — =0.8] — target distance between bones (number) — =2] — minimum bone count on primary axis (number) — =24] — maximum bone count total (number) — =0.35] — secondary/primary extent ratio to add branches (number) — =2.0] — exponent for distance weight falloff Returns: , skeleton: {jointCount, joints, inverseBindMatrices} }} Convenience: generate skeleton AND augment geo object in place. Returns the skeleton object for passing to registerSkinnedMesh. Parameters: (Object) — — same as generateProceduralSkeleton Returns: } <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by .


same as generateProceduralSkeleton Returns: } <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats


render/mesh/RopeMeshRenderer.js
Classes
class RopeMeshRenderer
Notes & Examples
Shared GPU device

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: RopeMeshRenderer.js GPU Rope Mesh Rendering with Anisotropic Fiber Shading Renders rope simulations as smooth tube meshes with Marschner hair shading model. Supports twist, color blending, and material properties for realistic fiber appearance. Classes Method Signature Summary Update rope meshes from ECS components Reads PhysicsChain components from entities Update rope meshes from unified particle system (Phase 3) Reads rope particle positions from ropeChains metadata Legacy method update from editor.physicsSimulations Map Build tube meshes from rope entries (shared by both update methods) Each entry: { pts, ringCount, radius, color, materialParams, secondaryColor, styleParams } <! HUMAN NOTES Notes & Examples Shared GPU device Engine subsystems should reuse the cached wrapper returned by . The wrapper owns the native , its queue, granted features, limits, and device loss callbacks. Resources created by one native device cannot be used by another, so pass the shared wrapper or native device into each subsystem that needs GPU access. Example: Acquire the shared engine device Request a feature only when the application cannot run without it. automatically requests the engine's supported optional feature set, while reports the features actually granted to the device. Feature and limit checks Device loss Gotchas: First acquisition defines requirements: caches the wrapper. Supply mandatory features and limits on the first call. Native access: use and when a subsystem needs WebGPU primitives. Recovery: this module reports device loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See


loss but does not expose an in place API. Re bootstrap all device owned resources together. Limits: check the granted before large allocations. (Source: ) See also: GPU Device Sharing · Virtual GPU · GpuFormats