@woosh/meep-engine 3.44.0 → 3.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bundle-worker-terrain.js +1 -1
- package/package.json +1 -1
- package/src/core/assert.d.ts.map +1 -1
- package/src/core/assert.js +5 -1
- package/src/core/binary/hash/XXH128Hash.d.ts +1 -37
- package/src/core/binary/hash/XXH128Hash.d.ts.map +1 -1
- package/src/core/binary/hash/XXH128Hash.js +4 -55
- package/src/core/binary/hash/XXH3_SECRET.d.ts +1 -12
- package/src/core/binary/hash/XXH3_SECRET.d.ts.map +1 -1
- package/src/core/binary/hash/XXH3_SECRET.js +4 -25
- package/src/core/binary/hash/crc32.d.ts +1 -15
- package/src/core/binary/hash/crc32.d.ts.map +1 -1
- package/src/core/binary/hash/crc32.js +4 -96
- package/src/core/binary/hash/xxh3_128.d.ts +1 -9
- package/src/core/binary/hash/xxh3_128.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_128.js +4 -341
- package/src/core/binary/hash/xxh3_64.d.ts +1 -8
- package/src/core/binary/hash/xxh3_64.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_64.js +4 -241
- package/src/core/binary/hash/xxh3_common.d.ts +1 -223
- package/src/core/binary/hash/xxh3_common.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_common.js +90 -476
- package/src/core/collection/array/array_sort_insertion_ascending.d.ts +19 -0
- package/src/core/collection/array/array_sort_insertion_ascending.d.ts.map +1 -0
- package/src/core/collection/array/array_sort_insertion_ascending.js +31 -0
- package/src/core/collection/array/combine_hash.d.ts +6 -0
- package/src/core/collection/array/combine_hash.d.ts.map +1 -1
- package/src/core/collection/array/combine_hash.js +6 -0
- package/src/core/function/FunctionCompiler.js +2 -2
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts +27 -0
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts.map +1 -0
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.js +39 -0
- package/src/core/geom/3d/aabb/aabb3_from_v3_array.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_from_v3_array.js +4 -1
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts +2 -2
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.js +1 -1
- package/src/core/geom/3d/mat4/m4_multiply.d.ts +3 -0
- package/src/core/geom/3d/mat4/m4_multiply.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_multiply.js +3 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts +30 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.js +106 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts +21 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.js +36 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts +25 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.js +40 -0
- package/src/core/geom/3d/pose/pose3_compose_array.d.ts +28 -0
- package/src/core/geom/3d/pose/pose3_compose_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_compose_array.js +41 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.d.ts +29 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.js +42 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts +28 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.js +66 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts +22 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.js +30 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts +23 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.js +31 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts +26 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts.map +1 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.js +46 -0
- package/src/core/geom/ConicRay.js +2 -2
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +8 -5
- package/src/core/geom/vec3/v3_distance_array.d.ts +11 -0
- package/src/core/geom/vec3/v3_distance_array.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_distance_array.js +19 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.d.ts +23 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.js +49 -0
- package/src/core/geom/vec3/v3_reject_array.d.ts +15 -0
- package/src/core/geom/vec3/v3_reject_array.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_reject_array.js +32 -0
- package/src/core/graph/csr/csr_build_incidence.d.ts +26 -0
- package/src/core/graph/csr/csr_build_incidence.d.ts.map +1 -0
- package/src/core/graph/csr/csr_build_incidence.js +71 -0
- package/src/core/graph/csr/csr_graph_color_greedy.d.ts +25 -0
- package/src/core/graph/csr/csr_graph_color_greedy.d.ts.map +1 -0
- package/src/core/graph/csr/csr_graph_color_greedy.js +83 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.d.ts +15 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.d.ts.map +1 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.js +33 -0
- package/src/core/math/hash/XXH128Hash.d.ts +38 -0
- package/src/core/math/hash/XXH128Hash.d.ts.map +1 -0
- package/src/core/math/hash/XXH128Hash.js +55 -0
- package/src/core/math/hash/XXH3_SECRET.d.ts +13 -0
- package/src/core/math/hash/XXH3_SECRET.d.ts.map +1 -0
- package/src/core/math/hash/XXH3_SECRET.js +25 -0
- package/src/core/math/hash/crc32.d.ts +16 -0
- package/src/core/math/hash/crc32.d.ts.map +1 -0
- package/src/core/math/hash/crc32.js +96 -0
- package/src/core/math/hash/xxh3_128.d.ts +10 -0
- package/src/core/math/hash/xxh3_128.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_128.js +341 -0
- package/src/core/math/hash/xxh3_64.d.ts +9 -0
- package/src/core/math/hash/xxh3_64.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_64.js +241 -0
- package/src/core/math/hash/xxh3_common.d.ts +224 -0
- package/src/core/math/hash/xxh3_common.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_common.js +476 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts +26 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts.map +1 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.js +71 -0
- package/src/core/math/lookup/ParameterLookupTable.js +2 -2
- package/src/core/math/max2_exact.d.ts +15 -0
- package/src/core/math/max2_exact.d.ts.map +1 -0
- package/src/core/math/max2_exact.js +30 -0
- package/src/core/math/min2_exact.d.ts +20 -0
- package/src/core/math/min2_exact.d.ts.map +1 -0
- package/src/core/math/min2_exact.js +35 -0
- package/src/core/model/node-graph/node/NodeInstancePortReference.js +2 -2
- package/src/core/model/reactive/model/ReactiveBinaryExpression.js +2 -2
- package/src/core/model/reactive/model/terminal/ReactiveReference.js +2 -2
- package/src/engine/asset/AssetDescription.js +2 -2
- package/src/engine/ecs/animation/Animation.js +2 -2
- package/src/engine/ecs/animation/AnimationClip.d.ts.map +1 -1
- package/src/engine/ecs/animation/AnimationClip.js +7 -5
- package/src/engine/ecs/gui/GUIElement.d.ts.map +1 -1
- package/src/engine/ecs/gui/GUIElement.js +7 -5
- package/src/engine/ecs/gui/hud/HeadsUpDisplay.js +2 -2
- package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
- package/src/engine/ecs/gui/position/ViewportPosition.js +11 -7
- package/src/engine/ecs/ik/IKGoalSystem.d.ts.map +1 -1
- package/src/engine/ecs/ik/IKGoalSystem.js +3 -19
- package/src/engine/ecs/parent/parent_entity_model_of.d.ts +17 -0
- package/src/engine/ecs/parent/parent_entity_model_of.d.ts.map +1 -0
- package/src/engine/ecs/parent/parent_entity_model_of.js +26 -0
- package/src/engine/ecs/transform/Transform64.d.ts +1 -1
- package/src/engine/ecs/transform/Transform64.d.ts.map +1 -1
- package/src/engine/ecs/transform/Transform64.js +5 -4
- package/src/engine/ecs/transform/t64_read_pose_array.d.ts +15 -0
- package/src/engine/ecs/transform/t64_read_pose_array.d.ts.map +1 -0
- package/src/engine/ecs/transform/t64_read_pose_array.js +24 -0
- package/src/engine/graphics/ecs/animation/animator/AnimationClip.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/AnimationClip.js +8 -5
- package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/AnimationNotification.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationGraphDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +8 -5
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/Decal.js +9 -8
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts +2 -0
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts.map +1 -1
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.js +10 -21
- package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.js +9 -6
- package/src/engine/graphics3/AnimationGraphSystem.d.ts +5 -0
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +48 -2
- package/src/engine/graphics3/AnimationSystem.d.ts +5 -0
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +47 -2
- package/src/engine/graphics3/ParticipatingMedia.js +204 -204
- package/src/engine/graphics3/animation/AnimationClips.d.ts +5 -0
- package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -1
- package/src/engine/graphics3/animation/AnimationClips.js +5 -0
- package/src/engine/graphics3/register_clips.d.ts +29 -0
- package/src/engine/graphics3/register_clips.d.ts.map +1 -1
- package/src/engine/graphics3/register_clips.js +52 -0
- package/src/engine/grid/obstacle/GridObstacle.js +2 -2
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +2 -2
- package/src/engine/interpolation/Interpolated.js +2 -2
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts +9 -0
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts.map +1 -1
- package/src/engine/physics/broadphase/compute_fat_world_aabb.js +3 -1
- package/src/engine/physics/cloth/PLAN.md +10 -8
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +22 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +51 -19
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +16 -2
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +19 -24
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +7 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/ClothColliderIndex.js +85 -67
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.js +19 -101
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +2 -5
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_pack.js +7 -15
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +16 -61
- package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.js +7 -5
- package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothCollider.js +7 -5
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts +0 -1
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.js +6 -19
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +1 -2
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +3 -12
- package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothDynamics.js +20 -11
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +40 -130
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +17 -58
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +3 -3
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +44 -104
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +6 -13
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_holds.js +15 -40
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +45 -79
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +7 -27
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +30 -62
- package/src/engine/physics/cloth/playground/cloth_playground_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/cloth_playground_build.js +2 -3
- package/src/engine/physics/cloth/playground/collide_main.js +2 -28
- package/src/engine/physics/cloth/playground/garment_main.js +4 -19
- package/src/engine/physics/cloth/playground/main.js +6 -48
- package/src/engine/physics/cloth/playground/rig_main.js +947 -955
- package/src/engine/physics/cloth/playground/wind_main.js +8 -7
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +16 -76
- package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts +10 -8
- package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_color_particles.js +30 -102
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +3 -2
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_hold_line.js +2 -14
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts +21 -0
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.js +45 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts +32 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.js +133 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts +16 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.js +19 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +6 -55
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.js +30 -65
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +6 -28
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +2 -3
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts +21 -0
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.js +54 -0
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts +15 -0
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.js +28 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts +30 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.js +56 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +3 -17
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +2 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +7 -25
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +3 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +40 -62
- package/src/engine/physics/ecs/ContactProbeSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/ContactProbeSystem.js +2 -18
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +9 -50
- package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidField.js +7 -5
- package/src/engine/physics/fluid/ecs/FluidComponent.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidComponent.js +19 -11
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts +24 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.js +42 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts +25 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.js +40 -0
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +2 -2
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +2 -2
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +11 -7
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.js +11 -7
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/WakeFluidEffector.js +16 -9
- package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.d.ts.map +1 -1
- package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.js +40 -90
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/capsule_contacts.js +3 -5
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js +2 -14
- package/src/engine/physics/narrowphase/hull_sphere_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/hull_sphere_contact.js +2 -5
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/narrowphase_step.js +13 -32
- package/src/engine/physics/narrowphase/sphere_box_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/sphere_box_contact.js +2 -5
- package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitter.js +12 -7
- package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts.map +1 -1
- package/src/engine/sound/ecs/trigger/AudioEventTrigger.js +192 -191
- package/src/engine/sound/simulation/core/AcousticMedium.js +2 -2
- package/src/engine/sound/simulation/definition/AcousticDirectivity.js +2 -2
- package/src/engine/sound/simulation/definition/AcousticMaterial.d.ts.map +1 -1
- package/src/engine/sound/simulation/definition/AcousticMaterial.js +11 -7
- package/src/engine/sound/sopra/definition/BusDefinition.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/BusDefinition.js +5 -4
- package/src/engine/sound/sopra/definition/DuckingRule.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/DuckingRule.js +7 -5
- package/src/engine/sound/sopra/definition/EventDescription.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/EventDescription.js +23 -13
- package/src/engine/sound/sopra/definition/MixerSnapshot.js +2 -2
- package/src/engine/sound/sopra/definition/ParameterDefinition.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/ParameterDefinition.js +7 -5
- package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.js +4 -3
- package/src/engine/sound/sopra/definition/clip/ContainerAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.js +3 -3
- package/src/engine/sound/sopra/definition/clip/SampleAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SampleAudioClip.js +16 -9
- package/src/engine/sound/sopra/definition/clip/SilenceAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.js +7 -5
- package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/EqEffect.js +8 -5
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +2 -2
- package/src/engine/sound/sopra/legacy/SoundEmitter.d.ts.map +1 -1
- package/src/engine/sound/sopra/legacy/SoundEmitter.js +357 -352
- package/src/engine/sound/sopra/legacy/SoundTrack.d.ts.map +1 -1
- package/src/engine/sound/sopra/legacy/SoundTrack.js +281 -278
- package/src/format/image/png/PNGReader.js +644 -644
- package/src/format/image/png/crc32.d.ts +1 -1
- package/src/format/image/png/crc32.js +7 -8
- package/src/format/texture/basis/transcode/etc1s_to_astc.d.ts.map +1 -1
- package/src/format/texture/basis/transcode/etc1s_to_astc.js +2 -1
- package/src/shade/descriptor/binding/BindGroupLayoutDescriptor.js +2 -2
- package/src/shade/descriptor/binding/BindGroupLayoutEntry.d.ts.map +1 -1
- package/src/shade/descriptor/binding/BindGroupLayoutEntry.js +12 -8
- package/src/shade/descriptor/binding/StorageTextureBindingLayout.js +2 -2
- package/src/shade/descriptor/binding/TextureBindingLayout.js +2 -2
- package/src/shade/descriptor/blend/BlendComponent.js +2 -2
- package/src/shade/descriptor/pipeline/PipelineDescriptorBase.js +2 -2
- package/src/shade/descriptor/pipeline/PipelineLayoutDescriptor.js +2 -2
- package/src/shade/descriptor/pipeline/ProgrammableStage.js +2 -2
- package/src/shade/descriptor/pipeline/compute/ComputePipelineDescriptor.js +2 -2
- package/src/shade/descriptor/pipeline/render/ColorTargetState.js +2 -2
- package/src/shade/descriptor/pipeline/render/FragmentState.js +2 -2
- package/src/shade/descriptor/pipeline/render/PrimitiveState.js +2 -2
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js +8 -5
- package/src/shade/descriptor/pipeline/render/VertexAttribute.js +2 -2
- package/src/shade/descriptor/texture/SamplerDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/texture/SamplerDescriptor.js +20 -12
- package/src/shade/descriptor/texture/TextureDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/texture/TextureDescriptor.js +11 -7
- package/src/shade/device/graph/BufferResourceDescriptor.d.ts.map +1 -1
- package/src/shade/device/graph/BufferResourceDescriptor.js +196 -193
- package/src/shade/device/graph/TextureResourceDescriptor.d.ts.map +1 -1
- package/src/shade/device/graph/TextureResourceDescriptor.js +178 -173
- package/src/shade/device/timing/profile/sgpt_read_header.js +1 -1
- package/src/shade/device/timing/profile/sgpt_read_records.js +1 -1
- package/src/shade/device/timing/profile/sgpt_write_header.js +1 -1
- package/src/shade/device/timing/profile/sgpt_write_record.js +1 -1
- package/src/shade/playground/image_decode_bench/main.js +2 -1
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.js +2 -1
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.js +2 -1
- package/src/shade/playground/ssr_variance/statistics.d.ts.map +1 -1
- package/src/shade/playground/ssr_variance/statistics.js +2 -1
- package/src/shade/playground/texture_encode/main.d.ts.map +1 -1
- package/src/shade/playground/texture_encode/main.js +2 -1
- package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/measure.js +2 -1
- package/src/shade/renderer/binding/BufferBinding.js +2 -2
- package/src/shade/renderer/buffer/table/gpu_database_check_links.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/gpu_database_check_links.js +2 -1
- package/src/shade/renderer/camera/Camera.js +2 -2
- package/src/shade/renderer/geometry/Attribute.js +2 -2
- package/src/shade/renderer/geometry/Geometry.js +2 -2
- package/src/shade/renderer/geometry/geometry_deduplicate_vertices.js +2 -2
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +2 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +3 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.js +3 -2
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.js +2 -1
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_asset_id.js +13 -13
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_directory_block_checksum.js +41 -41
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_frame_checksum.js +41 -41
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_header_checksum.js +25 -25
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +3 -2
- package/src/shade/renderer/material/StandardShadeMaterial.d.ts.map +1 -1
- package/src/shade/renderer/material/StandardShadeMaterial.js +13 -8
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.js +3 -2
- package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.d.ts.map +1 -1
- package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js +14 -5
- package/src/shade/renderer/scene/optimization/sampler2d_from_image_bitmap.js +1 -1
- package/src/shade/renderer/shader/type/WGSLStructField.js +2 -2
- package/src/shade/renderer/shader/type/WebGPUArray.js +2 -2
- package/src/shade/renderer/shader/type/WebGPUStruct.d.ts.map +1 -1
- package/src/shade/renderer/shader/type/WebGPUStruct.js +9 -6
- package/src/shade/renderer/texture/ShadeTexture.d.ts.map +1 -1
- package/src/shade/renderer/texture/ShadeTexture.js +17 -10
- package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +2 -2
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +4 -4
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +6 -6
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +46 -55
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts +3 -3
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +14 -4
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +10 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +82 -40
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +4 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +8 -4
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +98 -86
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/shader_water_particles.js +440 -298
- package/src/view/common/HTMLElementCacheKey.d.ts.map +1 -1
- package/src/view/common/HTMLElementCacheKey.js +4 -3
- package/src/view/minimap/MinimapMarker.js +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solve `M·x = b` for a symmetric positive definite 3×3 `M`, by LDLᵀ factorisation.
|
|
3
|
+
*
|
|
4
|
+
* `M` is read as its six distinct entries, diagonal first: `[m00, m11, m22, m01, m02, m12]`.
|
|
5
|
+
*
|
|
6
|
+
* LDLᵀ rather than a cofactor inverse. The two agree in exact arithmetic and do not agree in Float64: an SPD
|
|
7
|
+
* matrix with a condition number in the billions has a cofactor determinant — a sum of triple products that
|
|
8
|
+
* has to cancel down by that ratio squared — that can come out *negative* although every eigenvalue is
|
|
9
|
+
* positive. The factorisation never forms those products, so its pivots stay positive where the determinant
|
|
10
|
+
* does not, and their product is the determinant to full precision.
|
|
11
|
+
*
|
|
12
|
+
* The pivots of an SPD matrix are `M` restricted to nested subspaces, so all three positive *is* positive
|
|
13
|
+
* definiteness: the function checks exactly that, and returns `false` without writing `out` when a pivot is
|
|
14
|
+
* not positive and finite — an indefinite, singular or non-finite `M`. An infinite pivot needs refusing
|
|
15
|
+
* explicitly: it is positive, and dividing by it reads as a finite solution, zero along that axis.
|
|
16
|
+
*
|
|
17
|
+
* @param {Float64Array|Float32Array|number[]} out solution `x`, 3 entries at `out_offset`
|
|
18
|
+
* @param {number} out_offset
|
|
19
|
+
* @param {Float64Array|Float32Array|number[]} m `[m00, m11, m22, m01, m02, m12]` at `m_offset`
|
|
20
|
+
* @param {number} m_offset
|
|
21
|
+
* @param {Float64Array|Float32Array|number[]} b right-hand side, 3 entries at `b_offset`
|
|
22
|
+
* @param {number} b_offset
|
|
23
|
+
* @returns {boolean} true when `M` was positive definite and `out` holds the solution
|
|
24
|
+
*/
|
|
25
|
+
export function matrix_symmetric_3x3_solve_ldlt(out: Float64Array | Float32Array | number[], out_offset: number, m: Float64Array | Float32Array | number[], m_offset: number, b: Float64Array | Float32Array | number[], b_offset: number): boolean;
|
|
26
|
+
//# sourceMappingURL=matrix_symmetric_3x3_solve_ldlt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix_symmetric_3x3_solve_ldlt.d.ts","sourceRoot":"","sources":["../../../../../src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qDARW,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,cAClC,MAAM,KACN,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,YAClC,MAAM,KACN,YAAY,GAAC,YAAY,GAAC,MAAM,EAAE,YAClC,MAAM,GACJ,OAAO,CAgDnB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solve `M·x = b` for a symmetric positive definite 3×3 `M`, by LDLᵀ factorisation.
|
|
3
|
+
*
|
|
4
|
+
* `M` is read as its six distinct entries, diagonal first: `[m00, m11, m22, m01, m02, m12]`.
|
|
5
|
+
*
|
|
6
|
+
* LDLᵀ rather than a cofactor inverse. The two agree in exact arithmetic and do not agree in Float64: an SPD
|
|
7
|
+
* matrix with a condition number in the billions has a cofactor determinant — a sum of triple products that
|
|
8
|
+
* has to cancel down by that ratio squared — that can come out *negative* although every eigenvalue is
|
|
9
|
+
* positive. The factorisation never forms those products, so its pivots stay positive where the determinant
|
|
10
|
+
* does not, and their product is the determinant to full precision.
|
|
11
|
+
*
|
|
12
|
+
* The pivots of an SPD matrix are `M` restricted to nested subspaces, so all three positive *is* positive
|
|
13
|
+
* definiteness: the function checks exactly that, and returns `false` without writing `out` when a pivot is
|
|
14
|
+
* not positive and finite — an indefinite, singular or non-finite `M`. An infinite pivot needs refusing
|
|
15
|
+
* explicitly: it is positive, and dividing by it reads as a finite solution, zero along that axis.
|
|
16
|
+
*
|
|
17
|
+
* @param {Float64Array|Float32Array|number[]} out solution `x`, 3 entries at `out_offset`
|
|
18
|
+
* @param {number} out_offset
|
|
19
|
+
* @param {Float64Array|Float32Array|number[]} m `[m00, m11, m22, m01, m02, m12]` at `m_offset`
|
|
20
|
+
* @param {number} m_offset
|
|
21
|
+
* @param {Float64Array|Float32Array|number[]} b right-hand side, 3 entries at `b_offset`
|
|
22
|
+
* @param {number} b_offset
|
|
23
|
+
* @returns {boolean} true when `M` was positive definite and `out` holds the solution
|
|
24
|
+
*/
|
|
25
|
+
export function matrix_symmetric_3x3_solve_ldlt(
|
|
26
|
+
out, out_offset,
|
|
27
|
+
m, m_offset,
|
|
28
|
+
b, b_offset
|
|
29
|
+
) {
|
|
30
|
+
const m00 = m[m_offset];
|
|
31
|
+
const m11 = m[m_offset + 1];
|
|
32
|
+
const m22 = m[m_offset + 2];
|
|
33
|
+
const m01 = m[m_offset + 3];
|
|
34
|
+
const m02 = m[m_offset + 4];
|
|
35
|
+
const m12 = m[m_offset + 5];
|
|
36
|
+
|
|
37
|
+
const pivot_0 = m00;
|
|
38
|
+
const lower_10 = m01 / pivot_0;
|
|
39
|
+
const lower_20 = m02 / pivot_0;
|
|
40
|
+
|
|
41
|
+
const pivot_1 = m11 - lower_10 * m01;
|
|
42
|
+
const lower_21 = (m12 - lower_20 * m01) / pivot_1;
|
|
43
|
+
|
|
44
|
+
const pivot_2 = m22 - lower_20 * m02 - lower_21 * lower_21 * pivot_1;
|
|
45
|
+
|
|
46
|
+
if (!(
|
|
47
|
+
pivot_0 > 0 && pivot_0 < Infinity
|
|
48
|
+
&& pivot_1 > 0 && pivot_1 < Infinity
|
|
49
|
+
&& pivot_2 > 0 && pivot_2 < Infinity
|
|
50
|
+
)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const b0 = b[b_offset];
|
|
55
|
+
const b1 = b[b_offset + 1];
|
|
56
|
+
const b2 = b[b_offset + 2];
|
|
57
|
+
|
|
58
|
+
// Forward substitution through L, scale by D, back substitution through Lᵀ.
|
|
59
|
+
const forward_1 = b1 - lower_10 * b0;
|
|
60
|
+
const forward_2 = b2 - lower_20 * b0 - lower_21 * forward_1;
|
|
61
|
+
|
|
62
|
+
const x2 = forward_2 / pivot_2;
|
|
63
|
+
const x1 = forward_1 / pivot_1 - lower_21 * x2;
|
|
64
|
+
const x0 = b0 / pivot_0 - lower_10 * x1 - lower_20 * x2;
|
|
65
|
+
|
|
66
|
+
out[out_offset] = x0;
|
|
67
|
+
out[out_offset + 1] = x1;
|
|
68
|
+
out[out_offset + 2] = x2;
|
|
69
|
+
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix3 } from "../hash/hash_mix3.js";
|
|
3
3
|
import { isArrayEqualStrict } from "../../collection/array/isArrayEqualStrict.js";
|
|
4
4
|
import { computeHashFloatArray } from "../hash/computeHashFloatArray.js";
|
|
5
5
|
import { inverseLerp } from "../inverseLerp.js";
|
|
@@ -377,7 +377,7 @@ export class ParameterLookupTable {
|
|
|
377
377
|
const dataHash = computeHashFloatArray(this.data);
|
|
378
378
|
const positionHash = computeHashFloatArray(this.positions);
|
|
379
379
|
|
|
380
|
-
return
|
|
380
|
+
return hash_mix3(
|
|
381
381
|
dataHash,
|
|
382
382
|
positionHash,
|
|
383
383
|
this.itemSize
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Math.max(a, b)` without the call, as {@link min2_exact}: the larger, NaN if either is, and `+0`
|
|
3
|
+
* above `-0`.
|
|
4
|
+
*
|
|
5
|
+
* {@link max2} drops a NaN in `b` and lets the first of two zeros win; this does neither.
|
|
6
|
+
*
|
|
7
|
+
* The same as `Math.max` under `Object.is` for every pair of numbers, except that a NaN answer is the
|
|
8
|
+
* canonical NaN.
|
|
9
|
+
*
|
|
10
|
+
* @param {number} a
|
|
11
|
+
* @param {number} b
|
|
12
|
+
* @returns {number}
|
|
13
|
+
*/
|
|
14
|
+
export function max2_exact(a: number, b: number): number;
|
|
15
|
+
//# sourceMappingURL=max2_exact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"max2_exact.d.ts","sourceRoot":"","sources":["../../../../src/core/math/max2_exact.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,8BAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAkBlB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Math.max(a, b)` without the call, as {@link min2_exact}: the larger, NaN if either is, and `+0`
|
|
3
|
+
* above `-0`.
|
|
4
|
+
*
|
|
5
|
+
* {@link max2} drops a NaN in `b` and lets the first of two zeros win; this does neither.
|
|
6
|
+
*
|
|
7
|
+
* The same as `Math.max` under `Object.is` for every pair of numbers, except that a NaN answer is the
|
|
8
|
+
* canonical NaN.
|
|
9
|
+
*
|
|
10
|
+
* @param {number} a
|
|
11
|
+
* @param {number} b
|
|
12
|
+
* @returns {number}
|
|
13
|
+
*/
|
|
14
|
+
export function max2_exact(a, b) {
|
|
15
|
+
if (a > b) {
|
|
16
|
+
return a;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (b > a) {
|
|
20
|
+
return b;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (a === b) {
|
|
24
|
+
// equal, and of two zeros the positive one if either is
|
|
25
|
+
return a === 0 && 1 / a < 0 ? b : a;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// one of them is NaN
|
|
29
|
+
return NaN;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Math.min(a, b)` without the call: the smaller, NaN if either is, and `-0` below `+0`.
|
|
3
|
+
*
|
|
4
|
+
* {@link min2} is `a < b ? a : b`, which answers `b` whenever the comparison is false — a NaN in `a`
|
|
5
|
+
* is dropped, and of two zeros the second one wins. That is right for a running minimum over values
|
|
6
|
+
* known to be numbers, and wrong for a bound that has to stay poisoned when its input was.
|
|
7
|
+
*
|
|
8
|
+
* Why not `Math.min` itself: in code V8 has not optimised yet (a function run a few times a step can
|
|
9
|
+
* stay unoptimised for thousands of steps), `Math.min` is a call into a builtin that hands its answer
|
|
10
|
+
* back boxed into a heap object. This is comparisons only.
|
|
11
|
+
*
|
|
12
|
+
* The same as `Math.min` under `Object.is` for every pair of numbers. A NaN answer is the canonical
|
|
13
|
+
* NaN; which NaN `Math.min` answers is the platform's (on x64, the one with the sign bit set).
|
|
14
|
+
*
|
|
15
|
+
* @param {number} a
|
|
16
|
+
* @param {number} b
|
|
17
|
+
* @returns {number}
|
|
18
|
+
*/
|
|
19
|
+
export function min2_exact(a: number, b: number): number;
|
|
20
|
+
//# sourceMappingURL=min2_exact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"min2_exact.d.ts","sourceRoot":"","sources":["../../../../src/core/math/min2_exact.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAkBlB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Math.min(a, b)` without the call: the smaller, NaN if either is, and `-0` below `+0`.
|
|
3
|
+
*
|
|
4
|
+
* {@link min2} is `a < b ? a : b`, which answers `b` whenever the comparison is false — a NaN in `a`
|
|
5
|
+
* is dropped, and of two zeros the second one wins. That is right for a running minimum over values
|
|
6
|
+
* known to be numbers, and wrong for a bound that has to stay poisoned when its input was.
|
|
7
|
+
*
|
|
8
|
+
* Why not `Math.min` itself: in code V8 has not optimised yet (a function run a few times a step can
|
|
9
|
+
* stay unoptimised for thousands of steps), `Math.min` is a call into a builtin that hands its answer
|
|
10
|
+
* back boxed into a heap object. This is comparisons only.
|
|
11
|
+
*
|
|
12
|
+
* The same as `Math.min` under `Object.is` for every pair of numbers. A NaN answer is the canonical
|
|
13
|
+
* NaN; which NaN `Math.min` answers is the platform's (on x64, the one with the sign bit set).
|
|
14
|
+
*
|
|
15
|
+
* @param {number} a
|
|
16
|
+
* @param {number} b
|
|
17
|
+
* @returns {number}
|
|
18
|
+
*/
|
|
19
|
+
export function min2_exact(a, b) {
|
|
20
|
+
if (a < b) {
|
|
21
|
+
return a;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (b < a) {
|
|
25
|
+
return b;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (a === b) {
|
|
29
|
+
// equal, and of two zeros the negative one if either is
|
|
30
|
+
return a === 0 && 1 / a > 0 ? b : a;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// one of them is NaN
|
|
34
|
+
return NaN;
|
|
35
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix2 } from "../../../math/hash/hash_mix2.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @typedef {import("../Connection.js").Connection} Connection
|
|
@@ -137,7 +137,7 @@ export class NodeInstancePortReference {
|
|
|
137
137
|
* @return {number}
|
|
138
138
|
*/
|
|
139
139
|
hash() {
|
|
140
|
-
return
|
|
140
|
+
return hash_mix2(
|
|
141
141
|
this.instance.hash(),
|
|
142
142
|
this.port.hash()
|
|
143
143
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix3 } from "../../../math/hash/hash_mix3.js";
|
|
3
3
|
import { ReactiveExpression } from "./ReactiveExpression.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -60,7 +60,7 @@ export class ReactiveBinaryExpression extends ReactiveExpression {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
hash() {
|
|
63
|
-
return
|
|
63
|
+
return hash_mix3(
|
|
64
64
|
this.left.hash(),
|
|
65
65
|
this.right.hash(),
|
|
66
66
|
super.hash()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../../assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix2 } from "../../../../math/hash/hash_mix2.js";
|
|
3
3
|
import DataType from "../../../../parser/simple/DataType.js";
|
|
4
4
|
import { computeStringHash } from "../../../../primitives/strings/computeStringHash.js";
|
|
5
5
|
import { ReactiveExpression } from "../ReactiveExpression.js";
|
|
@@ -124,7 +124,7 @@ export class ReactiveReference extends ReactiveExpression {
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
hash() {
|
|
127
|
-
return
|
|
127
|
+
return hash_mix2(
|
|
128
128
|
computeStringHash(this.name),
|
|
129
129
|
super.hash()
|
|
130
130
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../core/assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix2 } from "../../core/math/hash/hash_mix2.js";
|
|
3
3
|
import { computeStringHash } from "../../core/primitives/strings/computeStringHash.js";
|
|
4
4
|
|
|
5
5
|
export class AssetDescription {
|
|
@@ -39,7 +39,7 @@ export class AssetDescription {
|
|
|
39
39
|
* @returns {number}
|
|
40
40
|
*/
|
|
41
41
|
hash() {
|
|
42
|
-
return
|
|
42
|
+
return hash_mix2(
|
|
43
43
|
computeStringHash(this.path),
|
|
44
44
|
computeStringHash(this.type)
|
|
45
45
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../core/assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix2 } from "../../../core/math/hash/hash_mix2.js";
|
|
3
3
|
import List from '../../../core/collection/list/List.js';
|
|
4
4
|
import { computeHashFloat } from "../../../core/primitives/numbers/computeHashFloat.js";
|
|
5
5
|
import { AnimationClip } from "./AnimationClip.js";
|
|
@@ -139,7 +139,7 @@ export class Animation {
|
|
|
139
139
|
* @returns {number}
|
|
140
140
|
*/
|
|
141
141
|
hash() {
|
|
142
|
-
return
|
|
142
|
+
return hash_mix2(
|
|
143
143
|
this.clips.hash(),
|
|
144
144
|
computeHashFloat(this.debtTime)
|
|
145
145
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationClip.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/animation/AnimationClip.js"],"names":[],"mappings":"AAKA;
|
|
1
|
+
{"version":3,"file":"AnimationClip.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/animation/AnimationClip.js"],"names":[],"mappings":"AAKA;IA6DI;;;;OAIG;IACH,yBAFa,aAAa,CAQzB;IAtED,qBAA8B;IAC9B,6BAAqC;IAErC;;;OAGG;IACH,QAFU,OAAO,CAEO;IAExB;;;OAGG;IACH,WAFU,OAAO,CAEU;IAE3B;;;OAGG;IACH,OAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,cAHW,aAAa,GACX,OAAO,CAQnB;IAED;;;OAGG;IACH,QAFa,MAAM,CAYlB;IAED;;;;OAIG;IACH,WAHW,MAAM,oBAAkB,GACtB,OAAO,CAInB;IAeD,0BA4BC;IAED;;;;;;MAQC;IAED;;;OAGG;IACH,2CAQC;IAED;;;OAGG;IACH,6CAOC;CACJ;2BA9I0B,uCAAuC;4BADtC,wCAAwC;oBADhD,+BAA+B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
|
|
2
2
|
import Vector1 from "../../../core/geom/Vector1.js";
|
|
3
3
|
import ObservedInteger from "../../../core/model/ObservedInteger.js";
|
|
4
4
|
import ObservedString from "../../../core/model/ObservedString.js";
|
|
@@ -44,10 +44,12 @@ export class AnimationClip {
|
|
|
44
44
|
* @returns {number}
|
|
45
45
|
*/
|
|
46
46
|
hash() {
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
return hash_mix3(
|
|
48
|
+
hash_mix3(
|
|
49
|
+
this.name.hash(),
|
|
50
|
+
this.repeatCount.hash(),
|
|
51
|
+
this.weight.hash()
|
|
52
|
+
),
|
|
51
53
|
this.timeScale.hash(),
|
|
52
54
|
this.flags
|
|
53
55
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUIElement.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/gui/GUIElement.js"],"names":[],"mappings":"6BASU,MAAM;;;;;;AAahB;
|
|
1
|
+
{"version":3,"file":"GUIElement.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/gui/GUIElement.js"],"names":[],"mappings":"6BASU,MAAM;;;;;;AAahB;IA2II;;;;OAIG;IACH,6BAFa,UAAU,CAYtB;IAED;;;;OAIG;IACH,yBAFY,UAAU,CAQrB;IAtKD;;;OAGG;IACH,WAAY;IAEZ;;;OAGG;IACH,cAAa;IAEb;;;OAGG;IACH,gBAAgB;IAEhB;;;OAGG;IACH,QAFU,OAAO,CAEU;IAE3B;;;;OAIG;IACH,gBAFU,SAAO,IAAI,CAER;IAEb;;;OAGG;IACH,cAA+B;IAG/B;;;OAGG;IACH,SAFU,eAAe,CAEW;IAGpC;;;;OAIG;IACH,cAHW,MAAM,GAAC,cAAc,GACnB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,cAAc,GACnB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,cAAc,SACrB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,cAAc,GACnB,OAAO,CAInB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACR,OAAO,CAgCnB;IAED;;;OAGG;IACH,QAFY,MAAM,CAYjB;IAgCD;;;;;;aAUC;IAED;;;;;;;;;MAQC;CAEJ;;;;;oBAnNmB,+BAA+B;4BAEvB,wCAAwC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../core/assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
|
|
3
3
|
import Vector2 from '../../../core/geom/Vector2.js';
|
|
4
4
|
import { objectDeepEquals } from "../../../core/model/object/objectDeepEquals.js";
|
|
5
5
|
import ObservedBoolean from "../../../core/model/ObservedBoolean.js";
|
|
@@ -148,10 +148,12 @@ class GUIElement {
|
|
|
148
148
|
* @return {number}
|
|
149
149
|
*/
|
|
150
150
|
hash() {
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
return hash_mix3(
|
|
152
|
+
hash_mix3(
|
|
153
|
+
this.flags,
|
|
154
|
+
computeStringHash(this.klass),
|
|
155
|
+
this.anchor.hash()
|
|
156
|
+
),
|
|
155
157
|
computeStringHash(this.group),
|
|
156
158
|
this.visible.hash()
|
|
157
159
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
|
|
2
2
|
import Vector3 from '../../../../core/geom/Vector3.js';
|
|
3
3
|
import { HeadsUpDisplayFlag } from "./HeadsUpDisplayFlag.js";
|
|
4
4
|
|
|
@@ -73,7 +73,7 @@ class HeadsUpDisplay {
|
|
|
73
73
|
* @return {number}
|
|
74
74
|
*/
|
|
75
75
|
hash() {
|
|
76
|
-
return
|
|
76
|
+
return hash_mix2(
|
|
77
77
|
this.flags,
|
|
78
78
|
this.worldOffset.hash()
|
|
79
79
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewportPosition.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/gui/position/ViewportPosition.js"],"names":[],"mappings":"oCAOU,MAAM;;;;;;AAOhB;
|
|
1
|
+
{"version":3,"file":"ViewportPosition.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/gui/position/ViewportPosition.js"],"names":[],"mappings":"oCAOU,MAAM;;;;;;AAOhB;IA8GI,4CAMC;IAnHD;;;OAGG;IACH,UAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,QAFU,OAAO,CAEM;IACvB;;;OAGG;IACH,QAFU,OAAO,CAEU;IAG3B;;;;OAIG;IACH,sBAFU,OAAO,CAEY;IAE7B;;;;OAIG;IACH,iBAFU,MAAM,CAEK;IAGrB;;;OAGG;IACH,mBAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,SAFU,eAAe,CAEW;IAEpC;;;;OAIG;IACH,cAHW,gBAAgB,GACd,OAAO,CAWnB;IAED,eAcC;IAED;;;;;;;;aAkBC;IAED;;;;;;;;;;;;;;;;;MAUC;CASJ;;;;;oBAlImB,kCAAkC;4BAC1B,2CAA2C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hash_mix3 } from "../../../../core/math/hash/hash_mix3.js";
|
|
2
2
|
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
3
3
|
import ObservedBoolean from "../../../../core/model/ObservedBoolean.js";
|
|
4
4
|
import { computeHashFloat } from "../../../../core/primitives/numbers/computeHashFloat.js";
|
|
@@ -75,12 +75,16 @@ class ViewportPosition {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
hash() {
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
return hash_mix3(
|
|
79
|
+
hash_mix3(
|
|
80
|
+
hash_mix3(
|
|
81
|
+
this.position.hash(),
|
|
82
|
+
this.offset.hash(),
|
|
83
|
+
this.anchor.hash()
|
|
84
|
+
),
|
|
85
|
+
this.resolveGuiCollisions ? 1 : 0,
|
|
86
|
+
computeHashFloat(this.screenEdgeWidth)
|
|
87
|
+
),
|
|
84
88
|
this.stickToScreenEdge ? 1 : 0,
|
|
85
89
|
this.enabled.hash()
|
|
86
90
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IKGoalSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/ik/IKGoalSystem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IKGoalSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/ik/IKGoalSystem.js"],"names":[],"mappings":"AA0OA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH;;IAEI,6DAA6C;IAE7C,kbASE;IAEF;;;OAGG;IACH,gBAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,WAFU,MAAM,CAEC;IAkDjB;;;;OAIG;IACH,WAJW,MAAM,cACN,mBAAmB,UACnB,MAAM,QAgChB;IAED;;;;OAIG;IACH,aAJW,MAAM,cACN,mBAAmB,UACnB,MAAM,QAkBhB;IAED,sCA+BC;;CA6nBJ;uBA1hCsB,cAAc;oCAED,gDAAgD;uBAQ7D,aAAa;4BAD7B,6BAA6B;4CA3BQ,oDAAoD;yCAEvD,uDAAuD;0BAQtE,2BAA2B;kCAEnB,6BAA6B;6BAIlC,2BAA2B;sBAPlC,4BAA4B"}
|
|
@@ -19,6 +19,7 @@ import { GPUStateAuthorityFlags } from "../gpu/GPUStateAuthorityFlags.js";
|
|
|
19
19
|
import { gpu_authority_hold } from "../gpu/gpu_authority_hold.js";
|
|
20
20
|
import { gpu_authority_unhold } from "../gpu/gpu_authority_unhold.js";
|
|
21
21
|
import { ParentEntity } from "../parent/ParentEntity.js";
|
|
22
|
+
import { parent_entity_model_of } from "../parent/parent_entity_model_of.js";
|
|
22
23
|
import { System } from "../System.js";
|
|
23
24
|
import { TRANSFORM_ATTACHMENT_EVENT_CHANGE } from "../transform-attachment/TRANSFORM_ATTACHMENT_EVENT_CHANGE.js";
|
|
24
25
|
import { TransformAttachment } from "../transform-attachment/TransformAttachment.js";
|
|
@@ -354,8 +355,8 @@ export class IKGoalSystem extends System {
|
|
|
354
355
|
record.entity = entity;
|
|
355
356
|
record.goal = goal;
|
|
356
357
|
record.system = this;
|
|
357
|
-
record.model =
|
|
358
|
-
record.target_model = dataset.entityExists(goal.target) ?
|
|
358
|
+
record.model = parent_entity_model_of(dataset, entity);
|
|
359
|
+
record.target_model = dataset.entityExists(goal.target) ? parent_entity_model_of(dataset, goal.target) : -1;
|
|
359
360
|
|
|
360
361
|
this.#records.set(entity, record);
|
|
361
362
|
|
|
@@ -1071,23 +1072,6 @@ export class IKGoalSystem extends System {
|
|
|
1071
1072
|
}
|
|
1072
1073
|
}
|
|
1073
1074
|
|
|
1074
|
-
/**
|
|
1075
|
-
* The entity whose clips drive `entity`: the model its lifetime belongs to, or itself.
|
|
1076
|
-
*
|
|
1077
|
-
* @param {EntityComponentDataset} dataset
|
|
1078
|
-
* @param {number} entity
|
|
1079
|
-
* @returns {number}
|
|
1080
|
-
*/
|
|
1081
|
-
function model_of(dataset, entity) {
|
|
1082
|
-
const owner = dataset.getComponent(entity, ParentEntity);
|
|
1083
|
-
|
|
1084
|
-
if (owner === undefined || owner === null) {
|
|
1085
|
-
return entity;
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
return owner.entity;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
1075
|
/**
|
|
1092
1076
|
* Goals grouped by connected paths: two goals whose paths share a bone are solved together.
|
|
1093
1077
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The entity whose clips drive `entity`: the model its lifetime belongs to, or itself.
|
|
3
|
+
*
|
|
4
|
+
* A placed model's bones each carry a {@link ParentEntity} naming the model's root, and the root is
|
|
5
|
+
* where the model's clips and animation drivers live. So the model of a bone is one step up the
|
|
6
|
+
* lifetime edge, and an entity without one — a root, a prop, a hand-made rig — is its own model.
|
|
7
|
+
*
|
|
8
|
+
* One step, not a walk to the top: a model placed under another model is still its own model, with
|
|
9
|
+
* its own clips.
|
|
10
|
+
*
|
|
11
|
+
* @param {EntityComponentDataset} dataset
|
|
12
|
+
* @param {number} entity
|
|
13
|
+
* @returns {number} the model entity; `entity` itself when it has no {@link ParentEntity}, or one
|
|
14
|
+
* naming no entity yet (`-1`)
|
|
15
|
+
*/
|
|
16
|
+
export function parent_entity_model_of(dataset: EntityComponentDataset, entity: number): number;
|
|
17
|
+
//# sourceMappingURL=parent_entity_model_of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parent_entity_model_of.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/parent/parent_entity_model_of.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,gFAJW,MAAM,GACJ,MAAM,CAWlB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ParentEntity } from "./ParentEntity.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The entity whose clips drive `entity`: the model its lifetime belongs to, or itself.
|
|
5
|
+
*
|
|
6
|
+
* A placed model's bones each carry a {@link ParentEntity} naming the model's root, and the root is
|
|
7
|
+
* where the model's clips and animation drivers live. So the model of a bone is one step up the
|
|
8
|
+
* lifetime edge, and an entity without one — a root, a prop, a hand-made rig — is its own model.
|
|
9
|
+
*
|
|
10
|
+
* One step, not a walk to the top: a model placed under another model is still its own model, with
|
|
11
|
+
* its own clips.
|
|
12
|
+
*
|
|
13
|
+
* @param {EntityComponentDataset} dataset
|
|
14
|
+
* @param {number} entity
|
|
15
|
+
* @returns {number} the model entity; `entity` itself when it has no {@link ParentEntity}, or one
|
|
16
|
+
* naming no entity yet (`-1`)
|
|
17
|
+
*/
|
|
18
|
+
export function parent_entity_model_of(dataset, entity) {
|
|
19
|
+
const owner = dataset.getComponent(entity, ParentEntity);
|
|
20
|
+
|
|
21
|
+
if (owner === undefined || owner === null || owner.entity < 0) {
|
|
22
|
+
return entity;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return owner.entity;
|
|
26
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Index of the first element of the 4x4 affine matrix inside a {@link Transform64}.
|
|
6
6
|
*
|
|
7
7
|
* It is 0, which means a `Transform64` can be passed to any `mat4` function directly,
|
|
8
|
-
* in place of the matrix - `
|
|
8
|
+
* in place of the matrix - `m4_multiply_f64(out, a_transform, b_transform)` and the like.
|
|
9
9
|
* @type {number}
|
|
10
10
|
*/
|
|
11
11
|
export const TRANSFORM64_MATRIX_OFFSET: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transform64.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/transform/Transform64.js"],"names":[],"mappings":"AAUA;;GAEG;AAEH;;;;;;GAMG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;;;;;GAOG;AACH,6CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,0CAFU,MAAM,CAE8B;AAE9C;;;GAGG;AACH,uCAFU,MAAM,CAE2B;AAE3C;;;GAGG;AACH,+BAFU,MAAM,CAEmB;AASnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;
|
|
1
|
+
{"version":3,"file":"Transform64.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/transform/Transform64.js"],"names":[],"mappings":"AAUA;;GAEG;AAEH;;;;;;GAMG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;;;;;GAOG;AACH,6CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,0CAFU,MAAM,CAE8B;AAE9C;;;GAGG;AACH,uCAFU,MAAM,CAE2B;AAE3C;;;GAGG;AACH,+BAFU,MAAM,CAEmB;AASnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH;IAmqBI;;;;;;;;;;;;;OAaG;IACH,2BAZW,MAAM,iBACN,MAAM,iBACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,WACN,MAAM,WACN,MAAM,WACN,MAAM,GACJ,WAAW,CAgBvB;IAED;;;;OAIG;IACH,sBAHW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,GAChC,WAAW,CAQvB;IAED;;;;OAIG;IACH,4BAFa,WAAW,CAQvB;IAvtBD;;;OAGG;IACH,uDAIC;IAED,cAIC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,2BAEC;IAgBD;;;;OAIG;IACH,iCAEC;IArBD;;;;;;;;;OASG;IACH,gCAEC;IAWD,4BAEC;IAED,4BAEC;IAED,4BAEC;IAED;;;;;;OAMG;IACH,kBAJW,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAWD;;;OAGG;IACH,8BAEC;IAfD;;;;OAIG;IACH,6BAEC;IAUD,yBAEC;IAED,yBAEC;IAED,yBAEC;IAED,yBAEC;IAED;;;;;;;OAOG;IACH,eALW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAYhB;IAgCD;;;;;;;;;;;;;;OAcG;IACH,6BAIC;IAjDD;;;;;;;;;;;;;;OAcG;IACH,4BAaC;IA4CD;;;;;;;;;;OAUG;IACH,2BAmBC;IAnDD;;;;;OAKG;IACH,0BAaC;IAuDD;;;;;;;;;;;;;OAaG;IACH,wBAkBC;IArDD;;;;;OAKG;IACH,uBAaC;IAoCD;;;;;;;;;;;;;;;;;OAiBG;IACH,kBAPW,MAAM,YACN,MAAM,YACN,MAAM,SACN,MAAM,SACN,MAAM,SACN,MAAM,QAwBhB;IAED;;;;OAIG;IACH,eAHW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,GAAC,OAAO,OAC1C,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,GAAC,OAAO,QAOpD;IAWD;;;OAGG;IACH,2BAEC;IAfD;;;;OAIG;IACH,0BAEC;IAUD,sBAEC;IAED,sBAEC;IAED,sBAEC;IAED;;;;;OAKG;IACH,YAJW,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAED;;;OAGG;IACH,kBAFW,MAAM,QAIhB;IAED;;;;;;;;;OASG;IACH,qBAQC;IAED;;;;;;;;;OASG;IACH,yBAOC;IAED;;;;;OAKG;IACH,eAHW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,GAChC,IAAI,CAahB;IAED;;;;OAIG;IACH,gBAHW,WAAW,GACT,IAAI,CAIhB;IAED;;;;;;;;;;OAUG;IACH,sBAJW,WAAW,KACX,WAAW,GACT,IAAI,CAahB;IAED;;;;;OAKG;IACH,qBAcC;IAVG,UAAW;IACX,UAAW;IACX,WAAY;IACZ,WAAY;IAShB;;;;;OAKG;IACH,cAFa,OAAO,CAanB;IAED;;;OAGG;IACH,YAFW,WAAW,QAIrB;IAED;;;OAGG;IACH,SAFa,WAAW,CAQvB;IAED;;;;;OAKG;IACH,cAHW,WAAW,GACT,OAAO,CAInB;IAED;;;;;;OAMG;IACH,QAFa,MAAM,CAwBlB;IAED;;;;;;;OAOG;IACH,0BA0BC;IAED;;;OAGG;IACH,UAFa;QAAC,WAAW,EAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC;QAAC,QAAQ,EAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC;QAAC,KAAK,EAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC,CAAA;KAAC,CAqB1I;IA2EL;;;;;;;;OAQG;IACH,wBANU,OAAO,CAMkB;CAjBlC;;kBAIS,MAAM;;sBA3zBH,OAAO,+BAA+B,EAAE,OAAO"}
|
|
@@ -3,7 +3,7 @@ import { array_copy } from "../../../core/collection/array/array_copy.js";
|
|
|
3
3
|
import { array_range_equal_strict } from "../../../core/collection/array/array_range_equal_strict.js";
|
|
4
4
|
import { m4_decompose_array } from "../../../core/geom/3d/mat4/m4_decompose_array.js";
|
|
5
5
|
import { m4_from_rotation_translation_scale_array } from "../../../core/geom/3d/mat4/m4_from_rotation_translation_scale_array.js";
|
|
6
|
-
import {
|
|
6
|
+
import { m4_multiply_f64 } from "../../../core/geom/3d/mat4/m4_multiply_f64.js";
|
|
7
7
|
import { quat3_multiply } from "../../../core/geom/3d/quaternion/quat3_multiply.js";
|
|
8
8
|
import { v3_quaternion_apply } from "../../../core/geom/vec3/v3_quaternion_apply.js";
|
|
9
9
|
import { t64_look_rotation } from "./t64_look_rotation.js";
|
|
@@ -16,7 +16,7 @@ import { t64_look_rotation } from "./t64_look_rotation.js";
|
|
|
16
16
|
* Index of the first element of the 4x4 affine matrix inside a {@link Transform64}.
|
|
17
17
|
*
|
|
18
18
|
* It is 0, which means a `Transform64` can be passed to any `mat4` function directly,
|
|
19
|
-
* in place of the matrix - `
|
|
19
|
+
* in place of the matrix - `m4_multiply_f64(out, a_transform, b_transform)` and the like.
|
|
20
20
|
* @type {number}
|
|
21
21
|
*/
|
|
22
22
|
export const TRANSFORM64_MATRIX_OFFSET = 0;
|
|
@@ -595,8 +595,9 @@ export class Transform64 extends Float64Array {
|
|
|
595
595
|
assert.equal(a.isTransform64, true, 'a.isTransform64 !== true');
|
|
596
596
|
assert.equal(b.isTransform64, true, 'b.isTransform64 !== true');
|
|
597
597
|
|
|
598
|
-
//
|
|
599
|
-
|
|
598
|
+
// every element is read before the write that could replace it, so aliasing is safe; the
|
|
599
|
+
// Float64Array-only copy, because the shared m4_multiply boxes every element it writes
|
|
600
|
+
m4_multiply_f64(this, a, b);
|
|
600
601
|
|
|
601
602
|
this.updateComponents();
|
|
602
603
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pack a transform's rigid pose, `[tx, ty, tz, qx, qy, qz, qw]`, into an array: the translation and
|
|
3
|
+
* the rotation, without the scale or the matrix.
|
|
4
|
+
*
|
|
5
|
+
* Seven floats is the shape a contact kernel, an oriented box transform or a cloth holder takes a
|
|
6
|
+
* pose in. Read off the transform's lanes (a {@link Transform64} is a `Float64Array`) rather than
|
|
7
|
+
* through `translation_x` and the rest: a hot caller that does not inline those accessor calls gets
|
|
8
|
+
* each number back boxed, and the vector getters allocate outright.
|
|
9
|
+
*
|
|
10
|
+
* @param {number[]|Float32Array|Float64Array} out
|
|
11
|
+
* @param {number} out_offset receives 7 floats
|
|
12
|
+
* @param {Transform64|Float64Array} transform a `Transform64`, or an array in its layout
|
|
13
|
+
*/
|
|
14
|
+
export function t64_read_pose_array(out: number[] | Float32Array | Float64Array, out_offset: number, transform: Transform64 | Float64Array): void;
|
|
15
|
+
//# sourceMappingURL=t64_read_pose_array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"t64_read_pose_array.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/transform/t64_read_pose_array.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,yCAJW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,cAClC,MAAM,aACN,cAAY,YAAY,QAUlC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TRANSFORM64_ROTATION_OFFSET, TRANSFORM64_TRANSLATION_OFFSET } from "./Transform64.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pack a transform's rigid pose, `[tx, ty, tz, qx, qy, qz, qw]`, into an array: the translation and
|
|
5
|
+
* the rotation, without the scale or the matrix.
|
|
6
|
+
*
|
|
7
|
+
* Seven floats is the shape a contact kernel, an oriented box transform or a cloth holder takes a
|
|
8
|
+
* pose in. Read off the transform's lanes (a {@link Transform64} is a `Float64Array`) rather than
|
|
9
|
+
* through `translation_x` and the rest: a hot caller that does not inline those accessor calls gets
|
|
10
|
+
* each number back boxed, and the vector getters allocate outright.
|
|
11
|
+
*
|
|
12
|
+
* @param {number[]|Float32Array|Float64Array} out
|
|
13
|
+
* @param {number} out_offset receives 7 floats
|
|
14
|
+
* @param {Transform64|Float64Array} transform a `Transform64`, or an array in its layout
|
|
15
|
+
*/
|
|
16
|
+
export function t64_read_pose_array(out, out_offset, transform) {
|
|
17
|
+
out[out_offset] = transform[TRANSFORM64_TRANSLATION_OFFSET];
|
|
18
|
+
out[out_offset + 1] = transform[TRANSFORM64_TRANSLATION_OFFSET + 1];
|
|
19
|
+
out[out_offset + 2] = transform[TRANSFORM64_TRANSLATION_OFFSET + 2];
|
|
20
|
+
out[out_offset + 3] = transform[TRANSFORM64_ROTATION_OFFSET];
|
|
21
|
+
out[out_offset + 4] = transform[TRANSFORM64_ROTATION_OFFSET + 1];
|
|
22
|
+
out[out_offset + 5] = transform[TRANSFORM64_ROTATION_OFFSET + 2];
|
|
23
|
+
out[out_offset + 6] = transform[TRANSFORM64_ROTATION_OFFSET + 3];
|
|
24
|
+
}
|