@woosh/meep-engine 3.77.0 → 3.78.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/package.json +3 -2
- package/src/engine/EngineHarness.d.ts +4 -6
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +11 -19
- package/src/engine/graphics3/GraphicsEngine.d.ts +19 -1
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +24 -2
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +4 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +36 -2
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +60 -3
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts +0 -1
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/EventInstance.js +0 -1
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts +8 -0
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/ComputePipelineManager.js +18 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts +8 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/RenderPipelineManager.js +17 -0
- package/src/shade/playground/avboit_footprint/index.html +20 -0
- package/src/shade/playground/avboit_footprint/main.d.ts +2 -0
- package/src/shade/playground/avboit_footprint/main.d.ts.map +1 -0
- package/src/shade/playground/avboit_footprint/main.js +428 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +7 -3
- package/src/shade/playground/screen_probes/main.d.ts.map +1 -1
- package/src/shade/playground/screen_probes/main.js +7 -3
- package/src/shade/renderer/Renderer.d.ts +18 -8
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +201 -16
- package/src/shade/renderer/RendererConfiguration.d.ts +95 -0
- package/src/shade/renderer/RendererConfiguration.d.ts.map +1 -0
- package/src/shade/renderer/RendererConfiguration.js +119 -0
- package/src/shade/renderer/extension/ShadowAtlas.d.ts +4 -2
- package/src/shade/renderer/extension/ShadowAtlas.d.ts.map +1 -1
- package/src/shade/renderer/extension/ShadowAtlas.js +4 -2
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +8 -0
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +34 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +7 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +15 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +10 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +37 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +31 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +7 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +20 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +8 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +14 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts +7 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +9 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +11 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +71 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js +9 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js +9 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.js +13 -0
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +9 -0
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +47 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +6 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +17 -0
- package/src/shade/renderer/hair/hair_shadow_draw.d.ts +2 -2
- package/src/shade/renderer/hair/hair_shadow_draw.js +2 -2
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts +8 -0
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +20 -1
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts +6 -0
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts.map +1 -1
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.js +11 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +6 -0
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +15 -0
- package/src/shade/renderer/particles/graph_particles.d.ts +8 -0
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +28 -3
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts +7 -0
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles_avboit.js +14 -0
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +5 -7
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +7 -0
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +15 -0
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts +6 -0
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +16 -2
- package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts +6 -0
- package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.js +9 -0
- package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts +11 -0
- package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.js +10 -0
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +6 -0
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +10 -1
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +7 -0
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +21 -0
- package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts +7 -0
- package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.js +11 -1
- package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts +9 -0
- package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.js +29 -0
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts +6 -0
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.js +13 -1
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts +6 -0
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.js +11 -0
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +9 -0
- package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.js +33 -18
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +8 -0
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +42 -2
- package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts +6 -0
- package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.js +10 -0
- package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts +6 -0
- package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.js +11 -0
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts +8 -0
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +27 -3
- package/src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.d.ts +7 -4
- package/src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.js +66 -14
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts +6 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js +10 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +5 -4
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +5 -4
- package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.d.ts +3 -3
- package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.js +3 -3
- package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js +5 -7
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js +5 -7
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts +34 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.js +42 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts +5 -4
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js +8 -7
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts +2 -2
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.js +4 -5
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +9 -0
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +18 -0
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts +20 -0
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js +149 -0
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.d.ts +8 -0
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +100 -33
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +9 -0
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +15 -0
- package/src/shade/renderer/rasterize/native/rasterization_shader_resources.d.ts +11 -0
- package/src/shade/renderer/rasterize/native/rasterization_shader_resources.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/rasterization_shader_resources.js +24 -11
- package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +6 -0
- package/src/shade/renderer/restir/di/ReSTIRDI.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/ReSTIRDI.js +10 -1
- package/src/shade/renderer/restir/di/graph_restir_di.d.ts +9 -0
- package/src/shade/renderer/restir/di/graph_restir_di.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/graph_restir_di.js +19 -1
- package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts +6 -0
- package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/graph_restir_di_denoise.js +9 -0
- package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts +7 -0
- package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts.map +1 -1
- package/src/shade/renderer/scene/movers/graph_scene_movers.js +11 -0
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_vertex_normal.d.ts +13 -0
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_vertex_normal.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_vertex_normal.js +42 -0
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +10 -0
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +39 -6
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts +34 -0
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js +106 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_cascade_caster_position.d.ts +16 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_cascade_caster_position.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_cascade_caster_position.js +50 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts +25 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js +42 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.js +5 -5
- package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts +7 -0
- package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.js +14 -0
- package/src/shade/renderer/text/shaders/shader_text_avboit.d.ts.map +1 -1
- package/src/shade/renderer/text/shaders/shader_text_avboit.js +5 -7
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +9 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +16 -1
- package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water_avboit.js +16 -13
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts +0 -33
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts.map +0 -1
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.js +0 -45
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### Cloth: a cloth that slides is not pulled back to where it landed
|
|
6
|
+
|
|
7
|
+
- **Fixed:** cloth friction pulled a sliding particle towards the point where its contact began, for as long as
|
|
8
|
+
the contact lasted. A sheet shoved across a floor swung back through where it started, and a sheet carried by a
|
|
9
|
+
turning collider went on round after the collider stopped. A friction row at its cap now brings its anchor up
|
|
10
|
+
behind the particle; a contact that holds is unchanged (cloth `MEASUREMENTS.md` §70).
|
|
11
|
+
- **Changed:** `cloth_contact_dual_update` takes `alpha` and `gamma` after the collider table.
|
|
12
|
+
|
|
5
13
|
### Sound: beat-locked music
|
|
6
14
|
|
|
7
15
|
- **Added:** `sopra/music/`, an adaptive score as layers of stems on one tempo grid. `MusicGrid` (tempo, meter
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Meep is a game engine with a GPU-driven WebGPU renderer, physics, spatial audio, rollback
|
|
6
6
|
networking and an in-app editor.
|
|
7
7
|
|
|
8
|
-
[Examples](https://meep.company-named.com/examples/) · [Documentation](https://meep.company-named.com/docs/getting-started/) · [Licence & pricing](https://meep.company-named.com/pricing/)
|
|
8
|
+
[Examples](https://meep.company-named.com/examples/) · [Documentation](https://meep.company-named.com/docs/getting-started/) · [Licence & pricing](https://meep.company-named.com/pricing/) · [Check your device](https://webgpu.report/check?features=indirect-first-instance,float32-blendable,texture-formats-tier1,subgroups&maxStorageBuffersPerShaderStage=10&maxColorAttachmentBytesPerSample=32)
|
|
9
9
|
|
|
10
10
|
## Getting started
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Advanced 3D game engine",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"author": "Alexander Goldring",
|
|
9
|
-
"version": "3.
|
|
9
|
+
"version": "3.78.1",
|
|
10
10
|
"exports": {
|
|
11
11
|
"./build/*": "./build/*",
|
|
12
12
|
"./src/*": "./src/*",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"**/*.scss"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"test:ci": "node scripts/check-types.mjs && vitest run --
|
|
23
|
+
"test:ci": "node scripts/check-types.mjs && vitest run --reporter=default --reporter=junit --outputFile=junit.xml",
|
|
24
|
+
"test:coverage": "vitest run --coverage --testTimeout=0",
|
|
24
25
|
"build-module": "rollup -c rollup.config.js",
|
|
25
26
|
"publish-npm": "npm publish",
|
|
26
27
|
"generate-types": "tsc --project tsconfig.types.json",
|
|
@@ -105,26 +105,24 @@ export class EngineHarness {
|
|
|
105
105
|
showFps?: boolean;
|
|
106
106
|
}): Promise<void>;
|
|
107
107
|
/**
|
|
108
|
+
* A sun. There is no ambient light: Shade lights indirect from the environment, see {@link LightSystem}.
|
|
109
|
+
*
|
|
108
110
|
* @param {Object} param
|
|
109
111
|
* @param {Engine} param.engine
|
|
110
112
|
* @param {EntityComponentDataset} [param.ecd]
|
|
111
113
|
* @param {boolean} [param.castShadow]
|
|
112
114
|
* @param {Color} [param.sun]
|
|
113
|
-
* @param {number} [param.sunIntensity]
|
|
115
|
+
* @param {number} [param.sunIntensity] lux, see {@link DEFAULT_SUNLIGHT_INTENSITY}
|
|
114
116
|
* @param {Vector3} [param.sunDirection]
|
|
115
|
-
* @param {Color} [param.ambient]
|
|
116
|
-
* @param {number} [param.ambientIntensity]
|
|
117
117
|
* @param {number} [param.sunShadowDistance] Maximum draw distance for sun's shadow. Allows better use of shadowmap resolution.
|
|
118
118
|
*/
|
|
119
|
-
static buildLights({ engine, ecd, castShadow, sun, sunIntensity, sunDirection, sunShadowDistance,
|
|
119
|
+
static buildLights({ engine, ecd, castShadow, sun, sunIntensity, sunDirection, sunShadowDistance, }: {
|
|
120
120
|
engine: Engine;
|
|
121
121
|
ecd?: EntityComponentDataset;
|
|
122
122
|
castShadow?: boolean;
|
|
123
123
|
sun?: Color;
|
|
124
124
|
sunIntensity?: number;
|
|
125
125
|
sunDirection?: Vector3;
|
|
126
|
-
ambient?: Color;
|
|
127
|
-
ambientIntensity?: number;
|
|
128
126
|
sunShadowDistance?: number;
|
|
129
127
|
}): Promise<void>;
|
|
130
128
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineHarness.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineHarness.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EngineHarness.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineHarness.js"],"names":[],"mappings":"AA4FA;IAmBI;;;;;OAKG;IACH;QAHmE,aAAa,GAArE,CAAC,MAAM,EAAC,mBAAmB,EAAC,MAAM,EAAC,MAAM,QAAI;QAC5C,QAAQ,MAAM,CAAC,CAM1B;IAED;;;;;;;;;OASG;IACH,0BAHW,MAAM,GACJ,KAAK,CAYjB;IAED;;;;;;;;;OASG;IACH,6BAHW,MAAM,GACJ,aAAa,CAQzB;IAkED;;;;;;;;;;;;;OAaG;IACH;QAZyB,MAAM,EAApB,MAAM;QACyB,GAAG,GAAlC,sBAAsB;QACN,MAAM,GAAtB,OAAO;QACQ,QAAQ,GAAvB,MAAM;QACS,KAAK,GAApB,MAAM;QACS,GAAG,GAAlB,MAAM;QACU,QAAQ,GAAxB,OAAO;QACQ,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACJ,MAAM,CA+DlB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH;QAnB0B,MAAM,EAArB,MAAM;QACgC,KAAK,GAA3C;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QACrB,SAAS;QACT,WAAW;QACF,KAAK,GAArB,MAAM;QACU,GAAG,GAAnB,MAAM;QACU,QAAQ,GAAxB,MAAM;QACwB,WAAW,GAAzC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAC,CAAC,EAAC,MAAM,CAAA;SAAC;QACJ,iBAAiB,GAAjC,MAAM;QACW,WAAW,GAA5B,OAAO;QACU,aAAa,GAA9B,OAAO;QACU,YAAY,GAA7B,OAAO;QACU,aAAa,GAA9B,OAAO;QACS,iBAAiB,GAAjC,MAAM;QACU,iBAAiB,GAAjC,MAAM;QACW,gBAAgB,GAAjC,OAAO;QACU,cAAc,GAA/B,OAAO;QACU,OAAO,GAAxB,OAAO;sBAwEjB;IAGD;;;;;;;;;;;OAWG;IACH;QARyB,MAAM,EAApB,MAAM;QACyB,GAAG,GAAlC,sBAAsB;QACN,UAAU,GAA1B,OAAO;QACO,GAAG,GAAjB,KAAK;QACU,YAAY,GAA3B,MAAM;QACU,YAAY,GAA5B,OAAO;QACQ,iBAAiB,GAAhC,MAAM;sBA2ChB;IAED;;;;;;OAMG;IACH;QAL0B,YAAY,GAA3B,MAAM;QACQ,MAAM,EAApB,MAAM;QACyB,GAAG,GAAlC,sBAAsB;QACpB,QAAQ,MAAM,CAAC,CAgD3B;IAGD;;;;;;;;;;OAUG;IACH;QAR2B,MAAM,EAAtB,MAAM;QACY,IAAI,GAAtB,OAAO;QACU,QAAQ;QACR,UAAU,GAA3B,MAAM;QACW,UAAU,GAA3B,MAAM;QACY,WAAW,GAA7B,OAAO;QACL,OAAO,CAwEnB;IAjfD;;;OAGG;IACH,YAFU,eAAQ,IAAI,CAEb;IAGL;;;OAGG;IACH,QAFU,MAAM,CAEiC;IA2DrD;;;;;OAKG;IACH;QAJkE,aAAa,GAApE,CAAC,MAAM,EAAC,mBAAmB,EAAC,MAAM,EAAC,MAAM,QAAI;QAC5B,mBAAmB,GAApC,OAAO;QACL,QAAQ,MAAM,CAAC,CA0D3B;CA8WJ;;IAID;;;OAGG;IACH,uCAMC;;qCAhjBY,OAAO,iCAAiC,EAAE,sBAAsB;mBA7B1D,aAAa;oCACI,0BAA0B;sBAQxC,kCAAkC;8BAnB1B,mCAAmC;oBAD7C,yBAAyB;mBAK1B,iBAAiB;sBATd,wBAAwB;oBAG1B,yBAAyB;oBASzB,8BAA8B"}
|
|
@@ -83,6 +83,13 @@ function setLocale(engine) {
|
|
|
83
83
|
*/
|
|
84
84
|
const DEFAULT_SUNLIGHT_COLOR = Object.freeze(new Color(1, 0.93, 0.87));
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* The default sun's illuminance, lux: π, under which a white Lambertian surface facing the sun reflects a radiance of
|
|
88
|
+
* 1 (ρ·E/π), and an 18% grey one 0.18 — the luminance an exposure of one shows at middle grey. A sunlit scene of the
|
|
89
|
+
* defaults therefore meters at about an exposure of one, and automatic exposure has little to adapt away.
|
|
90
|
+
*/
|
|
91
|
+
const DEFAULT_SUNLIGHT_INTENSITY = Math.PI;
|
|
92
|
+
|
|
86
93
|
export class EngineHarness {
|
|
87
94
|
/**
|
|
88
95
|
* @readonly
|
|
@@ -390,15 +397,15 @@ export class EngineHarness {
|
|
|
390
397
|
|
|
391
398
|
|
|
392
399
|
/**
|
|
400
|
+
* A sun. There is no ambient light: Shade lights indirect from the environment, see {@link LightSystem}.
|
|
401
|
+
*
|
|
393
402
|
* @param {Object} param
|
|
394
403
|
* @param {Engine} param.engine
|
|
395
404
|
* @param {EntityComponentDataset} [param.ecd]
|
|
396
405
|
* @param {boolean} [param.castShadow]
|
|
397
406
|
* @param {Color} [param.sun]
|
|
398
|
-
* @param {number} [param.sunIntensity]
|
|
407
|
+
* @param {number} [param.sunIntensity] lux, see {@link DEFAULT_SUNLIGHT_INTENSITY}
|
|
399
408
|
* @param {Vector3} [param.sunDirection]
|
|
400
|
-
* @param {Color} [param.ambient]
|
|
401
|
-
* @param {number} [param.ambientIntensity]
|
|
402
409
|
* @param {number} [param.sunShadowDistance] Maximum draw distance for sun's shadow. Allows better use of shadowmap resolution.
|
|
403
410
|
*/
|
|
404
411
|
static async buildLights({
|
|
@@ -406,11 +413,9 @@ export class EngineHarness {
|
|
|
406
413
|
ecd = engine.entityManager.dataset,
|
|
407
414
|
castShadow = true,
|
|
408
415
|
sun = DEFAULT_SUNLIGHT_COLOR,
|
|
409
|
-
sunIntensity =
|
|
416
|
+
sunIntensity = DEFAULT_SUNLIGHT_INTENSITY,
|
|
410
417
|
sunDirection = new Vector3(0.17, -1, 0.17),
|
|
411
418
|
sunShadowDistance = 1000,
|
|
412
|
-
ambient = Color.white,
|
|
413
|
-
ambientIntensity = 0.07
|
|
414
419
|
}) {
|
|
415
420
|
const em = engine.entityManager;
|
|
416
421
|
|
|
@@ -444,19 +449,6 @@ export class EngineHarness {
|
|
|
444
449
|
.add(transform)
|
|
445
450
|
.add(Tag.fromJSON(["Light", "Key"]))
|
|
446
451
|
.build(ecd);
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
const fill = new Light();
|
|
450
|
-
fill.type.set(Light.Type.AMBIENT);
|
|
451
|
-
fill.color.copy(ambient);
|
|
452
|
-
fill.intensity.set(ambientIntensity);
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
new Entity()
|
|
456
|
-
.add(fill)
|
|
457
|
-
.add(new Transform64())
|
|
458
|
-
.add(Tag.fromJSON(["Light", "Ambient"]))
|
|
459
|
-
.build(ecd);
|
|
460
452
|
}
|
|
461
453
|
|
|
462
454
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* start(), stop(), render(), updateSize()}` — because that is what `Engine` needs in order to boot,
|
|
7
7
|
* and because the facade is deliberately not allowed to grow past §4.2 (D14).
|
|
8
8
|
*
|
|
9
|
-
* **
|
|
9
|
+
* **Five things have been let through since, each by name.** {@link add_extension} /
|
|
10
10
|
* {@link remove_extension} (E9), because an extension has to survive the restart that replaces the
|
|
11
11
|
* renderer holding it; {@link add_transparency_channel} / {@link remove_transparency_channel}
|
|
12
12
|
* (2026-09-24, trails), the same door for the one thing an extension cannot do — draw inside the
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
* callers that have no other route, not a migration target — the old engine's 44
|
|
21
21
|
* `.renderer`/`getRenderer()` call sites are each still a migration item.
|
|
22
22
|
*
|
|
23
|
+
* {@link renderer_configuration} is the fifth: what every renderer this engine starts begins as. It
|
|
24
|
+
* is held here for the reason extensions are — it is stated before a device exists, and it outlives
|
|
25
|
+
* the renderer a restart replaces — and it is data the caller writes, not the renderer.
|
|
26
|
+
*
|
|
23
27
|
* What is deliberately absent, and stays absent: `getRenderer()` (the old engine's accessor, and
|
|
24
28
|
* the shape those call sites are being ported off), `layers` (CPU visibility dies with GPU
|
|
25
29
|
* culling), `scene` (entities reach the scene through the mesh system, not through the facade),
|
|
@@ -44,6 +48,19 @@ export class GraphicsEngine {
|
|
|
44
48
|
* @returns {Renderer|null}
|
|
45
49
|
*/
|
|
46
50
|
get renderer(): Renderer;
|
|
51
|
+
/**
|
|
52
|
+
* What every renderer {@link start} makes begins as: the settings that decide which pipelines it
|
|
53
|
+
* compiles ahead of its first frame, so a frame is not held up compiling them when it first draws
|
|
54
|
+
* with them. Write to it before {@link start}.
|
|
55
|
+
*
|
|
56
|
+
* {@link start} reads it each time, so a restart begins from it again. Once a renderer is running
|
|
57
|
+
* its own fields are the state: a change made here waits for the next {@link start}, and a change
|
|
58
|
+
* made on the renderer does not come back here.
|
|
59
|
+
*
|
|
60
|
+
* @readonly
|
|
61
|
+
* @type {RendererConfiguration}
|
|
62
|
+
*/
|
|
63
|
+
readonly renderer_configuration: RendererConfiguration;
|
|
47
64
|
/**
|
|
48
65
|
* @param {boolean} v
|
|
49
66
|
*/
|
|
@@ -409,6 +426,7 @@ export type GPUSceneContext = import("../../shade/renderer/scene/GPUSceneContext
|
|
|
409
426
|
export type ShadeTexture = import("../../shade/renderer/texture/ShadeTexture.js").ShadeTexture;
|
|
410
427
|
export type Camera = import("../graphics/ecs/camera/Camera.js").Camera;
|
|
411
428
|
import { Renderer } from "../../shade/renderer/Renderer.js";
|
|
429
|
+
import { RendererConfiguration } from "../../shade/renderer/RendererConfiguration.js";
|
|
412
430
|
import { ShadeCameraAdapter } from "./ShadeCameraAdapter.js";
|
|
413
431
|
import Signal from "../../core/events/signal/Signal.js";
|
|
414
432
|
import { Vector2 } from "../../core/geom/Vector2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/GraphicsEngine.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/GraphicsEngine.js"],"names":[],"mappings":"AA2DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IACI;;;;;OAKG;IACH,gCAEC;IAUD;;;;OAIG;IACH,yBAEC;IAED;;;;;;;;;;;OAWG;IACH,iCAFU,qBAAqB,CAEsB;IAwDrD;;OAEG;IACH,0CAQC;IAlBD;;OAEG;IACH,yCAEC;IA0CG;;;;;;OAMG;IACH,QAFU,kBAAkB,CAEsB;IAElD;QACI;;;;;;;;WAQG;mBADO,MAAM;QAIhB;;;;;WAKG;oBADO,MAAM;QAIhB;;;;WAIG;qBADO,MAAM;QAIhB;;;;;;;WAOG;;QAGH;;;;;WAKG;;MAEN;IAID;;;;;OAKG;IACH,4BAFU,OAAO,CAEyB;IAE1C;;;;;;OAMG;IACH,UAFU,SAAS,CAEY;IAG/B;;OAEG;IACH,YAFU,iBAAiB,GAAC,IAAI,CAEV;IAEtB;;;;;OAKG;IACH,UAFU,OAAO,CAEG;IAEpB;;;;;OAKG;IACH,UAFU,OAAO,CAEG;IAEpB;;OAEG;IACH,YAFU,MAAM,CAEG;IAoBvB;;;;;;;;;;;;OAYG;IACH,mDAEC;IAED;;;;;;;;OAQG;IACH,iBAFW,KAAK,QAgBf;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,6BAFW,YAAY,QAStB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,yBAHW,eAAe,GACb,eAAe,CAa3B;IAED;;;;;;;;;;OAUG;IACH,uBAHW,UAAU,GACR,MAAM,CAclB;IAED;;;;;;OAMG;IACH,4BAHW,eAAe,GACb,OAAO,CAgBnB;IAED;;;;;;;;;;;;;OAaG;IACH,kCAHW,iBAAiB,GACf,iBAAiB,CAqB7B;IAED;;;;;;OAMG;IACH,8BAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,qCAHW,iBAAiB,GACf,OAAO,CAgBnB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,qBALW,KAAK,GACH,eAAe,GAAC,IAAI,CAehC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,yBARW,KAAK,UACL,MAAM,SACN,MAAM,UACN,MAAM,GACJ,QAAQ,SAAS,CAAC,CAwD9B;IAED;;;;OAIG;IACH,0BAEC;IAED;;;;;;;;;;OAUG;IACH,SAFa,QAAQ,IAAI,CAAC,CA4DzB;IAED;;;;;;;;;;;;;;;OAeG;IACH,qBAFW,iBAAiB,QAc3B;IAED;;;;;OAKG;IACH,aAiBC;IASD;;;;;;;;OAQG;IACH,8BAHW,OAAO,GAAC,OAAO,UACf,OAAO,GAAC,OAAO,QAQzB;IAED;;;;;;;;;;;;;;;OAeG;IACH,yBALW,MAAM,KACN,MAAM,UACN,OAAO,aACP,OAAO,QAIjB;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,mBAyBC;IAED;;;;;;;;;OASG;IACH,4BAPW,MAAM,GAKJ,OAAO,CA2DnB;;CACJ;sBA77BY,OAAO,4BAA4B,EAAE,OAAO;yBAC5C,OAAO,8CAA8C,EAAE,UAAU;8BACjE,OAAO,mDAAmD,EAAE,eAAe;gCAC3E,OAAO,mEAAmE,EAAE,iBAAiB;8BAC7F,OAAO,+CAA+C,EAAE,eAAe;2BACvE,OAAO,8CAA8C,EAAE,YAAY;qBACnE,OAAO,kCAAkC,EAAE,MAAM;yBAfrC,kCAAkC;sCACrB,+CAA+C;mCAKlD,yBAAyB;mBAZzC,oCAAoC;wBAC/B,4BAA4B;sBAS9B,kCAAkC;yCALf,kDAAkD;sBAGrE,qCAAqC;0BACjC,0CAA0C"}
|
|
@@ -6,6 +6,7 @@ import { TextureDescriptor } from "../../shade/descriptor/texture/TextureDescrip
|
|
|
6
6
|
import { PerspectiveCamera } from "../../shade/renderer/camera/PerspectiveCamera.js";
|
|
7
7
|
import { DynamicResolutionScaling } from "../../shade/renderer/DynamicResolutionScaling.js";
|
|
8
8
|
import { Renderer } from "../../shade/renderer/Renderer.js";
|
|
9
|
+
import { RendererConfiguration } from "../../shade/renderer/RendererConfiguration.js";
|
|
9
10
|
import { Scene } from "../../shade/renderer/scene/Scene.js";
|
|
10
11
|
import { Sampler2D } from "../graphics/texture/sampler/Sampler2D.js";
|
|
11
12
|
import EmptyView from "../../view/elements/EmptyView.js";
|
|
@@ -64,7 +65,7 @@ const TARGET_FRAME_RATE = 30;
|
|
|
64
65
|
* start(), stop(), render(), updateSize()}` — because that is what `Engine` needs in order to boot,
|
|
65
66
|
* and because the facade is deliberately not allowed to grow past §4.2 (D14).
|
|
66
67
|
*
|
|
67
|
-
* **
|
|
68
|
+
* **Five things have been let through since, each by name.** {@link add_extension} /
|
|
68
69
|
* {@link remove_extension} (E9), because an extension has to survive the restart that replaces the
|
|
69
70
|
* renderer holding it; {@link add_transparency_channel} / {@link remove_transparency_channel}
|
|
70
71
|
* (2026-09-24, trails), the same door for the one thing an extension cannot do — draw inside the
|
|
@@ -78,6 +79,10 @@ const TARGET_FRAME_RATE = 30;
|
|
|
78
79
|
* callers that have no other route, not a migration target — the old engine's 44
|
|
79
80
|
* `.renderer`/`getRenderer()` call sites are each still a migration item.
|
|
80
81
|
*
|
|
82
|
+
* {@link renderer_configuration} is the fifth: what every renderer this engine starts begins as. It
|
|
83
|
+
* is held here for the reason extensions are — it is stated before a device exists, and it outlives
|
|
84
|
+
* the renderer a restart replaces — and it is data the caller writes, not the renderer.
|
|
85
|
+
*
|
|
81
86
|
* What is deliberately absent, and stays absent: `getRenderer()` (the old engine's accessor, and
|
|
82
87
|
* the shape those call sites are being ported off), `layers` (CPU visibility dies with GPU
|
|
83
88
|
* culling), `scene` (entities reach the scene through the mesh system, not through the facade),
|
|
@@ -116,6 +121,20 @@ export class GraphicsEngine {
|
|
|
116
121
|
return this.#renderer;
|
|
117
122
|
}
|
|
118
123
|
|
|
124
|
+
/**
|
|
125
|
+
* What every renderer {@link start} makes begins as: the settings that decide which pipelines it
|
|
126
|
+
* compiles ahead of its first frame, so a frame is not held up compiling them when it first draws
|
|
127
|
+
* with them. Write to it before {@link start}.
|
|
128
|
+
*
|
|
129
|
+
* {@link start} reads it each time, so a restart begins from it again. Once a renderer is running
|
|
130
|
+
* its own fields are the state: a change made here waits for the next {@link start}, and a change
|
|
131
|
+
* made on the renderer does not come back here.
|
|
132
|
+
*
|
|
133
|
+
* @readonly
|
|
134
|
+
* @type {RendererConfiguration}
|
|
135
|
+
*/
|
|
136
|
+
renderer_configuration = new RendererConfiguration();
|
|
137
|
+
|
|
119
138
|
/**
|
|
120
139
|
* Trades internal resolution for frame time — see {@link dynamic_resolution}.
|
|
121
140
|
*
|
|
@@ -709,7 +728,10 @@ export class GraphicsEngine {
|
|
|
709
728
|
}
|
|
710
729
|
|
|
711
730
|
try {
|
|
712
|
-
await renderer.initialize({
|
|
731
|
+
await renderer.initialize({
|
|
732
|
+
context: canvas.getContext('webgpu'),
|
|
733
|
+
configuration: this.renderer_configuration,
|
|
734
|
+
});
|
|
713
735
|
} catch (failure) {
|
|
714
736
|
this.#canvas = null;
|
|
715
737
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_step.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/solver/cloth_step.js"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkIG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,kDAfW,MAAM,kBACN,MAAM,kBAEN,MAAM,kBACN,MAAM,YACN,MAAM,cACN,MAAM,mBACN,YAAY,GAAC,YAAY,GAAC,IAAI,mBAE9B,MAAM,WACN;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAC,aAChK,YAAY,GAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"cloth_step.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/solver/cloth_step.js"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkIG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,kDAfW,MAAM,kBACN,MAAM,kBAEN,MAAM,kBACN,MAAM,YACN,MAAM,cACN,MAAM,mBACN,YAAY,GAAC,YAAY,GAAC,IAAI,mBAE9B,MAAM,WACN;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAC,aAChK,YAAY,GAAC,IAAI,QA2I3B"}
|
|
@@ -302,7 +302,10 @@ export function cloth_step(
|
|
|
302
302
|
cloth_backstop_dual_update(state, beta, k_max_ratio, inverse_h_squared);
|
|
303
303
|
|
|
304
304
|
if (contacts !== null) {
|
|
305
|
-
cloth_contact_dual_update(
|
|
305
|
+
cloth_contact_dual_update(
|
|
306
|
+
state, contacts, alpha, gamma, beta,
|
|
307
|
+
k_max_ratio, inverse_h_squared, contact_ramp_ratio
|
|
308
|
+
);
|
|
306
309
|
}
|
|
307
310
|
}
|
|
308
311
|
|
|
@@ -38,15 +38,22 @@ export function cloth_contact_warm_start(state: ClothState, alpha: number, gamma
|
|
|
38
38
|
* the next iteration. It costs a second field evaluation per contact per
|
|
39
39
|
* iteration and it is what makes the multiplier converge within the step.
|
|
40
40
|
*
|
|
41
|
+
* A friction row that ends the update at its cap has yielded, and its anchor is
|
|
42
|
+
* brought up behind the particle — the module docblock says how far and why.
|
|
43
|
+
*
|
|
41
44
|
* @param {ClothState} state
|
|
42
|
-
* @param {Float32Array|Float64Array} table
|
|
45
|
+
* @param {Float32Array|Float64Array} table packed colliders, cloth-local, posed
|
|
46
|
+
* at the substep in progress
|
|
47
|
+
* @param {number} alpha the multiplier's regularisation, as
|
|
48
|
+
* {@link cloth_contact_warm_start} takes it
|
|
49
|
+
* @param {number} gamma the multiplier's decay, with `alpha`
|
|
43
50
|
* @param {number} beta the friction row's ramp, N/m²
|
|
44
51
|
* @param {number} k_max_ratio
|
|
45
52
|
* @param {number} inverse_h_squared
|
|
46
53
|
* @param {number} [ramp_ratio] the normal row's ramp, as the fraction of the
|
|
47
54
|
* band gained per contact offset of violation per iteration
|
|
48
55
|
*/
|
|
49
|
-
export function cloth_contact_dual_update(state: ClothState, table: Float32Array | Float64Array, beta: number, k_max_ratio: number, inverse_h_squared: number, ramp_ratio?: number): void;
|
|
56
|
+
export function cloth_contact_dual_update(state: ClothState, table: Float32Array | Float64Array, alpha: number, gamma: number, beta: number, k_max_ratio: number, inverse_h_squared: number, ramp_ratio?: number): void;
|
|
50
57
|
/**
|
|
51
58
|
* # Contact — the collision row and its friction row, which are one contact
|
|
52
59
|
*
|
|
@@ -95,6 +102,33 @@ export function cloth_contact_dual_update(state: ClothState, table: Float32Array
|
|
|
95
102
|
* frame to frame is a choice with state in it — which is exactly what §7 P4(a)
|
|
96
103
|
* exists to keep out of this system.
|
|
97
104
|
*
|
|
105
|
+
* ## The anchor follows a row that has yielded
|
|
106
|
+
*
|
|
107
|
+
* The anchor remembers a point only while the row holds. A row at its cap is
|
|
108
|
+
* sliding, and Coulomb friction opposes the slide — not the way back to where
|
|
109
|
+
* the particle first touched. An anchor left behind turns the cap into a pull
|
|
110
|
+
* towards that point whichever way the particle is moving, which is a
|
|
111
|
+
* potential: it takes speed from a particle going out and hands it back on the
|
|
112
|
+
* return.
|
|
113
|
+
*
|
|
114
|
+
* So when the dual update finds a row at its cap, the anchor is brought up
|
|
115
|
+
* behind the particle, along the slip, to
|
|
116
|
+
*
|
|
117
|
+
* ‖P_t(x − a)‖ = (1 − α·γ) · μ·f_n / k_f
|
|
118
|
+
*
|
|
119
|
+
* and no closer. The invariant is that **a row enters a substep carrying no
|
|
120
|
+
* more than its cap**. The row's force is `k_f·‖P_t(x − a)‖ + λ_f`, and the
|
|
121
|
+
* warm start keeps `α·γ` of `λ_f`; the offset carries what that drops. Closer,
|
|
122
|
+
* and a contact held near its cap has to slide every substep to rebuild the
|
|
123
|
+
* force the multiplier lost. Further, and the offset and the multiplier carry
|
|
124
|
+
* more than the cap between them, so a row that has yielded is still at its cap
|
|
125
|
+
* after the particle has stopped. The friction penalty's own decay only takes
|
|
126
|
+
* the row further inside the cap.
|
|
127
|
+
*
|
|
128
|
+
* A row under its cap is not touched, so static friction holds a particle to
|
|
129
|
+
* the point it stuck at exactly as before. What is left of the pull is that
|
|
130
|
+
* offset: a particle that slides to a stop settles back by at most that far.
|
|
131
|
+
*
|
|
98
132
|
* ## Which force the friction cap reads
|
|
99
133
|
*
|
|
100
134
|
* The *current iteration's* normal force, not the previous iteration's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_contact_row.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/physics/cloth/solver/constraint/cloth_contact_row.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloth_contact_row.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/physics/cloth/solver/constraint/cloth_contact_row.js"],"names":[],"mappings":"AAmKA;;;;;;;;GAQG;AACH,sDANW,YAAY,+BAEZ,MAAM,SACN,YAAY,GAAC,YAAY,QA+LnC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,mEARW,MAAM,SACN,MAAM,eACN,MAAM,eACN,MAAM,qBACN,MAAM,kBACN,MAAM,QAkDhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,oEAXW,YAAY,GAAC,YAAY,SAEzB,MAAM,SAEN,MAAM,QACN,MAAM,eACN,MAAM,qBACN,MAAM,eACN,MAAM,QAkIhB;AA5iBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;;;GAKG;AACH,qCAFU,MAAM,CAE2B"}
|
|
@@ -72,6 +72,33 @@ import { CLOTH_CONTACT_GAMMA, CLOTH_CONTACT_RAMP_RATIO } from "../cloth_solver_c
|
|
|
72
72
|
* frame to frame is a choice with state in it — which is exactly what §7 P4(a)
|
|
73
73
|
* exists to keep out of this system.
|
|
74
74
|
*
|
|
75
|
+
* ## The anchor follows a row that has yielded
|
|
76
|
+
*
|
|
77
|
+
* The anchor remembers a point only while the row holds. A row at its cap is
|
|
78
|
+
* sliding, and Coulomb friction opposes the slide — not the way back to where
|
|
79
|
+
* the particle first touched. An anchor left behind turns the cap into a pull
|
|
80
|
+
* towards that point whichever way the particle is moving, which is a
|
|
81
|
+
* potential: it takes speed from a particle going out and hands it back on the
|
|
82
|
+
* return.
|
|
83
|
+
*
|
|
84
|
+
* So when the dual update finds a row at its cap, the anchor is brought up
|
|
85
|
+
* behind the particle, along the slip, to
|
|
86
|
+
*
|
|
87
|
+
* ‖P_t(x − a)‖ = (1 − α·γ) · μ·f_n / k_f
|
|
88
|
+
*
|
|
89
|
+
* and no closer. The invariant is that **a row enters a substep carrying no
|
|
90
|
+
* more than its cap**. The row's force is `k_f·‖P_t(x − a)‖ + λ_f`, and the
|
|
91
|
+
* warm start keeps `α·γ` of `λ_f`; the offset carries what that drops. Closer,
|
|
92
|
+
* and a contact held near its cap has to slide every substep to rebuild the
|
|
93
|
+
* force the multiplier lost. Further, and the offset and the multiplier carry
|
|
94
|
+
* more than the cap between them, so a row that has yielded is still at its cap
|
|
95
|
+
* after the particle has stopped. The friction penalty's own decay only takes
|
|
96
|
+
* the row further inside the cap.
|
|
97
|
+
*
|
|
98
|
+
* A row under its cap is not touched, so static friction holds a particle to
|
|
99
|
+
* the point it stuck at exactly as before. What is left of the pull is that
|
|
100
|
+
* offset: a particle that slides to a stop settles back by at most that far.
|
|
101
|
+
*
|
|
75
102
|
* ## Which force the friction cap reads
|
|
76
103
|
*
|
|
77
104
|
* The *current iteration's* normal force, not the previous iteration's
|
|
@@ -411,17 +438,28 @@ export function cloth_contact_warm_start(state, alpha, gamma, k_min_ratio, k_max
|
|
|
411
438
|
* the next iteration. It costs a second field evaluation per contact per
|
|
412
439
|
* iteration and it is what makes the multiplier converge within the step.
|
|
413
440
|
*
|
|
441
|
+
* A friction row that ends the update at its cap has yielded, and its anchor is
|
|
442
|
+
* brought up behind the particle — the module docblock says how far and why.
|
|
443
|
+
*
|
|
414
444
|
* @param {ClothState} state
|
|
415
|
-
* @param {Float32Array|Float64Array} table
|
|
445
|
+
* @param {Float32Array|Float64Array} table packed colliders, cloth-local, posed
|
|
446
|
+
* at the substep in progress
|
|
447
|
+
* @param {number} alpha the multiplier's regularisation, as
|
|
448
|
+
* {@link cloth_contact_warm_start} takes it
|
|
449
|
+
* @param {number} gamma the multiplier's decay, with `alpha`
|
|
416
450
|
* @param {number} beta the friction row's ramp, N/m²
|
|
417
451
|
* @param {number} k_max_ratio
|
|
418
452
|
* @param {number} inverse_h_squared
|
|
419
453
|
* @param {number} [ramp_ratio] the normal row's ramp, as the fraction of the
|
|
420
454
|
* band gained per contact offset of violation per iteration
|
|
421
455
|
*/
|
|
422
|
-
export function cloth_contact_dual_update(state, table, beta, k_max_ratio, inverse_h_squared, ramp_ratio = CLOTH_CONTACT_RAMP_RATIO) {
|
|
456
|
+
export function cloth_contact_dual_update(state, table, alpha, gamma, beta, k_max_ratio, inverse_h_squared, ramp_ratio = CLOTH_CONTACT_RAMP_RATIO) {
|
|
423
457
|
const particle_count = state.particle_count;
|
|
424
458
|
|
|
459
|
+
// What the next warm start drops from a friction multiplier, which is what
|
|
460
|
+
// a yielded row's anchor has to carry in its place.
|
|
461
|
+
const carried_by_anchor = 1 - alpha * gamma;
|
|
462
|
+
|
|
425
463
|
const collider = state.contact_collider;
|
|
426
464
|
const mass_inverse = state.mass_inverse;
|
|
427
465
|
const position = state.position;
|
|
@@ -516,7 +554,26 @@ export function cloth_contact_dual_update(state, table, beta, k_max_ratio, inver
|
|
|
516
554
|
|
|
517
555
|
const unclamped = kf * slip + friction_lambda[slot];
|
|
518
556
|
|
|
519
|
-
|
|
557
|
+
if (unclamped < cap) {
|
|
558
|
+
friction_lambda[slot] = unclamped > 0 ? unclamped : 0;
|
|
559
|
+
} else {
|
|
560
|
+
friction_lambda[slot] = cap;
|
|
561
|
+
|
|
562
|
+
// The row has yielded, so the anchor follows (the module
|
|
563
|
+
// docblock). A penalty of zero puts the reach at `Infinity`
|
|
564
|
+
// and leaves the anchor where it is.
|
|
565
|
+
const reach = carried_by_anchor * cap / kf;
|
|
566
|
+
|
|
567
|
+
if (slip > reach) {
|
|
568
|
+
const follow = 1 - reach / slip;
|
|
569
|
+
|
|
570
|
+
ANCHOR_WORLD[0] += tx * follow;
|
|
571
|
+
ANCHOR_WORLD[1] += ty * follow;
|
|
572
|
+
ANCHOR_WORLD[2] += tz * follow;
|
|
573
|
+
|
|
574
|
+
cloth_collider_to_local_array(anchor, slot * 3, table, record, ANCHOR_WORLD, 0);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
520
577
|
|
|
521
578
|
const ramped_friction = kf + beta * slip;
|
|
522
579
|
|
|
@@ -253,7 +253,6 @@ export class EventInstance {
|
|
|
253
253
|
}
|
|
254
254
|
export type Quaternion = import("../../../../core/geom/Quaternion.js").Quaternion;
|
|
255
255
|
export type Vector3 = import("../../../../core/geom/Vector3.js").Vector3;
|
|
256
|
-
export type AcousticSolution = import("../../simulation/core/AcousticSolution.js").AcousticSolution;
|
|
257
256
|
export type AcousticDirectivity = import("../../simulation/definition/AcousticDirectivity.js").AcousticDirectivity;
|
|
258
257
|
export type SopraEngine = import("../SopraEngine.js").SopraEngine;
|
|
259
258
|
export type EventDescription = import("../definition/EventDescription.js").EventDescription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/sopra/runtime/EventInstance.js"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"EventInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/sopra/runtime/EventInstance.js"],"names":[],"mappings":";;;iCAiCU,MAAM;;;;;;AAsChB;;;;;;;;;GASG;AACH;IAqSI;;;;OAIG;IACH,oBAJW,WAAW,eACX,gBAAgB,4HAChB;QAAC,KAAK,CAAC,EAAC,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAC,OAAO,CAAC;QAAC,OAAO,CAAC,EAAC,OAAO,CAAC;QAAC,WAAW,CAAC,EAAC,MAAM,CAAC;QAAC,eAAe,CAAC,EAAC,oBAAoB,CAAC;QAAC,SAAS,CAAC,EAAC,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAC,OAAO,CAAC;QAAC,YAAY,CAAC,EAAC,MAAM,CAAC;QAAC,WAAW,CAAC,EAAC,UAAU,CAAC;QAAC,WAAW,CAAC,EAAC,mBAAmB,CAAA;KAAC,EAkFjP;IAxXD;;OAEG;IACH,WAFU,MAAM,CAEF;IAEd;;OAEG;IACH,OAFU,kBAAkB,GAAC,MAAM,CAEA;IAEnC;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB;;;;;OAKG;IACH,cAFU,MAAM,CAE8B;IAE9C;;;OAGG;IACH,aAAuB;IAwRnB;;OAEG;IACH,QAFU,WAAW,CAED;IAEpB;;OAEG;IACH,aAFU,gBAAgB,CAEI;IAE9B;;OAEG;IACH,OAFU,MAAM,CAEE;IAElB;;;;;;;;;OASG;IACH,UAFU,UAAU,MAAM,CAAC,GAAC,IAAI,CAER;IAExB;;;;;OAKG;IACH,aAFU,UAAU,GAAC,IAAI,CAEK;IAE9B;;;;;OAKG;IACH,aAFU,mBAAmB,GAAC,IAAI,CAEJ;IAE9B;;OAEG;IACH,SAFU,OAAO,CAEK;IAEtB;;OAEG;IACH,oBAFU,MAAM,CAEqB;IAErC;;OAEG;IACH,iBAFU,oBAAoB,CAEQ;IAc1C;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,2CAeC;IAED;;;OAGG;IACH,WAFW,MAAM,QAyChB;IAwKD;;;;;;;;;;;;OAYG;IACH,4BAJW,MAAM,QACN,MAAM,SACN,MAAM,QAIhB;IAED;;;;;;;;;OASG;IACH,iCALW,MAAM,QACN,MAAM,SACN,MAAM,gBACN,MAAM,QAIhB;IAED;;;;;OAKG;IACH,4BAJW,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;IAaD;;;OAGG;IACH,qBAEC;IAED;;;;OAIG;IACH,wBAEC;IAED;;;OAGG;IACH,cAFW,MAAM,QAQhB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,sBAFW,gBAAgB,QA4H1B;IAqED;;;;;OAKG;IACH,uBAJW,MAAM,YACN,MAAM,eACN,MAAM,QAqBhB;IAED;;;;;OAKG;IACH,yBAHW,MAAM,eACN,MAAM,QAqBhB;IAED;;;;OAIG;IACH,cAFW,MAAM,QAehB;IAED;;OAEG;IACH,gBAEC;IAED;;;;;;;;OAQG;IACH,YAFW,MAAM,QA+DhB;IAED;;;;;;;OAOG;IACH,cAEC;IAwJD;;OAEG;IACH,aAgDC;;CACJ;yBAn0CY,OAAO,qCAAqC,EAAE,UAAU;sBACxD,OAAO,kCAAkC,EAAE,OAAO;kCAClD,OAAO,oDAAoD,EAAE,mBAAmB;0BAChF,OAAO,mBAAmB,EAAE,WAAW;+BACvC,OAAO,mCAAmC,EAAE,gBAAgB;mCAC5D,OAAO,2BAA2B,EAAE,oBAAoB;oBACxD,OAAO,YAAY,EAAE,KAAK;iCAbN,2CAA2C"}
|
|
@@ -22,7 +22,6 @@ import { v3_length } from "../../../../core/geom/vec3/v3_length.js";
|
|
|
22
22
|
/**
|
|
23
23
|
* @typedef {import("../../../../core/geom/Quaternion.js").Quaternion} Quaternion
|
|
24
24
|
* @typedef {import("../../../../core/geom/Vector3.js").Vector3} Vector3
|
|
25
|
-
* @typedef {import("../../simulation/core/AcousticSolution.js").AcousticSolution} AcousticSolution
|
|
26
25
|
* @typedef {import("../../simulation/definition/AcousticDirectivity.js").AcousticDirectivity} AcousticDirectivity
|
|
27
26
|
* @typedef {import("../SopraEngine.js").SopraEngine} SopraEngine
|
|
28
27
|
* @typedef {import("../definition/EventDescription.js").EventDescription} EventDescription
|
|
@@ -23,6 +23,14 @@ export class ComputePipelineManager {
|
|
|
23
23
|
* @returns {number}
|
|
24
24
|
*/
|
|
25
25
|
get pending_count(): number;
|
|
26
|
+
/**
|
|
27
|
+
* How many pipelines {@link obtain} has made itself, because {@link prepare} had not made them by the time a
|
|
28
|
+
* frame asked: each one compiled where the frame waits for it. Zero for a renderer whose every pipeline was
|
|
29
|
+
* offered to a {@link PipelineEnquiry} ahead of use.
|
|
30
|
+
*
|
|
31
|
+
* @returns {number}
|
|
32
|
+
*/
|
|
33
|
+
get created_on_demand_count(): number;
|
|
26
34
|
/**
|
|
27
35
|
* Whether `descriptor` is no longer waiting on an asynchronous {@link prepare} compilation.
|
|
28
36
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComputePipelineManager.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/pipeline/ComputePipelineManager.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;
|
|
1
|
+
{"version":3,"file":"ComputePipelineManager.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/pipeline/ComputePipelineManager.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;IAsGI;;;;;OAKG;IACH,wCAHW,qBAAqB,WACrB,oBAAoB,EAc9B;IA7GD;;;OAGG;IACH,0EAEC;IAoBD;;;;OAIG;IACH,4BAEC;IAOD;;;;;;OAMG;IACH,sCAEC;IAED;;;;;OAKG;IACH,qBAHW,yBAAyB,GACvB,OAAO,CAOnB;IAED;;;;;OAKG;IACH,iCAHW;QAAE,GAAG,CAAC,UAAU,EAAE,yBAAyB,GAAG,OAAO,CAAA;KAAE,GACrD,OAAO,CAoBnB;IA2DD;;;;OAIG;IACH,mBAHW,yBAAyB,sBAQnC;IAED;;;;;;;;;;OAUG;IACH,oBAHW,yBAAyB,GACvB,QAAQ,IAAI,CAAC,CAwCzB;;CAEJ;wCAnOY,OAAO,gEAAgE,EAAE,yBAAyB;mCAClG,OAAO,mCAAmC,EAAE,oBAAoB;oCAChE,OAAO,4BAA4B,EAAE,qBAAqB;8BAC1D,OAAO,sBAAsB,EAAE,eAAe"}
|
|
@@ -54,6 +54,22 @@ export class ComputePipelineManager {
|
|
|
54
54
|
return this.#pending.size;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* @type {number}
|
|
59
|
+
*/
|
|
60
|
+
#created_on_demand_count = 0;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* How many pipelines {@link obtain} has made itself, because {@link prepare} had not made them by the time a
|
|
64
|
+
* frame asked: each one compiled where the frame waits for it. Zero for a renderer whose every pipeline was
|
|
65
|
+
* offered to a {@link PipelineEnquiry} ahead of use.
|
|
66
|
+
*
|
|
67
|
+
* @returns {number}
|
|
68
|
+
*/
|
|
69
|
+
get created_on_demand_count() {
|
|
70
|
+
return this.#created_on_demand_count;
|
|
71
|
+
}
|
|
72
|
+
|
|
57
73
|
/**
|
|
58
74
|
* Whether `descriptor` is no longer waiting on an asynchronous {@link prepare} compilation.
|
|
59
75
|
*
|
|
@@ -145,6 +161,8 @@ export class ComputePipelineManager {
|
|
|
145
161
|
* @returns {GPUComputePipeline}
|
|
146
162
|
*/
|
|
147
163
|
#create(descriptor) {
|
|
164
|
+
this.#created_on_demand_count++;
|
|
165
|
+
|
|
148
166
|
return this.#device.createComputePipeline(this.#gpu_descriptor(descriptor));
|
|
149
167
|
}
|
|
150
168
|
|
|
@@ -22,6 +22,14 @@ export class RenderPipelineManager {
|
|
|
22
22
|
* @returns {number}
|
|
23
23
|
*/
|
|
24
24
|
get pending_count(): number;
|
|
25
|
+
/**
|
|
26
|
+
* How many pipelines {@link obtain} has made itself, because {@link prepare} had not made them by the time a
|
|
27
|
+
* frame asked: each one compiled where the frame waits for it. Zero for a renderer whose every pipeline was
|
|
28
|
+
* offered to a {@link PipelineEnquiry} ahead of use.
|
|
29
|
+
*
|
|
30
|
+
* @returns {number}
|
|
31
|
+
*/
|
|
32
|
+
get created_on_demand_count(): number;
|
|
25
33
|
/**
|
|
26
34
|
* Whether `descriptor` is no longer waiting on an asynchronous {@link prepare} compilation.
|
|
27
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderPipelineManager.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/pipeline/RenderPipelineManager.js"],"names":[],"mappings":"AAKA;;;;GAIG;AAGH;
|
|
1
|
+
{"version":3,"file":"RenderPipelineManager.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/pipeline/RenderPipelineManager.js"],"names":[],"mappings":"AAKA;;;;GAIG;AAGH;IAoGI;;;;;OAKG;IACH,wCAHW,qBAAqB,WACrB,oBAAoB,EAc9B;IA3GD;;;OAGG;IACH,0EAEC;IAoBD;;;;OAIG;IACH,4BAEC;IAOD;;;;;;OAMG;IACH,sCAEC;IAED;;;;;OAKG;IACH,qBAHW,wBAAwB,GACtB,OAAO,CAMnB;IAED;;;;;OAKG;IACH,iCAHW;QAAE,GAAG,CAAC,UAAU,EAAE,wBAAwB,GAAG,OAAO,CAAA;KAAE,GACpD,OAAO,CAoBnB;IA6FD;;;;;OAKG;IACH,mBAJW,wBAAwB,6BACxB,kBAAkB,qBAgB5B;IAED;;;;;;;;;;;OAWG;IACH,oBAJW,wBAAwB,GAEtB,QAAQ,IAAI,CAAC,CAuCzB;;CAEJ;mCA7QY,OAAO,mCAAmC,EAAE,oBAAoB;oCAChE,OAAO,4BAA4B,EAAE,qBAAqB;8BAC1D,OAAO,sBAAsB,EAAE,eAAe;yCANlB,8DAA8D"}
|
|
@@ -56,6 +56,22 @@ export class RenderPipelineManager {
|
|
|
56
56
|
return this.#pending.size;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @type {number}
|
|
61
|
+
*/
|
|
62
|
+
#created_on_demand_count = 0;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* How many pipelines {@link obtain} has made itself, because {@link prepare} had not made them by the time a
|
|
66
|
+
* frame asked: each one compiled where the frame waits for it. Zero for a renderer whose every pipeline was
|
|
67
|
+
* offered to a {@link PipelineEnquiry} ahead of use.
|
|
68
|
+
*
|
|
69
|
+
* @returns {number}
|
|
70
|
+
*/
|
|
71
|
+
get created_on_demand_count() {
|
|
72
|
+
return this.#created_on_demand_count;
|
|
73
|
+
}
|
|
74
|
+
|
|
59
75
|
/**
|
|
60
76
|
* Whether `descriptor` is no longer waiting on an asynchronous {@link prepare} compilation.
|
|
61
77
|
*
|
|
@@ -159,6 +175,7 @@ export class RenderPipelineManager {
|
|
|
159
175
|
* @returns {GPURenderPipeline}
|
|
160
176
|
*/
|
|
161
177
|
#create(descriptor) {
|
|
178
|
+
this.#created_on_demand_count++;
|
|
162
179
|
|
|
163
180
|
const device = this.#device;
|
|
164
181
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>AVBOIT · tilted surfaces</title>
|
|
4
|
+
<style>
|
|
5
|
+
:root{color-scheme:dark;font:14px/1.45 system-ui,sans-serif;color:#d6e4ea;background:#10161b}*{box-sizing:border-box}
|
|
6
|
+
body{margin:0;display:flex;align-items:flex-start;min-height:100vh}
|
|
7
|
+
#viewport{flex:none;overflow:hidden;position:relative;outline:none;background:#000}#viewport canvas{width:100%;height:100%;display:block}
|
|
8
|
+
aside{padding:16px 20px;width:340px;flex:none}h1{font-size:18px;margin:0 0 6px}h2{font-size:13px;color:#8cb9bf;text-transform:uppercase;letter-spacing:.07em;margin:18px 0 8px}
|
|
9
|
+
p{margin:8px 0;color:#9faeb9;font-size:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.5 monospace;color:#8bd3d5;background:#0c151b;padding:10px;border-radius:5px;margin:0}
|
|
10
|
+
#status{border-left:3px solid #70b8b5;padding:8px 10px;font-size:12px;background:#1d2c32}
|
|
11
|
+
#cases a{display:block;color:#b9cdd6;text-decoration:none;font-size:12px;padding:3px 6px;border-radius:4px}#cases a:hover{background:#22323b}#cases a.current{background:#2b4550;color:#fff}
|
|
12
|
+
</style></head>
|
|
13
|
+
<body><div id="viewport" tabindex="0"></div>
|
|
14
|
+
<aside><h1>AVBOIT / tilted surfaces</h1><p>A transparent surface that runs through depth across one voxel, sharing its pixels with something else.</p>
|
|
15
|
+
<div id="status">Starting renderer…</div>
|
|
16
|
+
<h2 id="title"></h2><pre id="expect"></pre>
|
|
17
|
+
<h2>Cases</h2><div id="cases"></div>
|
|
18
|
+
</aside>
|
|
19
|
+
<script type="module" src="./main.js"></script>
|
|
20
|
+
</body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/avboit_footprint/main.js"],"names":[],"mappings":""}
|