@woosh/meep-engine 3.22.0 → 3.23.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/geom/3d/hash-grid/PointHashGrid3.d.ts +118 -0
- package/src/core/geom/3d/hash-grid/PointHashGrid3.d.ts.map +1 -0
- package/src/core/geom/3d/hash-grid/PointHashGrid3.js +283 -0
- package/src/core/geom/3d/shape/BoxShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/BoxShape3D.js +6 -17
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/CapsuleShape3D.js +3 -14
- package/src/core/geom/3d/shape/CylinderShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/CylinderShape3D.js +3 -21
- package/src/core/geom/3d/shape/PlaneShape3D.d.ts +105 -0
- package/src/core/geom/3d/shape/PlaneShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/PlaneShape3D.js +251 -0
- package/src/core/geom/3d/shape/SphereShape3D.js +3 -3
- package/src/core/geom/3d/shape/json/shape_to_type.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/shape_to_type.js +3 -0
- package/src/core/geom/3d/shape/json/type_adapters.d.ts +14 -0
- package/src/core/geom/3d/shape/json/type_adapters.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/type_adapters.js +15 -0
- package/src/core/geom/3d/shape/sdf/sdf3_box.d.ts +51 -0
- package/src/core/geom/3d/shape/sdf/sdf3_box.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_box.js +113 -0
- package/src/core/geom/3d/shape/sdf/sdf3_capsule.d.ts +46 -0
- package/src/core/geom/3d/shape/sdf/sdf3_capsule.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_capsule.js +82 -0
- package/src/core/geom/3d/shape/sdf/sdf3_cylinder.d.ts +60 -0
- package/src/core/geom/3d/shape/sdf/sdf3_cylinder.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_cylinder.js +126 -0
- package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.d.ts +50 -0
- package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.js +53 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts +52 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.js +61 -0
- package/src/core/geom/3d/shape/sdf/sdf3_sphere.d.ts +41 -0
- package/src/core/geom/3d/shape/sdf/sdf3_sphere.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_sphere.js +71 -0
- package/src/core/process/ConcurrencyGate.d.ts +103 -0
- package/src/core/process/ConcurrencyGate.d.ts.map +1 -0
- package/src/core/process/ConcurrencyGate.js +207 -0
- package/src/engine/asset/AssetManager.d.ts +10 -0
- package/src/engine/asset/AssetManager.d.ts.map +1 -1
- package/src/engine/asset/AssetManager.js +10 -0
- package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +30 -13
- package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts +26 -0
- package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts.map +1 -0
- package/src/engine/graphics3/pose/collect_entity_playbacks.js +40 -0
- package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
- package/src/engine/graphics3/pose/query_entity_node_world_pose.js +74 -101
- package/src/engine/physics/cloth/MEASUREMENTS.md +1287 -4
- package/src/engine/physics/cloth/PLAN.md +1967 -1581
- package/src/engine/physics/cloth/build/ClothProxy.d.ts +147 -0
- package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/ClothProxy.js +207 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +70 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +256 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +176 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.js +435 -0
- package/src/engine/physics/cloth/collider/ClothColliderKind.d.ts +12 -0
- package/src/engine/physics/cloth/collider/ClothColliderKind.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/ClothColliderKind.js +38 -0
- package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts +120 -0
- package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/ClothColliderRecord.js +137 -0
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts +25 -0
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.js +190 -0
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +44 -0
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/cloth_collider_pack.js +173 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +94 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +275 -0
- package/src/engine/physics/cloth/ecs/ClothCollider.d.ts +126 -0
- package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothCollider.js +199 -0
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts +9 -0
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.js +32 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +114 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +243 -0
- package/src/engine/physics/cloth/ecs/ClothDynamicsFlags.js +66 -57
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +109 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +479 -363
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts +95 -0
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothRig.js +140 -0
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +30 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +1021 -773
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +90 -0
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +374 -0
- package/src/engine/physics/cloth/ecs/cloth_dynamics_library.d.ts +32 -3
- package/src/engine/physics/cloth/ecs/cloth_dynamics_library.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_library.js +283 -254
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +59 -0
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +328 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +13 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +288 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +58 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +199 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +8 -63
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +317 -645
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +61 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +212 -449
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts +49 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +115 -0
- package/src/engine/physics/cloth/playground/README.md +155 -1
- package/src/engine/physics/cloth/playground/collide.html +178 -0
- package/src/engine/physics/cloth/playground/collide_build.d.ts +95 -0
- package/src/engine/physics/cloth/playground/collide_build.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/collide_build.js +315 -0
- package/src/engine/physics/cloth/playground/collide_main.d.ts +2 -0
- package/src/engine/physics/cloth/playground/collide_main.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/collide_main.js +720 -0
- package/src/engine/physics/cloth/playground/garment.html +182 -0
- package/src/engine/physics/cloth/playground/garment_build.d.ts +78 -0
- package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/garment_build.js +359 -0
- package/src/engine/physics/cloth/playground/garment_main.d.ts +2 -0
- package/src/engine/physics/cloth/playground/garment_main.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/garment_main.js +633 -0
- package/src/engine/physics/cloth/solver/ClothState.d.ts +208 -5
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +302 -8
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +87 -0
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +343 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +112 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.js +448 -0
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts +4 -1
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.js +16 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +112 -5
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +117 -6
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +40 -9
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +122 -10
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +95 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +285 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +129 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +501 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +75 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +202 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/playground/vgeo_viewer/README.md +18 -0
- package/src/shade/playground/vgeo_viewer/main.js +87 -50
- package/src/shade/renderer/buffer/table/GPUDatabase.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUDatabase.js +191 -62
- package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts +94 -2
- package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUTypedTable.js +414 -2
- package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.d.ts +14 -0
- package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.js +13 -0
- package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.d.ts +17 -0
- package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.d.ts.map +1 -0
- package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.js +116 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +9 -4
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +843 -734
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts +12 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.js +13 -0
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts +17 -0
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.js +185 -30
- package/src/shade/renderer/geometry/virtual/MICRON_COMPARISON_2026_08_20.md +17 -0
- package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +141 -24
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +204 -64
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +110 -10
- package/src/shade/renderer/geometry/virtual/VK_LOD_CLUSTERS_COMPARISON_2026_08_20.md +19 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts +19 -6
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.js +26 -7
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts +173 -14
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +458 -51
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts +49 -13
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js +52 -14
- package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.d.ts +20 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.js +19 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.d.ts +27 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.js +48 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.d.ts +29 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.js +60 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.d.ts +8 -1
- 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 +32 -2
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts +258 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.js +723 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts +49 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.js +50 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.d.ts +3 -0
- package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.js +121 -21
- package/src/shade/renderer/texture/virtual/README.md +6 -4
- package/src/shade/renderer/texture/virtual/VirtualTextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/virtual/VirtualTextureManager.js +7 -0
- package/src/shade/renderer/texture/virtual/source/VTSourceTiled.d.ts +3 -3
- package/src/shade/renderer/texture/virtual/source/VTSourceTiled.js +3 -3
- package/src/engine/ecs/system/SystemExecutionPhase.d.ts +0 -9
- package/src/engine/ecs/system/SystemExecutionPhase.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/NOTES.md +0 -128
- package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.d.ts +0 -6
- package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.js +0 -5
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts +0 -49
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.js +0 -264
- package/src/engine/graphics/texture/virtual/VirtualTextureUsage.d.ts +0 -44
- package/src/engine/graphics/texture/virtual/VirtualTextureUsage.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureUsage.js +0 -228
- package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.d.ts +0 -3
- package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.js +0 -73
- package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.d.ts +0 -14
- package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.js +0 -85
- package/src/engine/graphics/texture/virtual/debug/UsageDebugView.d.ts +0 -12
- package/src/engine/graphics/texture/virtual/debug/UsageDebugView.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/debug/UsageDebugView.js +0 -63
- package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.d.ts +0 -12
- package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.js +0 -243
- package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.d.ts +0 -30
- package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.js +0 -39
- package/src/engine/graphics/texture/virtual/tile/compose_finger_print.d.ts +0 -9
- package/src/engine/graphics/texture/virtual/tile/compose_finger_print.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/compose_finger_print.js +0 -24
- package/src/engine/graphics/texture/virtual/tile/compose_tile_address.d.ts +0 -9
- package/src/engine/graphics/texture/virtual/tile/compose_tile_address.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/compose_tile_address.js +0 -26
- package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.d.ts +0 -11
- package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.js +0 -12
- package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.d.ts +0 -7
- package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.js +0 -16
- package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.d.ts +0 -7
- package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.js +0 -35
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { quat3_multiply } from "../../../../core/geom/3d/quaternion/quat3_multiply.js";
|
|
3
|
+
import { v3_quaternion_apply } from "../../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
4
|
+
import { TransformAuthority } from "../../../../shade/renderer/scene/TransformAuthority.js";
|
|
5
|
+
import { cloth_build_children, cloth_build_rows } from "./cloth_build_rows.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* # Seeding a cloth from a skinned model's joints — §11.2
|
|
9
|
+
*
|
|
10
|
+
* One particle per joint the proxy names, with the anchor as the fixed set, and
|
|
11
|
+
* everything after that is `cloth_build_rows.js` — the same rows, the same
|
|
12
|
+
* geodesics, the same leashes the entity path gets. §11 says "the solver is
|
|
13
|
+
* identical either way; only seeding and write-back differ", and this file plus
|
|
14
|
+
* `cloth_write_back_rig.js` is the whole of the difference.
|
|
15
|
+
*
|
|
16
|
+
* ## Cloth takes authority, and that is a real claim
|
|
17
|
+
*
|
|
18
|
+
* §11.2 says the writable handle is "the joint's `Node3D.transform_local` — the
|
|
19
|
+
* same handle the animation systems write". **The animation systems do not
|
|
20
|
+
* write it.** `TransformAuthority` is explicit: a node a clip drives is
|
|
21
|
+
* `GPU`, and "the CPU allocates and seeds the row, then never writes to it
|
|
22
|
+
* again, so the node's own `transform_local` stops describing it and should not
|
|
23
|
+
* be read as if it did". Cloth writing `transform_local` on such a node would
|
|
24
|
+
* be writing to something nothing reads.
|
|
25
|
+
*
|
|
26
|
+
* So the seed **claims** `TransformAuthority.CPU` on every joint it drives. The
|
|
27
|
+
* consequence is stated rather than hidden: a joint cloth simulates stops being
|
|
28
|
+
* animatable by a clip, because two writers of one row is the race the authority
|
|
29
|
+
* enum exists to prevent. That is the right trade for a cape — the whole point
|
|
30
|
+
* of simulating it is that nobody keyframes it — and it is an authoring error
|
|
31
|
+
* for a garment whose joints are also keyed, which is why the seed says so.
|
|
32
|
+
*
|
|
33
|
+
* ## The animated pose is constant, exactly as it is for a rope
|
|
34
|
+
*
|
|
35
|
+
* §11.1 says a subtree's authored pose is rigid relative to its anchor, so in
|
|
36
|
+
* the anchor's own frame it does not move, and then says "a subtree whose links
|
|
37
|
+
* are themselves animated is not an M1 case — that is the rig path, where the
|
|
38
|
+
* animated pose comes from the skeleton and is live".
|
|
39
|
+
*
|
|
40
|
+
* For a **rigged** garment it is not live either, and the reason is the
|
|
41
|
+
* authority claim above: cloth owns those joints, so nothing else poses them,
|
|
42
|
+
* so their authored pose is the proxy's baked bind pose — constant in the
|
|
43
|
+
* anchor's frame, exactly as a rope's is. What moves is the anchor, and the
|
|
44
|
+
* anchor is a joint of the character's own animated skeleton.
|
|
45
|
+
*
|
|
46
|
+
* The live case is the **unrigged** path, where the animated targets are mesh
|
|
47
|
+
* vertices skinned to the character's skeleton by
|
|
48
|
+
* `mesh_apply_skeletal_vertex_skinning` and genuinely move under the animation.
|
|
49
|
+
* That path is not in M3.
|
|
50
|
+
*
|
|
51
|
+
* @author Alex Goldring
|
|
52
|
+
* @copyright Company Named Limited (c) 2026
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Seed `instance` from a proxy and the joints of a skin.
|
|
57
|
+
*
|
|
58
|
+
* @param {ClothInstance} instance seeded in place
|
|
59
|
+
* @param {ClothProxy} proxy
|
|
60
|
+
* @param {Node3D[]} joints the skin's joints, in the order the proxy indexes
|
|
61
|
+
* @param {number} dt fixed step, seconds
|
|
62
|
+
* @returns {void}
|
|
63
|
+
*/
|
|
64
|
+
export function cloth_seed_rig(instance, proxy, joints, dt) {
|
|
65
|
+
assert.ok(proxy.isClothProxy === true, 'proxy must be a ClothProxy');
|
|
66
|
+
|
|
67
|
+
const joint_count = proxy.joint_count;
|
|
68
|
+
|
|
69
|
+
// Node 0 is the anchor, exactly as it is for the entity path: the fixed
|
|
70
|
+
// set, the origin of the local frame, and `d_geo = 0`.
|
|
71
|
+
const node_count = joint_count + 1;
|
|
72
|
+
|
|
73
|
+
instance.node_count = node_count;
|
|
74
|
+
|
|
75
|
+
const node_parent = new Int32Array(node_count);
|
|
76
|
+
|
|
77
|
+
node_parent[0] = -1;
|
|
78
|
+
|
|
79
|
+
for (let i = 0; i < joint_count; i++) {
|
|
80
|
+
node_parent[i + 1] = proxy.joint_parent[i] + 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
instance.node_parent = node_parent;
|
|
84
|
+
|
|
85
|
+
const node_joint = new Array(node_count);
|
|
86
|
+
|
|
87
|
+
node_joint[0] = joints[proxy.anchor];
|
|
88
|
+
|
|
89
|
+
for (let i = 0; i < joint_count; i++) {
|
|
90
|
+
const node = joints[proxy.joint[i]];
|
|
91
|
+
|
|
92
|
+
assert.defined(node, `joint ${proxy.joint[i]} of the skin`);
|
|
93
|
+
|
|
94
|
+
node_joint[i + 1] = node;
|
|
95
|
+
|
|
96
|
+
// See the module docblock. A clip-driven joint reads as GPU here, and
|
|
97
|
+
// taking it is what makes the write-back visible at all.
|
|
98
|
+
node.transform_authority = TransformAuthority.CPU;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
instance.node_joint = node_joint;
|
|
102
|
+
|
|
103
|
+
// The entity path's arrays have no meaning here and holding stale ones is
|
|
104
|
+
// how a write-back reaches into a previous seeding's entities.
|
|
105
|
+
instance.node_entity = null;
|
|
106
|
+
instance.node_transform = [];
|
|
107
|
+
instance.node_attachment = [];
|
|
108
|
+
instance.pruned_count = 0;
|
|
109
|
+
instance.pruned_entity = null;
|
|
110
|
+
instance.pruned_parent = null;
|
|
111
|
+
instance.pruned_transform = [];
|
|
112
|
+
instance.pruned_attachment = [];
|
|
113
|
+
|
|
114
|
+
cloth_build_children(instance);
|
|
115
|
+
|
|
116
|
+
read_bind_pose(instance, proxy);
|
|
117
|
+
|
|
118
|
+
instance.dynamics_seen.copy(instance.cloth.dynamics);
|
|
119
|
+
|
|
120
|
+
cloth_build_rows(instance, dt);
|
|
121
|
+
|
|
122
|
+
instance.seeded = true;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Compose the proxy's baked bind pose into the anchor's frame.
|
|
127
|
+
*
|
|
128
|
+
* The proxy's parents come before its children, so one forward pass is the whole
|
|
129
|
+
* hierarchy — the same property `cloth_seed_subtree` gets from a breadth-first
|
|
130
|
+
* walk and relies on for the same reason.
|
|
131
|
+
*
|
|
132
|
+
* @param {ClothInstance} instance
|
|
133
|
+
* @param {ClothProxy} proxy
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
function read_bind_pose(instance, proxy) {
|
|
137
|
+
const node_count = instance.node_count;
|
|
138
|
+
|
|
139
|
+
const local_position = new Float32Array(node_count * 3);
|
|
140
|
+
const local_rotation = new Float32Array(node_count * 4);
|
|
141
|
+
|
|
142
|
+
const position = new Float32Array(node_count * 3);
|
|
143
|
+
const rotation = new Float32Array(node_count * 4);
|
|
144
|
+
|
|
145
|
+
// The anchor is the origin of the frame it anchors.
|
|
146
|
+
local_rotation[3] = 1;
|
|
147
|
+
rotation[3] = 1;
|
|
148
|
+
|
|
149
|
+
const parent = instance.node_parent;
|
|
150
|
+
|
|
151
|
+
for (let node = 1; node < node_count; node++) {
|
|
152
|
+
const joint = node - 1;
|
|
153
|
+
|
|
154
|
+
local_position[node * 3] = proxy.rest_position[joint * 3];
|
|
155
|
+
local_position[node * 3 + 1] = proxy.rest_position[joint * 3 + 1];
|
|
156
|
+
local_position[node * 3 + 2] = proxy.rest_position[joint * 3 + 2];
|
|
157
|
+
|
|
158
|
+
local_rotation[node * 4] = proxy.rest_rotation[joint * 4];
|
|
159
|
+
local_rotation[node * 4 + 1] = proxy.rest_rotation[joint * 4 + 1];
|
|
160
|
+
local_rotation[node * 4 + 2] = proxy.rest_rotation[joint * 4 + 2];
|
|
161
|
+
local_rotation[node * 4 + 3] = proxy.rest_rotation[joint * 4 + 3];
|
|
162
|
+
|
|
163
|
+
const p = parent[node];
|
|
164
|
+
|
|
165
|
+
const pqx = rotation[p * 4];
|
|
166
|
+
const pqy = rotation[p * 4 + 1];
|
|
167
|
+
const pqz = rotation[p * 4 + 2];
|
|
168
|
+
const pqw = rotation[p * 4 + 3];
|
|
169
|
+
|
|
170
|
+
v3_quaternion_apply(
|
|
171
|
+
COMPOSE, 0,
|
|
172
|
+
local_position[node * 3], local_position[node * 3 + 1], local_position[node * 3 + 2],
|
|
173
|
+
pqx, pqy, pqz, pqw
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
position[node * 3] = position[p * 3] + COMPOSE[0];
|
|
177
|
+
position[node * 3 + 1] = position[p * 3 + 1] + COMPOSE[1];
|
|
178
|
+
position[node * 3 + 2] = position[p * 3 + 2] + COMPOSE[2];
|
|
179
|
+
|
|
180
|
+
quat3_multiply(
|
|
181
|
+
rotation, node * 4,
|
|
182
|
+
pqx, pqy, pqz, pqw,
|
|
183
|
+
local_rotation[node * 4], local_rotation[node * 4 + 1],
|
|
184
|
+
local_rotation[node * 4 + 2], local_rotation[node * 4 + 3]
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
instance.rest_local_position = local_position;
|
|
189
|
+
instance.rest_local_rotation = local_rotation;
|
|
190
|
+
|
|
191
|
+
instance.animated_position = position;
|
|
192
|
+
instance.animated_rotation = rotation;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @type {Float64Array}
|
|
197
|
+
* @private
|
|
198
|
+
*/
|
|
199
|
+
const COMPOSE = new Float64Array(3);
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Walk the subtree and build everything {@link ClothSystem} needs to step it.
|
|
3
|
-
*
|
|
4
|
-
* @param {ClothInstance} instance seeded in place
|
|
5
|
-
* @param {EntityComponentDataset} ecd
|
|
6
|
-
* @param {TransformAttachmentSystem} attachments
|
|
7
|
-
* @param {number} dt fixed step, seconds — the bend row's scale is a ratio of
|
|
8
|
-
* `m/dt²`, so the step length is part of the rest data
|
|
9
|
-
* @returns {void}
|
|
10
|
-
*/
|
|
11
|
-
export function cloth_seed_subtree(instance: ClothInstance, ecd: EntityComponentDataset, attachments: TransformAttachmentSystem, dt: number): void;
|
|
12
|
-
/**
|
|
13
|
-
* Re-parameterise the rows of an already-seeded cloth from its current
|
|
14
|
-
* {@link ClothDynamics}, without walking the subtree again.
|
|
15
|
-
*
|
|
16
|
-
* This is what makes `cloth.dynamics.slack = 0.2` work live: the topology, the
|
|
17
|
-
* rest lengths and the geodesics are properties of the authored pose and do not
|
|
18
|
-
* move, and everything that does move is a number in a row table.
|
|
19
|
-
*
|
|
20
|
-
* The multipliers are **not** reset. A row whose radius has just changed is
|
|
21
|
-
* carrying a force appropriate to the radius it had, and it is one warm start
|
|
22
|
-
* away from carrying the right one; zeroing them would put a visible jolt into
|
|
23
|
-
* every parameter change instead.
|
|
24
|
-
*
|
|
25
|
-
* @param {ClothInstance} instance
|
|
26
|
-
* @param {number} dt
|
|
27
|
-
* @returns {void}
|
|
28
|
-
*/
|
|
29
|
-
export function cloth_reparameterise(instance: ClothInstance, dt: number): void;
|
|
30
|
-
/**
|
|
31
|
-
* Whether a dynamics change needs the subtree walked again rather than merely
|
|
32
|
-
* re-parameterised.
|
|
33
|
-
*
|
|
34
|
-
* Two fields do: turning the strain limit on or off adds or removes rows, and
|
|
35
|
-
* so does moving `slack` across the bound at which its row is provably
|
|
36
|
-
* inactive. Everything else is a number in a table that already exists.
|
|
37
|
-
*
|
|
38
|
-
* @param {ClothDynamics} before
|
|
39
|
-
* @param {ClothDynamics} after
|
|
40
|
-
* @returns {boolean}
|
|
41
|
-
*/
|
|
42
|
-
export function cloth_dynamics_change_needs_reseed(before: ClothDynamics, after: ClothDynamics): boolean;
|
|
43
1
|
/**
|
|
44
2
|
* # Seeding a cloth from an entity subtree — §11.1
|
|
45
3
|
*
|
|
@@ -87,28 +45,15 @@ export function cloth_dynamics_change_needs_reseed(before: ClothDynamics, after:
|
|
|
87
45
|
* @copyright Company Named Limited (c) 2026
|
|
88
46
|
*/
|
|
89
47
|
/**
|
|
90
|
-
*
|
|
91
|
-
* why "arbitrary" is a statement about the solver rather than a shrug.
|
|
92
|
-
* @type {number}
|
|
93
|
-
*/
|
|
94
|
-
export const CLOTH_PARTICLE_MASS: number;
|
|
95
|
-
/**
|
|
96
|
-
* Slack radius at `ClothDynamics#slack = 1`, as a multiple of `d_geo`.
|
|
97
|
-
*
|
|
98
|
-
* It is **2**, and that is a derivation rather than a taste. The tether row
|
|
99
|
-
* already holds every particle within `d_geo` of the anchor, and the animated
|
|
100
|
-
* position it is leashed to is itself within `d_geo` of the anchor — a chord is
|
|
101
|
-
* never longer than the arc it subtends. By the triangle inequality the two can
|
|
102
|
-
* therefore never be more than `2·d_geo` apart, so a slack radius of `2·d_geo`
|
|
103
|
-
* is **provably inactive** and `slack = 1` means exactly "no leash" with no
|
|
104
|
-
* sentinel value and no discontinuity to code around.
|
|
48
|
+
* Walk the subtree and build everything {@link ClothSystem} needs to step it.
|
|
105
49
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
50
|
+
* @param {ClothInstance} instance seeded in place
|
|
51
|
+
* @param {EntityComponentDataset} ecd
|
|
52
|
+
* @param {TransformAttachmentSystem} attachments
|
|
53
|
+
* @param {number} dt fixed step, seconds — the bend row's scale is a ratio of
|
|
54
|
+
* `m/dt²`, so the step length is part of the rest data
|
|
55
|
+
* @returns {void}
|
|
111
56
|
*/
|
|
112
|
-
export
|
|
57
|
+
export function cloth_seed_subtree(instance: ClothInstance, ecd: EntityComponentDataset, attachments: TransformAttachmentSystem, dt: number): void;
|
|
113
58
|
import { ClothInstance } from "./ClothInstance.js";
|
|
114
59
|
//# sourceMappingURL=cloth_seed_subtree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_seed_subtree.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_seed_subtree.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloth_seed_subtree.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_seed_subtree.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;;;;;GASG;AACH,6CAPW,aAAa,2EAGb,MAAM,GAEJ,IAAI,CAkGhB;8BA5J6B,oBAAoB"}
|