@woosh/meep-engine 3.44.0 → 3.46.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/build/bundle-worker-terrain.js +1 -1
- package/package.json +1 -1
- package/src/core/assert.d.ts.map +1 -1
- package/src/core/assert.js +5 -1
- package/src/core/binary/hash/XXH128Hash.d.ts +1 -37
- package/src/core/binary/hash/XXH128Hash.d.ts.map +1 -1
- package/src/core/binary/hash/XXH128Hash.js +4 -55
- package/src/core/binary/hash/XXH3_SECRET.d.ts +1 -12
- package/src/core/binary/hash/XXH3_SECRET.d.ts.map +1 -1
- package/src/core/binary/hash/XXH3_SECRET.js +4 -25
- package/src/core/binary/hash/crc32.d.ts +1 -15
- package/src/core/binary/hash/crc32.d.ts.map +1 -1
- package/src/core/binary/hash/crc32.js +4 -96
- package/src/core/binary/hash/xxh3_128.d.ts +1 -9
- package/src/core/binary/hash/xxh3_128.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_128.js +4 -341
- package/src/core/binary/hash/xxh3_64.d.ts +1 -8
- package/src/core/binary/hash/xxh3_64.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_64.js +4 -241
- package/src/core/binary/hash/xxh3_common.d.ts +1 -223
- package/src/core/binary/hash/xxh3_common.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_common.js +90 -476
- package/src/core/collection/array/array_sort_insertion_ascending.d.ts +19 -0
- package/src/core/collection/array/array_sort_insertion_ascending.d.ts.map +1 -0
- package/src/core/collection/array/array_sort_insertion_ascending.js +31 -0
- package/src/core/collection/array/combine_hash.d.ts +6 -0
- package/src/core/collection/array/combine_hash.d.ts.map +1 -1
- package/src/core/collection/array/combine_hash.js +6 -0
- package/src/core/function/FunctionCompiler.js +2 -2
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts +27 -0
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts.map +1 -0
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.js +39 -0
- package/src/core/geom/3d/aabb/aabb3_from_v3_array.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_from_v3_array.js +4 -1
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts +2 -2
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.js +1 -1
- package/src/core/geom/3d/mat4/m4_multiply.d.ts +3 -0
- package/src/core/geom/3d/mat4/m4_multiply.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_multiply.js +3 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts +30 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.js +106 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts +21 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.js +36 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts +25 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.js +40 -0
- package/src/core/geom/3d/pose/pose3_compose_array.d.ts +28 -0
- package/src/core/geom/3d/pose/pose3_compose_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_compose_array.js +41 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.d.ts +29 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.js +42 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts +28 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.js +66 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts +22 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.js +30 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts +23 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.js +31 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts +26 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts.map +1 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.js +46 -0
- package/src/core/geom/ConicRay.js +2 -2
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +8 -5
- package/src/core/geom/vec3/v3_distance_array.d.ts +11 -0
- package/src/core/geom/vec3/v3_distance_array.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_distance_array.js +19 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.d.ts +23 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.js +49 -0
- package/src/core/geom/vec3/v3_reject_array.d.ts +15 -0
- package/src/core/geom/vec3/v3_reject_array.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_reject_array.js +32 -0
- package/src/core/graph/csr/csr_build_incidence.d.ts +26 -0
- package/src/core/graph/csr/csr_build_incidence.d.ts.map +1 -0
- package/src/core/graph/csr/csr_build_incidence.js +71 -0
- package/src/core/graph/csr/csr_graph_color_greedy.d.ts +25 -0
- package/src/core/graph/csr/csr_graph_color_greedy.d.ts.map +1 -0
- package/src/core/graph/csr/csr_graph_color_greedy.js +83 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.d.ts +15 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.d.ts.map +1 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.js +33 -0
- package/src/core/math/hash/XXH128Hash.d.ts +38 -0
- package/src/core/math/hash/XXH128Hash.d.ts.map +1 -0
- package/src/core/math/hash/XXH128Hash.js +55 -0
- package/src/core/math/hash/XXH3_SECRET.d.ts +13 -0
- package/src/core/math/hash/XXH3_SECRET.d.ts.map +1 -0
- package/src/core/math/hash/XXH3_SECRET.js +25 -0
- package/src/core/math/hash/crc32.d.ts +16 -0
- package/src/core/math/hash/crc32.d.ts.map +1 -0
- package/src/core/math/hash/crc32.js +96 -0
- package/src/core/math/hash/xxh3_128.d.ts +10 -0
- package/src/core/math/hash/xxh3_128.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_128.js +341 -0
- package/src/core/math/hash/xxh3_64.d.ts +9 -0
- package/src/core/math/hash/xxh3_64.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_64.js +241 -0
- package/src/core/math/hash/xxh3_common.d.ts +224 -0
- package/src/core/math/hash/xxh3_common.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_common.js +476 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts +26 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts.map +1 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.js +71 -0
- package/src/core/math/lookup/ParameterLookupTable.js +2 -2
- package/src/core/math/max2_exact.d.ts +15 -0
- package/src/core/math/max2_exact.d.ts.map +1 -0
- package/src/core/math/max2_exact.js +30 -0
- package/src/core/math/min2_exact.d.ts +20 -0
- package/src/core/math/min2_exact.d.ts.map +1 -0
- package/src/core/math/min2_exact.js +35 -0
- package/src/core/model/node-graph/node/NodeInstancePortReference.js +2 -2
- package/src/core/model/reactive/model/ReactiveBinaryExpression.js +2 -2
- package/src/core/model/reactive/model/terminal/ReactiveReference.js +2 -2
- package/src/engine/asset/AssetDescription.js +2 -2
- package/src/engine/ecs/animation/Animation.js +2 -2
- package/src/engine/ecs/animation/AnimationClip.d.ts.map +1 -1
- package/src/engine/ecs/animation/AnimationClip.js +7 -5
- package/src/engine/ecs/gui/GUIElement.d.ts.map +1 -1
- package/src/engine/ecs/gui/GUIElement.js +7 -5
- package/src/engine/ecs/gui/hud/HeadsUpDisplay.js +2 -2
- package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
- package/src/engine/ecs/gui/position/ViewportPosition.js +11 -7
- package/src/engine/ecs/ik/IKGoalSystem.d.ts.map +1 -1
- package/src/engine/ecs/ik/IKGoalSystem.js +3 -19
- package/src/engine/ecs/parent/parent_entity_model_of.d.ts +17 -0
- package/src/engine/ecs/parent/parent_entity_model_of.d.ts.map +1 -0
- package/src/engine/ecs/parent/parent_entity_model_of.js +26 -0
- package/src/engine/ecs/transform/Transform64.d.ts +1 -1
- package/src/engine/ecs/transform/Transform64.d.ts.map +1 -1
- package/src/engine/ecs/transform/Transform64.js +5 -4
- package/src/engine/ecs/transform/t64_read_pose_array.d.ts +15 -0
- package/src/engine/ecs/transform/t64_read_pose_array.d.ts.map +1 -0
- package/src/engine/ecs/transform/t64_read_pose_array.js +24 -0
- package/src/engine/graphics/ecs/animation/animator/AnimationClip.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/AnimationClip.js +8 -5
- package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/AnimationNotification.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationGraphDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +8 -5
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/Decal.js +9 -8
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts +2 -0
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts.map +1 -1
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.js +10 -21
- package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.js +9 -6
- package/src/engine/graphics3/AnimationGraphSystem.d.ts +5 -0
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +48 -2
- package/src/engine/graphics3/AnimationSystem.d.ts +5 -0
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +47 -2
- package/src/engine/graphics3/ParticipatingMedia.js +204 -204
- package/src/engine/graphics3/animation/AnimationClips.d.ts +5 -0
- package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -1
- package/src/engine/graphics3/animation/AnimationClips.js +5 -0
- package/src/engine/graphics3/register_clips.d.ts +29 -0
- package/src/engine/graphics3/register_clips.d.ts.map +1 -1
- package/src/engine/graphics3/register_clips.js +52 -0
- package/src/engine/grid/obstacle/GridObstacle.js +2 -2
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +2 -2
- package/src/engine/interpolation/Interpolated.js +2 -2
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts +9 -0
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts.map +1 -1
- package/src/engine/physics/broadphase/compute_fat_world_aabb.js +3 -1
- package/src/engine/physics/cloth/PLAN.md +10 -8
- 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 -1
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +51 -19
- 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 +16 -2
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +19 -24
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +7 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/ClothColliderIndex.js +85 -67
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.js +19 -101
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +2 -5
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_pack.js +7 -15
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +16 -61
- package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.js +7 -5
- package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothCollider.js +7 -5
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts +0 -1
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.js +6 -19
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +1 -2
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +3 -12
- package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothDynamics.js +20 -11
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +40 -130
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +17 -58
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +3 -3
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +44 -104
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +6 -13
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_holds.js +15 -40
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +45 -79
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +7 -27
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +30 -62
- package/src/engine/physics/cloth/playground/cloth_playground_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/cloth_playground_build.js +2 -3
- package/src/engine/physics/cloth/playground/collide_main.js +2 -28
- package/src/engine/physics/cloth/playground/garment_main.js +4 -19
- package/src/engine/physics/cloth/playground/main.js +6 -48
- package/src/engine/physics/cloth/playground/rig_main.js +947 -955
- package/src/engine/physics/cloth/playground/wind_main.js +8 -7
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +16 -76
- package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts +10 -8
- package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_color_particles.js +30 -102
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +3 -2
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_hold_line.js +2 -14
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts +21 -0
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.js +45 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts +32 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.js +133 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts +16 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.js +19 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +6 -55
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.js +30 -65
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +6 -28
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +2 -3
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts +21 -0
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.js +54 -0
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts +15 -0
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.js +28 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts +30 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.js +56 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +3 -17
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +2 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +7 -25
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +3 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +40 -62
- package/src/engine/physics/ecs/ContactProbeSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/ContactProbeSystem.js +2 -18
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +9 -50
- package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidField.js +7 -5
- package/src/engine/physics/fluid/ecs/FluidComponent.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidComponent.js +19 -11
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts +24 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.js +42 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts +25 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.js +40 -0
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +2 -2
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +2 -2
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +11 -7
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.js +11 -7
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/WakeFluidEffector.js +16 -9
- package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.d.ts.map +1 -1
- package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.js +40 -90
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/capsule_contacts.js +3 -5
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js +2 -14
- package/src/engine/physics/narrowphase/hull_sphere_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/hull_sphere_contact.js +2 -5
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/narrowphase_step.js +13 -32
- package/src/engine/physics/narrowphase/sphere_box_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/sphere_box_contact.js +2 -5
- package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitter.js +12 -7
- package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts.map +1 -1
- package/src/engine/sound/ecs/trigger/AudioEventTrigger.js +192 -191
- package/src/engine/sound/simulation/core/AcousticMedium.js +2 -2
- package/src/engine/sound/simulation/definition/AcousticDirectivity.js +2 -2
- package/src/engine/sound/simulation/definition/AcousticMaterial.d.ts.map +1 -1
- package/src/engine/sound/simulation/definition/AcousticMaterial.js +11 -7
- package/src/engine/sound/sopra/definition/BusDefinition.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/BusDefinition.js +5 -4
- package/src/engine/sound/sopra/definition/DuckingRule.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/DuckingRule.js +7 -5
- package/src/engine/sound/sopra/definition/EventDescription.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/EventDescription.js +23 -13
- package/src/engine/sound/sopra/definition/MixerSnapshot.js +2 -2
- package/src/engine/sound/sopra/definition/ParameterDefinition.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/ParameterDefinition.js +7 -5
- package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.js +4 -3
- package/src/engine/sound/sopra/definition/clip/ContainerAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.js +3 -3
- package/src/engine/sound/sopra/definition/clip/SampleAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SampleAudioClip.js +16 -9
- package/src/engine/sound/sopra/definition/clip/SilenceAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.js +7 -5
- package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/EqEffect.js +8 -5
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +2 -2
- package/src/engine/sound/sopra/legacy/SoundEmitter.d.ts.map +1 -1
- package/src/engine/sound/sopra/legacy/SoundEmitter.js +357 -352
- package/src/engine/sound/sopra/legacy/SoundTrack.d.ts.map +1 -1
- package/src/engine/sound/sopra/legacy/SoundTrack.js +281 -278
- package/src/format/image/png/PNGReader.js +644 -644
- package/src/format/image/png/crc32.d.ts +1 -1
- package/src/format/image/png/crc32.js +7 -8
- package/src/format/texture/basis/transcode/etc1s_to_astc.d.ts.map +1 -1
- package/src/format/texture/basis/transcode/etc1s_to_astc.js +2 -1
- package/src/shade/descriptor/binding/BindGroupLayoutDescriptor.js +2 -2
- package/src/shade/descriptor/binding/BindGroupLayoutEntry.d.ts.map +1 -1
- package/src/shade/descriptor/binding/BindGroupLayoutEntry.js +12 -8
- package/src/shade/descriptor/binding/StorageTextureBindingLayout.js +2 -2
- package/src/shade/descriptor/binding/TextureBindingLayout.js +2 -2
- package/src/shade/descriptor/blend/BlendComponent.js +2 -2
- package/src/shade/descriptor/pipeline/PipelineDescriptorBase.js +2 -2
- package/src/shade/descriptor/pipeline/PipelineLayoutDescriptor.js +2 -2
- package/src/shade/descriptor/pipeline/ProgrammableStage.js +2 -2
- package/src/shade/descriptor/pipeline/compute/ComputePipelineDescriptor.js +2 -2
- package/src/shade/descriptor/pipeline/render/ColorTargetState.js +2 -2
- package/src/shade/descriptor/pipeline/render/FragmentState.js +2 -2
- package/src/shade/descriptor/pipeline/render/PrimitiveState.js +2 -2
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js +8 -5
- package/src/shade/descriptor/pipeline/render/VertexAttribute.js +2 -2
- package/src/shade/descriptor/texture/SamplerDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/texture/SamplerDescriptor.js +20 -12
- package/src/shade/descriptor/texture/TextureDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/texture/TextureDescriptor.js +11 -7
- package/src/shade/device/graph/BufferResourceDescriptor.d.ts.map +1 -1
- package/src/shade/device/graph/BufferResourceDescriptor.js +196 -193
- package/src/shade/device/graph/TextureResourceDescriptor.d.ts.map +1 -1
- package/src/shade/device/graph/TextureResourceDescriptor.js +178 -173
- package/src/shade/device/timing/profile/sgpt_read_header.js +1 -1
- package/src/shade/device/timing/profile/sgpt_read_records.js +1 -1
- package/src/shade/device/timing/profile/sgpt_write_header.js +1 -1
- package/src/shade/device/timing/profile/sgpt_write_record.js +1 -1
- package/src/shade/playground/image_decode_bench/main.js +2 -1
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.js +2 -1
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.js +2 -1
- package/src/shade/playground/ssr_variance/statistics.d.ts.map +1 -1
- package/src/shade/playground/ssr_variance/statistics.js +2 -1
- package/src/shade/playground/texture_encode/main.d.ts.map +1 -1
- package/src/shade/playground/texture_encode/main.js +2 -1
- package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/measure.js +2 -1
- package/src/shade/renderer/binding/BufferBinding.js +2 -2
- package/src/shade/renderer/buffer/table/gpu_database_check_links.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/gpu_database_check_links.js +2 -1
- package/src/shade/renderer/camera/Camera.js +2 -2
- package/src/shade/renderer/geometry/Attribute.js +2 -2
- package/src/shade/renderer/geometry/Geometry.js +2 -2
- package/src/shade/renderer/geometry/geometry_deduplicate_vertices.js +2 -2
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +2 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +3 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.js +3 -2
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.js +2 -1
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_asset_id.js +13 -13
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_directory_block_checksum.js +41 -41
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_frame_checksum.js +41 -41
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_header_checksum.js +25 -25
- 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 +3 -2
- package/src/shade/renderer/material/StandardShadeMaterial.d.ts.map +1 -1
- package/src/shade/renderer/material/StandardShadeMaterial.js +13 -8
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.js +3 -2
- package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.d.ts.map +1 -1
- package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js +14 -5
- package/src/shade/renderer/scene/optimization/sampler2d_from_image_bitmap.js +1 -1
- package/src/shade/renderer/shader/type/WGSLStructField.js +2 -2
- package/src/shade/renderer/shader/type/WebGPUArray.js +2 -2
- package/src/shade/renderer/shader/type/WebGPUStruct.d.ts.map +1 -1
- package/src/shade/renderer/shader/type/WebGPUStruct.js +9 -6
- package/src/shade/renderer/texture/ShadeTexture.d.ts.map +1 -1
- package/src/shade/renderer/texture/ShadeTexture.js +17 -10
- package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +2 -2
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +4 -4
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +6 -6
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +46 -55
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts +3 -3
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +14 -4
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +10 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +82 -40
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +4 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +8 -4
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +98 -86
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/shader_water_particles.js +440 -298
- package/src/view/common/HTMLElementCacheKey.d.ts.map +1 -1
- package/src/view/common/HTMLElementCacheKey.js +4 -3
- package/src/view/minimap/MinimapMarker.js +2 -2
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { array_range_equal_strict } from "../../../../core/collection/array/array_range_equal_strict.js";
|
|
3
|
+
import { pose3_apply_point_array } from "../../../../core/geom/3d/pose/pose3_apply_point_array.js";
|
|
4
|
+
import { pose3_to_local_array } from "../../../../core/geom/3d/pose/pose3_to_local_array.js";
|
|
5
|
+
import { quat3_clamp_angle_array } from "../../../../core/geom/3d/quaternion/quat3_clamp_angle_array.js";
|
|
6
|
+
import {
|
|
7
|
+
quat3_multiply_conjugate_right_array
|
|
8
|
+
} from "../../../../core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.js";
|
|
4
9
|
import { v3_quaternion_apply_array } from "../../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
5
10
|
import { v3_quaternion_apply_inverse_array } from "../../../../core/geom/vec3/v3_quaternion_apply_inverse.js";
|
|
6
11
|
import { EntityObserver } from "../../../ecs/EntityObserver.js";
|
|
7
12
|
import { EventType } from "../../../ecs/EventType.js";
|
|
8
13
|
import { GPUStateAuthorityFlags } from "../../../ecs/gpu/GPUStateAuthorityFlags.js";
|
|
9
14
|
import { gpu_authority_has } from "../../../ecs/gpu/gpu_authority_has.js";
|
|
10
|
-
import {
|
|
15
|
+
import { parent_entity_model_of } from "../../../ecs/parent/parent_entity_model_of.js";
|
|
11
16
|
import {
|
|
12
|
-
|
|
13
|
-
} from "../../../ecs/transform-attachment/
|
|
17
|
+
transform_attachment_parent_of
|
|
18
|
+
} from "../../../ecs/transform-attachment/transform_attachment_parent_of.js";
|
|
14
19
|
import {
|
|
15
20
|
TransformAttachmentSystem
|
|
16
21
|
} from "../../../ecs/transform-attachment/TransformAttachmentSystem.js";
|
|
@@ -20,6 +25,7 @@ import {
|
|
|
20
25
|
Transform64
|
|
21
26
|
} from "../../../ecs/transform/Transform64.js";
|
|
22
27
|
import { t64_evaluate_world } from "../../../ecs/transform/t64_evaluate_world.js";
|
|
28
|
+
import { t64_read_pose_array } from "../../../ecs/transform/t64_read_pose_array.js";
|
|
23
29
|
import {
|
|
24
30
|
collect_entity_playbacks
|
|
25
31
|
} from "../../../graphics3/pose/collect_entity_playbacks.js";
|
|
@@ -551,9 +557,7 @@ export class ClothWorld {
|
|
|
551
557
|
return `entity ${hold.holder} holds cloth ${instance.entity} and hangs from entity ${entity}, which that cloth moves`;
|
|
552
558
|
}
|
|
553
559
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
entity = attachment === undefined ? -1 : attachment.parent;
|
|
560
|
+
entity = transform_attachment_parent_of(ecd, entity);
|
|
557
561
|
}
|
|
558
562
|
|
|
559
563
|
const particles = hold.pin.particles;
|
|
@@ -695,18 +699,7 @@ export class ClothWorld {
|
|
|
695
699
|
const pose = hold.pose;
|
|
696
700
|
|
|
697
701
|
// in the frame: q_f⁻¹ · (t − t_f), q_f⁻¹ ⊗ q
|
|
698
|
-
|
|
699
|
-
HOLD_SCRATCH[1] = world[1] - frame_translation[1];
|
|
700
|
-
HOLD_SCRATCH[2] = world[2] - frame_translation[2];
|
|
701
|
-
|
|
702
|
-
v3_quaternion_apply_inverse_array(pose, 0, HOLD_SCRATCH, 0, frame_rotation, 0);
|
|
703
|
-
|
|
704
|
-
FRAME_CONJUGATE[0] = -frame_rotation[0];
|
|
705
|
-
FRAME_CONJUGATE[1] = -frame_rotation[1];
|
|
706
|
-
FRAME_CONJUGATE[2] = -frame_rotation[2];
|
|
707
|
-
FRAME_CONJUGATE[3] = frame_rotation[3];
|
|
708
|
-
|
|
709
|
-
quat3_multiply_array(pose, 3, FRAME_CONJUGATE, 0, world, 3);
|
|
702
|
+
pose3_to_local_array(pose, 0, pose, 3, frame_translation, 0, frame_rotation, 0, world, 0, world, 3);
|
|
710
703
|
|
|
711
704
|
if (!hold.has_previous) {
|
|
712
705
|
moved = true;
|
|
@@ -714,14 +707,8 @@ export class ClothWorld {
|
|
|
714
707
|
continue;
|
|
715
708
|
}
|
|
716
709
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
for (let i = 0; i < 7; i++) {
|
|
720
|
-
if (world[i] !== before[i]) {
|
|
721
|
-
moved = true;
|
|
722
|
-
|
|
723
|
-
break;
|
|
724
|
-
}
|
|
710
|
+
if (!array_range_equal_strict(world, 0, hold.world_previous, 0, 7)) {
|
|
711
|
+
moved = true;
|
|
725
712
|
}
|
|
726
713
|
}
|
|
727
714
|
|
|
@@ -776,8 +763,7 @@ export class ClothWorld {
|
|
|
776
763
|
return false;
|
|
777
764
|
}
|
|
778
765
|
|
|
779
|
-
const
|
|
780
|
-
const model = owner === undefined || owner === null ? e : owner.entity;
|
|
766
|
+
const model = parent_entity_model_of(ecd, e);
|
|
781
767
|
|
|
782
768
|
if (MODELS.indexOf(model) === -1) {
|
|
783
769
|
MODELS.push(model);
|
|
@@ -785,9 +771,7 @@ export class ClothWorld {
|
|
|
785
771
|
collect_entity_playbacks(playbacks, this.entityManager, model);
|
|
786
772
|
}
|
|
787
773
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
e = attachment === undefined ? -1 : attachment.parent;
|
|
774
|
+
e = transform_attachment_parent_of(ecd, e);
|
|
791
775
|
}
|
|
792
776
|
|
|
793
777
|
t64_evaluate_world(EVALUATED, ecd, entity, playbacks);
|
|
@@ -797,13 +781,7 @@ export class ClothWorld {
|
|
|
797
781
|
source = EVALUATED;
|
|
798
782
|
}
|
|
799
783
|
|
|
800
|
-
out
|
|
801
|
-
out[1] = source[TRANSFORM64_TRANSLATION_OFFSET + 1];
|
|
802
|
-
out[2] = source[TRANSFORM64_TRANSLATION_OFFSET + 2];
|
|
803
|
-
out[3] = source[TRANSFORM64_ROTATION_OFFSET];
|
|
804
|
-
out[4] = source[TRANSFORM64_ROTATION_OFFSET + 1];
|
|
805
|
-
out[5] = source[TRANSFORM64_ROTATION_OFFSET + 2];
|
|
806
|
-
out[6] = source[TRANSFORM64_ROTATION_OFFSET + 3];
|
|
784
|
+
t64_read_pose_array(out, 0, source);
|
|
807
785
|
|
|
808
786
|
return true;
|
|
809
787
|
}
|
|
@@ -1389,17 +1367,7 @@ export class ClothWorld {
|
|
|
1389
1367
|
reset = true;
|
|
1390
1368
|
}
|
|
1391
1369
|
} else if (moved) {
|
|
1392
|
-
|
|
1393
|
-
// wherever the call was not inlined
|
|
1394
|
-
FRAME_POSE[0] = tx;
|
|
1395
|
-
FRAME_POSE[1] = ty;
|
|
1396
|
-
FRAME_POSE[2] = tz;
|
|
1397
|
-
FRAME_POSE[3] = qx;
|
|
1398
|
-
FRAME_POSE[4] = qy;
|
|
1399
|
-
FRAME_POSE[5] = qz;
|
|
1400
|
-
FRAME_POSE[6] = qw;
|
|
1401
|
-
|
|
1402
|
-
move_local_frame(instance, FRAME_POSE, previous_translation, previous_rotation);
|
|
1370
|
+
move_local_frame(instance, FRAME_TRANSLATION, FRAME_ROTATION, previous_translation, previous_rotation);
|
|
1403
1371
|
}
|
|
1404
1372
|
|
|
1405
1373
|
previous_translation[0] = tx;
|
|
@@ -1585,18 +1553,14 @@ export class ClothWorld {
|
|
|
1585
1553
|
|
|
1586
1554
|
const b = node * 7;
|
|
1587
1555
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
FRAME_CONJUGATE[2] = -frame[TRANSFORM64_ROTATION_OFFSET + 2];
|
|
1597
|
-
FRAME_CONJUGATE[3] = frame[TRANSFORM64_ROTATION_OFFSET + 3];
|
|
1598
|
-
|
|
1599
|
-
quat3_multiply_array(boundary, b + 3, FRAME_CONJUGATE, 0, EVALUATED, TRANSFORM64_ROTATION_OFFSET);
|
|
1556
|
+
pose3_to_local_array(
|
|
1557
|
+
boundary, b,
|
|
1558
|
+
boundary, b + 3,
|
|
1559
|
+
frame, TRANSFORM64_TRANSLATION_OFFSET,
|
|
1560
|
+
frame, TRANSFORM64_ROTATION_OFFSET,
|
|
1561
|
+
EVALUATED, TRANSFORM64_TRANSLATION_OFFSET,
|
|
1562
|
+
EVALUATED, TRANSFORM64_ROTATION_OFFSET
|
|
1563
|
+
);
|
|
1600
1564
|
}
|
|
1601
1565
|
|
|
1602
1566
|
playbacks.length = 0;
|
|
@@ -1671,14 +1635,8 @@ const LOCAL_GRAVITY = new Float64Array(3);
|
|
|
1671
1635
|
const FRAME = new Float64Array(8);
|
|
1672
1636
|
|
|
1673
1637
|
/**
|
|
1674
|
-
* The frame's
|
|
1675
|
-
*
|
|
1676
|
-
* @private
|
|
1677
|
-
*/
|
|
1678
|
-
const FRAME_POSE = new Float64Array(7);
|
|
1679
|
-
|
|
1680
|
-
/**
|
|
1681
|
-
* The frame's translation and rotation this step, apart, as the holds take them.
|
|
1638
|
+
* The frame's translation and rotation this step, apart, as the holds and {@link move_local_frame}
|
|
1639
|
+
* take them: the transform read once, before anything this step could write it.
|
|
1682
1640
|
* @type {Float64Array}
|
|
1683
1641
|
* @private
|
|
1684
1642
|
*/
|
|
@@ -1690,18 +1648,6 @@ const FRAME_TRANSLATION = new Float64Array(3);
|
|
|
1690
1648
|
*/
|
|
1691
1649
|
const FRAME_ROTATION = new Float64Array(4);
|
|
1692
1650
|
|
|
1693
|
-
/**
|
|
1694
|
-
* @type {Float64Array}
|
|
1695
|
-
* @private
|
|
1696
|
-
*/
|
|
1697
|
-
const FRAME_CONJUGATE = new Float64Array(4);
|
|
1698
|
-
|
|
1699
|
-
/**
|
|
1700
|
-
* @type {Float64Array}
|
|
1701
|
-
* @private
|
|
1702
|
-
*/
|
|
1703
|
-
const HOLD_SCRATCH = new Float64Array(4);
|
|
1704
|
-
|
|
1705
1651
|
/**
|
|
1706
1652
|
* An exactly evaluated world pose: a holder a clip drives, a bone a garment
|
|
1707
1653
|
* hangs from.
|
|
@@ -1717,21 +1663,6 @@ const EVALUATED = new Transform64();
|
|
|
1717
1663
|
*/
|
|
1718
1664
|
const MODELS = [];
|
|
1719
1665
|
|
|
1720
|
-
/**
|
|
1721
|
-
* {@link move_local_frame}'s `q_now⁻¹`, `[-qx, -qy, -qz, qw]`.
|
|
1722
|
-
* @type {Float64Array}
|
|
1723
|
-
* @private
|
|
1724
|
-
*/
|
|
1725
|
-
const POSE_CONJUGATE = new Float64Array(4);
|
|
1726
|
-
|
|
1727
|
-
/**
|
|
1728
|
-
* The identity rotation, `[0, 0, 0, 1]`, which {@link move_local_frame} limits a turn towards. Never
|
|
1729
|
-
* written.
|
|
1730
|
-
* @type {Float64Array}
|
|
1731
|
-
* @private
|
|
1732
|
-
*/
|
|
1733
|
-
const IDENTITY_ROTATION = new Float64Array([0, 0, 0, 1]);
|
|
1734
|
-
|
|
1735
1666
|
/**
|
|
1736
1667
|
* Carry the free particles across a change of frame pose, by however much of it the
|
|
1737
1668
|
* fabric is willing to feel. §7 P7.
|
|
@@ -1753,12 +1684,13 @@ const IDENTITY_ROTATION = new Float64Array([0, 0, 0, 1]);
|
|
|
1753
1684
|
* is every call, twice per particle per step of a moving frame.
|
|
1754
1685
|
*
|
|
1755
1686
|
* @param {ClothInstance} instance
|
|
1756
|
-
* @param {Float64Array}
|
|
1687
|
+
* @param {Float64Array} translation the frame's translation now
|
|
1688
|
+
* @param {Float64Array} rotation the frame's rotation now
|
|
1757
1689
|
* @param {Float64Array} previous_translation
|
|
1758
1690
|
* @param {Float64Array} previous_rotation
|
|
1759
1691
|
* @private
|
|
1760
1692
|
*/
|
|
1761
|
-
function move_local_frame(instance,
|
|
1693
|
+
function move_local_frame(instance, translation, rotation, previous_translation, previous_rotation) {
|
|
1762
1694
|
let inertia = instance.cloth.dynamics.inertia;
|
|
1763
1695
|
|
|
1764
1696
|
if (inertia <= 0) {
|
|
@@ -1769,11 +1701,8 @@ function move_local_frame(instance, pose, previous_translation, previous_rotatio
|
|
|
1769
1701
|
inertia = 1;
|
|
1770
1702
|
}
|
|
1771
1703
|
|
|
1772
|
-
|
|
1773
|
-
FRAME
|
|
1774
|
-
FRAME[2] = previous_translation[2] - pose[2];
|
|
1775
|
-
|
|
1776
|
-
v3_quaternion_apply_inverse_array(FRAME, 0, FRAME, 0, pose, 3);
|
|
1704
|
+
// the previous pose in the frame now: D and Q
|
|
1705
|
+
pose3_to_local_array(FRAME, 0, FRAME, 4, translation, 0, rotation, 0, previous_translation, 0, previous_rotation, 0);
|
|
1777
1706
|
|
|
1778
1707
|
const travel_limit = CLOTH_FRAME_TRAVEL_REACH * instance.reach;
|
|
1779
1708
|
|
|
@@ -1787,21 +1716,10 @@ function move_local_frame(instance, pose, previous_translation, previous_rotatio
|
|
|
1787
1716
|
FRAME[2] *= scale;
|
|
1788
1717
|
}
|
|
1789
1718
|
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
quat3_multiply_array(FRAME, 4, POSE_CONJUGATE, 0, previous_rotation, 0);
|
|
1796
|
-
|
|
1797
|
-
// `|w|` is `cos(θ/2)`, so this is the angle test without an `acos`.
|
|
1798
|
-
const half_angle_cos = FRAME[7] < 0 ? -FRAME[7] : FRAME[7];
|
|
1799
|
-
|
|
1800
|
-
if (half_angle_cos < Math.cos(CLOTH_FRAME_ROTATION_LIMIT * 0.5)) {
|
|
1801
|
-
const angle = 2 * Math.acos(half_angle_cos > 1 ? 1 : half_angle_cos);
|
|
1802
|
-
|
|
1803
|
-
quat3_nlerp_array(FRAME, 4, IDENTITY_ROTATION, 0, FRAME, 4, CLOTH_FRAME_ROTATION_LIMIT / angle);
|
|
1804
|
-
}
|
|
1719
|
+
// Exactly the limit about the same axis. An nlerp from the identity by `limit / θ` follows the
|
|
1720
|
+
// chord and turned less than the limit the further past it the frame spun: three quarters of it
|
|
1721
|
+
// at a half turn.
|
|
1722
|
+
quat3_clamp_angle_array(FRAME, 4, FRAME, 4, CLOTH_FRAME_ROTATION_LIMIT);
|
|
1805
1723
|
|
|
1806
1724
|
const state = instance.state;
|
|
1807
1725
|
|
|
@@ -1857,11 +1775,7 @@ function carry_with_holder(instance, h) {
|
|
|
1857
1775
|
const before = hold.pose_previous;
|
|
1858
1776
|
|
|
1859
1777
|
// the jump's rotation, q_now ⊗ q_before⁻¹
|
|
1860
|
-
|
|
1861
|
-
JUMP, 0,
|
|
1862
|
-
now[3], now[4], now[5], now[6],
|
|
1863
|
-
-before[3], -before[4], -before[5], before[6]
|
|
1864
|
-
);
|
|
1778
|
+
quat3_multiply_conjugate_right_array(JUMP, 0, now, 3, before, 3);
|
|
1865
1779
|
|
|
1866
1780
|
const state = instance.state;
|
|
1867
1781
|
const position = state.position;
|
|
@@ -1884,11 +1798,7 @@ function carry_with_holder(instance, h) {
|
|
|
1884
1798
|
CARRIED[1] = position[p + 1] - before[1];
|
|
1885
1799
|
CARRIED[2] = position[p + 2] - before[2];
|
|
1886
1800
|
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
position[p] += now[0];
|
|
1890
|
-
position[p + 1] += now[1];
|
|
1891
|
-
position[p + 2] += now[2];
|
|
1801
|
+
pose3_apply_point_array(position, p, now, 0, JUMP, 0, CARRIED, 0);
|
|
1892
1802
|
|
|
1893
1803
|
v3_quaternion_apply_array(velocity, p, velocity, p, JUMP, 0);
|
|
1894
1804
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_build_rows.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_build_rows.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloth_build_rows.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_build_rows.js"],"names":[],"mappings":"AAqEA;;;;GAIG;AACH,+DAFa,IAAI,CAsBhB;AAED;;;;;;;;;;GAUG;AACH,2DAFa,IAAI,CA6BhB;AAED;;;;;;;;GAQG;AACH,8DAFa,IAAI,CAgDhB;AAED;;;;;;;;;;;;;;GAcG;AACH,4CAJW,YAAY,SACZ,MAAM,GACJ,MAAM,CAYlB;AAED;;;;;;;;;;;;;GAaG;AACH,8DAHW,MAAM,GACJ,IAAI,CAkOhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,kEAHW,MAAM,GACJ,IAAI,CAiEhB;AAED;;;;;;;;;;;GAWG;AACH,iGAFa,OAAO,CAkBnB;AA/iBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;GAIG;AACH,kCAFU,MAAM,CAEwB;AAIxC;;;;;;;;;;;;;;;;;GAiBG;AACH,gCAFU,MAAM,CAEmB"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { v3_distance_array } from "../../../../core/geom/vec3/v3_distance_array.js";
|
|
2
|
+
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
3
|
+
import { csr_build_incidence } from "../../../../core/graph/csr/csr_build_incidence.js";
|
|
1
4
|
import { ClothState } from "../solver/ClothState.js";
|
|
2
5
|
import { ClothDynamicsFlags } from "./ClothDynamicsFlags.js";
|
|
3
6
|
import { cloth_self_closest_free_pair, cloth_self_exclusions } from "../solver/cloth_self_find.js";
|
|
4
7
|
import { cloth_bend_ratio, cloth_strain_allowance } from "./cloth_dynamics_map.js";
|
|
5
8
|
import { cloth_edge_incidence } from "./cloth_geodesic.js";
|
|
6
9
|
import { cloth_bend_stencil_weights } from "../solver/constraint/cloth_bend_row.js";
|
|
10
|
+
import { cloth_particle_of_source } from "../solver/cloth_particle_of_source.js";
|
|
7
11
|
|
|
8
12
|
/**
|
|
9
13
|
* # The rows, and everything that is a number rather than a walk
|
|
@@ -72,26 +76,19 @@ export function cloth_build_children(instance) {
|
|
|
72
76
|
const node_count = instance.node_count;
|
|
73
77
|
const parent = instance.node_parent;
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
let child_count = 0;
|
|
76
80
|
|
|
77
81
|
for (let node = 0; node < node_count; node++) {
|
|
78
82
|
if (parent[node] >= 0) {
|
|
79
|
-
|
|
83
|
+
child_count++;
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const child = new Int32Array(offset[node_count]);
|
|
88
|
-
const cursor = offset.slice(0, node_count);
|
|
87
|
+
const offset = new Int32Array(node_count + 1);
|
|
88
|
+
const child = new Int32Array(child_count);
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
child[cursor[parent[node]]++] = node;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
90
|
+
// a root's parent is −1, which is in no bucket
|
|
91
|
+
csr_build_incidence(offset, child, parent, node_count, node_count);
|
|
95
92
|
|
|
96
93
|
instance.node_child_offset = offset;
|
|
97
94
|
instance.node_child = child;
|
|
@@ -161,24 +158,13 @@ export function cloth_build_surface(instance) {
|
|
|
161
158
|
}
|
|
162
159
|
|
|
163
160
|
const offset = new Int32Array(node_count + 1);
|
|
164
|
-
|
|
165
|
-
for (let i = 0; i < triangle_count * 3; i++) {
|
|
166
|
-
offset[triangle[i] + 1]++;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
for (let node = 0; node < node_count; node++) {
|
|
170
|
-
offset[node + 1] += offset[node];
|
|
171
|
-
}
|
|
172
|
-
|
|
173
161
|
const surface = new Int32Array(triangle_count * 3);
|
|
174
|
-
const cursor = offset.slice(0, node_count);
|
|
175
162
|
|
|
176
|
-
|
|
177
|
-
for (let k = 0; k < 3; k++) {
|
|
178
|
-
const node = triangle[t * 3 + k];
|
|
163
|
+
csr_build_incidence(offset, surface, triangle, triangle_count * 3, node_count);
|
|
179
164
|
|
|
180
|
-
|
|
181
|
-
|
|
165
|
+
// a corner's flat index `t·3 + k` to its triangle `t`
|
|
166
|
+
for (let i = 0; i < triangle_count * 3; i++) {
|
|
167
|
+
surface[i] = (surface[i] / 3) | 0;
|
|
182
168
|
}
|
|
183
169
|
|
|
184
170
|
// the first edge each node has: fixed for the life of the seed, which is all
|
|
@@ -232,22 +218,6 @@ export function cloth_hinge_inertia(weight, hinge) {
|
|
|
232
218
|
return sum > 0 ? CLOTH_PARTICLE_MASS / sum : 0;
|
|
233
219
|
}
|
|
234
220
|
|
|
235
|
-
/**
|
|
236
|
-
* Distance between two nodes of the rest pose.
|
|
237
|
-
* @param {Float32Array} rest
|
|
238
|
-
* @param {number} a
|
|
239
|
-
* @param {number} b
|
|
240
|
-
* @returns {number}
|
|
241
|
-
* @private
|
|
242
|
-
*/
|
|
243
|
-
function rest_distance(rest, a, b) {
|
|
244
|
-
return Math.hypot(
|
|
245
|
-
rest[b * 3] - rest[a * 3],
|
|
246
|
-
rest[b * 3 + 1] - rest[a * 3 + 1],
|
|
247
|
-
rest[b * 3 + 2] - rest[a * 3 + 2]
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
221
|
/**
|
|
252
222
|
* Rows and the `ClothState` itself, from a seeded rest pose and the graph over
|
|
253
223
|
* it.
|
|
@@ -300,7 +270,7 @@ export function cloth_build_rows(instance, dt) {
|
|
|
300
270
|
const a = edge[e * 2];
|
|
301
271
|
const b = edge[e * 2 + 1];
|
|
302
272
|
|
|
303
|
-
const length =
|
|
273
|
+
const length = v3_distance_array(rest, a * 3, rest, b * 3);
|
|
304
274
|
|
|
305
275
|
edge_length[e] = length;
|
|
306
276
|
|
|
@@ -347,7 +317,7 @@ export function cloth_build_rows(instance, dt) {
|
|
|
347
317
|
// Soft, bilateral: the bending model. Its rest length is read from
|
|
348
318
|
// the authored pose, so a chain authored with a curve holds it.
|
|
349
319
|
stretch_particle.push(a, b);
|
|
350
|
-
stretch_rest.push(
|
|
320
|
+
stretch_rest.push(v3_distance_array(rest, a * 3, rest, b * 3));
|
|
351
321
|
stretch_stiffness.push(bend_stiffness);
|
|
352
322
|
stretch_force_min.push(-Infinity);
|
|
353
323
|
stretch_force_max.push(Infinity);
|
|
@@ -452,9 +422,7 @@ export function cloth_build_rows(instance, dt) {
|
|
|
452
422
|
|
|
453
423
|
const particle_of_node = new Int32Array(node_count);
|
|
454
424
|
|
|
455
|
-
|
|
456
|
-
particle_of_node[state.source_of_particle[particle]] = particle;
|
|
457
|
-
}
|
|
425
|
+
cloth_particle_of_source(particle_of_node, state.source_of_particle, node_count);
|
|
458
426
|
|
|
459
427
|
// Everything derived from the rows, derived again — and from the bind pose,
|
|
460
428
|
// which is what `closest_free_pair` has to be measured in: the answer is a
|
|
@@ -490,15 +458,6 @@ export function cloth_build_rows(instance, dt) {
|
|
|
490
458
|
instance.seeded = true;
|
|
491
459
|
}
|
|
492
460
|
|
|
493
|
-
/**
|
|
494
|
-
* @param {number} v
|
|
495
|
-
* @returns {number}
|
|
496
|
-
* @private
|
|
497
|
-
*/
|
|
498
|
-
function clamp01(v) {
|
|
499
|
-
return v < 0 ? 0 : (v > 1 ? 1 : v);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
461
|
/**
|
|
503
462
|
* Re-parameterise the rows of an already-seeded cloth from its current
|
|
504
463
|
* {@link ClothDynamics}, without walking the subtree again.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_dynamics_map.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_dynamics_map.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloth_dynamics_map.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_dynamics_map.js"],"names":[],"mappings":"AAuQA;;;;;;;;GAQG;AACH,gDAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;;GAQG;AACH,uCAHW,MAAM,GACJ,MAAM,CAUlB;AAED;;;;;;;;;;;GAWG;AACH,mDAPW,MAAM,YAEN,MAAM,cACN,MAAM,MACN,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,0CAJW,MAAM,MACN,MAAM,GACJ,MAAM,CAYlB;AAED;;;;;;;;GAQG;AACH,kDAJW,MAAM,MACN,MAAM,GACJ,MAAM,CAQlB;AA7WD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;GAKG;AACH,+BAFU,MAAM,CAEqB;AAErC;;;;;GAKG;AACH,+BAFU,MAAM,CAEqB;AAErC;;;;;;;;;;;GAWG;AACH,mCAFU,MAAM,CAEsB;AAEtC;;;;;GAKG;AACH,mCAFU,MAAM,CAEyB;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,+CAFU,MAAM,CAEkC;AAElD;;;;;;;;GAQG;AACH,iCAFU,MAAM,CAEqB;AAErC;;;;;;;;;;;;;;GAcG;AACH,uCAFU,MAAM,CAE4B;AAE5C;;;;;;;;GAQG;AACH,yCAFU,MAAM,CAE8B;AAE9C;;;;;;;;;GASG;AACH,mCAFU,MAAM,CAEsB;AAEtC;;;;;;;;GAQG;AACH,mCAFU,MAAM,CAEsB;AAEtC;;;;;;;GAOG;AACH,oCAFU,MAAM,CAEwB;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,kCAFU,MAAM,CAEsB;AAEtC;;;;;;;GAOG;AACH,sCAFU,MAAM,CAE4B;AAE5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CAFU,MAAM,CAEmC;AAEnD;;;;;GAKG;AACH,gCAFU,MAAM,CAEoB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* # Normalised coordinates → row parameters
|
|
3
5
|
*
|
|
@@ -269,9 +271,7 @@ export const CLOTH_SLEEP_STEPS = 30;
|
|
|
269
271
|
* @returns {number} strain, `L_max = L₀·(1 + ε)`
|
|
270
272
|
*/
|
|
271
273
|
export function cloth_strain_allowance(stretch) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
return CLOTH_STRAIN_MAX * Math.pow(CLOTH_STRAIN_MIN / CLOTH_STRAIN_MAX, t);
|
|
274
|
+
return CLOTH_STRAIN_MAX * Math.pow(CLOTH_STRAIN_MIN / CLOTH_STRAIN_MAX, clamp01(stretch));
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_gather_colliders.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_gather_colliders.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloth_gather_colliders.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/ecs/cloth_gather_colliders.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qFAHW,MAAM,GACJ,MAAM,CAsBlB;AA2HD;;;;;;GAMG;AACH,kGAHW,MAAM,GACJ,MAAM,CAmBlB;AA2ED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,2FAFa,OAAO,CAkBnB;AAED;;;;;;;;GAQG;AACH,yEAHW,MAAM,GACJ,IAAI,CAgBhB"}
|