@woosh/meep-engine 3.44.0 → 3.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bundle-worker-terrain.js +1 -1
- package/package.json +1 -1
- package/src/core/assert.d.ts.map +1 -1
- package/src/core/assert.js +5 -1
- package/src/core/binary/hash/XXH128Hash.d.ts +1 -37
- package/src/core/binary/hash/XXH128Hash.d.ts.map +1 -1
- package/src/core/binary/hash/XXH128Hash.js +4 -55
- package/src/core/binary/hash/XXH3_SECRET.d.ts +1 -12
- package/src/core/binary/hash/XXH3_SECRET.d.ts.map +1 -1
- package/src/core/binary/hash/XXH3_SECRET.js +4 -25
- package/src/core/binary/hash/crc32.d.ts +1 -15
- package/src/core/binary/hash/crc32.d.ts.map +1 -1
- package/src/core/binary/hash/crc32.js +4 -96
- package/src/core/binary/hash/xxh3_128.d.ts +1 -9
- package/src/core/binary/hash/xxh3_128.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_128.js +4 -341
- package/src/core/binary/hash/xxh3_64.d.ts +1 -8
- package/src/core/binary/hash/xxh3_64.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_64.js +4 -241
- package/src/core/binary/hash/xxh3_common.d.ts +1 -223
- package/src/core/binary/hash/xxh3_common.d.ts.map +1 -1
- package/src/core/binary/hash/xxh3_common.js +90 -476
- package/src/core/collection/array/array_sort_insertion_ascending.d.ts +19 -0
- package/src/core/collection/array/array_sort_insertion_ascending.d.ts.map +1 -0
- package/src/core/collection/array/array_sort_insertion_ascending.js +31 -0
- package/src/core/collection/array/combine_hash.d.ts +6 -0
- package/src/core/collection/array/combine_hash.d.ts.map +1 -1
- package/src/core/collection/array/combine_hash.js +6 -0
- package/src/core/function/FunctionCompiler.js +2 -2
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts +27 -0
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.d.ts.map +1 -0
- package/src/core/geom/3d/aabb/aabb3_array_round_outward_f32.js +39 -0
- package/src/core/geom/3d/aabb/aabb3_from_v3_array.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_from_v3_array.js +4 -1
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts +2 -2
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.js +1 -1
- package/src/core/geom/3d/mat4/m4_multiply.d.ts +3 -0
- package/src/core/geom/3d/mat4/m4_multiply.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_multiply.js +3 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts +30 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_multiply_f64.js +106 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts +21 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_apply_inverse_point_array.js +36 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts +25 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_apply_point_array.js +40 -0
- package/src/core/geom/3d/pose/pose3_compose_array.d.ts +28 -0
- package/src/core/geom/3d/pose/pose3_compose_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_compose_array.js +41 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.d.ts +29 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.d.ts.map +1 -0
- package/src/core/geom/3d/pose/pose3_to_local_array.js +42 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts +28 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_clamp_angle_array.js +66 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts +22 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_left_array.js +30 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts +23 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_multiply_conjugate_right_array.js +31 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts +26 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.d.ts.map +1 -0
- package/src/core/geom/3d/triangle/tri3_compute_normal_area_weighted_array.js +46 -0
- package/src/core/geom/ConicRay.js +2 -2
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +8 -5
- package/src/core/geom/vec3/v3_distance_array.d.ts +11 -0
- package/src/core/geom/vec3/v3_distance_array.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_distance_array.js +19 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.d.ts +23 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_normalize_array_checked.js +49 -0
- package/src/core/geom/vec3/v3_reject_array.d.ts +15 -0
- package/src/core/geom/vec3/v3_reject_array.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_reject_array.js +32 -0
- package/src/core/graph/csr/csr_build_incidence.d.ts +26 -0
- package/src/core/graph/csr/csr_build_incidence.d.ts.map +1 -0
- package/src/core/graph/csr/csr_build_incidence.js +71 -0
- package/src/core/graph/csr/csr_graph_color_greedy.d.ts +25 -0
- package/src/core/graph/csr/csr_graph_color_greedy.d.ts.map +1 -0
- package/src/core/graph/csr/csr_graph_color_greedy.js +83 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.d.ts +15 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.d.ts.map +1 -0
- package/src/core/graph/csr/csr_graph_validate_coloring.js +33 -0
- package/src/core/math/hash/XXH128Hash.d.ts +38 -0
- package/src/core/math/hash/XXH128Hash.d.ts.map +1 -0
- package/src/core/math/hash/XXH128Hash.js +55 -0
- package/src/core/math/hash/XXH3_SECRET.d.ts +13 -0
- package/src/core/math/hash/XXH3_SECRET.d.ts.map +1 -0
- package/src/core/math/hash/XXH3_SECRET.js +25 -0
- package/src/core/math/hash/crc32.d.ts +16 -0
- package/src/core/math/hash/crc32.d.ts.map +1 -0
- package/src/core/math/hash/crc32.js +96 -0
- package/src/core/math/hash/xxh3_128.d.ts +10 -0
- package/src/core/math/hash/xxh3_128.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_128.js +341 -0
- package/src/core/math/hash/xxh3_64.d.ts +9 -0
- package/src/core/math/hash/xxh3_64.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_64.js +241 -0
- package/src/core/math/hash/xxh3_common.d.ts +224 -0
- package/src/core/math/hash/xxh3_common.d.ts.map +1 -0
- package/src/core/math/hash/xxh3_common.js +476 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts +26 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.d.ts.map +1 -0
- package/src/core/math/linalg/matrix_symmetric_3x3_solve_ldlt.js +71 -0
- package/src/core/math/lookup/ParameterLookupTable.js +2 -2
- package/src/core/math/max2_exact.d.ts +15 -0
- package/src/core/math/max2_exact.d.ts.map +1 -0
- package/src/core/math/max2_exact.js +30 -0
- package/src/core/math/min2_exact.d.ts +20 -0
- package/src/core/math/min2_exact.d.ts.map +1 -0
- package/src/core/math/min2_exact.js +35 -0
- package/src/core/model/node-graph/node/NodeInstancePortReference.js +2 -2
- package/src/core/model/reactive/model/ReactiveBinaryExpression.js +2 -2
- package/src/core/model/reactive/model/terminal/ReactiveReference.js +2 -2
- package/src/engine/asset/AssetDescription.js +2 -2
- package/src/engine/ecs/animation/Animation.js +2 -2
- package/src/engine/ecs/animation/AnimationClip.d.ts.map +1 -1
- package/src/engine/ecs/animation/AnimationClip.js +7 -5
- package/src/engine/ecs/gui/GUIElement.d.ts.map +1 -1
- package/src/engine/ecs/gui/GUIElement.js +7 -5
- package/src/engine/ecs/gui/hud/HeadsUpDisplay.js +2 -2
- package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
- package/src/engine/ecs/gui/position/ViewportPosition.js +11 -7
- package/src/engine/ecs/ik/IKGoalSystem.d.ts.map +1 -1
- package/src/engine/ecs/ik/IKGoalSystem.js +3 -19
- package/src/engine/ecs/parent/parent_entity_model_of.d.ts +17 -0
- package/src/engine/ecs/parent/parent_entity_model_of.d.ts.map +1 -0
- package/src/engine/ecs/parent/parent_entity_model_of.js +26 -0
- package/src/engine/ecs/transform/Transform64.d.ts +1 -1
- package/src/engine/ecs/transform/Transform64.d.ts.map +1 -1
- package/src/engine/ecs/transform/Transform64.js +5 -4
- package/src/engine/ecs/transform/t64_read_pose_array.d.ts +15 -0
- package/src/engine/ecs/transform/t64_read_pose_array.d.ts.map +1 -0
- package/src/engine/ecs/transform/t64_read_pose_array.js +24 -0
- package/src/engine/graphics/ecs/animation/animator/AnimationClip.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/AnimationClip.js +8 -5
- package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/AnimationNotification.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationGraphDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +8 -5
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/Decal.js +9 -8
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts +2 -0
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.d.ts.map +1 -1
- package/src/engine/graphics/geometry/geometry_construct_triangle_normal_area_weighted.js +10 -21
- package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.js +9 -6
- package/src/engine/graphics3/AnimationGraphSystem.d.ts +5 -0
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +48 -2
- package/src/engine/graphics3/AnimationSystem.d.ts +5 -0
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +47 -2
- package/src/engine/graphics3/ParticipatingMedia.js +204 -204
- package/src/engine/graphics3/animation/AnimationClips.d.ts +5 -0
- package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -1
- package/src/engine/graphics3/animation/AnimationClips.js +5 -0
- package/src/engine/graphics3/register_clips.d.ts +29 -0
- package/src/engine/graphics3/register_clips.d.ts.map +1 -1
- package/src/engine/graphics3/register_clips.js +52 -0
- package/src/engine/grid/obstacle/GridObstacle.js +2 -2
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +2 -2
- package/src/engine/interpolation/Interpolated.js +2 -2
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts +9 -0
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts.map +1 -1
- package/src/engine/physics/broadphase/compute_fat_world_aabb.js +3 -1
- package/src/engine/physics/cloth/PLAN.md +10 -8
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts +22 -0
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_bind_in_frame.js +51 -19
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +16 -2
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.d.ts.map +1 -1
- package/src/engine/physics/cloth/build/cloth_proxy_from_mesh.js +19 -24
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +7 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/ClothColliderIndex.js +85 -67
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.js +19 -101
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +2 -5
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_pack.js +7 -15
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +16 -61
- package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/Cloth.js +7 -5
- package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothCollider.js +7 -5
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts +0 -1
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.js +6 -19
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +1 -2
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +3 -12
- package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothDynamics.js +20 -11
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +40 -130
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +17 -58
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +3 -3
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +44 -104
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +6 -13
- package/src/engine/physics/cloth/ecs/cloth_holds.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_holds.js +15 -40
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +45 -79
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +7 -27
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +30 -62
- package/src/engine/physics/cloth/playground/cloth_playground_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/cloth_playground_build.js +2 -3
- package/src/engine/physics/cloth/playground/collide_main.js +2 -28
- package/src/engine/physics/cloth/playground/garment_main.js +4 -19
- package/src/engine/physics/cloth/playground/main.js +6 -48
- package/src/engine/physics/cloth/playground/rig_main.js +947 -955
- package/src/engine/physics/cloth/playground/wind_main.js +8 -7
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +16 -76
- package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts +10 -8
- package/src/engine/physics/cloth/solver/cloth_color_particles.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_color_particles.js +30 -102
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +3 -2
- package/src/engine/physics/cloth/solver/cloth_hold_line.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_hold_line.js +2 -14
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts +21 -0
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_kinetic_energy.js +45 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts +32 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_particle_coupling.js +133 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts +16 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_particle_of_source.js +19 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +6 -55
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.js +30 -65
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +6 -28
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +2 -3
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts +21 -0
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_stretch_residual.js +54 -0
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts +15 -0
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_vertex_accumulator.js +28 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts +30 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_worst_tether_ratio.js +56 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +3 -17
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +2 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +7 -25
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +3 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +40 -62
- package/src/engine/physics/ecs/ContactProbeSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/ContactProbeSystem.js +2 -18
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +9 -50
- package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidField.js +7 -5
- package/src/engine/physics/fluid/ecs/FluidComponent.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidComponent.js +19 -11
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts +24 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_domain_bounds.js +42 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts +25 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/fluid_sample_velocity_world_mps.js +40 -0
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +2 -2
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +2 -2
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +11 -7
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.js +11 -7
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/WakeFluidEffector.js +16 -9
- package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.d.ts.map +1 -1
- package/src/engine/physics/inverse_kinematics/frame_fabrik/frame_fabrik_solve.js +40 -90
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/capsule_contacts.js +3 -5
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js +2 -14
- package/src/engine/physics/narrowphase/hull_sphere_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/hull_sphere_contact.js +2 -5
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/narrowphase_step.js +13 -32
- package/src/engine/physics/narrowphase/sphere_box_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/sphere_box_contact.js +2 -5
- package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitter.js +12 -7
- package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts.map +1 -1
- package/src/engine/sound/ecs/trigger/AudioEventTrigger.js +192 -191
- package/src/engine/sound/simulation/core/AcousticMedium.js +2 -2
- package/src/engine/sound/simulation/definition/AcousticDirectivity.js +2 -2
- package/src/engine/sound/simulation/definition/AcousticMaterial.d.ts.map +1 -1
- package/src/engine/sound/simulation/definition/AcousticMaterial.js +11 -7
- package/src/engine/sound/sopra/definition/BusDefinition.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/BusDefinition.js +5 -4
- package/src/engine/sound/sopra/definition/DuckingRule.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/DuckingRule.js +7 -5
- package/src/engine/sound/sopra/definition/EventDescription.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/EventDescription.js +23 -13
- package/src/engine/sound/sopra/definition/MixerSnapshot.js +2 -2
- package/src/engine/sound/sopra/definition/ParameterDefinition.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/ParameterDefinition.js +7 -5
- package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.js +4 -3
- package/src/engine/sound/sopra/definition/clip/ContainerAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.js +3 -3
- package/src/engine/sound/sopra/definition/clip/SampleAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SampleAudioClip.js +16 -9
- package/src/engine/sound/sopra/definition/clip/SilenceAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.js +2 -2
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.js +7 -5
- package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/EqEffect.js +8 -5
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +2 -2
- package/src/engine/sound/sopra/legacy/SoundEmitter.d.ts.map +1 -1
- package/src/engine/sound/sopra/legacy/SoundEmitter.js +357 -352
- package/src/engine/sound/sopra/legacy/SoundTrack.d.ts.map +1 -1
- package/src/engine/sound/sopra/legacy/SoundTrack.js +281 -278
- package/src/format/image/png/PNGReader.js +644 -644
- package/src/format/image/png/crc32.d.ts +1 -1
- package/src/format/image/png/crc32.js +7 -8
- package/src/format/texture/basis/transcode/etc1s_to_astc.d.ts.map +1 -1
- package/src/format/texture/basis/transcode/etc1s_to_astc.js +2 -1
- package/src/shade/descriptor/binding/BindGroupLayoutDescriptor.js +2 -2
- package/src/shade/descriptor/binding/BindGroupLayoutEntry.d.ts.map +1 -1
- package/src/shade/descriptor/binding/BindGroupLayoutEntry.js +12 -8
- package/src/shade/descriptor/binding/StorageTextureBindingLayout.js +2 -2
- package/src/shade/descriptor/binding/TextureBindingLayout.js +2 -2
- package/src/shade/descriptor/blend/BlendComponent.js +2 -2
- package/src/shade/descriptor/pipeline/PipelineDescriptorBase.js +2 -2
- package/src/shade/descriptor/pipeline/PipelineLayoutDescriptor.js +2 -2
- package/src/shade/descriptor/pipeline/ProgrammableStage.js +2 -2
- package/src/shade/descriptor/pipeline/compute/ComputePipelineDescriptor.js +2 -2
- package/src/shade/descriptor/pipeline/render/ColorTargetState.js +2 -2
- package/src/shade/descriptor/pipeline/render/FragmentState.js +2 -2
- package/src/shade/descriptor/pipeline/render/PrimitiveState.js +2 -2
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js +8 -5
- package/src/shade/descriptor/pipeline/render/VertexAttribute.js +2 -2
- package/src/shade/descriptor/texture/SamplerDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/texture/SamplerDescriptor.js +20 -12
- package/src/shade/descriptor/texture/TextureDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/texture/TextureDescriptor.js +11 -7
- package/src/shade/device/graph/BufferResourceDescriptor.d.ts.map +1 -1
- package/src/shade/device/graph/BufferResourceDescriptor.js +196 -193
- package/src/shade/device/graph/TextureResourceDescriptor.d.ts.map +1 -1
- package/src/shade/device/graph/TextureResourceDescriptor.js +178 -173
- package/src/shade/device/timing/profile/sgpt_read_header.js +1 -1
- package/src/shade/device/timing/profile/sgpt_read_records.js +1 -1
- package/src/shade/device/timing/profile/sgpt_write_header.js +1 -1
- package/src/shade/device/timing/profile/sgpt_write_record.js +1 -1
- package/src/shade/playground/image_decode_bench/main.js +2 -1
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.js +2 -1
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.js +2 -1
- package/src/shade/playground/ssr_variance/statistics.d.ts.map +1 -1
- package/src/shade/playground/ssr_variance/statistics.js +2 -1
- package/src/shade/playground/texture_encode/main.d.ts.map +1 -1
- package/src/shade/playground/texture_encode/main.js +2 -1
- package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/measure.js +2 -1
- package/src/shade/renderer/binding/BufferBinding.js +2 -2
- package/src/shade/renderer/buffer/table/gpu_database_check_links.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/gpu_database_check_links.js +2 -1
- package/src/shade/renderer/camera/Camera.js +2 -2
- package/src/shade/renderer/geometry/Attribute.js +2 -2
- package/src/shade/renderer/geometry/Geometry.js +2 -2
- package/src/shade/renderer/geometry/geometry_deduplicate_vertices.js +2 -2
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +2 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +3 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_leaf_frontier.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_partition_into_groups.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_run_round.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_try_repack.js +3 -2
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.js +2 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.js +2 -1
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_asset_id.js +13 -13
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_directory_block_checksum.js +41 -41
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_frame_checksum.js +41 -41
- package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_header_checksum.js +25 -25
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +3 -2
- package/src/shade/renderer/material/StandardShadeMaterial.d.ts.map +1 -1
- package/src/shade/renderer/material/StandardShadeMaterial.js +13 -8
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_extract.js +3 -2
- package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.d.ts.map +1 -1
- package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js +14 -5
- package/src/shade/renderer/scene/optimization/sampler2d_from_image_bitmap.js +1 -1
- package/src/shade/renderer/shader/type/WGSLStructField.js +2 -2
- package/src/shade/renderer/shader/type/WebGPUArray.js +2 -2
- package/src/shade/renderer/shader/type/WebGPUStruct.d.ts.map +1 -1
- package/src/shade/renderer/shader/type/WebGPUStruct.js +9 -6
- package/src/shade/renderer/texture/ShadeTexture.d.ts.map +1 -1
- package/src/shade/renderer/texture/ShadeTexture.js +17 -10
- package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +2 -2
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +4 -4
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +6 -6
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +46 -55
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts +3 -3
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +14 -4
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +10 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +82 -40
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +4 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +8 -4
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +98 -86
- package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/shader_water_particles.js +440 -298
- package/src/view/common/HTMLElementCacheKey.d.ts.map +1 -1
- package/src/view/common/HTMLElementCacheKey.js +4 -3
- package/src/view/minimap/MinimapMarker.js +2 -2
|
@@ -1,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 { round_up } from "../../../../core/math/round_up.js";
|
|
4
4
|
import { CodeChunk } from "../compiler/CodeChunk.js";
|
|
5
5
|
import { f32, u32, vec4f, vec4u } from "./WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
@@ -61,7 +61,7 @@ export class WebGPUArray extends WebGPUType {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
hash() {
|
|
64
|
-
return
|
|
64
|
+
return hash_mix2(
|
|
65
65
|
this.type.hash(),
|
|
66
66
|
this.count
|
|
67
67
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGPUStruct.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shader/type/WebGPUStruct.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebGPUStruct.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shader/type/WebGPUStruct.js"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH;IAmNI;;;;;;;;;;;;;;OAcG;IACH,8BAHW,MAAM,GACL,YAAY,CAiCvB;IAED;;;;OAIG;IACH,6BAHc,eAAe,KACjB,YAAY,CAiBvB;IA5QD;;;OAGG;IACH,uBAEC;IAVD,kBAEC;IAUD;;;OAGG;IACH,iBAFU,eAAe,EAAE,CAEf;IAmBZ;;;;OAIG;IACH,YAHW,YAAY,GACV,IAAI,CAwBhB;IAED;;;OAGG;IACH,SAFY,YAAY,CAUvB;IAED;;;;;;;;OAQG;IACH,kBAJa,MAAM,CA+BlB;IAED;;;;;;OAMG;IACH,QAFa,IAAI,CAoChB;IAED,4BAYC;IAuGD;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAKnB;IAGD;;;;;OAKG;IACH,gBAJW,MAAM,GACL,eAAe,CAa1B;IA8GL;;;OAGG;IACH,mBAFU,OAAO,CAEc;;CAN9B;2BAvb0B,iBAAiB;gCAEZ,sBAAsB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
2
|
import LineBuilder from "../../../../core/codegen/LineBuilder.js";
|
|
3
|
-
import {
|
|
3
|
+
import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
|
|
4
|
+
import { hash_mix3 } from "../../../../core/math/hash/hash_mix3.js";
|
|
4
5
|
import { isArrayEqual } from "../../../../core/collection/array/isArrayEqual.js";
|
|
5
6
|
import { round_up } from "../../../../core/math/round_up.js";
|
|
6
7
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
@@ -210,11 +211,13 @@ export class WebGPUStruct extends WebGPUType {
|
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
hash() {
|
|
213
|
-
return
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
return hash_mix2(
|
|
215
|
+
hash_mix3(
|
|
216
|
+
computeStringHash(this.name),
|
|
217
|
+
this.#size,
|
|
218
|
+
this.#align
|
|
219
|
+
),
|
|
220
|
+
this.fields.length
|
|
218
221
|
);
|
|
219
222
|
}
|
|
220
223
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShadeTexture.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/texture/ShadeTexture.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShadeTexture.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/texture/ShadeTexture.js"],"names":[],"mappings":"AAeA;IA4GI;;;;OAIG;IACH,oBAHW,UAAU,GACR,YAAY,CAiBxB;IA/HD,cAAW;IAOX;;;OAGG;IACH,8BAEC;IAED;;;;;;;;;;;;;OAaG;IACH,aAFU,UAAU,GAAC,MAAM,GAAC,IAAI,CAEb;IAEnB;;;OAGG;IACH,yDAEC;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,iBAAiB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,iBAAiB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,iBAAiB,SACxB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,iBAAiB,GACtB,OAAO,CAInB;IAED,cAAsB;IAEtB,kBAAqC;IACrC,kBAAqC;IAErC;;;OAGG;IACH,cAFU,iBAAiB,CAEa;IAExC,cAA+B;IAC/B,cAA+B;IAC/B,cAA+B;IAE/B;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,wBAFU,iBAAiB,GAAC,MAAM,CAEgB;IAwBlD,eAiBC;IAED;;;;OAIG;IACH,cAHW,YAAY,GACV,OAAO,CAYnB;;CACJ;yBA3KY,OAAO,wBAAwB,EAAE,UAAU;yBAC3C,OAAO,iBAAiB,EAAE,UAAU;kCANf,wBAAwB;kCACxB,wBAAwB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { assert } from "../../../core/assert.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix2 } from "../../../core/math/hash/hash_mix2.js";
|
|
3
|
+
import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
|
|
3
4
|
import { optional_hash } from "../../../core/model/object/optional_hash.js";
|
|
4
5
|
import { ShadeTextureFlags } from "./ShadeTextureFlags.js";
|
|
5
6
|
import { TextureFilterType } from "./TextureFilterType.js";
|
|
@@ -143,15 +144,21 @@ export class ShadeTexture {
|
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
hash() {
|
|
146
|
-
return
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
return hash_mix2(
|
|
148
|
+
hash_mix3(
|
|
149
|
+
hash_mix3(
|
|
150
|
+
hash_mix3(
|
|
151
|
+
optional_hash(this.#image),
|
|
152
|
+
this.flags,
|
|
153
|
+
this.minFilter
|
|
154
|
+
),
|
|
155
|
+
this.magFilter,
|
|
156
|
+
this.mipmapFilter
|
|
157
|
+
),
|
|
158
|
+
this.wrapS,
|
|
159
|
+
this.wrapT
|
|
160
|
+
),
|
|
161
|
+
this.wrapR
|
|
155
162
|
);
|
|
156
163
|
}
|
|
157
164
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
2
|
import { BinaryBuffer } from "../../../../core/binary/BinaryBuffer.js";
|
|
3
3
|
import { platform_compute_endianness } from "../../../../core/binary/platform_compute_endianness.js";
|
|
4
|
-
import {
|
|
4
|
+
import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
|
|
5
5
|
import { HashMap } from "../../../../core/collection/map/HashMap.js";
|
|
6
6
|
import { Deque } from "../../../../core/collection/queue/Deque.js";
|
|
7
7
|
import { round_up } from "../../../../core/math/round_up.js";
|
|
@@ -69,7 +69,7 @@ class MipmapShaderKey {
|
|
|
69
69
|
* @return {number}
|
|
70
70
|
*/
|
|
71
71
|
hash() {
|
|
72
|
-
return
|
|
72
|
+
return hash_mix2(
|
|
73
73
|
computeStringHash(this.format),
|
|
74
74
|
this.filter,
|
|
75
75
|
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Most particle entries one point reads, over every level.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Most particle entries one point reads, over every level. A front's run of particles in a cell is one entry, so a
|
|
3
|
+
* point reads about one a front that reaches it; where it would read more than WATER_PARTICLE_CROWD_KEEP, the keep
|
|
4
|
+
* pass dooms the flattest runs in its cells, which fade out while what is left of the budget still draws them, and
|
|
5
|
+
* cuts, whole, the fronts the budget cannot hold.
|
|
6
6
|
*/
|
|
7
7
|
export const WATER_PARTICLE_GATHER_BUDGET: 64;
|
|
8
8
|
/**
|
|
@@ -5,10 +5,10 @@ import { chunk_water_spectrum } from "./spectrum/chunk_water_spectrum.js";
|
|
|
5
5
|
import { chunk_water_particle } from "./particles/chunk_water_particle.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Most particle entries one point reads, over every level.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Most particle entries one point reads, over every level. A front's run of particles in a cell is one entry, so a
|
|
9
|
+
* point reads about one a front that reaches it; where it would read more than WATER_PARTICLE_CROWD_KEEP, the keep
|
|
10
|
+
* pass dooms the flattest runs in its cells, which fade out while what is left of the budget still draws them, and
|
|
11
|
+
* cuts, whole, the fronts the budget cannot hold.
|
|
12
12
|
*/
|
|
13
13
|
export const WATER_PARTICLE_GATHER_BUDGET = 64;
|
|
14
14
|
|
|
@@ -133,8 +133,8 @@ fn water_surface_sum(wave: u32, p: vec2<f32>, footprint: f32) -> WaterSurfaceSum
|
|
|
133
133
|
visited++;
|
|
134
134
|
let entry = water_particle_entries[i];
|
|
135
135
|
if (entry.key != key || any(entry.cell != cell)) { continue; }
|
|
136
|
-
let field =
|
|
137
|
-
entry.dispersion, entry.distance, entry.phase);
|
|
136
|
+
let field = water_particle_run_field(p - entry.position, entry.angle, entry.amplitude, entry.radius, entry.half_length,
|
|
137
|
+
entry.dispersion, entry.distance, entry.phase, entry.run);
|
|
138
138
|
// a packet is geometry while its wavelength spans eight samples, fading out by four
|
|
139
139
|
let f = clamp(log2(entry.radius / (2.0 * footprint)), 0.0, 1.0);
|
|
140
140
|
let rough = sqrt(1.0 - f * f);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GPUWaterParticles.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/GPUWaterParticles.js"],"names":[],"mappings":"AAkCA,kHAAkH;AAClH,+CAAgD;AAUhD;;;;GAIG;AACH;
|
|
1
|
+
{"version":3,"file":"GPUWaterParticles.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/GPUWaterParticles.js"],"names":[],"mappings":"AAkCA,kHAAkH;AAClH,+CAAgD;AAUhD;;;;GAIG;AACH;IAwBI,uFAAuF;IACvF,yBAAuC;IACvC,kGAAkG;IAClG,yBAAuC;IACvC,uGAAuG;IACvG,6BAA+C;IAC/C,mEAAmE;IACnE,2BAAyD;IACzD,uBAAyC;IAEzC;;;;;;;;;;;OAWG;IACH,qCALW,MAAM,QACN,MAAM,UACK,OAAO,8CAA8C,EAAE,sBAAsB,KAAE,IAAI,GAAC,IAAI,CA4D7G;IAED,gBAeC;IAED;;;;;;;;;;;;;;;OAeG;IACH;QATyG,KAAK,EAAnG,OAAO,iEAAiE,EAAE,UAAU;QACpE,KAAK,EAArB,MAAM;QACa,KAAK;QACL,QAAQ;QACR,SAAS;QACT,QAAQ;QACX,YAAY,EAA5B,MAAM;QACU,EAAE,EAAlB,MAAM;aA8FhB;;CACJ"}
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
shader_water_particles_bin,
|
|
15
15
|
shader_water_particles_bounds,
|
|
16
16
|
shader_water_particles_clear,
|
|
17
|
+
shader_water_particles_cut,
|
|
17
18
|
shader_water_particles_emit,
|
|
18
19
|
shader_water_particles_finalize,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
shader_water_particles_keep,
|
|
21
|
+
shader_water_particles_links,
|
|
22
|
+
shader_water_particles_mark,
|
|
21
23
|
shader_water_particles_nest,
|
|
22
24
|
shader_water_particles_rank,
|
|
23
|
-
shader_water_particles_runs,
|
|
24
25
|
shader_water_particles_scatter,
|
|
25
|
-
shader_water_particles_share,
|
|
26
26
|
shader_water_particles_split,
|
|
27
27
|
shader_water_particles_total,
|
|
28
28
|
shader_water_particles_update,
|
|
@@ -58,17 +58,15 @@ export class GPUWaterParticles {
|
|
|
58
58
|
#children = null;
|
|
59
59
|
#child_sums = null;
|
|
60
60
|
#images = null;
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#draw = null;
|
|
61
|
+
#links = null;
|
|
62
|
+
#reaches = null;
|
|
63
|
+
#shown = null;
|
|
65
64
|
#buckets = null;
|
|
66
65
|
#offsets = null;
|
|
67
66
|
#slots = null;
|
|
68
67
|
#bucket_amplitude = null;
|
|
69
|
-
#
|
|
68
|
+
#bucket_crowd = null;
|
|
70
69
|
#bucket_nest = null;
|
|
71
|
-
#visible = null;
|
|
72
70
|
#staging = null;
|
|
73
71
|
#entries = null;
|
|
74
72
|
#body_bounds = null;
|
|
@@ -114,22 +112,21 @@ export class GPUWaterParticles {
|
|
|
114
112
|
this.#child_sums = buffer('child sums', sums(capacity));
|
|
115
113
|
// per particle the mirror image the step left beside it at the outline
|
|
116
114
|
this.#images = buffer('images', capacity * WATER_PARTICLE_STRUCT.size);
|
|
117
|
-
// per particle
|
|
118
|
-
|
|
119
|
-
this
|
|
120
|
-
this.#
|
|
121
|
-
|
|
122
|
-
this.#
|
|
115
|
+
// per particle its front's neighbours before and after it
|
|
116
|
+
this.#links = buffer('links', capacity * 8);
|
|
117
|
+
// per particle the cells its support overlaps this frame: its first, its level and spans
|
|
118
|
+
this.#reaches = buffer('reaches', capacity * 12);
|
|
119
|
+
// per particle whether its crowds draw it
|
|
120
|
+
this.#shown = buffer('shown', capacity * 4);
|
|
123
121
|
// per bucket its entries, then the hash: table size and inclusive offsets
|
|
124
122
|
this.#buckets = buffer('buckets', 16 + this.#table_limit * 4);
|
|
125
123
|
this.#offsets = buffer('offsets', sums(this.#table_limit));
|
|
126
124
|
this.#slots = buffer('slots', capacity * WATER_PARTICLE_CORNERS * 4);
|
|
127
125
|
this.#bucket_amplitude = buffer('bucket amplitude', this.#table_limit * 4);
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
this.#
|
|
126
|
+
// its runs by steepness class and in all; then the most a point under it reads at finer levels, the classes its
|
|
127
|
+
// points keep and draw, and a slot of the frame's table of cut fronts
|
|
128
|
+
this.#bucket_crowd = buffer('bucket crowd', this.#table_limit * WATER_PARTICLE_CROWD_WORDS * 4);
|
|
131
129
|
this.#bucket_nest = buffer('bucket nest', this.#table_limit * WATER_PARTICLE_NEST_WORDS * 4);
|
|
132
|
-
this.#visible = buffer('visible', capacity * 4);
|
|
133
130
|
const entries = capacity * WATER_PARTICLE_CORNERS * WATER_PARTICLE_ENTRY_STRUCT.size;
|
|
134
131
|
this.#staging = buffer('staging', entries);
|
|
135
132
|
this.#entries = buffer('entries', entries);
|
|
@@ -157,16 +154,15 @@ export class GPUWaterParticles {
|
|
|
157
154
|
}
|
|
158
155
|
|
|
159
156
|
dispose() {
|
|
160
|
-
for (const buffer of [...this.#particles, this.#children, this.#child_sums, this.#images, this.#
|
|
161
|
-
this.#
|
|
162
|
-
|
|
157
|
+
for (const buffer of [...this.#particles, this.#children, this.#child_sums, this.#images, this.#links, this.#reaches, this.#shown, this.#buckets,
|
|
158
|
+
this.#offsets, this.#slots, this.#bucket_amplitude, this.#bucket_crowd, this.#bucket_nest, this.#staging, this.#entries, this.#body_bounds,
|
|
159
|
+
...(this.#commands ?? [])]) {
|
|
163
160
|
buffer?.destroy();
|
|
164
161
|
}
|
|
165
162
|
this.#particles = [];
|
|
166
163
|
this.#children = this.#child_sums = this.#images = this.#buckets = this.#offsets = this.#slots = this.#bucket_amplitude = null;
|
|
167
164
|
this.#staging = this.#entries = null;
|
|
168
|
-
this.#
|
|
169
|
-
this.#bucket_weight = this.#bucket_nest = this.#visible = null;
|
|
165
|
+
this.#links = this.#reaches = this.#shown = this.#bucket_crowd = this.#bucket_nest = null;
|
|
170
166
|
this.#body_bounds = null;
|
|
171
167
|
this.#commands = null;
|
|
172
168
|
this.#device = null;
|
|
@@ -205,8 +201,6 @@ export class GPUWaterParticles {
|
|
|
205
201
|
let child_sums = graph_import_buffer(graph, this.#child_sums, 'Water / particle child sums');
|
|
206
202
|
let buckets = graph_import_buffer(graph, this.#buckets, 'Water / particle buckets');
|
|
207
203
|
let offsets = graph_import_buffer(graph, this.#offsets, 'Water / particle offsets');
|
|
208
|
-
let fronts = graph_import_buffer(graph, this.#fronts, 'Water / particle fronts');
|
|
209
|
-
let front_sums = graph_import_buffer(graph, this.#front_sums, 'Water / particle front sums');
|
|
210
204
|
const node = (name, execute, reads, writes) => {
|
|
211
205
|
const data = {};
|
|
212
206
|
const pass = graph.add(name, data, (d, resources, context) => execute(resources, context, d));
|
|
@@ -243,49 +237,46 @@ export class GPUWaterParticles {
|
|
|
243
237
|
}, { child_sums }, {});
|
|
244
238
|
}
|
|
245
239
|
|
|
246
|
-
//
|
|
247
|
-
|
|
240
|
+
// The frame's hash: each particle's neighbours round its front, so that a run of them is drawn as one; how crowded
|
|
241
|
+
// each cell is and so which runs it keeps, the steepest, dooming the rest and cutting, whole, the fronts the gather
|
|
242
|
+
// cannot read;
|
|
243
|
+
// then each drawn run entered into every cell its first particle's support overlaps, offsets, entries in order.
|
|
244
|
+
buckets = node('Water / particles bin', (resources, { encoder }) => {
|
|
248
245
|
if (!stepping) {
|
|
249
246
|
// the table size the last stepping frame chose for these particles
|
|
250
247
|
shader_water_particles_finalize.dispatch({ encoder, bindings: { limits: { capacity, table_limit }, next, offsets: this.#buckets,
|
|
251
248
|
table_command: command_table } });
|
|
252
249
|
}
|
|
253
250
|
build_indirect_compute_dispatch_command(64, encoder, next, 0, command_next, 0, true);
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
front_sums = graph_prefix_scan_csdldf({ graph, input: fronts, output: front_sums, element_max_count: capacity });
|
|
258
|
-
|
|
259
|
-
// The frame's hash: how each particle is drawn, how crowded each cell is and so how much of each run its crowd
|
|
260
|
-
// leaves drawn, then each packet drawn into the cells its support overlaps, offsets, entries in order.
|
|
261
|
-
buckets = node('Water / particles bin', (resources, { encoder }) => {
|
|
262
|
-
const draw = this.#draw, runs = this.#runs;
|
|
263
|
-
shader_water_particles_runs.dispatchIndirect({ encoder, command: command_next, bindings: { next, fronts: this.#front_sums, runs } });
|
|
264
|
-
shader_water_particles_groups.dispatchIndirect({ encoder, command: command_next, bindings: { next, fronts: this.#front_sums, runs, draw } });
|
|
251
|
+
const links = this.#links;
|
|
252
|
+
const reaches = this.#reaches;
|
|
253
|
+
shader_water_particles_links.dispatchIndirect({ encoder, command: command_next, bindings: { next, links, reaches } });
|
|
265
254
|
shader_water_particles_clear.dispatchIndirect({ encoder, command: command_table, bindings: {
|
|
266
|
-
buckets: this.#buckets, bucket_amplitude: this.#bucket_amplitude,
|
|
267
|
-
bucket_nest: this.#bucket_nest } });
|
|
268
|
-
shader_water_particles_weigh.dispatchIndirect({ encoder, command: command_next, bindings: {
|
|
269
|
-
next, activity, offsets: this.#buckets, draw, bucket_weight: this.#bucket_weight, body_bounds: this.#body_bounds } });
|
|
270
|
-
shader_water_particles_nest.dispatchIndirect({ encoder, command: command_next, bindings: {
|
|
271
|
-
next, activity, offsets: this.#buckets, draw, body_bounds: this.#body_bounds, bucket_weight: this.#bucket_weight,
|
|
255
|
+
buckets: this.#buckets, bucket_amplitude: this.#bucket_amplitude, bucket_crowd: this.#bucket_crowd,
|
|
272
256
|
bucket_nest: this.#bucket_nest } });
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
257
|
+
const crowd = { next, activity, offsets: this.#buckets, links, reaches, body_bounds: this.#body_bounds,
|
|
258
|
+
bucket_crowd: this.#bucket_crowd };
|
|
259
|
+
shader_water_particles_weigh.dispatchIndirect({ encoder, command: command_next, bindings: crowd });
|
|
260
|
+
shader_water_particles_nest.dispatchIndirect({ encoder, command: command_next, bindings: { ...crowd, bucket_nest: this.#bucket_nest } });
|
|
261
|
+
shader_water_particles_cut.dispatchIndirect({ encoder, command: command_next, bindings: { ...crowd, bucket_nest: this.#bucket_nest } });
|
|
262
|
+
const shown = this.#shown;
|
|
263
|
+
shader_water_particles_mark.dispatchIndirect({ encoder, command: command_next, bindings: {
|
|
264
|
+
next, activity, offsets: this.#buckets, reaches, bucket_nest: this.#bucket_nest } });
|
|
265
|
+
shader_water_particles_keep.dispatchIndirect({ encoder, command: command_next, bindings: {
|
|
266
|
+
next, activity, offsets: this.#buckets, reaches, bucket_nest: this.#bucket_nest, shown } });
|
|
276
267
|
shader_water_particles_bin.dispatchIndirect({ encoder, command: command_next, bindings: {
|
|
277
268
|
next, activity, buckets: this.#buckets, slots: this.#slots, bucket_amplitude: this.#bucket_amplitude,
|
|
278
|
-
body_bounds: this.#body_bounds,
|
|
279
|
-
}, {
|
|
269
|
+
body_bounds: this.#body_bounds, links, reaches, shown } });
|
|
270
|
+
}, {}, { buckets }).buckets;
|
|
280
271
|
offsets = graph_prefix_scan_csdldf({ graph, input: buckets, output: offsets, element_max_count: table_limit });
|
|
281
272
|
node('Water / particles order and bound', (resources, { encoder }) => {
|
|
282
|
-
const bindings = { next, offsets: this.#offsets, slots: this.#slots,
|
|
273
|
+
const bindings = { next, offsets: this.#offsets, slots: this.#slots, reaches: this.#reaches };
|
|
283
274
|
shader_water_particles_scatter.dispatchIndirect({ encoder, command: command_next, bindings: { ...bindings,
|
|
284
|
-
|
|
275
|
+
links: this.#links, shown: this.#shown, staging: this.#staging } });
|
|
285
276
|
shader_water_particles_rank.dispatchIndirect({ encoder, command: command_next, bindings: { ...bindings,
|
|
286
277
|
staging: this.#staging, entries: this.#entries } });
|
|
287
|
-
shader_water_particles_bounds.dispatchIndirect({ encoder, command: command_next, bindings: {
|
|
288
|
-
|
|
278
|
+
shader_water_particles_bounds.dispatchIndirect({ encoder, command: command_next, bindings: { ...bindings, activity,
|
|
279
|
+
bucket_amplitude: this.#bucket_amplitude, body_bounds: this.#body_bounds } });
|
|
289
280
|
}, { offsets }, {});
|
|
290
281
|
}
|
|
291
282
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export const WATER_PARTICLE_STRUCT: WebGPUStruct;
|
|
10
10
|
/**
|
|
11
|
-
* A
|
|
12
|
-
* time, and the cell it was entered for, since
|
|
13
|
-
* two cells may share a bucket.
|
|
11
|
+
* A run of a front's particles as one hash cell holds it for the surface sampler: everything its kernel needs at the
|
|
12
|
+
* frame's time, from the run's first particle, and the cell it was entered for, since a front is entered in every cell
|
|
13
|
+
* its support overlaps and two cells may share a bucket.
|
|
14
14
|
*/
|
|
15
15
|
export const WATER_PARTICLE_ENTRY_STRUCT: WebGPUStruct;
|
|
16
16
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WATER_PARTICLE_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"WATER_PARTICLE_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,iDAyBoB;AAEpB;;;;GAIG;AACH,uDAuByB;6BAjEI,sCAAsC"}
|
|
@@ -29,12 +29,17 @@ export const WATER_PARTICLE_STRUCT = WebGPUStruct.from({
|
|
|
29
29
|
* image was emitted then, and it dies once the last of it has left too. 0 from emission.
|
|
30
30
|
*/
|
|
31
31
|
reflected: u32,
|
|
32
|
+
/**
|
|
33
|
+
* 0, or once a crowd it cannot be drawn in has doomed it, the steepness |a|/r below which it dies: it fades from
|
|
34
|
+
* then on, as a packet below the drawing threshold does.
|
|
35
|
+
*/
|
|
36
|
+
fading: f32,
|
|
32
37
|
}, 'WaterParticle');
|
|
33
38
|
|
|
34
39
|
/**
|
|
35
|
-
* A
|
|
36
|
-
* time, and the cell it was entered for, since
|
|
37
|
-
* two cells may share a bucket.
|
|
40
|
+
* A run of a front's particles as one hash cell holds it for the surface sampler: everything its kernel needs at the
|
|
41
|
+
* frame's time, from the run's first particle, and the cell it was entered for, since a front is entered in every cell
|
|
42
|
+
* its support overlaps and two cells may share a bucket.
|
|
38
43
|
*/
|
|
39
44
|
export const WATER_PARTICLE_ENTRY_STRUCT = WebGPUStruct.from({
|
|
40
45
|
position: vec2f,
|
|
@@ -48,10 +53,15 @@ export const WATER_PARTICLE_ENTRY_STRUCT = WebGPUStruct.from({
|
|
|
48
53
|
phase: f32,
|
|
49
54
|
/** water_waves row and level, as water_particle_key packs them */
|
|
50
55
|
key: u32,
|
|
51
|
-
/** Index of the particle, which orders a bucket. */
|
|
56
|
+
/** Index of the run's first particle, which orders a bucket. */
|
|
52
57
|
source: u32,
|
|
53
58
|
/** How far the particle stands from its front's centre, metres. */
|
|
54
59
|
distance: f32,
|
|
55
60
|
/** Half the length of its envelope across its front, metres. */
|
|
56
61
|
half_length: f32,
|
|
62
|
+
/**
|
|
63
|
+
* The run of the front's particles it draws, from this one on, each β further round: their count, and which ends
|
|
64
|
+
* are open, tapering by the end particle's own window (chunk_water_particle's water_particle_run_profile).
|
|
65
|
+
*/
|
|
66
|
+
run: u32,
|
|
57
67
|
}, 'WaterParticleEntry');
|
|
@@ -19,6 +19,14 @@ export const WATER_PARTICLE_LEVEL0_CELL: number;
|
|
|
19
19
|
* gathers at that speed and the peak falls as t^(−1/3), which no κ draws: up to 16% below r = 12 mm, 27% at 3 cm.
|
|
20
20
|
*/
|
|
21
21
|
export const WATER_PARTICLE_STRETCH: number[];
|
|
22
|
+
/** Bits of a hash entry's run word that hold its count of particles; the two above them mark its open ends. */
|
|
23
|
+
export const WATER_PARTICLE_RUN_MEMBERS: 1073741823;
|
|
24
|
+
/** A run whose first particle has no neighbour of its front before it: it tapers there by that particle's window. */
|
|
25
|
+
export const WATER_PARTICLE_RUN_OPEN_START: 1073741824;
|
|
26
|
+
/** A run whose last particle has no neighbour of its front after it. */
|
|
27
|
+
export const WATER_PARTICLE_RUN_OPEN_END: 2147483648;
|
|
28
|
+
/** A particle drawn alone: a run of one, open at both ends, which is its own window. */
|
|
29
|
+
export const WATER_PARTICLE_LONE: number;
|
|
22
30
|
/**
|
|
23
31
|
* The physics of one wave particle as pure functions (WATER_SURFACE_SIMULATION_PLAN_2026_10_06.md §5).
|
|
24
32
|
*
|
|
@@ -34,7 +42,8 @@ export const WATER_PARTICLE_STRETCH: number[];
|
|
|
34
42
|
* The particles of a front are β apart in angle around its centre, and a packet's crests are arcs around that
|
|
35
43
|
* centre; a cosine window of half-angle β is a partition of unity over them at every radius, so the front's
|
|
36
44
|
* height is the packet's amplitude whatever the spacing, splitting a front changes none of it, and one front
|
|
37
|
-
* adds at most two particles at any point.
|
|
45
|
+
* adds at most two particles at any point. So a run of neighbours alike in all but angle is drawn as one: height one
|
|
46
|
+
* over its particles and its own window past either end that has no neighbour, the same surface its windows sum to.
|
|
38
47
|
*
|
|
39
48
|
* @type {CodeChunk}
|
|
40
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_water_particle.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/chunk_water_particle.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,uCAAwC;AAKxC,yHAAyH;AACzH,gDAAkD;AAElD;;;;;;;;;;;;GAYG;AACH,8CAIE;AAKF
|
|
1
|
+
{"version":3,"file":"chunk_water_particle.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/water/surface/particles/chunk_water_particle.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,uCAAwC;AAKxC,yHAAyH;AACzH,gDAAkD;AAElD;;;;;;;;;;;;GAYG;AACH,8CAIE;AAKF,+GAA+G;AAC/G,oDAAqD;AAErD,qHAAqH;AACrH,uDAAwD;AAExD,wEAAwE;AACxE,qDAAsD;AAEtD,wFAAwF;AACxF,yCAA2G;AAE3G;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mCAFU,SAAS,CAgP6G;0BArTtG,uCAAuC"}
|