@woosh/meep-engine 3.43.0 → 3.44.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/editor/prototypeEditorShell.d.ts.map +1 -1
- package/editor/prototypeEditorShell.js +4 -2
- package/package.json +1 -1
- package/src/engine/Clock.d.ts +15 -0
- package/src/engine/Clock.d.ts.map +1 -1
- package/src/engine/Clock.js +29 -5
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +11 -19
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts +57 -0
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts.map +1 -0
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.js +84 -0
- package/src/engine/graphics3/AnimationGraphSystem.d.ts +23 -13
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +61 -64
- package/src/engine/graphics3/AnimationSystem.d.ts +24 -15
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +67 -61
- package/src/engine/graphics3/MeshSkinSystem.d.ts +56 -0
- package/src/engine/graphics3/MeshSkinSystem.d.ts.map +1 -0
- package/src/engine/graphics3/MeshSkinSystem.js +317 -0
- package/src/engine/graphics3/MeshSystem.d.ts +15 -35
- package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
- package/src/engine/graphics3/MeshSystem.js +21 -298
- package/src/engine/graphics3/RowChains.d.ts +76 -0
- package/src/engine/graphics3/RowChains.d.ts.map +1 -0
- package/src/engine/graphics3/RowChains.js +347 -0
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts +6 -0
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics3/ShadedGeometrySystem.js +329 -309
- package/src/engine/graphics3/animation/AnimationClips.d.ts +56 -0
- package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -0
- package/src/engine/graphics3/animation/AnimationClips.js +79 -0
- package/src/engine/graphics3/animation/ClipListPlayer.d.ts +13 -14
- package/src/engine/graphics3/animation/ClipListPlayer.d.ts.map +1 -1
- package/src/engine/graphics3/animation/ClipListPlayer.js +262 -263
- package/src/engine/graphics3/animation/write_clip_playback.d.ts +3 -3
- package/src/engine/graphics3/animation/write_clip_playback.js +4 -4
- package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts +5 -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 +80 -75
- package/src/engine/graphics3/prefab/PrefabInstance.d.ts +4 -24
- package/src/engine/graphics3/prefab/PrefabInstance.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/PrefabInstance.js +60 -80
- package/src/engine/graphics3/prefab/prefab_instantiate.d.ts +16 -3
- package/src/engine/graphics3/prefab/prefab_instantiate.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_instantiate.js +49 -12
- package/src/engine/graphics3/prefab/prefab_place.d.ts +31 -17
- package/src/engine/graphics3/prefab/prefab_place.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_place.js +175 -130
- package/src/engine/graphics3/register_clips.d.ts +64 -0
- package/src/engine/graphics3/register_clips.d.ts.map +1 -0
- package/src/engine/graphics3/register_clips.js +114 -0
- package/src/engine/physics/cloth/MEASUREMENTS.md +795 -0
- package/src/engine/physics/cloth/PLAN.md +339 -9
- package/src/engine/physics/cloth/build/ClothProxy.d.ts +113 -61
- package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/ClothProxy.js +142 -77
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +22 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +75 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +43 -30
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +357 -284
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts +62 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +280 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.d.ts +17 -9
- package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.js +220 -212
- package/src/engine/physics/cloth/ecs/ClothDynamicsFlags.js +6 -0
- package/src/engine/physics/cloth/ecs/ClothHold.d.ts +91 -0
- package/src/engine/physics/cloth/ecs/ClothHold.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothHold.js +103 -0
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +254 -48
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +277 -47
- package/src/engine/physics/cloth/ecs/ClothPin.d.ts +73 -0
- package/src/engine/physics/cloth/ecs/ClothPin.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothPin.js +92 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts +36 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.js +61 -0
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts +23 -17
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothRig.js +29 -27
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +12 -14
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +20 -15
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +57 -36
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +816 -179
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +12 -13
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +20 -14
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +63 -11
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +321 -84
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +9 -7
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +9 -7
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +3 -3
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +30 -30
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +37 -0
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +142 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts +97 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.js +608 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +2 -2
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +160 -9
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +17 -22
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +55 -117
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -6
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +44 -15
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +5 -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 +60 -16
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +65 -58
- package/src/engine/physics/cloth/playground/collide_main.js +1 -1
- package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/garment_build.js +17 -5
- package/src/engine/physics/cloth/playground/garment_main.js +1 -1
- package/src/engine/physics/cloth/playground/rig_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/rig_build.js +302 -296
- package/src/engine/physics/cloth/solver/ClothState.d.ts +45 -7
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +63 -7
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +6 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +7 -2
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts +114 -0
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_hold_line.js +362 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +6 -2
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +13 -13
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +24 -12
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +24 -12
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +16 -0
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +183 -20
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +1 -0
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +10 -3
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.js +353 -346
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +7 -5
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +7 -5
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +9 -9
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +26 -26
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/simulation/Ticker.d.ts +13 -0
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +43 -8
- package/src/shade/RENDERER_CONTRACT.md +8 -2
- package/src/shade/playground/mesh_row_ceiling/main.js +2 -1
- package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +11 -19
- package/src/shade/playground/skinned_blas_refit/place_character.d.ts +6 -3
- package/src/shade/playground/skinned_blas_refit/place_character.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/place_character.js +90 -90
- package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/main.js +502 -509
- package/src/shade/playground/texture_encode/README.md +129 -109
- package/src/shade/playground/texture_encode/main.js +1430 -1430
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts +45 -14
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +316 -64
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +5 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +11 -1
- package/src/shade/renderer/geometry/BoxGeometry.d.ts +1 -11
- package/src/shade/renderer/geometry/BoxGeometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/BoxGeometry.js +6 -13
- package/src/shade/renderer/geometry/CapsuleGeometry.d.ts +19 -0
- package/src/shade/renderer/geometry/CapsuleGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/CapsuleGeometry.js +24 -0
- package/src/shade/renderer/geometry/ConeGeometry.d.ts +20 -0
- package/src/shade/renderer/geometry/ConeGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/ConeGeometry.js +33 -0
- package/src/shade/renderer/geometry/CylinderGeometry.d.ts +21 -0
- package/src/shade/renderer/geometry/CylinderGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/CylinderGeometry.js +35 -0
- package/src/shade/renderer/geometry/PlaneGeometry.d.ts +17 -0
- package/src/shade/renderer/geometry/PlaneGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/PlaneGeometry.js +22 -0
- package/src/shade/renderer/geometry/TorusGeometry.d.ts +18 -0
- package/src/shade/renderer/geometry/TorusGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/TorusGeometry.js +23 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.d.ts +21 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.js +34 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts +19 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.js +205 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts +21 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.js +36 -0
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts +1 -1
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.js +44 -9
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts +20 -0
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.js +190 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +7 -2
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +26 -8
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +56 -39
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts +7 -0
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.js +46 -4
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.js +4 -2
- package/src/shade/renderer/gpu_primitive/sort/defs.d.ts +2 -2
- package/src/shade/renderer/gpu_primitive/sort/defs.js +79 -79
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +7 -3
- package/src/shade/renderer/particles/GPUParticleSystem.js +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +4 -3
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +200 -194
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +6 -2
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +334 -329
- 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 +7 -2
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +16 -4
- package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +2444 -2345
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.js +312 -310
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts +3 -3
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.js +383 -375
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.js +349 -346
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts +58 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.js +536 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts +21 -7
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.js +291 -327
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts +25 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.js +99 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts +5 -3
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.js +47 -71
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts +10 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.js +50 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts +4 -5
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.js +7 -8
- package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_transport.js +7 -5
- package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +1 -1
- package/src/shade/renderer/water/medium/GPUWaterBodies.js +8 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts +3 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts.map +1 -1
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.js +3 -2
- package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water.js +3 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.js +3 -1
- package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/graph_water_tessellation.js +11 -4
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +37 -20
- package/src/shade/wgsl/validate_wgsl_source.d.ts.map +1 -1
- package/src/shade/wgsl/validate_wgsl_source.js +74 -3
- package/src/engine/graphics3/register_instance_animation.d.ts +0 -114
- package/src/engine/graphics3/register_instance_animation.d.ts.map +0 -1
- package/src/engine/graphics3/register_instance_animation.js +0 -201
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("../../../graphics3/prefab/Prefab.js").Prefab} Prefab
|
|
3
|
+
* @typedef {import("../../../../shade/renderer/animation/Skin.js").Skin} Skin
|
|
4
|
+
* @typedef {import("./cloth_proxy_from_joints.js").ClothProxyBuildResult} ClothProxyBuildResult
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* # Building a proxy for a sheet: one joint per vertex, and the triangles between them
|
|
8
|
+
*
|
|
9
|
+
* A sheet — a flag, a banner, a curtain, a cloth dropped on a sphere — is a
|
|
10
|
+
* triangle mesh, and what drives its render mesh is a skin with **one joint per
|
|
11
|
+
* vertex**: each vertex weighted wholly to its own joint, every joint hanging
|
|
12
|
+
* straight off one root joint. That skin is ordinary; the engine draws it the way
|
|
13
|
+
* it draws any skinned model, and cloth moves its joints the way it moves a
|
|
14
|
+
* cape's. This builds the proxy for it — §11.3's steps 4, 6 and 10 over a mesh
|
|
15
|
+
* that is already welded and already a particle set:
|
|
16
|
+
*
|
|
17
|
+
* - **a hard stretch row per edge**, every edge of every triangle once;
|
|
18
|
+
* - **a hinge per interior edge** — the shared edge, then the wing opposite it in
|
|
19
|
+
* each triangle, which is `cloth_bend_row`'s stencil order. The stencil is built
|
|
20
|
+
* here rather than read through `bt_edge_read_diamond`, whose quad puts the
|
|
21
|
+
* shared edge in the middle;
|
|
22
|
+
* - the bind pose of every joint in the root joint's, and the root joint as the
|
|
23
|
+
* frame the sheet is simulated in.
|
|
24
|
+
*
|
|
25
|
+
* **Nothing is pinned.** Which vertices are held is the scene's business — a pole
|
|
26
|
+
* holding a flag's hoist, a hook holding a ribbon's top — and a `ClothPin` names
|
|
27
|
+
* them by particle, which is their position in `joint_names`.
|
|
28
|
+
*
|
|
29
|
+
* ## What is refused, and why at build
|
|
30
|
+
*
|
|
31
|
+
* §7 P8: a triangle with no area (no normal, no stencil), an edge three triangles
|
|
32
|
+
* share (no single hinge across it), joints that do not all hang from the same
|
|
33
|
+
* root, and a name the skin does not have. Each is an authoring mistake, and each
|
|
34
|
+
* comes back as a message naming it rather than as a sheet that misbehaves.
|
|
35
|
+
*
|
|
36
|
+
* ## The rest shape is assumed flat where it bends
|
|
37
|
+
*
|
|
38
|
+
* The hinge is §6's quadratic stencil, which annihilates a planar rest shape and
|
|
39
|
+
* every affine image of it and reads a curved rest as already bent (§18). A flag,
|
|
40
|
+
* a sheet and a circle skirt cut flat are what this serves; a tube is not.
|
|
41
|
+
*
|
|
42
|
+
* @author Alex Goldring
|
|
43
|
+
* @copyright Company Named Limited (c) 2026
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Build a proxy from the joints of a sheet's skin and the triangles over them.
|
|
47
|
+
*
|
|
48
|
+
* @param {Prefab} prefab the compiled model the joints are nodes of
|
|
49
|
+
* @param {Skin} skin one of the prefab's skins — joints as node indices
|
|
50
|
+
* @param {string[]} joint_names one joint per vertex; particle `i` is `joint_names[i]`
|
|
51
|
+
* @param {Int32Array|number[]} triangles indices into `joint_names`, 3 per triangle
|
|
52
|
+
* @param {object} [options]
|
|
53
|
+
* @param {string} [options.name]
|
|
54
|
+
* @returns {ClothProxyBuildResult}
|
|
55
|
+
*/
|
|
56
|
+
export function cloth_proxy_from_mesh(prefab: Prefab, skin: Skin, joint_names: string[], triangles: Int32Array | number[], { name }?: {
|
|
57
|
+
name?: string;
|
|
58
|
+
}): ClothProxyBuildResult;
|
|
59
|
+
export type Prefab = import("../../../graphics3/prefab/Prefab.js").Prefab;
|
|
60
|
+
export type Skin = import("../../../../shade/renderer/animation/Skin.js").Skin;
|
|
61
|
+
export type ClothProxyBuildResult = import("./cloth_proxy_from_joints.js").ClothProxyBuildResult;
|
|
62
|
+
//# sourceMappingURL=cloth_proxy_from_mesh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloth_proxy_from_mesh.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/build/cloth_proxy_from_mesh.js"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;GAUG;AACH,8CARW,MAAM,QACN,IAAI,eACJ,MAAM,EAAE,aACR,UAAU,GAAC,MAAM,EAAE;IAEF,IAAI,GAArB,MAAM;IACJ,qBAAqB,CA8LjC;qBApPY,OAAO,qCAAqC,EAAE,MAAM;mBACpD,OAAO,8CAA8C,EAAE,IAAI;oCAC3D,OAAO,8BAA8B,EAAE,qBAAqB"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { ClothProxy } from "./ClothProxy.js";
|
|
2
|
+
import { cloth_bind_in_frame } from "./cloth_bind_in_frame.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import("../../../graphics3/prefab/Prefab.js").Prefab} Prefab
|
|
6
|
+
* @typedef {import("../../../../shade/renderer/animation/Skin.js").Skin} Skin
|
|
7
|
+
* @typedef {import("./cloth_proxy_from_joints.js").ClothProxyBuildResult} ClothProxyBuildResult
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* # Building a proxy for a sheet: one joint per vertex, and the triangles between them
|
|
12
|
+
*
|
|
13
|
+
* A sheet — a flag, a banner, a curtain, a cloth dropped on a sphere — is a
|
|
14
|
+
* triangle mesh, and what drives its render mesh is a skin with **one joint per
|
|
15
|
+
* vertex**: each vertex weighted wholly to its own joint, every joint hanging
|
|
16
|
+
* straight off one root joint. That skin is ordinary; the engine draws it the way
|
|
17
|
+
* it draws any skinned model, and cloth moves its joints the way it moves a
|
|
18
|
+
* cape's. This builds the proxy for it — §11.3's steps 4, 6 and 10 over a mesh
|
|
19
|
+
* that is already welded and already a particle set:
|
|
20
|
+
*
|
|
21
|
+
* - **a hard stretch row per edge**, every edge of every triangle once;
|
|
22
|
+
* - **a hinge per interior edge** — the shared edge, then the wing opposite it in
|
|
23
|
+
* each triangle, which is `cloth_bend_row`'s stencil order. The stencil is built
|
|
24
|
+
* here rather than read through `bt_edge_read_diamond`, whose quad puts the
|
|
25
|
+
* shared edge in the middle;
|
|
26
|
+
* - the bind pose of every joint in the root joint's, and the root joint as the
|
|
27
|
+
* frame the sheet is simulated in.
|
|
28
|
+
*
|
|
29
|
+
* **Nothing is pinned.** Which vertices are held is the scene's business — a pole
|
|
30
|
+
* holding a flag's hoist, a hook holding a ribbon's top — and a `ClothPin` names
|
|
31
|
+
* them by particle, which is their position in `joint_names`.
|
|
32
|
+
*
|
|
33
|
+
* ## What is refused, and why at build
|
|
34
|
+
*
|
|
35
|
+
* §7 P8: a triangle with no area (no normal, no stencil), an edge three triangles
|
|
36
|
+
* share (no single hinge across it), joints that do not all hang from the same
|
|
37
|
+
* root, and a name the skin does not have. Each is an authoring mistake, and each
|
|
38
|
+
* comes back as a message naming it rather than as a sheet that misbehaves.
|
|
39
|
+
*
|
|
40
|
+
* ## The rest shape is assumed flat where it bends
|
|
41
|
+
*
|
|
42
|
+
* The hinge is §6's quadratic stencil, which annihilates a planar rest shape and
|
|
43
|
+
* every affine image of it and reads a curved rest as already bent (§18). A flag,
|
|
44
|
+
* a sheet and a circle skirt cut flat are what this serves; a tube is not.
|
|
45
|
+
*
|
|
46
|
+
* @author Alex Goldring
|
|
47
|
+
* @copyright Company Named Limited (c) 2026
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Build a proxy from the joints of a sheet's skin and the triangles over them.
|
|
52
|
+
*
|
|
53
|
+
* @param {Prefab} prefab the compiled model the joints are nodes of
|
|
54
|
+
* @param {Skin} skin one of the prefab's skins — joints as node indices
|
|
55
|
+
* @param {string[]} joint_names one joint per vertex; particle `i` is `joint_names[i]`
|
|
56
|
+
* @param {Int32Array|number[]} triangles indices into `joint_names`, 3 per triangle
|
|
57
|
+
* @param {object} [options]
|
|
58
|
+
* @param {string} [options.name]
|
|
59
|
+
* @returns {ClothProxyBuildResult}
|
|
60
|
+
*/
|
|
61
|
+
export function cloth_proxy_from_mesh(prefab, skin, joint_names, triangles, { name = "" } = {}) {
|
|
62
|
+
if (prefab === undefined || prefab === null || prefab.isPrefab !== true) {
|
|
63
|
+
return refuse(`${name}: no prefab`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (skin === undefined || skin === null) {
|
|
67
|
+
return refuse(`${name}: no skin`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const joints = skin.joints;
|
|
71
|
+
const parent_of = prefab.parent;
|
|
72
|
+
const name_of = prefab.name;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @type {Map<number, number>} node index → position in the skin's joints
|
|
76
|
+
*/
|
|
77
|
+
const index_of = new Map();
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @type {Map<string, number>}
|
|
81
|
+
*/
|
|
82
|
+
const by_name = new Map();
|
|
83
|
+
|
|
84
|
+
for (let i = 0; i < joints.length; i++) {
|
|
85
|
+
index_of.set(joints[i], i);
|
|
86
|
+
|
|
87
|
+
const joint_name = name_of[joints[i]];
|
|
88
|
+
|
|
89
|
+
if (joint_name !== "" && !by_name.has(joint_name)) {
|
|
90
|
+
by_name.set(joint_name, joints[i]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const particle_count = joint_names.length;
|
|
95
|
+
|
|
96
|
+
if (particle_count === 0) {
|
|
97
|
+
return refuse(`${name}: no joints`);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const node = new Int32Array(particle_count);
|
|
101
|
+
|
|
102
|
+
const seen = new Set();
|
|
103
|
+
|
|
104
|
+
for (let i = 0; i < particle_count; i++) {
|
|
105
|
+
const found = by_name.get(joint_names[i]);
|
|
106
|
+
|
|
107
|
+
if (found === undefined) {
|
|
108
|
+
return refuse(`${name}: the skin has no joint named "${joint_names[i]}"`);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (seen.has(found)) {
|
|
112
|
+
return refuse(`${name}: "${joint_names[i]}" is named twice`);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
seen.add(found);
|
|
116
|
+
|
|
117
|
+
node[i] = found;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// One root for every vertex joint: the frame, and what the write-back
|
|
121
|
+
// expresses each joint against.
|
|
122
|
+
const frame_node = parent_of[node[0]];
|
|
123
|
+
|
|
124
|
+
for (let i = 1; i < particle_count; i++) {
|
|
125
|
+
if (parent_of[node[i]] !== frame_node) {
|
|
126
|
+
return refuse(
|
|
127
|
+
`${name}: "${joint_names[0]}" hangs from "${name_of[frame_node] ?? 'nothing'}" and "${joint_names[i]}"`
|
|
128
|
+
+ ` from "${name_of[parent_of[node[i]]] ?? 'nothing'}" — a sheet's joints hang from one root joint`
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (frame_node < 0 || !index_of.has(frame_node)) {
|
|
134
|
+
return refuse(`${name}: the sheet's joints hang from "${name_of[frame_node] ?? 'nothing'}", which is not a joint of this skin`);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const triangle_count = Math.floor(triangles.length / 3);
|
|
138
|
+
|
|
139
|
+
if (triangle_count * 3 !== triangles.length) {
|
|
140
|
+
return refuse(`${name}: ${triangles.length} triangle indices is not a whole number of triangles`);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const pose = cloth_bind_in_frame(prefab, frame_node);
|
|
144
|
+
|
|
145
|
+
const rest_position = new Float32Array(particle_count * 3);
|
|
146
|
+
const rest_rotation = new Float32Array(particle_count * 4);
|
|
147
|
+
|
|
148
|
+
for (let i = 0; i < particle_count; i++) {
|
|
149
|
+
const p = pose(node[i]);
|
|
150
|
+
|
|
151
|
+
rest_position[i * 3] = p[0];
|
|
152
|
+
rest_position[i * 3 + 1] = p[1];
|
|
153
|
+
rest_position[i * 3 + 2] = p[2];
|
|
154
|
+
|
|
155
|
+
rest_rotation[i * 4] = p[3];
|
|
156
|
+
rest_rotation[i * 4 + 1] = p[4];
|
|
157
|
+
rest_rotation[i * 4 + 2] = p[5];
|
|
158
|
+
rest_rotation[i * 4 + 3] = p[6];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Every edge once, keyed by its two particles, with the wing opposite it in
|
|
163
|
+
* each triangle that has it.
|
|
164
|
+
* @type {Map<number, {a: number, b: number, wings: number[]}>}
|
|
165
|
+
*/
|
|
166
|
+
const edges = new Map();
|
|
167
|
+
|
|
168
|
+
for (let t = 0; t < triangle_count; t++) {
|
|
169
|
+
const i0 = triangles[t * 3];
|
|
170
|
+
const i1 = triangles[t * 3 + 1];
|
|
171
|
+
const i2 = triangles[t * 3 + 2];
|
|
172
|
+
|
|
173
|
+
for (const index of [i0, i1, i2]) {
|
|
174
|
+
if (!(index >= 0 && index < particle_count)) {
|
|
175
|
+
return refuse(`${name}: triangle ${t} names particle ${index} of ${particle_count}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (twice_area(rest_position, i0, i1, i2) <= 0) {
|
|
180
|
+
return refuse(
|
|
181
|
+
`${name}: triangle ${t} ("${joint_names[i0]}", "${joint_names[i1]}", "${joint_names[i2]}") has no area,`
|
|
182
|
+
+ ` so no normal and no hinge across it`
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const corners = [i0, i1, i2];
|
|
187
|
+
|
|
188
|
+
for (let k = 0; k < 3; k++) {
|
|
189
|
+
const a = corners[k];
|
|
190
|
+
const b = corners[(k + 1) % 3];
|
|
191
|
+
const wing = corners[(k + 2) % 3];
|
|
192
|
+
|
|
193
|
+
const lo = a < b ? a : b;
|
|
194
|
+
const hi = a < b ? b : a;
|
|
195
|
+
|
|
196
|
+
const key = lo * particle_count + hi;
|
|
197
|
+
|
|
198
|
+
let edge = edges.get(key);
|
|
199
|
+
|
|
200
|
+
if (edge === undefined) {
|
|
201
|
+
edge = { a: lo, b: hi, wings: [] };
|
|
202
|
+
|
|
203
|
+
edges.set(key, edge);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
edge.wings.push(wing);
|
|
207
|
+
|
|
208
|
+
if (edge.wings.length > 2) {
|
|
209
|
+
return refuse(
|
|
210
|
+
`${name}: the edge "${joint_names[lo]}"–"${joint_names[hi]}" is shared by more than two triangles,`
|
|
211
|
+
+ ` so there is no one hinge across it`
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const edge = [];
|
|
218
|
+
const hinge = [];
|
|
219
|
+
|
|
220
|
+
for (const { a, b, wings } of edges.values()) {
|
|
221
|
+
edge.push(a, b);
|
|
222
|
+
|
|
223
|
+
if (wings.length === 2) {
|
|
224
|
+
hinge.push(a, b, wings[0], wings[1]);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const particle_name = joint_names.slice();
|
|
229
|
+
|
|
230
|
+
return {
|
|
231
|
+
proxy: ClothProxy.from({
|
|
232
|
+
name,
|
|
233
|
+
joint: Array.from(node, n => index_of.get(n)),
|
|
234
|
+
output: new Uint8Array(particle_count).fill(1),
|
|
235
|
+
// every joint hangs straight off the frame
|
|
236
|
+
parent: new Int32Array(particle_count).fill(-1),
|
|
237
|
+
edge,
|
|
238
|
+
skip: [],
|
|
239
|
+
hinge,
|
|
240
|
+
triangle: Int32Array.from(triangles),
|
|
241
|
+
frame: index_of.get(frame_node),
|
|
242
|
+
rest_position,
|
|
243
|
+
rest_rotation,
|
|
244
|
+
particle_name
|
|
245
|
+
}),
|
|
246
|
+
groups: [],
|
|
247
|
+
error: ""
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Twice the area of a triangle of the rest pose.
|
|
253
|
+
*
|
|
254
|
+
* @param {Float32Array} position
|
|
255
|
+
* @param {number} a
|
|
256
|
+
* @param {number} b
|
|
257
|
+
* @param {number} c
|
|
258
|
+
* @returns {number}
|
|
259
|
+
* @private
|
|
260
|
+
*/
|
|
261
|
+
function twice_area(position, a, b, c) {
|
|
262
|
+
const ux = position[b * 3] - position[a * 3];
|
|
263
|
+
const uy = position[b * 3 + 1] - position[a * 3 + 1];
|
|
264
|
+
const uz = position[b * 3 + 2] - position[a * 3 + 2];
|
|
265
|
+
|
|
266
|
+
const vx = position[c * 3] - position[a * 3];
|
|
267
|
+
const vy = position[c * 3 + 1] - position[a * 3 + 1];
|
|
268
|
+
const vz = position[c * 3 + 2] - position[a * 3 + 2];
|
|
269
|
+
|
|
270
|
+
return Math.hypot(uy * vz - uz * vy, uz * vx - ux * vz, ux * vy - uy * vx);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @param {string} error
|
|
275
|
+
* @returns {ClothProxyBuildResult}
|
|
276
|
+
* @private
|
|
277
|
+
*/
|
|
278
|
+
function refuse(error) {
|
|
279
|
+
return { proxy: null, groups: [], error };
|
|
280
|
+
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* The rotation is an `nlerp` rather than a `slerp`: it is not constant angular
|
|
37
37
|
* velocity, and over the fraction of a fixed step it is indistinguishable from
|
|
38
38
|
* one — the two differ by under a thousandth of a degree at the half-radian per
|
|
39
|
-
* step `
|
|
39
|
+
* step `CLOTH_FRAME_ROTATION_LIMIT` already treats as a spin.
|
|
40
40
|
*
|
|
41
41
|
* @param {Float32Array|Float64Array} table
|
|
42
42
|
* @param {number} count records in `table`
|
|
@@ -72,7 +72,7 @@ import { ClothColliderKind } from "./ClothColliderKind.js";
|
|
|
72
72
|
* The rotation is an `nlerp` rather than a `slerp`: it is not constant angular
|
|
73
73
|
* velocity, and over the fraction of a fixed step it is indistinguishable from
|
|
74
74
|
* one — the two differ by under a thousandth of a degree at the half-radian per
|
|
75
|
-
* step `
|
|
75
|
+
* step `CLOTH_FRAME_ROTATION_LIMIT` already treats as a spin.
|
|
76
76
|
*
|
|
77
77
|
* @param {Float32Array|Float64Array} table
|
|
78
78
|
* @param {number} count records in `table`
|
|
@@ -6,22 +6,30 @@
|
|
|
6
6
|
*
|
|
7
7
|
* ```js
|
|
8
8
|
* rope_top.add(Cloth.from(ClothDynamics.ROPE));
|
|
9
|
+
* rope_top.add(ClothPin.from({ cloth: rope_top, particles: [0] }));
|
|
9
10
|
* ```
|
|
10
11
|
*
|
|
11
|
-
* **The
|
|
12
|
-
* The particle set is that entity
|
|
13
|
-
* `TransformAttachmentSystem#findChildrenOf` — the parent-to-children
|
|
14
|
-
* engine already maintains
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
12
|
+
* **The entity the component is on is the cloth's frame**, and nothing names
|
|
13
|
+
* anything. The particle set is that entity and its transform subtree, walked
|
|
14
|
+
* through `TransformAttachmentSystem#findChildrenOf` — the parent-to-children
|
|
15
|
+
* index the engine already maintains — with the entity itself as particle 0.
|
|
16
|
+
* Put `Cloth` on the top link of a rope and you get the rope; put it on a node
|
|
17
|
+
* with several chains under it and you get all of them in **one coupled
|
|
18
|
+
* solve**, which is what makes self-collision between them work.
|
|
19
|
+
*
|
|
20
|
+
* **What holds it is a separate question**, answered by {@link ClothPin}s: any
|
|
21
|
+
* number of them, on any entities, holding any particles, added and removed
|
|
22
|
+
* while it runs. The rope above is held at its top by its own entity; a rope
|
|
23
|
+
* bridge is that plus a post holding its last link; a rope nothing holds falls.
|
|
24
|
+
* The frame is only what the cloth is simulated in and what §7 P7's inertia is
|
|
25
|
+
* measured against — the entity the cloth rides, which cloth reads and never
|
|
26
|
+
* writes.
|
|
18
27
|
*
|
|
19
28
|
* Two rules keep the walk unambiguous:
|
|
20
29
|
*
|
|
21
30
|
* - **A nested `Cloth` claims its own subtree.** The walk stops when it meets
|
|
22
31
|
* another `Cloth`, so independent hanging parts of one prop partition
|
|
23
|
-
* naturally
|
|
24
|
-
* has written the inner one's anchor before the inner one reads it.
|
|
32
|
+
* naturally, each read one fixed step after the cloth above it wrote it.
|
|
25
33
|
* - **{@link ClothExclude}** prunes a subtree from the walk, for the rig with a
|
|
26
34
|
* non-simulated attachment point in the middle of a chain.
|
|
27
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cloth.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/Cloth.js"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"Cloth.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/Cloth.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH;IAkDI;;;;;;;;;OASG;IACH,uBATW,aAAa;QAGC,KAAK,GAAnB,MAAM;QACQ,KAAK,GAAnB,MAAM;QACQ,IAAI,GAAlB,MAAM;QACQ,KAAK,GAAnB,MAAM;QACJ,KAAK,CA6BjB;IArFD;;;;;;;OAOG;IACH,UAFU,aAAa,CAEQ;IAE/B;;;;;;;;OAQG;IACH,OAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,MAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,OAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,cAHW,MAAM,GAAC,UAAU,GACf,OAAO,CAInB;IAyCD;;;OAGG;IACH,cAHW,KAAK,GACH,OAAO,CAgBnB;IAED;;OAEG;IACH,QAFa,MAAM,CAUlB;IAED;;;;;;;;;;;;;;;;;MAQC;IAED;;OAEG;IACH,kDAFW,MAAM,QAehB;IAED,mBAEC;IAGL;;;OAGG;IACH,kBAFU,OAAO,CAEM;CANtB;;;;8BAhN6B,oBAAoB;2BACvB,iBAAiB"}
|