@woosh/meep-engine 3.44.0 → 3.45.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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/particles/optimizer/dag/particle_vector_extract.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.js +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloth_worst_tether_ratio.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/solver/cloth_worst_tether_ratio.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,mDATW,YAAY,GAAC,YAAY,oBACzB,UAAU,GAAC,WAAW,GAAC,MAAM,EAAE,YAC/B,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,cAClC,MAAM,GACJ,MAAM,CA6BlB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { v3_length } from "../../../../core/geom/vec3/v3_length.js";
|
|
2
|
+
import { max2_exact } from "../../../../core/math/max2_exact.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* How far the cloth has stretched away from its root, as the worst ratio over
|
|
6
|
+
* nodes of straight-line distance from node 0 to the fabric between them:
|
|
7
|
+
* `max ‖x_node − x_0‖ / d_geo(node)` over nodes `1 .. node_count − 1` — §7 P2's
|
|
8
|
+
* measure. At most 1 for a cloth that has not over-stretched anywhere, since no
|
|
9
|
+
* straight line is longer than the fabric it spans; `1.05` is a node five
|
|
10
|
+
* percent further out than the cloth reaches.
|
|
11
|
+
*
|
|
12
|
+
* Everything is measured from node 0, the root of the seeder's tree, which is
|
|
13
|
+
* where the rigs this was written for are held. A cloth held in several places
|
|
14
|
+
* wants each node measured from its own hold instead, and this is not that
|
|
15
|
+
* measure.
|
|
16
|
+
*
|
|
17
|
+
* A node at a NaN position reads NaN and so does the answer, whatever the other
|
|
18
|
+
* nodes say, so a broken state cannot pass for a well-behaved one.
|
|
19
|
+
*
|
|
20
|
+
* Takes the arrays rather than a `ClothInstance` so the solver side does not
|
|
21
|
+
* depend on the ECS one.
|
|
22
|
+
*
|
|
23
|
+
* @param {Float32Array|Float64Array} position 3 per particle
|
|
24
|
+
* @param {Int32Array|Uint32Array|number[]} particle_of_node particle index per node
|
|
25
|
+
* @param {Float32Array|Float64Array|number[]} geodesic fabric distance from node 0 per node, metres
|
|
26
|
+
* @param {number} node_count
|
|
27
|
+
* @returns {number} dimensionless; 0 for a cloth of fewer than two nodes
|
|
28
|
+
*
|
|
29
|
+
* @author Alex Goldring
|
|
30
|
+
* @copyright Company Named Limited (c) 2026
|
|
31
|
+
*/
|
|
32
|
+
export function cloth_worst_tether_ratio(position, particle_of_node, geodesic, node_count) {
|
|
33
|
+
const root = particle_of_node[0] * 3;
|
|
34
|
+
|
|
35
|
+
const root_x = position[root];
|
|
36
|
+
const root_y = position[root + 1];
|
|
37
|
+
const root_z = position[root + 2];
|
|
38
|
+
|
|
39
|
+
let worst = 0;
|
|
40
|
+
|
|
41
|
+
for (let node = 1; node < node_count; node++) {
|
|
42
|
+
const p = particle_of_node[node] * 3;
|
|
43
|
+
|
|
44
|
+
const distance = v3_length(
|
|
45
|
+
position[p] - root_x,
|
|
46
|
+
position[p + 1] - root_y,
|
|
47
|
+
position[p + 2] - root_z
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const ratio = distance / geodesic[node];
|
|
51
|
+
|
|
52
|
+
worst = max2_exact(worst, ratio);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return worst;
|
|
56
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_contact_row.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/physics/cloth/solver/constraint/cloth_contact_row.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloth_contact_row.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/physics/cloth/solver/constraint/cloth_contact_row.js"],"names":[],"mappings":"AAwHA;;;;;;;;GAQG;AACH,sDANW,YAAY,+BAEZ,MAAM,SACN,YAAY,GAAC,YAAY,QA+LnC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,mEANW,MAAM,SACN,MAAM,eACN,MAAM,eACN,MAAM,qBACN,MAAM,QA8ChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,oEALW,YAAY,GAAC,YAAY,QACzB,MAAM,eACN,MAAM,qBACN,MAAM,QAqGhB;AAxdD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;;;GAKG;AACH,qCAFU,MAAM,CAE2B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { clamp } from "../../../../../core/math/clamp.js";
|
|
1
2
|
import {
|
|
2
3
|
CCR_FEATURE,
|
|
3
4
|
CCR_FRICTION,
|
|
@@ -373,8 +374,8 @@ export function cloth_contact_warm_start(state, alpha, gamma, k_min_ratio, k_max
|
|
|
373
374
|
lambda[slot] *= decay;
|
|
374
375
|
friction_lambda[slot] *= decay;
|
|
375
376
|
|
|
376
|
-
penalty[slot] =
|
|
377
|
-
friction_penalty[slot] =
|
|
377
|
+
penalty[slot] = clamp(penalty[slot] * gamma, lo, hi);
|
|
378
|
+
friction_penalty[slot] = clamp(friction_penalty[slot] * gamma, lo, hi);
|
|
378
379
|
}
|
|
379
380
|
}
|
|
380
381
|
}
|
|
@@ -496,21 +497,6 @@ export function cloth_contact_dual_update(state, table, beta, k_max_ratio, inver
|
|
|
496
497
|
}
|
|
497
498
|
}
|
|
498
499
|
|
|
499
|
-
/**
|
|
500
|
-
* @param {number} value
|
|
501
|
-
* @param {number} lo
|
|
502
|
-
* @param {number} hi
|
|
503
|
-
* @returns {number}
|
|
504
|
-
* @private
|
|
505
|
-
*/
|
|
506
|
-
function clamp_band(value, lo, hi) {
|
|
507
|
-
if (value < lo) {
|
|
508
|
-
return lo;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
return value > hi ? hi : value;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
500
|
/**
|
|
515
501
|
* @type {Float64Array}
|
|
516
502
|
* @private
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* callers (vegetation sway, dust drift) interpret the field as a direction ×
|
|
22
22
|
* magnitude wind". Cloth's drag row is a relaxation toward a **velocity**, so
|
|
23
23
|
* the same wind voxelised at 0.25 m instead of 1 m would blow a garment four
|
|
24
|
-
* times as hard. The multiply by `cell_size` is
|
|
24
|
+
* times as hard. The multiply by `cell_size` is
|
|
25
|
+
* {@link fluid_sample_velocity_world_mps}'s. `MEASUREMENTS.md` §45.
|
|
25
26
|
* - **Unbuilt fields read as null.** A `FluidComponent` exists from the moment
|
|
26
27
|
* the entity is spawned and its field's buffers arrive at `build()`. Sampling
|
|
27
28
|
* before that is a null dereference rather than a zero, so an unbuilt field is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClothFluidWind.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/wind/ClothFluidWind.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClothFluidWind.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/wind/ClothFluidWind.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH;IAEI;;;;OAIG;IACH,SAFU,gBAAgB,CAEO;IAEjC;;;;OAIG;IACH,qBAAkB;IAElB;;;OAGG;IACH,iBAAc;IAEd;;;OAGG;IACH,gBAAY;CA6Gf;kCA/LiC,wBAAwB;iCACzB,uBAAuB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FluidComponent } from "../../fluid/ecs/FluidComponent.js";
|
|
2
|
+
import { fluid_sample_domain_bounds } from "../../fluid/ecs/fluid_sample_domain_bounds.js";
|
|
3
|
+
import { fluid_sample_velocity_world_mps } from "../../fluid/ecs/fluid_sample_velocity_world_mps.js";
|
|
2
4
|
import { AbstractClothWind } from "./AbstractClothWind.js";
|
|
3
5
|
import { ClothAmbientWind } from "./ClothAmbientWind.js";
|
|
4
6
|
|
|
@@ -25,7 +27,8 @@ import { ClothAmbientWind } from "./ClothAmbientWind.js";
|
|
|
25
27
|
* callers (vegetation sway, dust drift) interpret the field as a direction ×
|
|
26
28
|
* magnitude wind". Cloth's drag row is a relaxation toward a **velocity**, so
|
|
27
29
|
* the same wind voxelised at 0.25 m instead of 1 m would blow a garment four
|
|
28
|
-
* times as hard. The multiply by `cell_size` is
|
|
30
|
+
* times as hard. The multiply by `cell_size` is
|
|
31
|
+
* {@link fluid_sample_velocity_world_mps}'s. `MEASUREMENTS.md` §45.
|
|
29
32
|
* - **Unbuilt fields read as null.** A `FluidComponent` exists from the moment
|
|
30
33
|
* the entity is spawned and its field's buffers arrive at `build()`. Sampling
|
|
31
34
|
* before that is a null dereference rather than a zero, so an unbuilt field is
|
|
@@ -109,20 +112,7 @@ export class ClothFluidWind extends AbstractClothWind {
|
|
|
109
112
|
return;
|
|
110
113
|
}
|
|
111
114
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const cell_size = component.cell_size;
|
|
115
|
-
|
|
116
|
-
const origin = component.origin;
|
|
117
|
-
|
|
118
|
-
const b = count * 6;
|
|
119
|
-
|
|
120
|
-
bounds[b] = origin[0];
|
|
121
|
-
bounds[b + 1] = origin[1];
|
|
122
|
-
bounds[b + 2] = origin[2];
|
|
123
|
-
bounds[b + 3] = origin[0] + resolution[0] * cell_size;
|
|
124
|
-
bounds[b + 4] = origin[1] + resolution[1] * cell_size;
|
|
125
|
-
bounds[b + 5] = origin[2] + resolution[2] * cell_size;
|
|
115
|
+
fluid_sample_domain_bounds(bounds, count * 6, component);
|
|
126
116
|
|
|
127
117
|
components[count] = component;
|
|
128
118
|
|
|
@@ -194,16 +184,8 @@ export class ClothFluidWind extends AbstractClothWind {
|
|
|
194
184
|
continue;
|
|
195
185
|
}
|
|
196
186
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
component.sampleVelocityAtWorld(out, x, y, z);
|
|
200
|
-
|
|
201
|
-
// Cells per second to metres per second. See the header.
|
|
202
|
-
const cell_size = component.cell_size;
|
|
203
|
-
|
|
204
|
-
out[0] *= cell_size;
|
|
205
|
-
out[1] *= cell_size;
|
|
206
|
-
out[2] *= cell_size;
|
|
187
|
+
// In metres per second, not the field's cells per second. See the header.
|
|
188
|
+
fluid_sample_velocity_world_mps(out, 0, this.__components[i], x, y, z);
|
|
207
189
|
|
|
208
190
|
return out;
|
|
209
191
|
}
|
|
@@ -92,10 +92,12 @@ export function cloth_air_changed(state: ClothState, wind: AbstractClothWind, fr
|
|
|
92
92
|
* The cloth's world-space axis-aligned bounds.
|
|
93
93
|
*
|
|
94
94
|
* The particles are local, so this is the bounds of the **rotated** local box
|
|
95
|
-
* rather than the rotation of its bounds — the same
|
|
95
|
+
* rather than the rotation of its bounds — the same argument
|
|
96
96
|
* `cloth_gather_colliders` makes for its own query volume, and the same reason:
|
|
97
97
|
* a rotated box is not a box.
|
|
98
98
|
*
|
|
99
|
+
* A cloth with no particles has the empty box, `+∞` below and `−∞` above.
|
|
100
|
+
*
|
|
99
101
|
* @param {ClothState} state
|
|
100
102
|
* @param {Float64Array} frame_translation
|
|
101
103
|
* @param {Float64Array} frame_rotation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloth_sample_air.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/wind/cloth_sample_air.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloth_sample_air.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/cloth/wind/cloth_sample_air.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;;GAaG;AACH,gGARW,YAAY,kBACZ,YAAY,WACZ,YAAY,SAEZ,MAAM,GAEJ,OAAO,CA8EnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,iGATW,YAAY,kBACZ,YAAY,YACZ,YAAY,aACZ,MAAM,QACN,MAAM,GAGJ,OAAO,CAsBnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,uEALW,YAAY,kBACZ,YAAY,OACZ,YAAY,GACV,IAAI,CA4BhB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { aabb3_from_v3_array } from "../../../../core/geom/3d/aabb/aabb3_from_v3_array.js";
|
|
2
|
+
import { aabb3_transform_oriented_array } from "../../../../core/geom/3d/aabb/aabb3_transform_oriented.js";
|
|
1
3
|
import { v3_quaternion_apply } from "../../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
2
4
|
import { v3_quaternion_apply_inverse } from "../../../../core/geom/vec3/v3_quaternion_apply_inverse.js";
|
|
3
5
|
|
|
@@ -194,10 +196,12 @@ export function cloth_air_changed(state, wind, frame_translation, frame_rotation
|
|
|
194
196
|
* The cloth's world-space axis-aligned bounds.
|
|
195
197
|
*
|
|
196
198
|
* The particles are local, so this is the bounds of the **rotated** local box
|
|
197
|
-
* rather than the rotation of its bounds — the same
|
|
199
|
+
* rather than the rotation of its bounds — the same argument
|
|
198
200
|
* `cloth_gather_colliders` makes for its own query volume, and the same reason:
|
|
199
201
|
* a rotated box is not a box.
|
|
200
202
|
*
|
|
203
|
+
* A cloth with no particles has the empty box, `+∞` below and `−∞` above.
|
|
204
|
+
*
|
|
201
205
|
* @param {ClothState} state
|
|
202
206
|
* @param {Float64Array} frame_translation
|
|
203
207
|
* @param {Float64Array} frame_rotation
|
|
@@ -205,71 +209,31 @@ export function cloth_air_changed(state, wind, frame_translation, frame_rotation
|
|
|
205
209
|
* @returns {void}
|
|
206
210
|
*/
|
|
207
211
|
export function cloth_air_bounds(state, frame_translation, frame_rotation, out) {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
for (let i = 0; i < particle_count; i++) {
|
|
220
|
-
const p = i * 3;
|
|
221
|
-
|
|
222
|
-
const x = position[p];
|
|
223
|
-
const y = position[p + 1];
|
|
224
|
-
const z = position[p + 2];
|
|
225
|
-
|
|
226
|
-
if (x < min_x) { min_x = x; }
|
|
227
|
-
if (y < min_y) { min_y = y; }
|
|
228
|
-
if (z < min_z) { min_z = z; }
|
|
229
|
-
if (x > max_x) { max_x = x; }
|
|
230
|
-
if (y > max_y) { max_y = y; }
|
|
231
|
-
if (z > max_z) { max_z = z; }
|
|
212
|
+
if (state.particle_count === 0) {
|
|
213
|
+
// Rotating the empty box would subtract infinities and read NaN.
|
|
214
|
+
out[0] = Infinity;
|
|
215
|
+
out[1] = Infinity;
|
|
216
|
+
out[2] = Infinity;
|
|
217
|
+
out[3] = -Infinity;
|
|
218
|
+
out[4] = -Infinity;
|
|
219
|
+
out[5] = -Infinity;
|
|
220
|
+
|
|
221
|
+
return;
|
|
232
222
|
}
|
|
233
223
|
|
|
234
|
-
|
|
235
|
-
const qy = frame_rotation[1];
|
|
236
|
-
const qz = frame_rotation[2];
|
|
237
|
-
const qw = frame_rotation[3];
|
|
224
|
+
aabb3_from_v3_array(LOCAL_BOX, state.position, state.particle_count * 3);
|
|
238
225
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
WORLD, 0,
|
|
249
|
-
(corner & 1) === 0 ? min_x : max_x,
|
|
250
|
-
(corner & 2) === 0 ? min_y : max_y,
|
|
251
|
-
(corner & 4) === 0 ? min_z : max_z,
|
|
252
|
-
qx, qy, qz, qw
|
|
253
|
-
);
|
|
254
|
-
|
|
255
|
-
const x = WORLD[0] + frame_translation[0];
|
|
256
|
-
const y = WORLD[1] + frame_translation[1];
|
|
257
|
-
const z = WORLD[2] + frame_translation[2];
|
|
258
|
-
|
|
259
|
-
if (x < world_min_x) { world_min_x = x; }
|
|
260
|
-
if (y < world_min_y) { world_min_y = y; }
|
|
261
|
-
if (z < world_min_z) { world_min_z = z; }
|
|
262
|
-
if (x > world_max_x) { world_max_x = x; }
|
|
263
|
-
if (y > world_max_y) { world_max_y = y; }
|
|
264
|
-
if (z > world_max_z) { world_max_z = z; }
|
|
265
|
-
}
|
|
226
|
+
// The frame pose as the seven contiguous numbers the transform reads,
|
|
227
|
+
// translation then rotation.
|
|
228
|
+
FRAME_POSE[0] = frame_translation[0];
|
|
229
|
+
FRAME_POSE[1] = frame_translation[1];
|
|
230
|
+
FRAME_POSE[2] = frame_translation[2];
|
|
231
|
+
FRAME_POSE[3] = frame_rotation[0];
|
|
232
|
+
FRAME_POSE[4] = frame_rotation[1];
|
|
233
|
+
FRAME_POSE[5] = frame_rotation[2];
|
|
234
|
+
FRAME_POSE[6] = frame_rotation[3];
|
|
266
235
|
|
|
267
|
-
out
|
|
268
|
-
out[1] = world_min_y;
|
|
269
|
-
out[2] = world_min_z;
|
|
270
|
-
out[3] = world_max_x;
|
|
271
|
-
out[4] = world_max_y;
|
|
272
|
-
out[5] = world_max_z;
|
|
236
|
+
aabb3_transform_oriented_array(out, 0, LOCAL_BOX, 0, FRAME_POSE, 0);
|
|
273
237
|
}
|
|
274
238
|
|
|
275
239
|
/**
|
|
@@ -278,6 +242,20 @@ export function cloth_air_bounds(state, frame_translation, frame_rotation, out)
|
|
|
278
242
|
*/
|
|
279
243
|
const BOUNDS = new Float64Array(6);
|
|
280
244
|
|
|
245
|
+
/**
|
|
246
|
+
* The cloth's particle bounds in its local frame.
|
|
247
|
+
* @type {Float64Array}
|
|
248
|
+
* @private
|
|
249
|
+
*/
|
|
250
|
+
const LOCAL_BOX = new Float64Array(6);
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The cloth's frame pose, `[px, py, pz, qx, qy, qz, qw]`, for {@link aabb3_transform_oriented_array}.
|
|
254
|
+
* @type {Float64Array}
|
|
255
|
+
* @private
|
|
256
|
+
*/
|
|
257
|
+
const FRAME_POSE = new Float64Array(7);
|
|
258
|
+
|
|
281
259
|
/**
|
|
282
260
|
* @type {Float64Array}
|
|
283
261
|
* @private
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactProbeSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/ecs/ContactProbeSystem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContactProbeSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/ecs/ContactProbeSystem.js"],"names":[],"mappings":"AAsEA;;;;;;;;;;;;;GAaG;AACH;;IAEI,mEAAmD;IAEnD,2bASE;IAyCF;;;;OAIG;IACH,YAJW,YAAY,cACZ,mBAAmB,UACnB,MAAM,QAUhB;IAED;;;;OAIG;IACH,cAJW,YAAY,cACZ,mBAAmB,UACnB,MAAM,QAWhB;IAED,sCA2BC;;CAiKJ;uBA1VsB,qBAAqB;oCAER,uDAAuD;6BAY9D,mBAAmB;4BALzC,oCAAoC;4CAdC,oDAAoD;yBAkBvE,eAAe;yCAHC,uDAAuD;0BAdtE,kCAAkC;kCAC1B,oCAAoC;6BACzC,kCAAkC"}
|
|
@@ -8,6 +8,7 @@ import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessS
|
|
|
8
8
|
import { Animation } from "../../ecs/animation/Animation.js";
|
|
9
9
|
import { GPUStateAuthority } from "../../ecs/gpu/GPUStateAuthority.js";
|
|
10
10
|
import { ParentEntity } from "../../ecs/parent/ParentEntity.js";
|
|
11
|
+
import { parent_entity_model_of } from "../../ecs/parent/parent_entity_model_of.js";
|
|
11
12
|
import { System } from "../../ecs/System.js";
|
|
12
13
|
import { TRANSFORM_ATTACHMENT_EVENT_CHANGE } from "../../ecs/transform-attachment/TRANSFORM_ATTACHMENT_EVENT_CHANGE.js";
|
|
13
14
|
import { TransformAttachment } from "../../ecs/transform-attachment/TransformAttachment.js";
|
|
@@ -327,7 +328,7 @@ export class ContactProbeSystem extends System {
|
|
|
327
328
|
#world_of(result, entity) {
|
|
328
329
|
const dataset = this.entityManager.dataset;
|
|
329
330
|
|
|
330
|
-
const model =
|
|
331
|
+
const model = parent_entity_model_of(dataset, entity);
|
|
331
332
|
|
|
332
333
|
let cache = this.#caches.get(model);
|
|
333
334
|
|
|
@@ -356,23 +357,6 @@ export class ContactProbeSystem extends System {
|
|
|
356
357
|
}
|
|
357
358
|
}
|
|
358
359
|
|
|
359
|
-
/**
|
|
360
|
-
* The entity whose clips drive `entity`: the model its lifetime belongs to, or itself.
|
|
361
|
-
*
|
|
362
|
-
* @param {EntityComponentDataset} dataset
|
|
363
|
-
* @param {number} entity
|
|
364
|
-
* @returns {number}
|
|
365
|
-
*/
|
|
366
|
-
function model_of(dataset, entity) {
|
|
367
|
-
const owner = dataset.getComponent(entity, ParentEntity);
|
|
368
|
-
|
|
369
|
-
if (owner === undefined || owner === null) {
|
|
370
|
-
return entity;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
return owner.entity;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
360
|
/**
|
|
377
361
|
* The top of the lifetime chain an entity belongs to.
|
|
378
362
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhysicsSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/ecs/PhysicsSystem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PhysicsSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/ecs/PhysicsSystem.js"],"names":[],"mappings":"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"}
|
|
@@ -5,18 +5,20 @@ import {
|
|
|
5
5
|
bvh_query_user_data_intersects_aabb
|
|
6
6
|
} from "../../../core/bvh2/bvh3/query/bvh_query_user_data_intersects_aabb.js";
|
|
7
7
|
import { returnTrue } from "../../../core/function/returnTrue.js";
|
|
8
|
+
import { aabb3_array_round_outward_f32 } from "../../../core/geom/3d/aabb/aabb3_array_round_outward_f32.js";
|
|
8
9
|
import {
|
|
9
10
|
aabb3_transform_oriented,
|
|
10
11
|
aabb3_transform_oriented_array
|
|
11
12
|
} from "../../../core/geom/3d/aabb/aabb3_transform_oriented.js";
|
|
12
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
quat3_multiply_conjugate_right_array
|
|
15
|
+
} from "../../../core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.js";
|
|
13
16
|
import Vector3 from "../../../core/geom/Vector3.js";
|
|
14
|
-
import { f32_next_down } from "../../../core/math/f32_next_down.js";
|
|
15
|
-
import { f32_next_up } from "../../../core/math/f32_next_up.js";
|
|
16
17
|
import { ResourceAccessKind } from "../../../core/model/ResourceAccessKind.js";
|
|
17
18
|
import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessSpecification.js";
|
|
18
19
|
import { System } from "../../ecs/System.js";
|
|
19
20
|
import { t64_announce_change } from "../../ecs/transform/t64_announce_change.js";
|
|
21
|
+
import { t64_read_pose_array } from "../../ecs/transform/t64_read_pose_array.js";
|
|
20
22
|
import { TRANSFORM64_EVENT_PLACED } from "../../ecs/transform/TRANSFORM64_EVENT_PLACED.js";
|
|
21
23
|
import {
|
|
22
24
|
Transform64,
|
|
@@ -134,13 +136,6 @@ const TARGET_POSE_STRIDE = 8;
|
|
|
134
136
|
*/
|
|
135
137
|
const scratch_target_dq = new Float64Array(4);
|
|
136
138
|
|
|
137
|
-
/**
|
|
138
|
-
* Scratch for {@link PhysicsSystem#__derive_target_velocities}: the conjugate of the body's current
|
|
139
|
-
* orientation, `[x, y, z, w]`, the second operand of that rotation.
|
|
140
|
-
* @type {Float64Array}
|
|
141
|
-
*/
|
|
142
|
-
const scratch_target_conjugate = new Float64Array(4);
|
|
143
|
-
|
|
144
139
|
/**
|
|
145
140
|
* What {@link PhysicsSystem#collidersOf} answers for a body that has none: one shared, frozen
|
|
146
141
|
* empty list.
|
|
@@ -154,31 +149,6 @@ const NO_COLLIDERS = Object.freeze([]);
|
|
|
154
149
|
*/
|
|
155
150
|
let interpolation_log_deprecation_warned = false;
|
|
156
151
|
|
|
157
|
-
/**
|
|
158
|
-
* Round a world box outward to float32, in place: each lower bound down and each upper bound up
|
|
159
|
-
* to a float32 value, so the box keeps containing what it bounded once the broadphase stores it.
|
|
160
|
-
*
|
|
161
|
-
* The BVHs store float32, and a plain write rounds to the NEAREST float32 — inward on any side
|
|
162
|
-
* that rounds that way, by up to half a float32 step: 3 cm at 1e6 m. A static leaf is its body's
|
|
163
|
-
* tight box, so a query reaching the body through its leaf missed whatever of the body lay
|
|
164
|
-
* outside it. A ray dropped onto a 2 mm plate 1e6 m out missed it; so did rays a millimetre inside
|
|
165
|
-
* a 1 m crate's faces 1e5 m out. The refit skip in stage 2 also leans on it: a stationary body's
|
|
166
|
-
* box is contained by its own stored leaf only if that leaf did not shrink.
|
|
167
|
-
*
|
|
168
|
-
* @param {Float64Array} aabb `[x0, y0, z0, x1, y1, z1]`
|
|
169
|
-
*/
|
|
170
|
-
function aabb3_round_outward_f32(aabb) {
|
|
171
|
-
for (let i = 0; i < 3; i++) {
|
|
172
|
-
const lower = aabb[i];
|
|
173
|
-
const lower_f32 = Math.fround(lower);
|
|
174
|
-
aabb[i] = lower_f32 > lower ? f32_next_down(lower_f32) : lower_f32;
|
|
175
|
-
|
|
176
|
-
const upper = aabb[i + 3];
|
|
177
|
-
const upper_f32 = Math.fround(upper);
|
|
178
|
-
aabb[i + 3] = upper_f32 < upper ? f32_next_up(upper_f32) : upper_f32;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
152
|
/**
|
|
183
153
|
* Rigid-body physics system.
|
|
184
154
|
*
|
|
@@ -815,7 +785,7 @@ export class PhysicsSystem extends System {
|
|
|
815
785
|
transform.rotation_x, transform.rotation_y, transform.rotation_z, transform.rotation_w
|
|
816
786
|
);
|
|
817
787
|
|
|
818
|
-
|
|
788
|
+
aabb3_array_round_outward_f32(scratch_world_aabb, 0, scratch_world_aabb, 0);
|
|
819
789
|
|
|
820
790
|
const bvh = rb.kind === BodyKind.Static ? this.staticBvh : this.dynamicBvh;
|
|
821
791
|
const node = bvh.allocate_node();
|
|
@@ -1693,12 +1663,7 @@ export class PhysicsSystem extends System {
|
|
|
1693
1663
|
// the one a world angular velocity integrates (dq/dt = ½ ω ⊗ q). Its axis × angle over
|
|
1694
1664
|
// dt is the angular velocity; the shorter of the two arcs a quaternion pair describes.
|
|
1695
1665
|
// Both operands go in as arrays, the target straight from its slot.
|
|
1696
|
-
|
|
1697
|
-
scratch_target_conjugate[1] = -tr[TRANSFORM64_ROTATION_OFFSET + 1];
|
|
1698
|
-
scratch_target_conjugate[2] = -tr[TRANSFORM64_ROTATION_OFFSET + 2];
|
|
1699
|
-
scratch_target_conjugate[3] = tr[TRANSFORM64_ROTATION_OFFSET + 3];
|
|
1700
|
-
|
|
1701
|
-
quat3_multiply_array(scratch_target_dq, 0, poses, base + 4, scratch_target_conjugate, 0);
|
|
1666
|
+
quat3_multiply_conjugate_right_array(scratch_target_dq, 0, poses, base + 4, tr, TRANSFORM64_ROTATION_OFFSET);
|
|
1702
1667
|
|
|
1703
1668
|
let dx = scratch_target_dq[0];
|
|
1704
1669
|
let dy = scratch_target_dq[1];
|
|
@@ -2544,13 +2509,7 @@ export class PhysicsSystem extends System {
|
|
|
2544
2509
|
// their accessors, which this step does not inline either and which return their
|
|
2545
2510
|
// numbers boxed.
|
|
2546
2511
|
const pose = scratch_refit_pose;
|
|
2547
|
-
pose
|
|
2548
|
-
pose[1] = collider_transform[TRANSFORM64_TRANSLATION_OFFSET + 1];
|
|
2549
|
-
pose[2] = collider_transform[TRANSFORM64_TRANSLATION_OFFSET + 2];
|
|
2550
|
-
pose[3] = collider_transform[TRANSFORM64_ROTATION_OFFSET];
|
|
2551
|
-
pose[4] = collider_transform[TRANSFORM64_ROTATION_OFFSET + 1];
|
|
2552
|
-
pose[5] = collider_transform[TRANSFORM64_ROTATION_OFFSET + 2];
|
|
2553
|
-
pose[6] = collider_transform[TRANSFORM64_ROTATION_OFFSET + 3];
|
|
2512
|
+
t64_read_pose_array(pose, 0, collider_transform);
|
|
2554
2513
|
|
|
2555
2514
|
aabb3_transform_oriented_array(scratch_world_aabb, 0, scratch_local_aabb, 0, pose, 0);
|
|
2556
2515
|
|
|
@@ -2600,7 +2559,7 @@ export class PhysicsSystem extends System {
|
|
|
2600
2559
|
// Outward, so the stored leaf still contains this fat box: the
|
|
2601
2560
|
// next step's skip test is then exact for a body that has not
|
|
2602
2561
|
// moved, as well as conservative for every query in between.
|
|
2603
|
-
|
|
2562
|
+
aabb3_array_round_outward_f32(scratch_world_aabb, 0, scratch_world_aabb, 0);
|
|
2604
2563
|
this.dynamicBvh.node_move_aabb(node, scratch_world_aabb);
|
|
2605
2564
|
}
|
|
2606
2565
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The world-space box a {@link FluidComponent}'s cells occupy, written as `[min_x, min_y, min_z, max_x,
|
|
3
|
+
* max_y, max_z]` into `out` at `out_offset`.
|
|
4
|
+
*
|
|
5
|
+
* Inside it, each velocity component is read from the simulation along its own axis; across the other
|
|
6
|
+
* two, and for the scalars, the outer half-cell shell already reads the clamped edge cell, since those
|
|
7
|
+
* live at the cell centres. The box is the cells, not the region free of clamping.
|
|
8
|
+
*
|
|
9
|
+
* `origin` is cell `(0,0,0)`'s CENTRE, so the cells run from `origin - cell_size/2` to
|
|
10
|
+
* `origin + (res - 1/2)·cell_size` on each axis. A point outside this box still gets an answer from
|
|
11
|
+
* {@link fluid_sample_velocity_world_mps} - the nearest edge's - and a consumer deciding whether a point
|
|
12
|
+
* is in the field or out in the world beyond it asks this box.
|
|
13
|
+
*
|
|
14
|
+
* Not {@link FluidComponent#getBoundingBox}: that box is the splat broad phase, deliberately one more
|
|
15
|
+
* cell wider on every side so a sub-cell effector near a face is not dropped. It answers "can a source
|
|
16
|
+
* here write into the field", this answers "does the field describe this point".
|
|
17
|
+
*
|
|
18
|
+
* @param {Float32Array|Float64Array|number[]} out
|
|
19
|
+
* @param {number} out_offset
|
|
20
|
+
* @param {FluidComponent} component
|
|
21
|
+
* @returns {void}
|
|
22
|
+
*/
|
|
23
|
+
export function fluid_sample_domain_bounds(out: Float32Array | Float64Array | number[], out_offset: number, component: FluidComponent): void;
|
|
24
|
+
//# sourceMappingURL=fluid_sample_domain_bounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluid_sample_domain_bounds.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,gDALW,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,cAClC,MAAM,8BAEJ,IAAI,CAqBhB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The world-space box a {@link FluidComponent}'s cells occupy, written as `[min_x, min_y, min_z, max_x,
|
|
3
|
+
* max_y, max_z]` into `out` at `out_offset`.
|
|
4
|
+
*
|
|
5
|
+
* Inside it, each velocity component is read from the simulation along its own axis; across the other
|
|
6
|
+
* two, and for the scalars, the outer half-cell shell already reads the clamped edge cell, since those
|
|
7
|
+
* live at the cell centres. The box is the cells, not the region free of clamping.
|
|
8
|
+
*
|
|
9
|
+
* `origin` is cell `(0,0,0)`'s CENTRE, so the cells run from `origin - cell_size/2` to
|
|
10
|
+
* `origin + (res - 1/2)·cell_size` on each axis. A point outside this box still gets an answer from
|
|
11
|
+
* {@link fluid_sample_velocity_world_mps} - the nearest edge's - and a consumer deciding whether a point
|
|
12
|
+
* is in the field or out in the world beyond it asks this box.
|
|
13
|
+
*
|
|
14
|
+
* Not {@link FluidComponent#getBoundingBox}: that box is the splat broad phase, deliberately one more
|
|
15
|
+
* cell wider on every side so a sub-cell effector near a face is not dropped. It answers "can a source
|
|
16
|
+
* here write into the field", this answers "does the field describe this point".
|
|
17
|
+
*
|
|
18
|
+
* @param {Float32Array|Float64Array|number[]} out
|
|
19
|
+
* @param {number} out_offset
|
|
20
|
+
* @param {FluidComponent} component
|
|
21
|
+
* @returns {void}
|
|
22
|
+
*/
|
|
23
|
+
export function fluid_sample_domain_bounds(out, out_offset, component) {
|
|
24
|
+
const resolution = component.field.getResolution();
|
|
25
|
+
|
|
26
|
+
const cell_size = component.cell_size;
|
|
27
|
+
const half = cell_size * 0.5;
|
|
28
|
+
|
|
29
|
+
const origin = component.origin;
|
|
30
|
+
|
|
31
|
+
const ox = origin[0];
|
|
32
|
+
const oy = origin[1];
|
|
33
|
+
const oz = origin[2];
|
|
34
|
+
|
|
35
|
+
out[out_offset] = ox - half;
|
|
36
|
+
out[out_offset + 1] = oy - half;
|
|
37
|
+
out[out_offset + 2] = oz - half;
|
|
38
|
+
|
|
39
|
+
out[out_offset + 3] = ox + resolution[0] * cell_size - half;
|
|
40
|
+
out[out_offset + 4] = oy + resolution[1] * cell_size - half;
|
|
41
|
+
out[out_offset + 5] = oz + resolution[2] * cell_size - half;
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sample a {@link FluidComponent}'s velocity at a world-space point, in **world units per second**,
|
|
3
|
+
* into `out` at `out_offset`.
|
|
4
|
+
*
|
|
5
|
+
* {@link FluidComponent#sampleVelocityAtWorld} answers in grid cells per second and says so: it
|
|
6
|
+
* leaves the field unscaled for callers that read it as a direction-times-strength wind and want the
|
|
7
|
+
* same strength at any cell size. A caller that treats the answer as a velocity - a drag that relaxes
|
|
8
|
+
* toward it, a particle carried by it - needs it multiplied by `cell_size`, or the same wind voxelised
|
|
9
|
+
* at a quarter of the cell size blows four times as hard. This is that multiply, in one place.
|
|
10
|
+
*
|
|
11
|
+
* The point is clamped to the grid exactly as the field's own sample is; see
|
|
12
|
+
* {@link fluid_sample_domain_bounds} for the box inside which it is not.
|
|
13
|
+
*
|
|
14
|
+
* The field must be built.
|
|
15
|
+
*
|
|
16
|
+
* @param {Float32Array|Float64Array|number[]} out
|
|
17
|
+
* @param {number} out_offset
|
|
18
|
+
* @param {FluidComponent} component
|
|
19
|
+
* @param {number} x world
|
|
20
|
+
* @param {number} y world
|
|
21
|
+
* @param {number} z world
|
|
22
|
+
* @returns {void}
|
|
23
|
+
*/
|
|
24
|
+
export function fluid_sample_velocity_world_mps(out: Float32Array | Float64Array | number[], out_offset: number, component: FluidComponent, x: number, y: number, z: number): void;
|
|
25
|
+
//# sourceMappingURL=fluid_sample_velocity_world_mps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fluid_sample_velocity_world_mps.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qDARW,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,cAClC,MAAM,gCAEN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,IAAI,CAUhB"}
|