@woosh/meep-engine 3.24.0 → 3.25.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/engine/graphics3/PickingSystem.d.ts +3 -3
- package/src/engine/graphics3/PickingSystem.d.ts.map +1 -1
- package/src/engine/graphics3/PickingSystem.js +52 -55
- package/src/engine/graphics3/shader_picking_gather.d.ts +40 -0
- package/src/engine/graphics3/shader_picking_gather.d.ts.map +1 -0
- package/src/engine/graphics3/shader_picking_gather.js +120 -0
- package/src/engine/physics/cloth/MEASUREMENTS.md +1050 -0
- package/src/engine/physics/cloth/PLAN.md +411 -49
- package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts +52 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.js +70 -0
- package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts +12 -3
- package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothDynamics.js +340 -331
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +36 -22
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +38 -23
- package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts +84 -0
- package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.js +141 -0
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +51 -82
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +81 -869
- package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts +48 -0
- package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothWorkerCore.js +107 -0
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +286 -0
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothWorld.js +1104 -0
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +182 -0
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +562 -0
- package/src/engine/physics/cloth/ecs/cloth.worker.d.ts +2 -0
- package/src/engine/physics/cloth/ecs/cloth.worker.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth.worker.js +12 -0
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +2 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +58 -0
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +341 -271
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +20 -2
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +39 -15
- package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts +29 -0
- package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_worker_protocol.js +78 -0
- package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts +17 -0
- package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/makeClothWorker.js +18 -0
- package/src/engine/physics/cloth/playground/README.md +73 -2
- package/src/engine/physics/cloth/playground/wind.html +166 -0
- package/src/engine/physics/cloth/playground/wind_build.d.ts +81 -0
- package/src/engine/physics/cloth/playground/wind_build.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/wind_build.js +141 -0
- package/src/engine/physics/cloth/playground/wind_main.d.ts +2 -0
- package/src/engine/physics/cloth/playground/wind_main.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/wind_main.js +681 -0
- package/src/engine/physics/cloth/solver/ClothState.d.ts +134 -79
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +273 -12
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +33 -0
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +34 -0
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +21 -2
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +173 -4
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +40 -0
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +284 -0
- package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts +107 -0
- package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_wind_accelerate.js +263 -0
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +88 -0
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/AbstractClothWind.js +100 -0
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +85 -0
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/ClothAmbientWind.js +182 -0
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +79 -0
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +210 -0
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +101 -0
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +290 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/device/mock/texture_copy.d.ts.map +1 -1
- package/src/shade/device/mock/texture_copy.js +28 -0
- package/src/shade/playground/vgeo_runtime/README.md +94 -0
- package/src/shade/playground/vgeo_runtime/index.html +62 -0
- package/src/shade/playground/vgeo_runtime/main.d.ts +2 -0
- package/src/shade/playground/vgeo_runtime/main.d.ts.map +1 -0
- package/src/shade/playground/vgeo_runtime/main.js +399 -0
- package/src/shade/playground/vgeo_viewer/sample_asset.js +1 -1
- package/src/shade/renderer/camera/Camera.d.ts +14 -0
- package/src/shade/renderer/camera/Camera.d.ts.map +1 -1
- package/src/shade/renderer/camera/Camera.js +7 -1
- package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.js +16 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.js +29 -9
- package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts +10 -0
- package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryMetadata.js +13 -0
- package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +46 -18
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +70 -22
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +97 -19
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +12 -2
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +14 -3
- package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts +2 -2
- 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 +124 -6
- package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts +22 -0
- package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.js +53 -0
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +8 -1
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +8 -1
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts +16 -0
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.js +15 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +54 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +53 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts +13 -2
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.js +14 -2
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +100 -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 +113 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.js +5 -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 +108 -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 +23 -0
- 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 +40 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +228 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +932 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +176 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +425 -0
- package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +241 -0
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +574 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +120 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +674 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts +287 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +976 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +42 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +96 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts +16 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.js +15 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +83 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +160 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +255 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.js +80 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +144 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +530 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +39 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +54 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +41 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +56 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts +49 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +328 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts +10 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.js +51 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.js +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +17 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +99 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +27 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.js +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.js +35 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts +15 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.js +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.js +36 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts +10 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.js +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +54 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.js +10 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.js +30 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.js +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.js +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.js +61 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.js +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts +20 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.js +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts +23 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +70 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts +18 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js +25 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts +35 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js +41 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts +32 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +138 -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/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 +9 -0
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +12 -1
- 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 +12 -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 +10 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +18 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +647 -594
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +22 -0
- package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts +35 -0
- package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.js +91 -0
- package/src/engine/graphics3/instantiate_scene_bundle.d.ts +0 -54
- package/src/engine/graphics3/instantiate_scene_bundle.d.ts.map +0 -1
- package/src/engine/graphics3/shade_node_to_entity_composition.d.ts +0 -39
- package/src/engine/graphics3/shade_node_to_entity_composition.d.ts.map +0 -1
- package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts +0 -35
- package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts.map +0 -1
- package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts +0 -96
- package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts.map +0 -1
- package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts +0 -20
- package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_bind_transform.d.ts +0 -25
- package/src/shade/renderer/animation/skin_bind_transform.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_frame_defect.d.ts +0 -34
- package/src/shade/renderer/animation/skin_frame_defect.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_joint_matrix.d.ts +0 -24
- package/src/shade/renderer/animation/skin_joint_matrix.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts +0 -70
- package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts.map +0 -1
- package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts +0 -96
- package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts.map +0 -1
- package/src/shade/renderer/scene/InstanceBatch.d.ts +0 -92
- package/src/shade/renderer/scene/InstanceBatch.d.ts.map +0 -1
- package/src/shade/renderer/scene/Mesh.d.ts +0 -55
- package/src/shade/renderer/scene/Mesh.d.ts.map +0 -1
- package/src/shade/renderer/scene/Node3D.d.ts +0 -159
- package/src/shade/renderer/scene/Node3D.d.ts.map +0 -1
- package/src/shade/renderer/scene/Node3DDirtyList.d.ts +0 -59
- package/src/shade/renderer/scene/Node3DDirtyList.d.ts.map +0 -1
- package/src/shade/renderer/scene/SceneNodeBinding.d.ts +0 -52
- package/src/shade/renderer/scene/SceneNodeBinding.d.ts.map +0 -1
- package/src/shade/renderer/scene/SkinnedMesh.d.ts +0 -27
- package/src/shade/renderer/scene/SkinnedMesh.d.ts.map +0 -1
- package/src/shade/renderer/scene/TransformAuthority.d.ts +0 -19
- package/src/shade/renderer/scene/TransformAuthority.d.ts.map +0 -1
|
@@ -343,32 +343,27 @@ export class ClothInstance {
|
|
|
343
343
|
*/
|
|
344
344
|
blend_seen: number;
|
|
345
345
|
/**
|
|
346
|
-
*
|
|
347
|
-
* frame** rather than the world's — the same layout `ClothColliderIndex`
|
|
348
|
-
* uses, in `Float32` rather than `Float64` because a cloth-local coordinate
|
|
349
|
-
* is garment-sized (§12).
|
|
346
|
+
* Whether {@link state}'s buffer must be a `SharedArrayBuffer`.
|
|
350
347
|
*
|
|
351
|
-
*
|
|
352
|
-
* `
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* @type {Float32Array|null}
|
|
358
|
-
*/
|
|
359
|
-
collider_table: Float32Array | null;
|
|
360
|
-
/**
|
|
361
|
-
* The index handle behind each record in {@link collider_table}. A record
|
|
362
|
-
* index is this step's; a handle is the collider's, and it is what a
|
|
363
|
-
* transient contact's multiplier is warm-started on.
|
|
364
|
-
* @type {Int32Array|null}
|
|
348
|
+
* Set by {@link WorkerClothSystem} when the instance is linked, and read by
|
|
349
|
+
* `cloth_build_rows` every time the state is built — which is at seed and
|
|
350
|
+
* again at every re-seed, so a cloth that gains a link or changes a
|
|
351
|
+
* `ClothDynamics` field the rows depend on comes back shared without
|
|
352
|
+
* anything having to remember to ask.
|
|
353
|
+
* @type {boolean}
|
|
365
354
|
*/
|
|
366
|
-
|
|
355
|
+
shared_state: boolean;
|
|
367
356
|
/**
|
|
368
|
-
*
|
|
369
|
-
*
|
|
357
|
+
* `true` once this cloth has said its collider table overflowed.
|
|
358
|
+
*
|
|
359
|
+
* M5 moved that table into {@link state}'s buffer — §12's own layout, and
|
|
360
|
+
* what lets a worker step the cloth without being told about a new array
|
|
361
|
+
* every time the broadphase returns more. A fixed region has a capacity, and
|
|
362
|
+
* a cloth that overlaps more colliders than `CLOTH_COLLIDER_SLOTS` drops the
|
|
363
|
+
* remainder; this is how it says so once rather than once a frame.
|
|
364
|
+
* @type {boolean}
|
|
370
365
|
*/
|
|
371
|
-
|
|
366
|
+
collider_overflow_reported: boolean;
|
|
372
367
|
/**
|
|
373
368
|
* Which particle pairs a self-collision row must never be built on, because
|
|
374
369
|
* a persistent row already governs them (§9). CSR, sorted, built at seed and
|
|
@@ -414,6 +409,25 @@ export class ClothInstance {
|
|
|
414
409
|
* @type {boolean}
|
|
415
410
|
*/
|
|
416
411
|
refused: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* The air at the cloth's centre the last time a step applied it, world-space
|
|
414
|
+
* metres per second (§10).
|
|
415
|
+
*
|
|
416
|
+
* What §7 P5's "wake on a wind change" compares against. It is the last
|
|
417
|
+
* **applied** air rather than the last sampled one, so a gust that builds
|
|
418
|
+
* slowly still wakes a sleeping banner instead of being reset by every step
|
|
419
|
+
* that declined to act on it.
|
|
420
|
+
* @type {Float64Array}
|
|
421
|
+
*/
|
|
422
|
+
air_seen: Float64Array;
|
|
423
|
+
/**
|
|
424
|
+
* Whether the last step sampled the air per particle rather than once for
|
|
425
|
+
* the whole cloth — that is, whether a fluid field actually reached it.
|
|
426
|
+
* Diagnostic, and the one the playground shows: it is the difference
|
|
427
|
+
* between §10's simulated wake and its ambient fallback.
|
|
428
|
+
* @type {boolean}
|
|
429
|
+
*/
|
|
430
|
+
air_varies: boolean;
|
|
417
431
|
/**
|
|
418
432
|
* How many times this cloth has been re-seeded by a teleport. Diagnostic:
|
|
419
433
|
* 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":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;IAEI;;;OAGG;IACH,QAFU,MAAM,CAEJ;IAEZ;;OAEG;IACH,OAFU,QAAM,IAAI,CAEP;IAEb;;;OAGG;IACH,WAFU,WAAW,GAAC,IAAI,CAET;IAEjB;;;;;OAKG;IACH,OAFU,MAAM,CAEN;IAEV;;;;;;OAMG;IACH,QAFU,OAAO,CAEF;IAEf;;OAEG;IACH,OAFU,aAAW,IAAI,CAEZ;IAEb;;OAEG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,aAFU,UAAU,GAAC,IAAI,CAEN;IAEnB;;;OAGG;IACH,aAFU,UAAU,GAAC,IAAI,CAEN;IAEnB;;;;;;;;;OASG;IACH,KAFU,WAAS,IAAI,CAEZ;IAEX;;;;OAIG;IACH,gBAFU,WAAW,EAAE,CAEH;IAEpB;;;;;;OAMG;IACH,YAFU,UAAU,GAAC,MAAM,EAAE,CAEb;IAEhB;;;;;;;;;;;;OAYG;IACH,aAFU,WAAW,CAEW;IAEhC;;;;;;;;;;;OAWG;IACH,iBAFU,qBAAqB,CAEV;IAErB;;;;OAIG;IACH,qBAFU,YAAY,GAAC,IAAI,CAEA;IAE3B;;;OAGG;IACH,qBAFU,YAAY,GAAC,IAAI,CAEA;IAE3B;;;OAGG;IACH,mBAFU,UAAU,GAAC,IAAI,CAEA;IAEzB;;;OAGG;IACH,YAFU,UAAU,GAAC,IAAI,CAEP;IAElB;;;;;;;;;OASG;IACH,eAFU,UAAU,GAAC,IAAI,CAEJ;IAErB;;;OAGG;IACH,eAFU,UAAU,GAAC,IAAI,CAEJ;IAErB;;OAEG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,kBAFU,WAAW,EAAE,CAED;IAEtB;;;;OAIG;IACH,mBAFU,qBAAqB,CAER;IAEvB;;;OAGG;IACH,kBAFU,UAAU,GAAC,IAAI,CAED;IAExB;;;;;;;;OAQG;IACH,UAFU,YAAY,GAAC,IAAI,CAEX;IAEhB;;;;;;;;;;;OAWG;IACH,mBAFU,YAAY,GAAC,IAAI,CAEF;IAEzB;;;OAGG;IACH,mBAFU,YAAY,GAAC,IAAI,CAEF;IAEzB;;;;;;;;;;OAUG;IACH,kBAFU,YAAY,GAAC,IAAI,CAEH;IAExB;;;;;;;;;OASG;IACH,kBAFU,YAAY,GAAC,IAAI,CAEH;IAExB;;;;;OAKG;IACH,WAFU,UAAU,GAAC,IAAI,CAER;IAEjB;;;OAGG;IACH,YAFU,UAAU,GAAC,IAAI,CAEP;IAElB;;;OAGG;IACH,UAFU,UAAU,GAAC,IAAI,CAET;IAEhB;;;OAGG;IACH,YAFU,UAAU,GAAC,IAAI,CAEP;IAElB;;;;OAIG;IACH,UAFU,UAAU,GAAC,IAAI,CAET;IAEhB;;;;;OAKG;IACH,OAFU,MAAM,CAEN;IAEV;;;;;;;;;OASG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,oBAFU,YAAY,CAEmB;IAEzC;;;OAGG;IACH,iBAFU,YAAY,CAE2B;IAEjD;;;;;OAKG;IACH,cAFU,OAAO,CAEI;IAErB;;;;;OAKG;IACH,eAFU,aAAa,CAEa;IAEpC;;;;;OAKG;IACH,qBAFU,MAAM,CAEQ;IAExB;;;;OAIG;IACH,aAFU,MAAM,CAEA;IAEhB;;;;;;;;OAQG;IACH,QAFU,OAAO,CAEF;IAEf;;;;;;;;OAQG;IACH,YAFU,MAAM,CAED;IAEf
|
|
1
|
+
{"version":3,"file":"ClothInstance.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothInstance.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;IAEI;;;OAGG;IACH,QAFU,MAAM,CAEJ;IAEZ;;OAEG;IACH,OAFU,QAAM,IAAI,CAEP;IAEb;;;OAGG;IACH,WAFU,WAAW,GAAC,IAAI,CAET;IAEjB;;;;;OAKG;IACH,OAFU,MAAM,CAEN;IAEV;;;;;;OAMG;IACH,QAFU,OAAO,CAEF;IAEf;;OAEG;IACH,OAFU,aAAW,IAAI,CAEZ;IAEb;;OAEG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,aAFU,UAAU,GAAC,IAAI,CAEN;IAEnB;;;OAGG;IACH,aAFU,UAAU,GAAC,IAAI,CAEN;IAEnB;;;;;;;;;OASG;IACH,KAFU,WAAS,IAAI,CAEZ;IAEX;;;;OAIG;IACH,gBAFU,WAAW,EAAE,CAEH;IAEpB;;;;;;OAMG;IACH,YAFU,UAAU,GAAC,MAAM,EAAE,CAEb;IAEhB;;;;;;;;;;;;OAYG;IACH,aAFU,WAAW,CAEW;IAEhC;;;;;;;;;;;OAWG;IACH,iBAFU,qBAAqB,CAEV;IAErB;;;;OAIG;IACH,qBAFU,YAAY,GAAC,IAAI,CAEA;IAE3B;;;OAGG;IACH,qBAFU,YAAY,GAAC,IAAI,CAEA;IAE3B;;;OAGG;IACH,mBAFU,UAAU,GAAC,IAAI,CAEA;IAEzB;;;OAGG;IACH,YAFU,UAAU,GAAC,IAAI,CAEP;IAElB;;;;;;;;;OASG;IACH,eAFU,UAAU,GAAC,IAAI,CAEJ;IAErB;;;OAGG;IACH,eAFU,UAAU,GAAC,IAAI,CAEJ;IAErB;;OAEG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,kBAFU,WAAW,EAAE,CAED;IAEtB;;;;OAIG;IACH,mBAFU,qBAAqB,CAER;IAEvB;;;OAGG;IACH,kBAFU,UAAU,GAAC,IAAI,CAED;IAExB;;;;;;;;OAQG;IACH,UAFU,YAAY,GAAC,IAAI,CAEX;IAEhB;;;;;;;;;;;OAWG;IACH,mBAFU,YAAY,GAAC,IAAI,CAEF;IAEzB;;;OAGG;IACH,mBAFU,YAAY,GAAC,IAAI,CAEF;IAEzB;;;;;;;;;;OAUG;IACH,kBAFU,YAAY,GAAC,IAAI,CAEH;IAExB;;;;;;;;;OASG;IACH,kBAFU,YAAY,GAAC,IAAI,CAEH;IAExB;;;;;OAKG;IACH,WAFU,UAAU,GAAC,IAAI,CAER;IAEjB;;;OAGG;IACH,YAFU,UAAU,GAAC,IAAI,CAEP;IAElB;;;OAGG;IACH,UAFU,UAAU,GAAC,IAAI,CAET;IAEhB;;;OAGG;IACH,YAFU,UAAU,GAAC,IAAI,CAEP;IAElB;;;;OAIG;IACH,UAFU,UAAU,GAAC,IAAI,CAET;IAEhB;;;;;OAKG;IACH,OAFU,MAAM,CAEN;IAEV;;;;;;;;;OASG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,oBAFU,YAAY,CAEmB;IAEzC;;;OAGG;IACH,iBAFU,YAAY,CAE2B;IAEjD;;;;;OAKG;IACH,cAFU,OAAO,CAEI;IAErB;;;;;OAKG;IACH,eAFU,aAAa,CAEa;IAEpC;;;;;OAKG;IACH,qBAFU,MAAM,CAEQ;IAExB;;;;OAIG;IACH,aAFU,MAAM,CAEA;IAEhB;;;;;;;;OAQG;IACH,QAFU,OAAO,CAEF;IAEf;;;;;;;;OAQG;IACH,YAFU,MAAM,CAED;IAEf;;;;;;;;;OASG;IACH,cAFU,OAAO,CAEI;IAErB;;;;;;;;;OASG;IACH,4BAFU,OAAO,CAEkB;IAEnC;;;;;;;OAOG;IACH,iBAFU;QAAC,MAAM,EAAE,UAAU,CAAC;QAAC,OAAO,EAAE,UAAU,CAAA;KAAC,GAAC,IAAI,CAEjC;IAEvB;;;;;;;;;;OAUG;IACH,mBAFU,MAAM,CAEa;IAE7B;;;;;OAKG;IACH,YAFU,MAAM,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;;;;;OAKG;IACH,gBAFU,MAAM,CAEG;CACtB;4BA3e2B,uCAAuC;8BACrC,oBAAoB"}
|
|
@@ -391,34 +391,28 @@ export class ClothInstance {
|
|
|
391
391
|
blend_seen = 1;
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
|
-
*
|
|
395
|
-
* frame** rather than the world's — the same layout `ClothColliderIndex`
|
|
396
|
-
* uses, in `Float32` rather than `Float64` because a cloth-local coordinate
|
|
397
|
-
* is garment-sized (§12).
|
|
394
|
+
* Whether {@link state}'s buffer must be a `SharedArrayBuffer`.
|
|
398
395
|
*
|
|
399
|
-
*
|
|
400
|
-
* `
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
* @type {Float32Array|null}
|
|
406
|
-
*/
|
|
407
|
-
collider_table = null;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* The index handle behind each record in {@link collider_table}. A record
|
|
411
|
-
* index is this step's; a handle is the collider's, and it is what a
|
|
412
|
-
* transient contact's multiplier is warm-started on.
|
|
413
|
-
* @type {Int32Array|null}
|
|
396
|
+
* Set by {@link WorkerClothSystem} when the instance is linked, and read by
|
|
397
|
+
* `cloth_build_rows` every time the state is built — which is at seed and
|
|
398
|
+
* again at every re-seed, so a cloth that gains a link or changes a
|
|
399
|
+
* `ClothDynamics` field the rows depend on comes back shared without
|
|
400
|
+
* anything having to remember to ask.
|
|
401
|
+
* @type {boolean}
|
|
414
402
|
*/
|
|
415
|
-
|
|
403
|
+
shared_state = false;
|
|
416
404
|
|
|
417
405
|
/**
|
|
418
|
-
*
|
|
419
|
-
*
|
|
406
|
+
* `true` once this cloth has said its collider table overflowed.
|
|
407
|
+
*
|
|
408
|
+
* M5 moved that table into {@link state}'s buffer — §12's own layout, and
|
|
409
|
+
* what lets a worker step the cloth without being told about a new array
|
|
410
|
+
* every time the broadphase returns more. A fixed region has a capacity, and
|
|
411
|
+
* a cloth that overlaps more colliders than `CLOTH_COLLIDER_SLOTS` drops the
|
|
412
|
+
* remainder; this is how it says so once rather than once a frame.
|
|
413
|
+
* @type {boolean}
|
|
420
414
|
*/
|
|
421
|
-
|
|
415
|
+
collider_overflow_reported = false;
|
|
422
416
|
|
|
423
417
|
/**
|
|
424
418
|
* Which particle pairs a self-collision row must never be built on, because
|
|
@@ -467,6 +461,27 @@ export class ClothInstance {
|
|
|
467
461
|
*/
|
|
468
462
|
refused = false;
|
|
469
463
|
|
|
464
|
+
/**
|
|
465
|
+
* The air at the cloth's centre the last time a step applied it, world-space
|
|
466
|
+
* metres per second (§10).
|
|
467
|
+
*
|
|
468
|
+
* What §7 P5's "wake on a wind change" compares against. It is the last
|
|
469
|
+
* **applied** air rather than the last sampled one, so a gust that builds
|
|
470
|
+
* slowly still wakes a sleeping banner instead of being reset by every step
|
|
471
|
+
* that declined to act on it.
|
|
472
|
+
* @type {Float64Array}
|
|
473
|
+
*/
|
|
474
|
+
air_seen = new Float64Array(3);
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Whether the last step sampled the air per particle rather than once for
|
|
478
|
+
* the whole cloth — that is, whether a fluid field actually reached it.
|
|
479
|
+
* Diagnostic, and the one the playground shows: it is the difference
|
|
480
|
+
* between §10's simulated wake and its ambient fallback.
|
|
481
|
+
* @type {boolean}
|
|
482
|
+
*/
|
|
483
|
+
air_varies = false;
|
|
484
|
+
|
|
470
485
|
/**
|
|
471
486
|
* How many times this cloth has been re-seeded by a teleport. Diagnostic:
|
|
472
487
|
* a cloth resetting every few seconds is being driven by something that
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # Binary serialization for {@link Cloth}
|
|
3
|
+
*
|
|
4
|
+
* The component is authoring data and nothing else, so the whole of it is
|
|
5
|
+
* written: the {@link ClothDynamics} value object inline, then `blend`, `layer`,
|
|
6
|
+
* `mask` and `flags`. There is no transient field to exclude — the live binding
|
|
7
|
+
* between a component and a simulation is a {@link ClothInstance} owned by
|
|
8
|
+
* `ClothWorld`, and everything world-tied lives over there: the seeded topology,
|
|
9
|
+
* the `ClothState` buffer, and `blend_seen`, which is what the write-back last
|
|
10
|
+
* saw rather than what the author asked for. All of it is rebuilt on link, the
|
|
11
|
+
* same division `RigidBodySerializationAdapter` makes against `_bodyId`.
|
|
12
|
+
*
|
|
13
|
+
* ## The dynamics are written **by value**, and that is not the `Collider#shape`
|
|
14
|
+
* case
|
|
15
|
+
*
|
|
16
|
+
* §3.2 sets out the convention for a component pointing at a built, shared,
|
|
17
|
+
* immutable asset — `Collider#shape`, `ParticleEffect`'s layout and program,
|
|
18
|
+
* `ClothRig#proxy` — which is that the reference is *not* in the stream and the
|
|
19
|
+
* asset pipeline wires it up, because what has to be restored is the asset's
|
|
20
|
+
* **identity**. A `ClothDynamics` is not that. §3.3's library is "a set of
|
|
21
|
+
* points rather than a mechanism": an entry is frozen and shared as an
|
|
22
|
+
* allocation optimisation, not because anything downstream refers to it by
|
|
23
|
+
* name, and a cloth built from `CLOTH_SILK.clone()` with one field moved has no
|
|
24
|
+
* identity to restore at all. Ten scalars are 68 bytes; an identity story for
|
|
25
|
+
* them would cost more than the bytes and would have to invent a name for every
|
|
26
|
+
* `clone()`. So the values go in the stream and a loaded cloth is equal to the
|
|
27
|
+
* saved one under {@link Cloth#equals}, which compares dynamics field-wise.
|
|
28
|
+
*
|
|
29
|
+
* ## Deserialize replaces the dynamics rather than writing into them
|
|
30
|
+
*
|
|
31
|
+
* Library entries are frozen and the engine is modules, so writing a field on
|
|
32
|
+
* one **throws** (`ClothDynamics.spec.js` pins that). Deserializing in place
|
|
33
|
+
* into a `Cloth` that holds `CLOTH_ROPE` — a reset-to-snapshot restore over a
|
|
34
|
+
* live scene, not a hypothetical — would be exactly that write. So the adapter
|
|
35
|
+
* builds a fresh instance and hands it over, which is also what
|
|
36
|
+
* {@link Cloth#fromJSON} does and for the same reason. The two codecs agreeing
|
|
37
|
+
* on it matters beyond the throw: a scene that round-trips as JSON and a scene
|
|
38
|
+
* that round-trips as binary must not disagree about whether the loaded cloth
|
|
39
|
+
* shares its dynamics with anything.
|
|
40
|
+
*
|
|
41
|
+
* ## `layer` and `mask` are read back unsigned, unlike the `RigidBody` pair
|
|
42
|
+
*
|
|
43
|
+
* `RigidBodySerializationAdapter` normalises those two fields with `| 0`,
|
|
44
|
+
* because a `RigidBody`'s default mask is the signed `0xFFFFFFFF | 0 === -1`
|
|
45
|
+
* and reading the raw unsigned value would make a round-tripped body compare
|
|
46
|
+
* unequal to a fresh one. `Cloth`'s default is the **unsigned** `0xFFFFFFFF`,
|
|
47
|
+
* and `Cloth.from` asserts `isNonNegativeInteger` on it, so here the same `| 0`
|
|
48
|
+
* would be the bug rather than the fix: it would hand back a `-1` that fails
|
|
49
|
+
* the component's own stated contract and compares unequal under
|
|
50
|
+
* {@link Cloth#equals}. `readUint32` already returns the unsigned value, so the
|
|
51
|
+
* correct code is the code with nothing in it — which is precisely why this
|
|
52
|
+
* paragraph exists, since the surrounding adapters all carry the opposite
|
|
53
|
+
* normalisation and it reads like an omission.
|
|
54
|
+
*
|
|
55
|
+
* ## Version 0, and no upgrader
|
|
56
|
+
*
|
|
57
|
+
* `RigidBodySerializationUpgrader_0_1` exists because a v0 stream had already
|
|
58
|
+
* shipped when the sleep fields were added; a first version has no predecessor
|
|
59
|
+
* stream to upgrade from. Adding a field here is a bump to 1 plus an upgrader
|
|
60
|
+
* that writes that field's pre-upgrade default, and the exact-size assertion in
|
|
61
|
+
* the spec is what makes forgetting the bump fail rather than corrupt.
|
|
62
|
+
*
|
|
63
|
+
* @author Alex Goldring
|
|
64
|
+
* @copyright Company Named Limited (c) 2026
|
|
65
|
+
*/
|
|
66
|
+
export class ClothSerializationAdapter extends BinaryClassSerializationAdapter<any> {
|
|
67
|
+
constructor();
|
|
68
|
+
klass: typeof Cloth;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @param {BinaryBuffer} buffer
|
|
72
|
+
* @param {Cloth} value
|
|
73
|
+
*/
|
|
74
|
+
serialize(buffer: BinaryBuffer, value: Cloth): void;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @param {BinaryBuffer} buffer
|
|
78
|
+
* @param {Cloth} value
|
|
79
|
+
*/
|
|
80
|
+
deserialize(buffer: BinaryBuffer, value: Cloth): void;
|
|
81
|
+
}
|
|
82
|
+
import { BinaryClassSerializationAdapter } from "../../../ecs/storage/binary/BinaryClassSerializationAdapter.js";
|
|
83
|
+
import { Cloth } from "./Cloth.js";
|
|
84
|
+
//# sourceMappingURL=ClothSerializationAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClothSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSerializationAdapter.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH;;IAEI,oBAAc;IAGd;;;;OAIG;IACH,uCAFW,KAAK,QA2Bf;IAED;;;;OAIG;IACH,yCAFW,KAAK,QA8Bf;CACJ;gDA5I+C,gEAAgE;sBAC1F,YAAY"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { BinaryClassSerializationAdapter } from "../../../ecs/storage/binary/BinaryClassSerializationAdapter.js";
|
|
2
|
+
import { Cloth } from "./Cloth.js";
|
|
3
|
+
import { ClothDynamics } from "./ClothDynamics.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* # Binary serialization for {@link Cloth}
|
|
7
|
+
*
|
|
8
|
+
* The component is authoring data and nothing else, so the whole of it is
|
|
9
|
+
* written: the {@link ClothDynamics} value object inline, then `blend`, `layer`,
|
|
10
|
+
* `mask` and `flags`. There is no transient field to exclude — the live binding
|
|
11
|
+
* between a component and a simulation is a {@link ClothInstance} owned by
|
|
12
|
+
* `ClothWorld`, and everything world-tied lives over there: the seeded topology,
|
|
13
|
+
* the `ClothState` buffer, and `blend_seen`, which is what the write-back last
|
|
14
|
+
* saw rather than what the author asked for. All of it is rebuilt on link, the
|
|
15
|
+
* same division `RigidBodySerializationAdapter` makes against `_bodyId`.
|
|
16
|
+
*
|
|
17
|
+
* ## The dynamics are written **by value**, and that is not the `Collider#shape`
|
|
18
|
+
* case
|
|
19
|
+
*
|
|
20
|
+
* §3.2 sets out the convention for a component pointing at a built, shared,
|
|
21
|
+
* immutable asset — `Collider#shape`, `ParticleEffect`'s layout and program,
|
|
22
|
+
* `ClothRig#proxy` — which is that the reference is *not* in the stream and the
|
|
23
|
+
* asset pipeline wires it up, because what has to be restored is the asset's
|
|
24
|
+
* **identity**. A `ClothDynamics` is not that. §3.3's library is "a set of
|
|
25
|
+
* points rather than a mechanism": an entry is frozen and shared as an
|
|
26
|
+
* allocation optimisation, not because anything downstream refers to it by
|
|
27
|
+
* name, and a cloth built from `CLOTH_SILK.clone()` with one field moved has no
|
|
28
|
+
* identity to restore at all. Ten scalars are 68 bytes; an identity story for
|
|
29
|
+
* them would cost more than the bytes and would have to invent a name for every
|
|
30
|
+
* `clone()`. So the values go in the stream and a loaded cloth is equal to the
|
|
31
|
+
* saved one under {@link Cloth#equals}, which compares dynamics field-wise.
|
|
32
|
+
*
|
|
33
|
+
* ## Deserialize replaces the dynamics rather than writing into them
|
|
34
|
+
*
|
|
35
|
+
* Library entries are frozen and the engine is modules, so writing a field on
|
|
36
|
+
* one **throws** (`ClothDynamics.spec.js` pins that). Deserializing in place
|
|
37
|
+
* into a `Cloth` that holds `CLOTH_ROPE` — a reset-to-snapshot restore over a
|
|
38
|
+
* live scene, not a hypothetical — would be exactly that write. So the adapter
|
|
39
|
+
* builds a fresh instance and hands it over, which is also what
|
|
40
|
+
* {@link Cloth#fromJSON} does and for the same reason. The two codecs agreeing
|
|
41
|
+
* on it matters beyond the throw: a scene that round-trips as JSON and a scene
|
|
42
|
+
* that round-trips as binary must not disagree about whether the loaded cloth
|
|
43
|
+
* shares its dynamics with anything.
|
|
44
|
+
*
|
|
45
|
+
* ## `layer` and `mask` are read back unsigned, unlike the `RigidBody` pair
|
|
46
|
+
*
|
|
47
|
+
* `RigidBodySerializationAdapter` normalises those two fields with `| 0`,
|
|
48
|
+
* because a `RigidBody`'s default mask is the signed `0xFFFFFFFF | 0 === -1`
|
|
49
|
+
* and reading the raw unsigned value would make a round-tripped body compare
|
|
50
|
+
* unequal to a fresh one. `Cloth`'s default is the **unsigned** `0xFFFFFFFF`,
|
|
51
|
+
* and `Cloth.from` asserts `isNonNegativeInteger` on it, so here the same `| 0`
|
|
52
|
+
* would be the bug rather than the fix: it would hand back a `-1` that fails
|
|
53
|
+
* the component's own stated contract and compares unequal under
|
|
54
|
+
* {@link Cloth#equals}. `readUint32` already returns the unsigned value, so the
|
|
55
|
+
* correct code is the code with nothing in it — which is precisely why this
|
|
56
|
+
* paragraph exists, since the surrounding adapters all carry the opposite
|
|
57
|
+
* normalisation and it reads like an omission.
|
|
58
|
+
*
|
|
59
|
+
* ## Version 0, and no upgrader
|
|
60
|
+
*
|
|
61
|
+
* `RigidBodySerializationUpgrader_0_1` exists because a v0 stream had already
|
|
62
|
+
* shipped when the sleep fields were added; a first version has no predecessor
|
|
63
|
+
* stream to upgrade from. Adding a field here is a bump to 1 plus an upgrader
|
|
64
|
+
* that writes that field's pre-upgrade default, and the exact-size assertion in
|
|
65
|
+
* the spec is what makes forgetting the bump fail rather than corrupt.
|
|
66
|
+
*
|
|
67
|
+
* @author Alex Goldring
|
|
68
|
+
* @copyright Company Named Limited (c) 2026
|
|
69
|
+
*/
|
|
70
|
+
export class ClothSerializationAdapter extends BinaryClassSerializationAdapter {
|
|
71
|
+
|
|
72
|
+
klass = Cloth;
|
|
73
|
+
version = 0;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @param {BinaryBuffer} buffer
|
|
78
|
+
* @param {Cloth} value
|
|
79
|
+
*/
|
|
80
|
+
serialize(buffer, value) {
|
|
81
|
+
const dynamics = value.dynamics;
|
|
82
|
+
|
|
83
|
+
buffer.writeFloat64(dynamics.stretch);
|
|
84
|
+
buffer.writeFloat64(dynamics.bend);
|
|
85
|
+
buffer.writeFloat64(dynamics.damping);
|
|
86
|
+
buffer.writeFloat64(dynamics.slack);
|
|
87
|
+
buffer.writeFloat64(dynamics.thickness);
|
|
88
|
+
buffer.writeFloat64(dynamics.inertia);
|
|
89
|
+
buffer.writeFloat64(dynamics.drag);
|
|
90
|
+
|
|
91
|
+
// A budget, not an enum: `assert.isPositiveInteger` is the whole of the
|
|
92
|
+
// component's contract on these two, so a u8 would be a silent clamp on
|
|
93
|
+
// a value the component considers legal. Four bytes each buys the
|
|
94
|
+
// absence of that.
|
|
95
|
+
buffer.writeUint32(dynamics.substeps);
|
|
96
|
+
buffer.writeUint32(dynamics.iterations);
|
|
97
|
+
|
|
98
|
+
buffer.writeUint32(dynamics.flags >>> 0);
|
|
99
|
+
|
|
100
|
+
buffer.writeFloat64(value.blend);
|
|
101
|
+
|
|
102
|
+
buffer.writeUint32(value.layer >>> 0);
|
|
103
|
+
buffer.writeUint32(value.mask >>> 0);
|
|
104
|
+
buffer.writeUint32(value.flags >>> 0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @param {BinaryBuffer} buffer
|
|
110
|
+
* @param {Cloth} value
|
|
111
|
+
*/
|
|
112
|
+
deserialize(buffer, value) {
|
|
113
|
+
// Fresh rather than in place: the target may hold a frozen library
|
|
114
|
+
// entry, and a loaded cloth always owns its dynamics — see the class
|
|
115
|
+
// docblock and Cloth#fromJSON.
|
|
116
|
+
const dynamics = new ClothDynamics();
|
|
117
|
+
|
|
118
|
+
dynamics.stretch = buffer.readFloat64();
|
|
119
|
+
dynamics.bend = buffer.readFloat64();
|
|
120
|
+
dynamics.damping = buffer.readFloat64();
|
|
121
|
+
dynamics.slack = buffer.readFloat64();
|
|
122
|
+
dynamics.thickness = buffer.readFloat64();
|
|
123
|
+
dynamics.inertia = buffer.readFloat64();
|
|
124
|
+
dynamics.drag = buffer.readFloat64();
|
|
125
|
+
|
|
126
|
+
dynamics.substeps = buffer.readUint32();
|
|
127
|
+
dynamics.iterations = buffer.readUint32();
|
|
128
|
+
|
|
129
|
+
dynamics.flags = buffer.readUint32();
|
|
130
|
+
|
|
131
|
+
value.dynamics = dynamics;
|
|
132
|
+
|
|
133
|
+
value.blend = buffer.readFloat64();
|
|
134
|
+
|
|
135
|
+
// Unsigned, deliberately — the `| 0` the RigidBody adapter applies
|
|
136
|
+
// would break this component's non-negative contract. Class docblock.
|
|
137
|
+
value.layer = buffer.readUint32();
|
|
138
|
+
value.mask = buffer.readUint32();
|
|
139
|
+
value.flags = buffer.readUint32();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* # The system — gather, step, write back
|
|
2
|
+
* # The system — gather, step, write back, all on this thread
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* Every cloth in the scene stepped inline at the fixed rate. The work itself
|
|
5
|
+
* lives in {@link ClothWorld}, which this shares with {@link WorkerClothSystem}
|
|
6
|
+
* so that §12's "`ClothSystem` and `WorkerClothSystem` must produce bit-identical
|
|
7
|
+
* results" is a property of there being one copy rather than of two copies
|
|
8
|
+
* agreeing. What is left here is a `System`'s own surface — what it depends on,
|
|
9
|
+
* what it accesses, and the loop.
|
|
10
|
+
*
|
|
11
|
+
* This is the fallback where `SharedArrayBuffer` is unavailable, and it is **not
|
|
12
|
+
* a degraded mode**: it is the same solver over the same data in the same
|
|
13
|
+
* order, and the only thing the worker buys is which thread pays for it.
|
|
10
14
|
*
|
|
11
15
|
* ## Where in the frame this runs
|
|
12
16
|
*
|
|
@@ -37,29 +41,6 @@
|
|
|
37
41
|
* it before `TransformAttachmentSystem`, which is right: cloth writes the local
|
|
38
42
|
* transforms and the attachment system is their reader.
|
|
39
43
|
*
|
|
40
|
-
* ## The local frame and the inertia model — §7 P7
|
|
41
|
-
*
|
|
42
|
-
* Particles live in the anchor's own frame. When the anchor moves, the cloth is
|
|
43
|
-
* asked how much of that motion it would like to feel:
|
|
44
|
-
* `ClothDynamics#inertia = 1` keeps every particle's **world** position and
|
|
45
|
-
* velocity, so a cape trails a sprinting character; `0` keeps their **local**
|
|
46
|
-
* ones, so the cloth rides the anchor as though it were standing still. The
|
|
47
|
-
* blend between the two is a lerp in the local frame, which is all the frame
|
|
48
|
-
* change is.
|
|
49
|
-
*
|
|
50
|
-
* The felt motion is limited before the blend, which is what makes "character
|
|
51
|
-
* sprints, cape behaves" a default rather than a tuning exercise, and the limits
|
|
52
|
-
* are derived from the cloth's own reach rather than authored.
|
|
53
|
-
*
|
|
54
|
-
* ## Teleport — §7 P6
|
|
55
|
-
*
|
|
56
|
-
* Anchor motion past a threshold is not locomotion and is not treated as any
|
|
57
|
-
* amount of it. `ClothFlags.TeleportKeep` carries the shape across, which in a
|
|
58
|
-
* local frame is literally doing nothing; the default re-seeds at the animated
|
|
59
|
-
* pose with zero velocity and opens a stabilisation window in which the
|
|
60
|
-
* velocity limit ramps back from nothing, so the first steps after a reset
|
|
61
|
-
* cannot produce a whip.
|
|
62
|
-
*
|
|
63
44
|
* @author Alex Goldring
|
|
64
45
|
* @copyright Company Named Limited (c) 2026
|
|
65
46
|
*/
|
|
@@ -68,59 +49,58 @@ export class ClothSystem extends System<any> {
|
|
|
68
49
|
dependencies: (typeof Transform64 | typeof Cloth)[];
|
|
69
50
|
components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof TransformAttachment> | ResourceAccessSpecification<typeof ClothCollider> | ResourceAccessSpecification<typeof Cloth> | ResourceAccessSpecification<typeof ClothExclude> | ResourceAccessSpecification<typeof ClothRig>)[];
|
|
70
51
|
/**
|
|
71
|
-
*
|
|
52
|
+
* @type {ClothWorld}
|
|
53
|
+
*/
|
|
54
|
+
world: ClothWorld;
|
|
55
|
+
/**
|
|
56
|
+
* One cloth's step parameters, reused for every cloth in turn because the
|
|
57
|
+
* step follows immediately.
|
|
58
|
+
*
|
|
59
|
+
* The same block {@link WorkerClothSystem} writes into the shared command
|
|
60
|
+
* region — one layout, written by one function, so the inline path and the
|
|
61
|
+
* worker path cannot be handed different numbers.
|
|
72
62
|
* @type {Float64Array}
|
|
63
|
+
* @private
|
|
73
64
|
*/
|
|
74
|
-
|
|
65
|
+
private __params;
|
|
75
66
|
/**
|
|
76
|
-
*
|
|
77
|
-
* instance's subtree steps after it.
|
|
78
|
-
* @type {ClothInstance[]}
|
|
67
|
+
* @param {Float64Array} value
|
|
79
68
|
*/
|
|
80
|
-
|
|
69
|
+
set gravity(value: Float64Array);
|
|
81
70
|
/**
|
|
82
|
-
*
|
|
83
|
-
* @
|
|
71
|
+
* World gravity, m/s². Rotated into each cloth's local frame per step.
|
|
72
|
+
* @returns {Float64Array}
|
|
84
73
|
*/
|
|
85
|
-
|
|
74
|
+
get gravity(): Float64Array;
|
|
86
75
|
/**
|
|
87
|
-
* @
|
|
88
|
-
* @private
|
|
76
|
+
* @param {AbstractClothWind|null} value
|
|
89
77
|
*/
|
|
90
|
-
|
|
78
|
+
set wind(value: any);
|
|
91
79
|
/**
|
|
92
|
-
* Where
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* running engine.
|
|
96
|
-
*
|
|
97
|
-
* Public and assignable because a garment's joints are a *rendering*
|
|
98
|
-
* structure and `MeshSystem` needs a graphics engine, a scene and a loader
|
|
99
|
-
* to exist — so a spec that wants joints without a renderer sets this
|
|
100
|
-
* instead, and gets exactly the interface the system uses.
|
|
101
|
-
*
|
|
102
|
-
* `null` means no rig can seed, which is the same additive shape the
|
|
103
|
-
* collider index has: a scene without one gets M1's cloth rather than an
|
|
104
|
-
* error.
|
|
105
|
-
* @type {{instance_of: function(number): (PrefabInstance|null)}|null}
|
|
80
|
+
* Where the air comes from — see {@link ClothWorld#wind}. `null` by default,
|
|
81
|
+
* which is a scene with no wind in it.
|
|
82
|
+
* @returns {AbstractClothWind|null}
|
|
106
83
|
*/
|
|
107
|
-
|
|
108
|
-
instance_of: (arg0: number) => (PrefabInstance | null);
|
|
109
|
-
} | null;
|
|
84
|
+
get wind(): any;
|
|
110
85
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* new requirement on every scene.
|
|
115
|
-
* @type {ClothColliderSystem|null}
|
|
116
|
-
* @private
|
|
86
|
+
* Live cloths, ordered so that an instance whose anchor sits inside another
|
|
87
|
+
* instance's subtree steps after it.
|
|
88
|
+
* @returns {ClothInstance[]}
|
|
117
89
|
*/
|
|
118
|
-
|
|
90
|
+
get instances(): ClothInstance[];
|
|
119
91
|
/**
|
|
120
|
-
* @
|
|
121
|
-
* @private
|
|
92
|
+
* @param {{instance_of: function(number): (PrefabInstance|null)}|null} value
|
|
122
93
|
*/
|
|
123
|
-
|
|
94
|
+
set models(value: {
|
|
95
|
+
instance_of: (arg0: number) => (PrefabInstance | null);
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* Where a skinned model instance comes from — see {@link ClothWorld#models}.
|
|
99
|
+
* @returns {{instance_of: function(number): (PrefabInstance|null)}|null}
|
|
100
|
+
*/
|
|
101
|
+
get models(): {
|
|
102
|
+
instance_of: (arg0: number) => (PrefabInstance | null);
|
|
103
|
+
};
|
|
124
104
|
/**
|
|
125
105
|
* @param {EntityManager} entityManager
|
|
126
106
|
* @returns {Promise<void>}
|
|
@@ -140,22 +120,12 @@ export class ClothSystem extends System<any> {
|
|
|
140
120
|
unlink(cloth: Cloth, transform: Transform64, entity: number): void;
|
|
141
121
|
/**
|
|
142
122
|
* Throw away a cloth's binding so the next step walks its subtree again.
|
|
143
|
-
*
|
|
144
|
-
* The walk is done once, because a rope's links do not come and go. When
|
|
145
|
-
* they do — a chain gains a link, a rig is rebuilt — this is how you say so,
|
|
146
|
-
* and it is the same contract `TransformAttachment#parent` already carries:
|
|
147
|
-
* the structure is immutable while it is attached, and changing it is an
|
|
148
|
-
* explicit act rather than something the engine polls for.
|
|
149
|
-
*
|
|
150
123
|
* @param {number} entity
|
|
151
124
|
* @returns {void}
|
|
152
125
|
*/
|
|
153
126
|
reseed(entity: number): void;
|
|
154
127
|
/**
|
|
155
|
-
* Wake a sleeping cloth.
|
|
156
|
-
* on their own; a caller that has changed the world in some way the cloth
|
|
157
|
-
* cannot see — M6's wind, for one — says so here.
|
|
158
|
-
*
|
|
128
|
+
* Wake a sleeping cloth.
|
|
159
129
|
* @param {number} entity
|
|
160
130
|
* @returns {void}
|
|
161
131
|
*/
|
|
@@ -165,7 +135,6 @@ export class ClothSystem extends System<any> {
|
|
|
165
135
|
* @returns {ClothInstance|undefined}
|
|
166
136
|
*/
|
|
167
137
|
instanceOf(entity: number): ClothInstance | undefined;
|
|
168
|
-
#private;
|
|
169
138
|
}
|
|
170
139
|
import { System } from "../../../ecs/System.js";
|
|
171
140
|
import { Transform64 } from "../../../ecs/transform/Transform64.js";
|
|
@@ -175,5 +144,5 @@ import { TransformAttachment } from "../../../ecs/transform-attachment/Transform
|
|
|
175
144
|
import { ClothCollider } from "./ClothCollider.js";
|
|
176
145
|
import { ClothExclude } from "./ClothExclude.js";
|
|
177
146
|
import { ClothRig } from "./ClothRig.js";
|
|
178
|
-
import {
|
|
147
|
+
import { ClothWorld } from "./ClothWorld.js";
|
|
179
148
|
//# sourceMappingURL=ClothSystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClothSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/ClothSystem.js"],"names":[],"mappings":"
|
|
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;;;;;;;;;OASG;IACH,iBAAqD;IAUrD;;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;;;;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;CAoCJ;uBArOsB,wBAAwB;4BAInB,uCAAuC;sBAE7C,YAAY;4CAPU,uDAAuD;oCAI5F,0DAA0D;8BAInC,oBAAoB;6BACrB,mBAAmB;yBACvB,eAAe;2BACb,iBAAiB"}
|