@woosh/meep-engine 3.43.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/editor/prototypeEditorShell.d.ts.map +1 -1
- package/editor/prototypeEditorShell.js +4 -2
- 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/Clock.d.ts +15 -0
- package/src/engine/Clock.d.ts.map +1 -1
- package/src/engine/Clock.js +29 -5
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +11 -19
- package/src/engine/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/ecs/mesh-v2/MeshSkin.d.ts +57 -0
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.d.ts.map +1 -0
- package/src/engine/graphics/ecs/mesh-v2/MeshSkin.js +84 -0
- package/src/engine/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 +28 -13
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +107 -64
- package/src/engine/graphics3/AnimationSystem.d.ts +29 -15
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +112 -61
- package/src/engine/graphics3/MeshSkinSystem.d.ts +56 -0
- package/src/engine/graphics3/MeshSkinSystem.d.ts.map +1 -0
- package/src/engine/graphics3/MeshSkinSystem.js +317 -0
- package/src/engine/graphics3/MeshSystem.d.ts +15 -35
- package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
- package/src/engine/graphics3/MeshSystem.js +21 -298
- package/src/engine/graphics3/RowChains.d.ts +76 -0
- package/src/engine/graphics3/RowChains.d.ts.map +1 -0
- package/src/engine/graphics3/RowChains.js +347 -0
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts +6 -0
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics3/ShadedGeometrySystem.js +329 -309
- package/src/engine/graphics3/animation/AnimationClips.d.ts +56 -0
- package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -0
- package/src/engine/graphics3/animation/AnimationClips.js +79 -0
- package/src/engine/graphics3/animation/ClipListPlayer.d.ts +13 -14
- package/src/engine/graphics3/animation/ClipListPlayer.d.ts.map +1 -1
- package/src/engine/graphics3/animation/ClipListPlayer.js +262 -263
- package/src/engine/graphics3/animation/write_clip_playback.d.ts +3 -3
- package/src/engine/graphics3/animation/write_clip_playback.js +4 -4
- package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts +5 -0
- package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
- package/src/engine/graphics3/pose/query_entity_node_world_pose.js +80 -75
- package/src/engine/graphics3/prefab/PrefabInstance.d.ts +4 -24
- package/src/engine/graphics3/prefab/PrefabInstance.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/PrefabInstance.js +60 -80
- package/src/engine/graphics3/prefab/prefab_instantiate.d.ts +16 -3
- package/src/engine/graphics3/prefab/prefab_instantiate.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_instantiate.js +49 -12
- package/src/engine/graphics3/prefab/prefab_place.d.ts +31 -17
- package/src/engine/graphics3/prefab/prefab_place.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_place.js +175 -130
- package/src/engine/graphics3/register_clips.d.ts +93 -0
- package/src/engine/graphics3/register_clips.d.ts.map +1 -0
- package/src/engine/graphics3/register_clips.js +166 -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/MEASUREMENTS.md +795 -0
- package/src/engine/physics/cloth/PLAN.md +349 -17
- package/src/engine/physics/cloth/build/ClothProxy.d.ts +113 -61
- package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/ClothProxy.js +142 -77
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +44 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +107 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +43 -30
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +371 -284
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts +62 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +275 -0
- 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 +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +17 -62
- package/src/engine/physics/cloth/ecs/Cloth.d.ts +17 -9
- package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.js +220 -212
- package/src/engine/physics/cloth/ecs/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/ClothDynamicsFlags.js +6 -0
- package/src/engine/physics/cloth/ecs/ClothHold.d.ts +91 -0
- package/src/engine/physics/cloth/ecs/ClothHold.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothHold.js +103 -0
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +254 -48
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +277 -47
- package/src/engine/physics/cloth/ecs/ClothPin.d.ts +73 -0
- package/src/engine/physics/cloth/ecs/ClothPin.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothPin.js +92 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts +36 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothPinSerializationAdapter.js +61 -0
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts +23 -17
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothRig.js +29 -27
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +12 -14
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +20 -15
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +57 -36
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +754 -207
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +12 -13
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +20 -14
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +63 -11
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +297 -101
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +9 -7
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +12 -10
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +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 +60 -120
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +37 -0
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +135 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts +97 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_holds.js +583 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +2 -2
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +168 -51
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +17 -22
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +55 -117
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -6
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +51 -42
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +5 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +62 -50
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +65 -58
- package/src/engine/physics/cloth/playground/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 +3 -29
- package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/garment_build.js +17 -5
- package/src/engine/physics/cloth/playground/garment_main.js +5 -20
- package/src/engine/physics/cloth/playground/main.js +6 -48
- package/src/engine/physics/cloth/playground/rig_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/rig_build.js +302 -296
- package/src/engine/physics/cloth/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 +45 -7
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +79 -83
- 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 +6 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +9 -3
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts +114 -0
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_hold_line.js +350 -0
- 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 +6 -2
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +19 -68
- 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_solver_constants.d.ts +24 -12
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +24 -12
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +16 -0
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +189 -48
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +1 -0
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +12 -6
- 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/solver/constraint/cloth_leash_row.d.ts +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_leash_row.js +353 -346
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +7 -5
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +7 -5
- package/src/engine/physics/cloth/wind/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 +12 -10
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +60 -82
- 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/FluidObstacleSystem.d.ts +4 -4
- 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/engine/simulation/Ticker.d.ts +13 -0
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +43 -8
- package/src/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/RENDERER_CONTRACT.md +8 -2
- package/src/shade/playground/image_decode_bench/main.js +2 -1
- package/src/shade/playground/mesh_row_ceiling/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_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +11 -19
- package/src/shade/playground/skinned_blas_refit/place_character.d.ts +6 -3
- package/src/shade/playground/skinned_blas_refit/place_character.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/place_character.js +90 -90
- package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/main.js +502 -509
- package/src/shade/playground/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/README.md +129 -109
- package/src/shade/playground/texture_encode/main.d.ts.map +1 -1
- package/src/shade/playground/texture_encode/main.js +1431 -1430
- 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/animation/GPUAnimationManager.d.ts +45 -14
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +316 -64
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +5 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +11 -1
- package/src/shade/renderer/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/BoxGeometry.d.ts +1 -11
- package/src/shade/renderer/geometry/BoxGeometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/BoxGeometry.js +6 -13
- package/src/shade/renderer/geometry/CapsuleGeometry.d.ts +19 -0
- package/src/shade/renderer/geometry/CapsuleGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/CapsuleGeometry.js +24 -0
- package/src/shade/renderer/geometry/ConeGeometry.d.ts +20 -0
- package/src/shade/renderer/geometry/ConeGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/ConeGeometry.js +33 -0
- package/src/shade/renderer/geometry/CylinderGeometry.d.ts +21 -0
- package/src/shade/renderer/geometry/CylinderGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/CylinderGeometry.js +35 -0
- package/src/shade/renderer/geometry/PlaneGeometry.d.ts +17 -0
- package/src/shade/renderer/geometry/PlaneGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/PlaneGeometry.js +22 -0
- package/src/shade/renderer/geometry/TorusGeometry.d.ts +18 -0
- package/src/shade/renderer/geometry/TorusGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/TorusGeometry.js +23 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.d.ts +21 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/UVSphereGeometry.js +34 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts +19 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_capsule_geometry.js +205 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts +21 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_cone_geometry.js +36 -0
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts +1 -1
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/primitives/make_cylinder_geometry.js +44 -9
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts +20 -0
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/primitives/make_uv_sphere_geometry.js +190 -0
- package/src/shade/renderer/geometry/virtual/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/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +7 -2
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +26 -8
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +56 -39
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts +7 -0
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.js +46 -4
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/test_prefix_sum.js +4 -2
- package/src/shade/renderer/gpu_primitive/sort/defs.d.ts +2 -2
- package/src/shade/renderer/gpu_primitive/sort/defs.js +79 -79
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +7 -3
- package/src/shade/renderer/particles/GPUParticleSystem.js +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +4 -3
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +200 -194
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +6 -2
- package/src/shade/renderer/particles/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/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +334 -329
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +7 -2
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +16 -4
- package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +2444 -2345
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.js +312 -310
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts +3 -3
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.js +383 -375
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.js +349 -346
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts +58 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block.js +536 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts +21 -7
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.js +291 -327
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts +25 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode1.js +99 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts +5 -3
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.js +47 -71
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts +10 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_partition_2.js +50 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts +4 -5
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts.map +1 -1
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.js +7 -8
- package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_transport.js +7 -5
- package/src/shade/renderer/water/medium/GPUWaterBodies.d.ts.map +1 -1
- package/src/shade/renderer/water/medium/GPUWaterBodies.js +8 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts +3 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts.map +1 -1
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.js +3 -2
- package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water.js +3 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.js +3 -1
- package/src/shade/renderer/water/surface/graph_water_tessellation.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/graph_water_tessellation.js +11 -4
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +37 -20
- package/src/shade/wgsl/validate_wgsl_source.d.ts.map +1 -1
- package/src/shade/wgsl/validate_wgsl_source.js +74 -3
- package/src/engine/graphics3/register_instance_animation.d.ts +0 -114
- package/src/engine/graphics3/register_instance_animation.d.ts.map +0 -1
- package/src/engine/graphics3/register_instance_animation.js +0 -201
|
@@ -0,0 +1,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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scratch for the field's own answer, in cells per second. Module-level: the
|
|
3
|
+
* sample allocates nothing.
|
|
4
|
+
* @type {Float64Array}
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
const CELLS_PER_SECOND = new Float64Array(3);
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Sample a {@link FluidComponent}'s velocity at a world-space point, in **world units per second**,
|
|
11
|
+
* into `out` at `out_offset`.
|
|
12
|
+
*
|
|
13
|
+
* {@link FluidComponent#sampleVelocityAtWorld} answers in grid cells per second and says so: it
|
|
14
|
+
* leaves the field unscaled for callers that read it as a direction-times-strength wind and want the
|
|
15
|
+
* same strength at any cell size. A caller that treats the answer as a velocity - a drag that relaxes
|
|
16
|
+
* toward it, a particle carried by it - needs it multiplied by `cell_size`, or the same wind voxelised
|
|
17
|
+
* at a quarter of the cell size blows four times as hard. This is that multiply, in one place.
|
|
18
|
+
*
|
|
19
|
+
* The point is clamped to the grid exactly as the field's own sample is; see
|
|
20
|
+
* {@link fluid_sample_domain_bounds} for the box inside which it is not.
|
|
21
|
+
*
|
|
22
|
+
* The field must be built.
|
|
23
|
+
*
|
|
24
|
+
* @param {Float32Array|Float64Array|number[]} out
|
|
25
|
+
* @param {number} out_offset
|
|
26
|
+
* @param {FluidComponent} component
|
|
27
|
+
* @param {number} x world
|
|
28
|
+
* @param {number} y world
|
|
29
|
+
* @param {number} z world
|
|
30
|
+
* @returns {void}
|
|
31
|
+
*/
|
|
32
|
+
export function fluid_sample_velocity_world_mps(out, out_offset, component, x, y, z) {
|
|
33
|
+
component.sampleVelocityAtWorld(CELLS_PER_SECOND, x, y, z);
|
|
34
|
+
|
|
35
|
+
const cell_size = component.cell_size;
|
|
36
|
+
|
|
37
|
+
out[out_offset] = CELLS_PER_SECOND[0] * cell_size;
|
|
38
|
+
out[out_offset + 1] = CELLS_PER_SECOND[1] * cell_size;
|
|
39
|
+
out[out_offset + 2] = CELLS_PER_SECOND[2] * cell_size;
|
|
40
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame_fabrik_solve.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frame_fabrik_solve.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.js"],"names":[],"mappings":"AAmqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,gFAJW,MAAM,aACN,MAAM,GACJ,MAAM,CA4DlB"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { pose3_apply_inverse_point_array } from "../../../../core/geom/3d/pose/pose3_apply_inverse_point_array.js";
|
|
3
|
+
import { pose3_apply_point_array } from "../../../../core/geom/3d/pose/pose3_apply_point_array.js";
|
|
2
4
|
import { quat3_multiply_array } from "../../../../core/geom/3d/quaternion/quat3_multiply.js";
|
|
5
|
+
import {
|
|
6
|
+
quat3_multiply_conjugate_left_array
|
|
7
|
+
} from "../../../../core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.js";
|
|
8
|
+
import {
|
|
9
|
+
quat3_multiply_conjugate_right_array
|
|
10
|
+
} from "../../../../core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.js";
|
|
3
11
|
import { quat3_shortest_arc } from "../../../../core/geom/3d/quaternion/quat3_shortest_arc.js";
|
|
4
12
|
import { swing_twist_clamp_array } from "../../../../core/geom/3d/quaternion/swing_twist_clamp.js";
|
|
5
13
|
import { v3_quaternion_apply_array } from "../../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
@@ -235,14 +243,7 @@ function limit_rotation(problem, i) {
|
|
|
235
243
|
|
|
236
244
|
if (parent < 0) {
|
|
237
245
|
// the parent's fixed frame: R_i = above * L_i, as animated
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
turn[0] = -local[i4];
|
|
241
|
-
turn[1] = -local[i4 + 1];
|
|
242
|
-
turn[2] = -local[i4 + 2];
|
|
243
|
-
turn[3] = local[i4 + 3];
|
|
244
|
-
|
|
245
|
-
quat3_multiply_array(above, 0, problem.base_rotation, i4, turn, 0);
|
|
246
|
+
quat3_multiply_conjugate_right_array(above, 0, problem.base_rotation, i4, problem.base_local_rotation, i4);
|
|
246
247
|
} else {
|
|
247
248
|
const p4 = parent * 4;
|
|
248
249
|
|
|
@@ -253,20 +254,9 @@ function limit_rotation(problem, i) {
|
|
|
253
254
|
}
|
|
254
255
|
|
|
255
256
|
// relative = conj(basis_a) * conj(above) * R_i * basis_b
|
|
256
|
-
|
|
257
|
-
turn[1] = -above[1];
|
|
258
|
-
turn[2] = -above[2];
|
|
259
|
-
turn[3] = above[3];
|
|
260
|
-
|
|
261
|
-
quat3_multiply_array(relative, 0, turn, 0, rotation, i4);
|
|
257
|
+
quat3_multiply_conjugate_left_array(relative, 0, above, 0, rotation, i4);
|
|
262
258
|
quat3_multiply_array(relative, 0, relative, 0, basis_b, i4);
|
|
263
|
-
|
|
264
|
-
turn[0] = -basis_a[i4];
|
|
265
|
-
turn[1] = -basis_a[i4 + 1];
|
|
266
|
-
turn[2] = -basis_a[i4 + 2];
|
|
267
|
-
turn[3] = basis_a[i4 + 3];
|
|
268
|
-
|
|
269
|
-
quat3_multiply_array(relative, 0, turn, 0, relative, 0);
|
|
259
|
+
quat3_multiply_conjugate_left_array(relative, 0, basis_a, i4, relative, 0);
|
|
270
260
|
|
|
271
261
|
if (!swing_twist_clamp_array(relative, 0, relative, 0, problem.limit_lower, problem.limit_upper, i * 3)) {
|
|
272
262
|
return;
|
|
@@ -274,13 +264,7 @@ function limit_rotation(problem, i) {
|
|
|
274
264
|
|
|
275
265
|
// R_i = above * basis_a * relative * conj(basis_b)
|
|
276
266
|
quat3_multiply_array(relative, 0, basis_a, i4, relative, 0);
|
|
277
|
-
|
|
278
|
-
turn[0] = -basis_b[i4];
|
|
279
|
-
turn[1] = -basis_b[i4 + 1];
|
|
280
|
-
turn[2] = -basis_b[i4 + 2];
|
|
281
|
-
turn[3] = basis_b[i4 + 3];
|
|
282
|
-
|
|
283
|
-
quat3_multiply_array(relative, 0, relative, 0, turn, 0);
|
|
267
|
+
quat3_multiply_conjugate_right_array(relative, 0, relative, 0, basis_b, i4);
|
|
284
268
|
|
|
285
269
|
quat3_multiply_array(rotation, i4, above, 0, relative, 0);
|
|
286
270
|
}
|
|
@@ -361,17 +345,8 @@ function prepare(problem) {
|
|
|
361
345
|
const p3 = p * 3;
|
|
362
346
|
const p4 = p * 4;
|
|
363
347
|
|
|
364
|
-
//
|
|
365
|
-
|
|
366
|
-
v3[1] = base_position[i3 + 1] - base_position[p3 + 1];
|
|
367
|
-
v3[2] = base_position[i3 + 2] - base_position[p3 + 2];
|
|
368
|
-
|
|
369
|
-
turn[0] = -base_rotation[p4];
|
|
370
|
-
turn[1] = -base_rotation[p4 + 1];
|
|
371
|
-
turn[2] = -base_rotation[p4 + 2];
|
|
372
|
-
turn[3] = base_rotation[p4 + 3];
|
|
373
|
-
|
|
374
|
-
v3_quaternion_apply_array(offset, i3, v3, 0, turn, 0);
|
|
348
|
+
// the joint's position in its parent's frame
|
|
349
|
+
pose3_apply_inverse_point_array(offset, i3, base_position, p3, base_rotation, p4, base_position, i3);
|
|
375
350
|
}
|
|
376
351
|
|
|
377
352
|
// children, compressed: counted one slot up, summed into starts, filled with the start as a
|
|
@@ -465,65 +440,29 @@ function prepare(problem) {
|
|
|
465
440
|
|
|
466
441
|
problem._goal_anchor[g] = anchor;
|
|
467
442
|
|
|
443
|
+
// both in the frame of their joint as animated: conj(R_j) (point - P_j)
|
|
468
444
|
if (anchor >= 0) {
|
|
469
|
-
|
|
445
|
+
pose3_apply_inverse_point_array(
|
|
446
|
+
problem._goal_anchor_offset, g * 3,
|
|
447
|
+
base_position, anchor * 3,
|
|
448
|
+
base_rotation, anchor * 4,
|
|
449
|
+
base_position, effector * 3
|
|
450
|
+
);
|
|
470
451
|
}
|
|
471
452
|
|
|
472
453
|
const target_joint = problem.goal_target_joint[g];
|
|
473
454
|
|
|
474
455
|
if (target_joint >= 0) {
|
|
475
|
-
|
|
456
|
+
pose3_apply_inverse_point_array(
|
|
457
|
+
problem._goal_target_local, g * 3,
|
|
458
|
+
base_position, target_joint * 3,
|
|
459
|
+
base_rotation, target_joint * 4,
|
|
460
|
+
problem.goal_target, g * 3
|
|
461
|
+
);
|
|
476
462
|
}
|
|
477
463
|
}
|
|
478
464
|
}
|
|
479
465
|
|
|
480
|
-
/**
|
|
481
|
-
* `out = conj(R_j) (point - P_j)` with the frame of joint `j` as animated.
|
|
482
|
-
*
|
|
483
|
-
* @param {Float64Array} out
|
|
484
|
-
* @param {number} out_offset
|
|
485
|
-
* @param {Float64Array} point
|
|
486
|
-
* @param {number} point_offset
|
|
487
|
-
* @param {Float64Array} base_position
|
|
488
|
-
* @param {Float64Array} base_rotation
|
|
489
|
-
* @param {number} j
|
|
490
|
-
*/
|
|
491
|
-
function to_frame(out, out_offset, point, point_offset, base_position, base_rotation, j) {
|
|
492
|
-
const j3 = j * 3;
|
|
493
|
-
const j4 = j * 4;
|
|
494
|
-
|
|
495
|
-
v3[0] = point[point_offset] - base_position[j3];
|
|
496
|
-
v3[1] = point[point_offset + 1] - base_position[j3 + 1];
|
|
497
|
-
v3[2] = point[point_offset + 2] - base_position[j3 + 2];
|
|
498
|
-
|
|
499
|
-
turn[0] = -base_rotation[j4];
|
|
500
|
-
turn[1] = -base_rotation[j4 + 1];
|
|
501
|
-
turn[2] = -base_rotation[j4 + 2];
|
|
502
|
-
turn[3] = base_rotation[j4 + 3];
|
|
503
|
-
|
|
504
|
-
v3_quaternion_apply_array(out, out_offset, v3, 0, turn, 0);
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* `out = P_j + R_j local` with the frame of joint `j` as solved so far.
|
|
509
|
-
*
|
|
510
|
-
* @param {Float64Array} out
|
|
511
|
-
* @param {number} out_offset
|
|
512
|
-
* @param {FrameFabrikProblem} problem
|
|
513
|
-
* @param {Float64Array} local
|
|
514
|
-
* @param {number} local_offset
|
|
515
|
-
* @param {number} j
|
|
516
|
-
*/
|
|
517
|
-
function from_frame(out, out_offset, problem, local, local_offset, j) {
|
|
518
|
-
const j3 = j * 3;
|
|
519
|
-
|
|
520
|
-
v3_quaternion_apply_array(v3, 0, local, local_offset, problem.solved_rotation, j * 4);
|
|
521
|
-
|
|
522
|
-
out[out_offset] = problem.solved_position[j3] + v3[0];
|
|
523
|
-
out[out_offset + 1] = problem.solved_position[j3 + 1] + v3[1];
|
|
524
|
-
out[out_offset + 2] = problem.solved_position[j3 + 2] + v3[2];
|
|
525
|
-
}
|
|
526
|
-
|
|
527
466
|
/**
|
|
528
467
|
* This iteration's target for every effector: `lerp(carried, goal, w)`.
|
|
529
468
|
*
|
|
@@ -551,7 +490,13 @@ function load_targets(problem) {
|
|
|
551
490
|
cy = problem.base_position[e3 + 1];
|
|
552
491
|
cz = problem.base_position[e3 + 2];
|
|
553
492
|
} else {
|
|
554
|
-
|
|
493
|
+
// out of the anchor's frame as solved so far: P_j + R_j local
|
|
494
|
+
pose3_apply_point_array(
|
|
495
|
+
target, g3,
|
|
496
|
+
problem.solved_position, anchor * 3,
|
|
497
|
+
problem.solved_rotation, anchor * 4,
|
|
498
|
+
problem._goal_anchor_offset, g3
|
|
499
|
+
);
|
|
555
500
|
|
|
556
501
|
cx = target[g3];
|
|
557
502
|
cy = target[g3 + 1];
|
|
@@ -567,7 +512,12 @@ function load_targets(problem) {
|
|
|
567
512
|
gy = problem.goal_target[g3 + 1];
|
|
568
513
|
gz = problem.goal_target[g3 + 2];
|
|
569
514
|
} else {
|
|
570
|
-
|
|
515
|
+
pose3_apply_point_array(
|
|
516
|
+
target, g3,
|
|
517
|
+
problem.solved_position, target_joint * 3,
|
|
518
|
+
problem.solved_rotation, target_joint * 4,
|
|
519
|
+
problem._goal_target_local, g3
|
|
520
|
+
);
|
|
571
521
|
|
|
572
522
|
gx = target[g3];
|
|
573
523
|
gy = target[g3 + 1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capsule_contacts.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/capsule_contacts.js"],"names":[],"mappings":"AAkEA;;;;;;;;;;;;;;;GAeG;AACH,2CAVW,MAAM,EAAE,GAAC,YAAY,MACrB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,eACN,MAAM,QAMhB;AAED;;;;;;GAMG;AACH,iDAJW,MAAM,EAAE,GAAC,YAAY,WACrB,YAAY,kBACZ,MAAM,QAehB;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAhBW,MAAM,EAAE,GAAC,YAAY,QACrB,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,YACN,MAAM,YACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,YACN,MAAM,GACJ,OAAO,CAYnB;AAED;;;;;;;;;GASG;AACH,kDAPW,MAAM,EAAE,GAAC,YAAY,WACrB,YAAY,kBACZ,MAAM,UACN,YAAY,iBACZ,MAAM,GACJ,OAAO,CA6CnB;AAMD;;;;;GAKG;AACH,6CAHW,MAAM,EAAE,GAAC,YAAY,yNACnB,OAAO,CAYnB;AAED;;;;;;;;;GASG;AACH,mDAPW,MAAM,EAAE,GAAC,YAAY,aACrB,YAAY,oBACZ,MAAM,aACN,YAAY,oBACZ,MAAM,GACJ,OAAO,CAmEnB;AA8BD;;;;;;;;;GASG;AACH,oDAHW,MAAM,EAAE,GAAC,YAAY,yNACnB,MAAM,CAYlB;AAED;;;;;;;;;GASG;AACH,0DAPW,MAAM,EAAE,GAAC,YAAY,aACrB,YAAY,oBACZ,MAAM,aACN,YAAY,oBACZ,MAAM,GACJ,MAAM,CAsHlB;AAeD;;;;;;;;;;;;;GAaG;AACH,yCAHW,MAAM,EAAE,GAAC,YAAY,4NACnB,OAAO,CAYnB;AAsBD;;;;;;;;;GASG;AACH,+CAPW,MAAM,EAAE,GAAC,YAAY,WACrB,YAAY,kBACZ,MAAM,OACN,YAAY,cACZ,MAAM,GACJ,OAAO,
|
|
1
|
+
{"version":3,"file":"capsule_contacts.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/capsule_contacts.js"],"names":[],"mappings":"AAkEA;;;;;;;;;;;;;;;GAeG;AACH,2CAVW,MAAM,EAAE,GAAC,YAAY,MACrB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,eACN,MAAM,QAMhB;AAED;;;;;;GAMG;AACH,iDAJW,MAAM,EAAE,GAAC,YAAY,WACrB,YAAY,kBACZ,MAAM,QAehB;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAhBW,MAAM,EAAE,GAAC,YAAY,QACrB,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,YACN,MAAM,YACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,YACN,MAAM,GACJ,OAAO,CAYnB;AAED;;;;;;;;;GASG;AACH,kDAPW,MAAM,EAAE,GAAC,YAAY,WACrB,YAAY,kBACZ,MAAM,UACN,YAAY,iBACZ,MAAM,GACJ,OAAO,CA6CnB;AAMD;;;;;GAKG;AACH,6CAHW,MAAM,EAAE,GAAC,YAAY,yNACnB,OAAO,CAYnB;AAED;;;;;;;;;GASG;AACH,mDAPW,MAAM,EAAE,GAAC,YAAY,aACrB,YAAY,oBACZ,MAAM,aACN,YAAY,oBACZ,MAAM,GACJ,OAAO,CAmEnB;AA8BD;;;;;;;;;GASG;AACH,oDAHW,MAAM,EAAE,GAAC,YAAY,yNACnB,MAAM,CAYlB;AAED;;;;;;;;;GASG;AACH,0DAPW,MAAM,EAAE,GAAC,YAAY,aACrB,YAAY,oBACZ,MAAM,aACN,YAAY,oBACZ,MAAM,GACJ,MAAM,CAsHlB;AAeD;;;;;;;;;;;;;GAaG;AACH,yCAHW,MAAM,EAAE,GAAC,YAAY,4NACnB,OAAO,CAYnB;AAsBD;;;;;;;;;GASG;AACH,+CAPW,MAAM,EAAE,GAAC,YAAY,WACrB,YAAY,kBACZ,MAAM,OACN,YAAY,cACZ,MAAM,GACJ,OAAO,CAkGnB;AAyCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,gDAtBW,YAAY,QACZ,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,YACN,MAAM,YACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,GACJ,MAAM,CAYlB;AAKD;;;;;;;;;GASG;AACH,sDAPW,YAAY,WACZ,YAAY,kBACZ,MAAM,OACN,YAAY,cACZ,MAAM,GACJ,MAAM,CA4DlB;AA7fD;;;;;;;;GAQG;AACH,6CAFU,MAAM,CAEiC;AAEjD;;;;GAIG;AACH,2CAFU,MAAM,CAE8B;AA2U9C;;;;;;;;;;GAUG;AACH,yCAFU,MAAM,CAE6B;AAE7C;;;;;GAKG;AACH,uCAFU,MAAM,CAE0B"}
|
|
@@ -4,7 +4,7 @@ import { line3_compute_segment_segment_closest_points } from "../../../core/geom
|
|
|
4
4
|
import { line3_compute_segment_closest_point_t } from "../../../core/geom/3d/line/line3_compute_segment_closest_point_t.js";
|
|
5
5
|
import { line3_compute_segment_closest_point_to_aabb3_t_array } from "../../../core/geom/3d/line/line3_compute_segment_closest_point_to_aabb3_t.js";
|
|
6
6
|
import { v3_quaternion_apply_array } from "../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
7
|
-
import {
|
|
7
|
+
import { pose3_apply_inverse_point_array } from "../../../core/geom/3d/pose/pose3_apply_inverse_point_array.js";
|
|
8
8
|
import { sphere_box_contact_array } from "./sphere_box_contact.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -554,10 +554,8 @@ export function capsule_box_contact_array(out, capsule, capsule_offset, box, box
|
|
|
554
554
|
capsule_world_segment_array(scratch_seg, capsule, capsule_offset);
|
|
555
555
|
// World → box-local: subtract box centre, then rotate by conjugate of box quat.
|
|
556
556
|
const local = scratch_seg_local;
|
|
557
|
-
local
|
|
558
|
-
local
|
|
559
|
-
v3_quaternion_apply_inverse_array(local, 0, local, 0, box, rotation);
|
|
560
|
-
v3_quaternion_apply_inverse_array(local, 3, local, 3, box, rotation);
|
|
557
|
+
pose3_apply_inverse_point_array(local, 0, box, box_offset, box, rotation, scratch_seg, 0);
|
|
558
|
+
pose3_apply_inverse_point_array(local, 3, box, box_offset, box, rotation, scratch_seg, 3);
|
|
561
559
|
|
|
562
560
|
const a0lx = local[0], a0ly = local[1], a0lz = local[2];
|
|
563
561
|
const a1lx = local[3], a1ly = local[4], a1lz = local[5];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh_enumerate_triangles.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mesh_enumerate_triangles.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,iDAXW,YAAY,UACZ,MAAM,kCAEN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,GACJ,MAAM,CAalB;AAKD;;;;;;;;;;;GAWG;AACH,uDAPW,YAAY,UACZ,MAAM,4BAEN,YAAY,eACZ,MAAM,GACJ,MAAM,CAqElB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { COLUMN_CHILD_1, COLUMN_CHILD_2, COLUMN_USER_DATA, ELEMENT_WORD_COUNT, NULL_NODE } from "../../../../core/bvh2/bvh3/BVH.js";
|
|
2
|
+
import { array_sort_insertion_ascending } from "../../../../core/collection/array/array_sort_insertion_ascending.js";
|
|
2
3
|
import { TRIANGLE_FEATURE_ID_OFFSET, TRIANGLE_FLOAT_STRIDE } from "./triangle_buffer_layout.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -359,18 +360,5 @@ function sort_found_triangles(count, max_value) {
|
|
|
359
360
|
return;
|
|
360
361
|
}
|
|
361
362
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
for (let i = 1; i < count; i++) {
|
|
365
|
-
const v = a[i];
|
|
366
|
-
|
|
367
|
-
let j = i - 1;
|
|
368
|
-
|
|
369
|
-
while (j >= 0 && a[j] > v) {
|
|
370
|
-
a[j + 1] = a[j];
|
|
371
|
-
j--;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
a[j + 1] = v;
|
|
375
|
-
}
|
|
363
|
+
array_sort_insertion_ascending(found_triangles, 0, count);
|
|
376
364
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hull_sphere_contact.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/hull_sphere_contact.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,yCAfW,MAAM,EAAE,GAAC,YAAY,+BAErB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,GACJ,OAAO,CAkBnB;AASD;;;;;;;;;;;;;GAaG;AACH,+CARW,MAAM,EAAE,GAAC,YAAY,iCAErB,YAAY,eACZ,MAAM,UACN,YAAY,iBACZ,MAAM,GACJ,OAAO,
|
|
1
|
+
{"version":3,"file":"hull_sphere_contact.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/hull_sphere_contact.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,yCAfW,MAAM,EAAE,GAAC,YAAY,+BAErB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,GACJ,OAAO,CAkBnB;AASD;;;;;;;;;;;;;GAaG;AACH,+CARW,MAAM,EAAE,GAAC,YAAY,iCAErB,YAAY,eACZ,MAAM,UACN,YAAY,iBACZ,MAAM,GACJ,OAAO,CAmHnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v3_quaternion_apply_array } from "../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
2
|
-
import {
|
|
2
|
+
import { pose3_apply_inverse_point_array } from "../../../core/geom/3d/pose/pose3_apply_inverse_point_array.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Below this distance from the hull's surface the direction from the closest surface point to the
|
|
@@ -96,10 +96,7 @@ export function hull_sphere_contact_array(out, hull, pose, pose_offset, sphere,
|
|
|
96
96
|
const sx = sphere[sphere_offset], sy = sphere[sphere_offset + 1], sz = sphere[sphere_offset + 2];
|
|
97
97
|
const radius = sphere[sphere_offset + 3];
|
|
98
98
|
|
|
99
|
-
scratch_centre
|
|
100
|
-
scratch_centre[1] = sy - py;
|
|
101
|
-
scratch_centre[2] = sz - pz;
|
|
102
|
-
v3_quaternion_apply_inverse_array(scratch_centre, 0, scratch_centre, 0, pose, rotation);
|
|
99
|
+
pose3_apply_inverse_point_array(scratch_centre, 0, pose, pose_offset, pose, rotation, sphere, sphere_offset);
|
|
103
100
|
|
|
104
101
|
const cx = scratch_centre[0];
|
|
105
102
|
const cy = scratch_centre[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"narrowphase_step.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/narrowphase_step.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"narrowphase_step.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/narrowphase_step.js"],"names":[],"mappings":"AAo1FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,qDAZW,YAAY,GAAC,MAAM,EAAE,iCAGrB,UAAU,MAAM,CAAC,QACjB,UAAU,MAAM,CAAC,iCAGjB,UAAU,MAAM,CAAC,QACjB,UAAU,MAAM,CAAC,GAEf,MAAM,CA2ClB;AA2JD;;;;;;;;;;;GAWG;AACH,uFALW,MAAM,MAAM;IAAC,QAAQ,WAAW;IAAC,SAAS,EAAE,WAAW,CAAA;CAAC,CAAC,CAAC,QAmMpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,uEAJW,MAAM,UACN,MAAM;IAAC,QAAQ,WAAW;IAAC,SAAS,EAAE,WAAW,CAAA;CAAC,CAAC,UACnD,MAAM;IAAC,QAAQ,WAAW;IAAC,SAAS,EAAE,WAAW,CAAA;CAAC,CAAC,QA0K7D;4BAv5GM,oCAAoC"}
|
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
TRANSFORM64_ROTATION_OFFSET,
|
|
60
60
|
TRANSFORM64_TRANSLATION_OFFSET
|
|
61
61
|
} from "../../ecs/transform/Transform64.js";
|
|
62
|
+
import { t64_read_pose_array } from "../../ecs/transform/t64_read_pose_array.js";
|
|
62
63
|
import { rigid_subject_pose } from "./rigid_subject_pose.js";
|
|
63
64
|
|
|
64
65
|
const posed_a = new PosedShape3D();
|
|
@@ -1081,7 +1082,7 @@ const tri_plane = new Float64Array(13);
|
|
|
1081
1082
|
* @param {Transform64} concave_tr
|
|
1082
1083
|
*/
|
|
1083
1084
|
function triangle_plane_world(tri, concave_tr) {
|
|
1084
|
-
|
|
1085
|
+
t64_read_pose_array(plane_pose, 0, concave_tr);
|
|
1085
1086
|
triangle_vertices_to_world(scratch_tri_world, triangle_buffer, tri, plane_pose);
|
|
1086
1087
|
|
|
1087
1088
|
const w = scratch_tri_world;
|
|
@@ -1476,26 +1477,6 @@ const plane_pose = new Float64Array(7);
|
|
|
1476
1477
|
*/
|
|
1477
1478
|
const convex_record = new Float64Array(10);
|
|
1478
1479
|
|
|
1479
|
-
/**
|
|
1480
|
-
* Pack a pose, `[px, py, pz, qx, qy, qz, qw]`, from a transform.
|
|
1481
|
-
*
|
|
1482
|
-
* Read off the transform's lanes (a Transform64 is a Float64Array), not through `translation_x` and
|
|
1483
|
-
* the rest: inlined into dispatch_pair, those accessor calls land on a branch too rarely taken for
|
|
1484
|
-
* TurboFan to inline them, and each then returns its number boxed.
|
|
1485
|
-
*
|
|
1486
|
-
* @param {Float64Array} out
|
|
1487
|
-
* @param {Transform64} tr
|
|
1488
|
-
*/
|
|
1489
|
-
function pose_pack(out, tr) {
|
|
1490
|
-
out[0] = tr[TRANSFORM64_TRANSLATION_OFFSET];
|
|
1491
|
-
out[1] = tr[TRANSFORM64_TRANSLATION_OFFSET + 1];
|
|
1492
|
-
out[2] = tr[TRANSFORM64_TRANSLATION_OFFSET + 2];
|
|
1493
|
-
out[3] = tr[TRANSFORM64_ROTATION_OFFSET];
|
|
1494
|
-
out[4] = tr[TRANSFORM64_ROTATION_OFFSET + 1];
|
|
1495
|
-
out[5] = tr[TRANSFORM64_ROTATION_OFFSET + 2];
|
|
1496
|
-
out[6] = tr[TRANSFORM64_ROTATION_OFFSET + 3];
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
1480
|
// dispatch_pair branches on the shape pair, so each branch runs on a fraction of its calls: too few
|
|
1500
1481
|
// for TurboFan to inline a call made there, small or not, and a call that is not inlined boxes each
|
|
1501
1482
|
// number handed to it. The closed-form pair kernels therefore get their bodies packed into these
|
|
@@ -1543,7 +1524,7 @@ function sphere_record_pack(out, tr, shape) {
|
|
|
1543
1524
|
* @param {CapsuleShape3D} shape
|
|
1544
1525
|
*/
|
|
1545
1526
|
function capsule_record_pack(out, tr, shape) {
|
|
1546
|
-
|
|
1527
|
+
t64_read_pose_array(out, 0, tr);
|
|
1547
1528
|
out[7] = shape.radius;
|
|
1548
1529
|
out[8] = shape.height * 0.5;
|
|
1549
1530
|
}
|
|
@@ -1611,14 +1592,14 @@ function append_manifold_contact(count, result, offset, first_is_a, feature_id)
|
|
|
1611
1592
|
|
|
1612
1593
|
/**
|
|
1613
1594
|
* Pack a box record, `[px, py, pz, qx, qy, qz, qw, hx, hy, hz]`: its centre and orientation from the
|
|
1614
|
-
* transform, then its half-extents, read off their lanes for {@link
|
|
1615
|
-
* a Float64Array).
|
|
1595
|
+
* transform, then its half-extents, read off their lanes for {@link t64_read_pose_array}'s reason (a
|
|
1596
|
+
* Vector3 is a Float64Array).
|
|
1616
1597
|
* @param {Float64Array} out
|
|
1617
1598
|
* @param {Transform64} tr
|
|
1618
1599
|
* @param {Vector3} half_extents
|
|
1619
1600
|
*/
|
|
1620
1601
|
function box_record_pack(out, tr, half_extents) {
|
|
1621
|
-
|
|
1602
|
+
t64_read_pose_array(out, 0, tr);
|
|
1622
1603
|
out[7] = half_extents[0];
|
|
1623
1604
|
out[8] = half_extents[1];
|
|
1624
1605
|
out[9] = half_extents[2];
|
|
@@ -1793,8 +1774,8 @@ function sphere_box_voronoi_fid_array(sphere, sphere_offset, box, box_offset) {
|
|
|
1793
1774
|
function hull_pair_contacts(count, hullA, trA, hullB, trB) {
|
|
1794
1775
|
// Poses go to the posed shapes and the clip in arrays, read off the transforms' lanes: this is
|
|
1795
1776
|
// called from a dispatch_pair branch, and numbers handed across a call there are boxed.
|
|
1796
|
-
|
|
1797
|
-
|
|
1777
|
+
t64_read_pose_array(pair_pose_a, 0, trA);
|
|
1778
|
+
t64_read_pose_array(pair_pose_b, 0, trB);
|
|
1798
1779
|
posed_a.setup_pose(hullA, pair_pose_a, 0);
|
|
1799
1780
|
posed_b.setup_pose(hullB, pair_pose_b, 0);
|
|
1800
1781
|
const depth = gjk_epa_penetration(epa_result, posed_a, posed_b);
|
|
@@ -2163,7 +2144,7 @@ function dispatch_pair(count, colA, trA, colB, trB) {
|
|
|
2163
2144
|
if ((shapeA.isConvexHullShape3D === true && isSphereB) || (isSphereA && shapeB.isConvexHullShape3D === true)) {
|
|
2164
2145
|
const hull_is_a = isSphereB;
|
|
2165
2146
|
|
|
2166
|
-
|
|
2147
|
+
t64_read_pose_array(pair_pose, 0, hull_is_a ? trA : trB);
|
|
2167
2148
|
sphere_record_pack(pair_sphere_b, hull_is_a ? trB : trA, hull_is_a ? shapeB : shapeA);
|
|
2168
2149
|
|
|
2169
2150
|
const ok = hull_sphere_contact_array(closed_form_result, hull_is_a ? shapeA : shapeB, pair_pose, 0, pair_sphere_b, 0);
|
|
@@ -2214,8 +2195,8 @@ function dispatch_pair(count, colA, trA, colB, trB) {
|
|
|
2214
2195
|
// The two bodies' poses, packed once for the calls below and the per-triangle kernels: passed
|
|
2215
2196
|
// as numbers to a call that is not inlined, every one would be boxed (see
|
|
2216
2197
|
// triangle_vertices_to_world).
|
|
2217
|
-
|
|
2218
|
-
|
|
2198
|
+
t64_read_pose_array(convex_pose, 0, convex_tr);
|
|
2199
|
+
t64_read_pose_array(concave_pose, 0, concave_tr);
|
|
2219
2200
|
|
|
2220
2201
|
// 1. Convex shape's world AABB.
|
|
2221
2202
|
convex_col.shape.compute_bounding_box(concave_local_aabb);
|
|
@@ -2310,7 +2291,7 @@ function dispatch_pair(count, colA, trA, colB, trB) {
|
|
|
2310
2291
|
convex_record[2] = convex_wz;
|
|
2311
2292
|
convex_record[3] = sphere_radius;
|
|
2312
2293
|
} else if (isBoxConvex || isCapsuleConvex) {
|
|
2313
|
-
|
|
2294
|
+
t64_read_pose_array(convex_record, 0, convex_tr);
|
|
2314
2295
|
|
|
2315
2296
|
if (isBoxConvex) {
|
|
2316
2297
|
convex_record[7] = box_half_extents.x;
|
|
@@ -3130,7 +3111,7 @@ function collider_box(i, entry) {
|
|
|
3130
3111
|
|
|
3131
3112
|
entry.collider.shape.compute_bounding_box(collider_local_box);
|
|
3132
3113
|
|
|
3133
|
-
|
|
3114
|
+
t64_read_pose_array(collider_pose, 0, t);
|
|
3134
3115
|
aabb3_transform_oriented_array(collider_boxes, i * 6, collider_local_box, 0, collider_pose, 0);
|
|
3135
3116
|
}
|
|
3136
3117
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sphere_box_contact.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/sphere_box_contact.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wCAjBW,MAAM,EAAE,GAAC,YAAY,MACrB,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,OAAO,CAmBnB;AASD;;;;;;;;;;;;GAYG;AACH,8CAPW,MAAM,EAAE,GAAC,YAAY,UACrB,YAAY,iBACZ,MAAM,OACN,YAAY,cACZ,MAAM,GACJ,OAAO,
|
|
1
|
+
{"version":3,"file":"sphere_box_contact.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/narrowphase/sphere_box_contact.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wCAjBW,MAAM,EAAE,GAAC,YAAY,MACrB,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,OAAO,CAmBnB;AASD;;;;;;;;;;;;GAYG;AACH,8CAPW,MAAM,EAAE,GAAC,YAAY,UACrB,YAAY,iBACZ,MAAM,OACN,YAAY,cACZ,MAAM,GACJ,OAAO,CA2FnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v3_quaternion_apply_array } from "../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
2
|
-
import {
|
|
2
|
+
import { pose3_apply_inverse_point_array } from "../../../core/geom/3d/pose/pose3_apply_inverse_point_array.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Scratch for the world→box-local rotation of the sphere centre at the
|
|
@@ -93,10 +93,7 @@ export function sphere_box_contact_array(out, sphere, sphere_offset, box, box_of
|
|
|
93
93
|
|
|
94
94
|
// Step 1: bring the sphere centre into box-local space via the conjugate
|
|
95
95
|
// quaternion. v_local = q* · (s - b) · q
|
|
96
|
-
scratch_local
|
|
97
|
-
scratch_local[1] = sy - by;
|
|
98
|
-
scratch_local[2] = sz - bz;
|
|
99
|
-
v3_quaternion_apply_inverse_array(scratch_local, 0, scratch_local, 0, box, rotation);
|
|
96
|
+
pose3_apply_inverse_point_array(scratch_local, 0, box, box_offset, box, rotation, sphere, sphere_offset);
|
|
100
97
|
const lx = scratch_local[0];
|
|
101
98
|
const ly = scratch_local[1];
|
|
102
99
|
const lz = scratch_local[2];
|
|
@@ -4,6 +4,10 @@ export default Ticker;
|
|
|
4
4
|
* Dispatches "tick" every animation frame or "maxDelay" time, whichever happens to be soonest
|
|
5
5
|
* This is essentially the timing bus that all the simulation systems subscribe to for their step advancement
|
|
6
6
|
*
|
|
7
|
+
* A tick taken in an animation frame runs inside that frame and is measured to the frame's timestamp,
|
|
8
|
+
* and {@link Ticker#onFrame} follows it, so whatever draws from `onFrame` draws the simulation as of
|
|
9
|
+
* that frame.
|
|
10
|
+
*
|
|
7
11
|
*
|
|
8
12
|
* @example
|
|
9
13
|
* ticker.onTick.add(delta_s => {
|
|
@@ -40,6 +44,14 @@ declare class Ticker {
|
|
|
40
44
|
* @type {Signal<number>}
|
|
41
45
|
*/
|
|
42
46
|
readonly onTick: any;
|
|
47
|
+
/**
|
|
48
|
+
* Dispatched once per animation frame, after that frame's tick - or with none, while paused or
|
|
49
|
+
* suspended. The place to draw: the simulation is at the frame's timestamp here.
|
|
50
|
+
* Not dispatched for the {@link start}'s `maxTimeout` fallback ticks, which are not frames.
|
|
51
|
+
* @readonly
|
|
52
|
+
* @type {Signal}
|
|
53
|
+
*/
|
|
54
|
+
readonly onFrame: Signal;
|
|
43
55
|
/**
|
|
44
56
|
* Whether the update loop is cycling. {@link Ticker#pause} and {@link Ticker#resume} require this,
|
|
45
57
|
* they throw otherwise.
|
|
@@ -66,4 +78,5 @@ declare class Ticker {
|
|
|
66
78
|
#private;
|
|
67
79
|
}
|
|
68
80
|
import Clock from '../Clock.js';
|
|
81
|
+
import Signal from "../../core/events/signal/Signal.js";
|
|
69
82
|
//# sourceMappingURL=Ticker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ticker.d.ts","sourceRoot":"","sources":["../../../../src/engine/simulation/Ticker.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Ticker.d.ts","sourceRoot":"","sources":["../../../../src/engine/simulation/Ticker.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACI;;;OAGG;IACH,gBAFU,KAAK,CAEK;IAEpB;;;;;;;;;;;;OAYG;IACH,uBAFU,OAAO,CAEY;IAkC7B;;;;OAIG;IACH,qBAAsB;IAEtB;;;;;;OAMG;IACH,kBAFU,MAAM,CAEO;IA2BvB;;;;OAIG;IACH,yBAEC;IAED;;;;OAIG;IACH,yBAEC;IAuGD;;;;OAIG;IACH;QAF4B,UAAU,GAA3B,MAAM;aAuGhB;IAED,cAWC;IAED,eAaC;IAED,aAaC;;CACJ;kBAjYiB,aAAa;mBAFZ,oCAAoC"}
|