@woosh/meep-engine 3.25.0 → 3.27.0
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/package.json +1 -1
- package/src/core/binary/lz4/LZ4_HIGH_COMPRESSION_PLAN_2026_09_14.md +542 -0
- package/src/core/binary/lz4/LZ4_LEVEL.d.ts +33 -0
- package/src/core/binary/lz4/LZ4_LEVEL.d.ts.map +1 -0
- package/src/core/binary/lz4/LZ4_LEVEL.js +32 -0
- package/src/core/binary/lz4/lz4_compress_block_at_level.d.ts +33 -0
- package/src/core/binary/lz4/lz4_compress_block_at_level.d.ts.map +1 -0
- package/src/core/binary/lz4/lz4_compress_block_at_level.js +47 -0
- package/src/core/binary/lz4/lz4_compress_block_hc.d.ts +40 -0
- package/src/core/binary/lz4/lz4_compress_block_hc.d.ts.map +1 -0
- package/src/core/binary/lz4/lz4_compress_block_hc.js +1382 -0
- package/src/core/binary/lz4/lz4_decompress_block.d.ts +2 -1
- package/src/core/binary/lz4/lz4_decompress_block.d.ts.map +1 -1
- package/src/core/binary/lz4/lz4_decompress_block.js +31 -6
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts +66 -0
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/HeightMapShape3D.js +314 -20
- package/src/core/geom/3d/shape/PosedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/PosedShape3D.js +57 -0
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/TransformedShape3D.js +102 -0
- package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnionShape3D.js +64 -0
- package/src/engine/physics/cloth/MEASUREMENTS.md +582 -0
- package/src/engine/physics/cloth/PLAN.md +330 -49
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +84 -17
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/ClothColliderIndex.js +451 -42
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +65 -7
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +72 -8
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +25 -4
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +75 -8
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +41 -4
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +207 -63
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +10 -0
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +17 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +27 -3
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +28 -3
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +75 -10
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +131 -12
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +19 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +249 -201
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +62 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +18 -10
- package/src/engine/physics/cloth/playground/collide_main.js +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +29 -8
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +37 -9
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +12 -2
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +12 -2
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +9 -2
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +9 -2
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +23 -9
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/AbstractClothWind.js +23 -9
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +7 -5
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothAmbientWind.js +12 -9
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +5 -2
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +7 -2
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +12 -5
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/playground/vgeo_runtime/README.md +167 -22
- package/src/shade/playground/vgeo_runtime/index.html +112 -62
- package/src/shade/playground/vgeo_runtime/main.js +660 -83
- package/src/shade/playground/vgeo_viewer/sample_asset.d.ts.map +1 -1
- package/src/shade/playground/vgeo_viewer/sample_asset.js +19 -2
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +11 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +16 -8
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.js +16 -11
- package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +73 -5
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +26 -15
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +5 -3
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +18 -0
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +20 -0
- package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.js +56 -9
- package/src/shade/renderer/geometry/virtual/build/vgeo_build.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/vgeo_build.js +1 -0
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +22 -0
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +24 -0
- package/src/shade/renderer/geometry/virtual/format/dag/VirtualGeometryCluster.d.ts +12 -0
- package/src/shade/renderer/geometry/virtual/format/dag/VirtualGeometryCluster.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/dag/VirtualGeometryCluster.js +13 -0
- package/src/shade/renderer/geometry/virtual/format/frame/vgeo_encode_frame_blob.d.ts +8 -1
- package/src/shade/renderer/geometry/virtual/format/frame/vgeo_encode_frame_blob.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/frame/vgeo_encode_frame_blob.js +11 -3
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FORMAT_VERSION.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FORMAT_VERSION.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FORMAT_VERSION.js +10 -1
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_MAX_PARENT_ENTRY_COUNT.d.ts +18 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_MAX_PARENT_ENTRY_COUNT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_MAX_PARENT_ENTRY_COUNT.js +17 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_MAX_PARENT_REF.d.ts +8 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_MAX_PARENT_REF.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_MAX_PARENT_REF.js +7 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PAGE_OFFSET.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PAGE_OFFSET.js +16 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PARENT_ENTRY_SIZE.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PARENT_ENTRY_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PARENT_ENTRY_SIZE.js +13 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PARENT_PAGE_ENTRY_SIZE.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PARENT_PAGE_ENTRY_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_PARENT_PAGE_ENTRY_SIZE.js +10 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts +20 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.js +20 -2
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts +4 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.js +4 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts +29 -3
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +81 -122
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +40 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.js +44 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPageFetcherCore.d.ts +69 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPageFetcherCore.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPageFetcherCore.js +236 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js +15 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_byte_source_from_descriptor.d.ts +31 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_byte_source_from_descriptor.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_byte_source_from_descriptor.js +32 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.d.ts +10 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.js +21 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_transfer.d.ts +15 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_transfer.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_transfer.js +84 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.d.ts +22 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.js +96 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +55 -0
- package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +202 -13
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +147 -10
- package/src/shade/renderer/geometry/virtual/runtime/CUT_PLAN_2026_09_14.md +637 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +33 -36
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +109 -193
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +58 -28
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +77 -105
- package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +37 -0
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +105 -22
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +548 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +29 -50
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +47 -489
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts +84 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +393 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts +234 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +1363 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidencyOptions.d.ts +81 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidencyOptions.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidencyOptions.js +89 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts +53 -34
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +407 -124
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +100 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +219 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_EXPAND.d.ts +17 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_EXPAND.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_EXPAND.js +47 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_COARSEN.d.ts +20 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_COARSEN.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_COARSEN.js +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +30 -12
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +15 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +18 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.js +5 -15
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.js +77 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_reseed.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_reseed.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_reseed.js +186 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +20 -8
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +580 -188
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +15 -18
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +19 -28
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +45 -25
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts +0 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +12 -10
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts +7 -2
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.js +8 -3
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts +2 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.js +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PARENT_ROW_OFFSET.d.ts +5 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PARENT_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PARENT_ROW_OFFSET.js +22 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PARENT_ROW_WORDS.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PARENT_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PARENT_ROW_WORDS.js +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_PARENT_BIT.d.ts +17 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_PARENT_BIT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_PARENT_BIT.js +16 -0
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts +15 -0
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.js +16 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_frontier_words.d.ts +23 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_frontier_words.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_frontier_words.js +28 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_page.worker.d.ts +2 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_page.worker.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_page.worker.js +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts +10 -5
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js +15 -6
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts +6 -1
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +38 -1
- package/src/shade/renderer/global_illumination/sharc/shader/shader_sharc_evict.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/sharc/shader/shader_sharc_evict.js +4 -3
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.js +6 -3
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +6 -3
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- 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 +12 -4
- package/src/shade/renderer/rasterize/bucket/shader_read_out_bucket.d.ts +2 -0
- package/src/shade/renderer/rasterize/bucket/shader_read_out_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/shader_read_out_bucket.js +58 -57
- package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_mesh_filter_2way.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_mesh_filter_2way.js +3 -5
- package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_meshlet_filter_1way_full.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/cull/hzb/shader_hzb_meshlet_filter_1way_full.js +3 -4
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_extract_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/shader_meshlets_extract_bucket.js +3 -4
- package/src/shade/renderer/rasterize/expand/pass0/pass_mesh_cull.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/pass0/pass_mesh_cull.js +7 -7
- package/src/shade/renderer/rasterize/fast/graph_extract_meshes_from_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/fast/graph_extract_meshes_from_bucket.js +83 -78
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +7 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +7 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +22 -2
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +59 -4
- package/src/shade/renderer/shader/resource/ShaderResourceSetDescriptor.d.ts.map +1 -1
- package/src/shade/renderer/shader/resource/ShaderResourceSetDescriptor.js +92 -16
- package/src/shade/renderer/view/GPUViewContext.d.ts +5 -0
- package/src/shade/renderer/view/GPUViewContext.d.ts.map +1 -1
- package/src/shade/renderer/view/GPUViewContext.js +21 -0
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +74 -3
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.js +0 -723
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.js +0 -50
- package/src/shade/renderer/shader/chunk/jobs/NOTES.md +0 -47
- package/src/shade/renderer/shader/chunk/jobs/chunk_job_system.js +0 -102
|
@@ -46,13 +46,6 @@ export class ClothInstance {
|
|
|
46
46
|
* @type {Transform64|null}
|
|
47
47
|
*/
|
|
48
48
|
transform: Transform64 | null;
|
|
49
|
-
/**
|
|
50
|
-
* How deep the anchor sits in the transform hierarchy. Instances step in
|
|
51
|
-
* ascending depth so that a `Cloth` nested inside another one reads an
|
|
52
|
-
* anchor the outer solve has already written this step.
|
|
53
|
-
* @type {number}
|
|
54
|
-
*/
|
|
55
|
-
depth: number;
|
|
56
49
|
/**
|
|
57
50
|
* `false` until the subtree has been walked. Seeding is deferred to the
|
|
58
51
|
* first step rather than done at link, because a rope's links arrive as
|
|
@@ -428,6 +421,71 @@ export class ClothInstance {
|
|
|
428
421
|
* @type {boolean}
|
|
429
422
|
*/
|
|
430
423
|
air_varies: boolean;
|
|
424
|
+
/**
|
|
425
|
+
* Seconds of fixed step **this instance** has taken, which is the clock
|
|
426
|
+
* §10's gust is a function of.
|
|
427
|
+
*
|
|
428
|
+
* Per cloth rather than per world, and the difference only shows with more
|
|
429
|
+
* than one of them. A cloth registered with the worker while another is
|
|
430
|
+
* already running waits for its memory, and the world's clock moves during
|
|
431
|
+
* that wait because the other cloth is still being advanced — so the two
|
|
432
|
+
* systems reach *this* cloth's first step at different world times and hand
|
|
433
|
+
* it different weather. An age counted in its own steps is the same number
|
|
434
|
+
* on both sides by construction. `MEASUREMENTS.md` §57.
|
|
435
|
+
*
|
|
436
|
+
* Advanced on every step the instance is *offered*, including ones it
|
|
437
|
+
* sleeps through, because a sleeping cloth still has to be able to ask
|
|
438
|
+
* whether the air has changed enough to wake it.
|
|
439
|
+
* @type {number}
|
|
440
|
+
*/
|
|
441
|
+
age: number;
|
|
442
|
+
/**
|
|
443
|
+
* The index handles this cloth last **stepped against**, in the order the
|
|
444
|
+
* broadphase returned them, and how many of them are meaningful.
|
|
445
|
+
*
|
|
446
|
+
* §7 P5's wake test compares each overlapping collider's previous pose with
|
|
447
|
+
* its current one, and `ClothColliderSystem#link` *places* a new collider —
|
|
448
|
+
* previous equals current — so a collider spawned around a sleeping cloth
|
|
449
|
+
* is one that has not moved and never woke it. The set is the other half of
|
|
450
|
+
* that question: a handle appearing or leaving is a change to the world the
|
|
451
|
+
* cloth went to sleep in, whatever the poses say.
|
|
452
|
+
* @type {Int32Array}
|
|
453
|
+
*/
|
|
454
|
+
collider_keys: Int32Array;
|
|
455
|
+
/**
|
|
456
|
+
* @type {number}
|
|
457
|
+
*/
|
|
458
|
+
collider_key_count: number;
|
|
459
|
+
/**
|
|
460
|
+
* The broadphase margin the last gather used, metres. The wake test has to
|
|
461
|
+
* query with the same one, or it compares a set built under one reach with
|
|
462
|
+
* a set built under another and wakes on the difference between the two
|
|
463
|
+
* questions rather than on a change in the world.
|
|
464
|
+
* @type {number}
|
|
465
|
+
*/
|
|
466
|
+
gather_reach: number;
|
|
467
|
+
/**
|
|
468
|
+
* The joint entities this cloth's rig seeding took `TransformAttachment`
|
|
469
|
+
* authority from, so that removing the cloth can give it back. `null` on
|
|
470
|
+
* the entity path and before the first rig seeding.
|
|
471
|
+
*
|
|
472
|
+
* Only the ones the revoke actually changed: a joint that was already the
|
|
473
|
+
* CPU's is not one cloth has anything to hand back.
|
|
474
|
+
* @type {number[]|null}
|
|
475
|
+
*/
|
|
476
|
+
revoked_joints: number[] | null;
|
|
477
|
+
/**
|
|
478
|
+
* Where every particle was when the current sleep window opened, or `null`
|
|
479
|
+
* before the first step — §7 P5's sleep test measures displacement from
|
|
480
|
+
* this rather than an instantaneous speed, because a cloth resting on a
|
|
481
|
+
* collider sits in a bounded limit cycle whose speed is not small.
|
|
482
|
+
*
|
|
483
|
+
* Re-anchored to the live positions whenever a particle leaves the
|
|
484
|
+
* threshold, so the window is "how far has anything moved since the cloth
|
|
485
|
+
* last moved" rather than a fixed grid of epochs.
|
|
486
|
+
* @type {Float32Array|null}
|
|
487
|
+
*/
|
|
488
|
+
sleep_reference: Float32Array | null;
|
|
431
489
|
/**
|
|
432
490
|
* How many times this cloth has been re-seeded by a teleport. Diagnostic:
|
|
433
491
|
* a cloth resetting every few seconds is being driven by something that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClothInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothInstance.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cloth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AM,CAED;IAEf;;;;;OAKG;IACH,eAFU,MAAM,CAEE;IAElB;;;;;OAKG;IACH,SAFU,OAAO,CAED;IAEhB;;;;;;;;;OASG;IACH,UAFU,YAAY,CAES;IAE/B;;;;;;OAMG;IACH,YAFU,OAAO,CAEE;IAEnB;;;;;;;;;;;;;;;;OAgBG;IACH,KAFU,MAAM,CAER;IAER;;;;;;;;;;;OAWG;IACH,eAFU,UAAU,CAEiC;IAErD;;OAEG;IACH,oBAFU,MAAM,CAEO;IAEvB;;;;;;OAMG;IACH,cAFU,MAAM,CAEC;IAEjB;;;;;;;;OAQG;IACH,gBAFU,MAAM,EAAE,GAAC,IAAI,CAED;IAEtB;;;;;;;;;;OAUG;IACH,iBAFU,YAAY,GAAC,IAAI,CAEJ;IAEvB;;;;;OAKG;IACH,gBAFU,MAAM,CAEG;CACtB;4BA3iB2B,uCAAuC;8BAErC,oBAAoB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Transform64 } from "../../../ecs/transform/Transform64.js";
|
|
2
|
+
import { CLOTH_COLLIDER_SLOTS } from "../solver/cloth_solver_constants.js";
|
|
2
3
|
import { ClothDynamics } from "./ClothDynamics.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -53,14 +54,6 @@ export class ClothInstance {
|
|
|
53
54
|
*/
|
|
54
55
|
transform = null;
|
|
55
56
|
|
|
56
|
-
/**
|
|
57
|
-
* How deep the anchor sits in the transform hierarchy. Instances step in
|
|
58
|
-
* ascending depth so that a `Cloth` nested inside another one reads an
|
|
59
|
-
* anchor the outer solve has already written this step.
|
|
60
|
-
* @type {number}
|
|
61
|
-
*/
|
|
62
|
-
depth = 0;
|
|
63
|
-
|
|
64
57
|
/**
|
|
65
58
|
* `false` until the subtree has been walked. Seeding is deferred to the
|
|
66
59
|
* first step rather than done at link, because a rope's links arrive as
|
|
@@ -482,6 +475,77 @@ export class ClothInstance {
|
|
|
482
475
|
*/
|
|
483
476
|
air_varies = false;
|
|
484
477
|
|
|
478
|
+
/**
|
|
479
|
+
* Seconds of fixed step **this instance** has taken, which is the clock
|
|
480
|
+
* §10's gust is a function of.
|
|
481
|
+
*
|
|
482
|
+
* Per cloth rather than per world, and the difference only shows with more
|
|
483
|
+
* than one of them. A cloth registered with the worker while another is
|
|
484
|
+
* already running waits for its memory, and the world's clock moves during
|
|
485
|
+
* that wait because the other cloth is still being advanced — so the two
|
|
486
|
+
* systems reach *this* cloth's first step at different world times and hand
|
|
487
|
+
* it different weather. An age counted in its own steps is the same number
|
|
488
|
+
* on both sides by construction. `MEASUREMENTS.md` §57.
|
|
489
|
+
*
|
|
490
|
+
* Advanced on every step the instance is *offered*, including ones it
|
|
491
|
+
* sleeps through, because a sleeping cloth still has to be able to ask
|
|
492
|
+
* whether the air has changed enough to wake it.
|
|
493
|
+
* @type {number}
|
|
494
|
+
*/
|
|
495
|
+
age = 0;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* The index handles this cloth last **stepped against**, in the order the
|
|
499
|
+
* broadphase returned them, and how many of them are meaningful.
|
|
500
|
+
*
|
|
501
|
+
* §7 P5's wake test compares each overlapping collider's previous pose with
|
|
502
|
+
* its current one, and `ClothColliderSystem#link` *places* a new collider —
|
|
503
|
+
* previous equals current — so a collider spawned around a sleeping cloth
|
|
504
|
+
* is one that has not moved and never woke it. The set is the other half of
|
|
505
|
+
* that question: a handle appearing or leaving is a change to the world the
|
|
506
|
+
* cloth went to sleep in, whatever the poses say.
|
|
507
|
+
* @type {Int32Array}
|
|
508
|
+
*/
|
|
509
|
+
collider_keys = new Int32Array(CLOTH_COLLIDER_SLOTS);
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* @type {number}
|
|
513
|
+
*/
|
|
514
|
+
collider_key_count = 0;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* The broadphase margin the last gather used, metres. The wake test has to
|
|
518
|
+
* query with the same one, or it compares a set built under one reach with
|
|
519
|
+
* a set built under another and wakes on the difference between the two
|
|
520
|
+
* questions rather than on a change in the world.
|
|
521
|
+
* @type {number}
|
|
522
|
+
*/
|
|
523
|
+
gather_reach = 0;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* The joint entities this cloth's rig seeding took `TransformAttachment`
|
|
527
|
+
* authority from, so that removing the cloth can give it back. `null` on
|
|
528
|
+
* the entity path and before the first rig seeding.
|
|
529
|
+
*
|
|
530
|
+
* Only the ones the revoke actually changed: a joint that was already the
|
|
531
|
+
* CPU's is not one cloth has anything to hand back.
|
|
532
|
+
* @type {number[]|null}
|
|
533
|
+
*/
|
|
534
|
+
revoked_joints = null;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Where every particle was when the current sleep window opened, or `null`
|
|
538
|
+
* before the first step — §7 P5's sleep test measures displacement from
|
|
539
|
+
* this rather than an instantaneous speed, because a cloth resting on a
|
|
540
|
+
* collider sits in a bounded limit cycle whose speed is not small.
|
|
541
|
+
*
|
|
542
|
+
* Re-anchored to the live positions whenever a particle leaves the
|
|
543
|
+
* threshold, so the window is "how far has anything moved since the cloth
|
|
544
|
+
* last moved" rather than a fixed grid of epochs.
|
|
545
|
+
* @type {Float32Array|null}
|
|
546
|
+
*/
|
|
547
|
+
sleep_reference = null;
|
|
548
|
+
|
|
485
549
|
/**
|
|
486
550
|
* How many times this cloth has been re-seeded by a teleport. Diagnostic:
|
|
487
551
|
* a cloth resetting every few seconds is being driven by something that
|
|
@@ -53,16 +53,27 @@ export class ClothSystem extends System<any> {
|
|
|
53
53
|
*/
|
|
54
54
|
world: ClothWorld;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
56
|
+
* Every nominated cloth's step parameters, one block each, grown as the
|
|
57
|
+
* scene grows.
|
|
58
58
|
*
|
|
59
|
-
* The same
|
|
59
|
+
* The same blocks {@link WorkerClothSystem} writes into the shared command
|
|
60
60
|
* region — one layout, written by one function, so the inline path and the
|
|
61
|
-
* worker path cannot be handed different numbers.
|
|
61
|
+
* worker path cannot be handed different numbers. **One block per cloth
|
|
62
|
+
* rather than one reused block**, because the three phases of a tick are now
|
|
63
|
+
* three loops and a cloth's parameters have to survive from its `advance` to
|
|
64
|
+
* its step. See {@link fixedUpdate}.
|
|
62
65
|
* @type {Float64Array}
|
|
63
66
|
* @private
|
|
64
67
|
*/
|
|
65
68
|
private __params;
|
|
69
|
+
/**
|
|
70
|
+
* The cloths `advance` nominated this tick, in the order it nominated them.
|
|
71
|
+
* Cleared at the top of every {@link fixedUpdate}; nothing here outlives a
|
|
72
|
+
* tick.
|
|
73
|
+
* @type {ClothInstance[]}
|
|
74
|
+
* @private
|
|
75
|
+
*/
|
|
76
|
+
private __dispatched;
|
|
66
77
|
/**
|
|
67
78
|
* @param {Float64Array} value
|
|
68
79
|
*/
|
|
@@ -106,6 +117,16 @@ export class ClothSystem extends System<any> {
|
|
|
106
117
|
* @returns {Promise<void>}
|
|
107
118
|
*/
|
|
108
119
|
startup(entityManager: EntityManager): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* @param {EntityComponentDataset} dataset
|
|
122
|
+
* @returns {void}
|
|
123
|
+
*/
|
|
124
|
+
handleDatasetAttached(dataset: EntityComponentDataset): void;
|
|
125
|
+
/**
|
|
126
|
+
* @param {EntityComponentDataset} dataset
|
|
127
|
+
* @returns {void}
|
|
128
|
+
*/
|
|
129
|
+
handleDatasetDetached(dataset: EntityComponentDataset): void;
|
|
109
130
|
/**
|
|
110
131
|
* @param {Cloth} cloth
|
|
111
132
|
* @param {Transform64} transform
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSystem.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;;IAEI,oDAAoC;IAEpC,iUAOE;IAEF;;OAEG;IACH,OAFU,UAAU,CAEK;IAEzB
|
|
1
|
+
{"version":3,"file":"ClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSystem.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;;IAEI,oDAAoC;IAEpC,iUAOE;IAEF;;OAEG;IACH,OAFU,UAAU,CAEK;IAEzB;;;;;;;;;;;;OAYG;IACH,iBAAyD;IAEzD;;;;;;OAMG;IACH,qBAAkB;IAUlB;;OAEG;IACH,iCAEC;IAbD;;;OAGG;IACH,4BAEC;IAkBD;;OAEG;IACH,qBAEC;IAdD;;;;OAIG;IACH,gBAEC;IASD;;;;OAIG;IACH,iCAEC;IAUD;;OAEG;IACH;4BAToC,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC;OAWjE;IAbD;;;OAGG;IACH;4BAFoC,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC;MAIjE;IASD;;;OAGG;IACH,uCAFa,QAAQ,IAAI,CAAC,CAIzB;IAED;;;OAGG;IACH,wDAFa,IAAI,CAIhB;IAED;;;OAGG;IACH,wDAFa,IAAI,CAIhB;IAED;;;;OAIG;IACH,YAJW,KAAK,aACL,WAAW,UACX,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAJW,KAAK,aACL,WAAW,UACX,MAAM,QAIhB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;;OAIG;IACH,aAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,gBAAc,SAAS,CAInC;CA2EJ;uBAxSsB,wBAAwB;4BAInB,uCAAuC;sBAE7C,YAAY;4CAPU,uDAAuD;oCAI5F,0DAA0D;8BAInC,oBAAoB;6BACrB,mBAAmB;yBACvB,eAAe;2BACb,iBAAiB"}
|
|
@@ -77,16 +77,28 @@ export class ClothSystem extends System {
|
|
|
77
77
|
world = new ClothWorld();
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
80
|
+
* Every nominated cloth's step parameters, one block each, grown as the
|
|
81
|
+
* scene grows.
|
|
82
82
|
*
|
|
83
|
-
* The same
|
|
83
|
+
* The same blocks {@link WorkerClothSystem} writes into the shared command
|
|
84
84
|
* region — one layout, written by one function, so the inline path and the
|
|
85
|
-
* worker path cannot be handed different numbers.
|
|
85
|
+
* worker path cannot be handed different numbers. **One block per cloth
|
|
86
|
+
* rather than one reused block**, because the three phases of a tick are now
|
|
87
|
+
* three loops and a cloth's parameters have to survive from its `advance` to
|
|
88
|
+
* its step. See {@link fixedUpdate}.
|
|
86
89
|
* @type {Float64Array}
|
|
87
90
|
* @private
|
|
88
91
|
*/
|
|
89
|
-
__params = new Float64Array(CLOTH_STEP_PARAM_STRIDE);
|
|
92
|
+
__params = new Float64Array(CLOTH_STEP_PARAM_STRIDE * 8);
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The cloths `advance` nominated this tick, in the order it nominated them.
|
|
96
|
+
* Cleared at the top of every {@link fixedUpdate}; nothing here outlives a
|
|
97
|
+
* tick.
|
|
98
|
+
* @type {ClothInstance[]}
|
|
99
|
+
* @private
|
|
100
|
+
*/
|
|
101
|
+
__dispatched = [];
|
|
90
102
|
|
|
91
103
|
/**
|
|
92
104
|
* World gravity, m/s². Rotated into each cloth's local frame per step.
|
|
@@ -151,6 +163,22 @@ export class ClothSystem extends System {
|
|
|
151
163
|
this.world.attach(entityManager);
|
|
152
164
|
}
|
|
153
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @param {EntityComponentDataset} dataset
|
|
168
|
+
* @returns {void}
|
|
169
|
+
*/
|
|
170
|
+
handleDatasetAttached(dataset) {
|
|
171
|
+
this.world.attach_dataset(dataset);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @param {EntityComponentDataset} dataset
|
|
176
|
+
* @returns {void}
|
|
177
|
+
*/
|
|
178
|
+
handleDatasetDetached(dataset) {
|
|
179
|
+
this.world.detach_dataset(dataset);
|
|
180
|
+
}
|
|
181
|
+
|
|
154
182
|
/**
|
|
155
183
|
* @param {Cloth} cloth
|
|
156
184
|
* @param {Transform64} transform
|
|
@@ -196,6 +224,25 @@ export class ClothSystem extends System {
|
|
|
196
224
|
}
|
|
197
225
|
|
|
198
226
|
/**
|
|
227
|
+
* Advance every cloth, then step every cloth, then finish every cloth.
|
|
228
|
+
*
|
|
229
|
+
* **Three loops rather than one**, and the reason is §12's parity gate.
|
|
230
|
+
* `WorkerClothSystem` cannot interleave them: its `apply` writes step T−1
|
|
231
|
+
* back at the top of the tick and its `collect` then advances everything for
|
|
232
|
+
* step T, because the step in between happened on another thread. So a
|
|
233
|
+
* nested cloth there reads its parent's **previous** step's pose, and a
|
|
234
|
+
* nested cloth here used to read the pose the cloth above it had written
|
|
235
|
+
* *this* step — `ClothWorld` sorted the instances by hierarchy depth
|
|
236
|
+
* specifically so that it would. Measured on a 4-link rope hung from link 3
|
|
237
|
+
* of a 6-link rope, no wind, 120 steps: the parent identical, the child
|
|
238
|
+
* differing at **step 1, byte 24**.
|
|
239
|
+
*
|
|
240
|
+
* Both readings are defensible and only one of them can be the contract.
|
|
241
|
+
* This is the one that costs nothing to make true on both sides — and once
|
|
242
|
+
* it is, the depth sort does nothing, so it is gone. What a nested cloth
|
|
243
|
+
* reads is its parent one fixed step stale, which is the same trade §4.1
|
|
244
|
+
* already makes for the anchor and measures at a few centimetres.
|
|
245
|
+
*
|
|
199
246
|
* @param {number} dt seconds
|
|
200
247
|
*/
|
|
201
248
|
fixedUpdate(dt) {
|
|
@@ -211,6 +258,14 @@ export class ClothSystem extends System {
|
|
|
211
258
|
|
|
212
259
|
const instances = world.instances;
|
|
213
260
|
|
|
261
|
+
const dispatched = this.__dispatched;
|
|
262
|
+
|
|
263
|
+
dispatched.length = 0;
|
|
264
|
+
|
|
265
|
+
if (this.__params.length < instances.length * CLOTH_STEP_PARAM_STRIDE) {
|
|
266
|
+
this.__params = new Float64Array(instances.length * CLOTH_STEP_PARAM_STRIDE);
|
|
267
|
+
}
|
|
268
|
+
|
|
214
269
|
const params = this.__params;
|
|
215
270
|
|
|
216
271
|
for (let i = 0; i < instances.length; i++) {
|
|
@@ -220,13 +275,25 @@ export class ClothSystem extends System {
|
|
|
220
275
|
continue;
|
|
221
276
|
}
|
|
222
277
|
|
|
223
|
-
if (!world.advance(instance, dt, params,
|
|
278
|
+
if (!world.advance(instance, dt, params, dispatched.length * CLOTH_STEP_PARAM_STRIDE)) {
|
|
224
279
|
continue;
|
|
225
280
|
}
|
|
226
281
|
|
|
227
|
-
|
|
282
|
+
dispatched.push(instance);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
for (let i = 0; i < dispatched.length; i++) {
|
|
286
|
+
const instance = dispatched[i];
|
|
228
287
|
|
|
229
|
-
|
|
288
|
+
cloth_step_instance(
|
|
289
|
+
instance.state, instance.self_exclusions, params, i * CLOTH_STEP_PARAM_STRIDE
|
|
290
|
+
);
|
|
230
291
|
}
|
|
292
|
+
|
|
293
|
+
for (let i = 0; i < dispatched.length; i++) {
|
|
294
|
+
world.finish(dispatched[i], ecd);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
dispatched.length = 0;
|
|
231
298
|
}
|
|
232
299
|
}
|
|
@@ -87,8 +87,16 @@ export class ClothWorld {
|
|
|
87
87
|
*/
|
|
88
88
|
gravity: Float64Array;
|
|
89
89
|
/**
|
|
90
|
-
* Live cloths,
|
|
91
|
-
*
|
|
90
|
+
* Live cloths, in the order they were linked.
|
|
91
|
+
*
|
|
92
|
+
* **Not sorted by hierarchy depth**, and it used to be. The sort existed so
|
|
93
|
+
* that a nested cloth advanced against an anchor the cloth above it had
|
|
94
|
+
* already written this step — which `WorkerClothSystem` cannot do, because
|
|
95
|
+
* the step it is writing back happened on another thread a tick ago. Both
|
|
96
|
+
* systems now advance every cloth, then step every cloth, then finish every
|
|
97
|
+
* cloth, so a nested cloth reads its parent one fixed step stale on both
|
|
98
|
+
* sides and the sort has nothing left to decide. `ClothSystem#fixedUpdate`
|
|
99
|
+
* carries the argument; `MEASUREMENTS.md` §56 carries the measurement.
|
|
92
100
|
* @type {ClothInstance[]}
|
|
93
101
|
*/
|
|
94
102
|
instances: ClothInstance[];
|
|
@@ -188,10 +196,23 @@ export class ClothWorld {
|
|
|
188
196
|
*/
|
|
189
197
|
private __by_entity;
|
|
190
198
|
/**
|
|
191
|
-
* @
|
|
199
|
+
* Watches `Cloth` + {@link ClothRig} so the rig path is a **live**
|
|
200
|
+
* discriminator rather than one read once.
|
|
201
|
+
*
|
|
202
|
+
* `ClothSystem#dependencies` is `[Cloth, Transform64]` — the tuple that
|
|
203
|
+
* makes something a cloth — so a `ClothRig` added to a live cloth completes
|
|
204
|
+
* no tuple the system observes and a `ClothRig` removed from one breaks
|
|
205
|
+
* none. §3.1's "the discriminator is a component's presence" then holds only
|
|
206
|
+
* for a character spawned whole, which is the one case a spec constructs and
|
|
207
|
+
* the least likely one in a scene where a model loads asynchronously.
|
|
208
|
+
*
|
|
209
|
+
* Both edges re-seed. The removing edge also gives the joints back first,
|
|
210
|
+
* because the instance that knows which they were is about to stop being a
|
|
211
|
+
* rig.
|
|
212
|
+
* @type {EntityObserver}
|
|
192
213
|
* @private
|
|
193
214
|
*/
|
|
194
|
-
private
|
|
215
|
+
private __rig_observer;
|
|
195
216
|
/**
|
|
196
217
|
* Resolve the systems a cloth world reads. Called from the owning system's
|
|
197
218
|
* `startup`.
|
|
@@ -206,6 +227,21 @@ export class ClothWorld {
|
|
|
206
227
|
* @returns {ClothInstance}
|
|
207
228
|
*/
|
|
208
229
|
link(cloth: Cloth, transform: Transform64, entity: number): ClothInstance;
|
|
230
|
+
/**
|
|
231
|
+
* Watch this dataset for a {@link ClothRig} arriving at or leaving a live
|
|
232
|
+
* cloth. Called from the owning system's `handleDatasetAttached`; see
|
|
233
|
+
* {@link ClothWorld#__rig_observer} for why the system's own dependency
|
|
234
|
+
* tuple cannot answer this.
|
|
235
|
+
*
|
|
236
|
+
* @param {EntityComponentDataset} dataset
|
|
237
|
+
* @returns {void}
|
|
238
|
+
*/
|
|
239
|
+
attach_dataset(dataset: EntityComponentDataset): void;
|
|
240
|
+
/**
|
|
241
|
+
* @param {EntityComponentDataset} dataset
|
|
242
|
+
* @returns {void}
|
|
243
|
+
*/
|
|
244
|
+
detach_dataset(dataset: EntityComponentDataset): void;
|
|
209
245
|
/**
|
|
210
246
|
* @param {number} entity
|
|
211
247
|
* @returns {ClothInstance|undefined} the instance that was removed
|
|
@@ -283,4 +319,5 @@ export class ClothWorld {
|
|
|
283
319
|
import { ClothInstance } from "./ClothInstance.js";
|
|
284
320
|
import { TransformAttachmentSystem } from "../../../ecs/transform-attachment/TransformAttachmentSystem.js";
|
|
285
321
|
import { ClothColliderSystem } from "./ClothColliderSystem.js";
|
|
322
|
+
import { Cloth } from "./Cloth.js";
|
|
286
323
|
//# sourceMappingURL=ClothWorld.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClothWorld.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothWorld.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClothWorld.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothWorld.js"],"names":[],"mappings":"AA2DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AACH;IAEI;;;OAGG;IACH,SAFU,YAAY,CAEoB;IAE1C;;;;;;;;;;;;OAYG;IACH,WAFU,aAAa,EAAE,CAEV;IAEf;;;;;;;;;;;;;;;OAeG;IACH,QAFU;QAAC,WAAW,SAAW,MAAM,KAAG,CAAC,iBAAe,IAAI,CAAC,CAAA;KAAC,GAAC,IAAI,CAEvD;IAEd;;OAEG;IACH,eAFU,gBAAc,IAAI,CAEP;IAErB;;OAEG;IACH,aAFU,yBAAyB,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