@woosh/meep-engine 3.45.0 → 3.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bundle-worker-terrain.js +1 -1
- package/editor/actions/concrete/TransformModifyAction.d.ts.map +1 -1
- package/editor/actions/concrete/TransformModifyAction.js +10 -2
- package/editor/ecs/component/FieldDescriptor.js +15 -0
- package/editor/ecs/component/createObjectEditor.js +41 -12
- package/editor/ecs/component/editors/ecs/Transform64Editor.d.ts.map +1 -1
- package/editor/ecs/component/editors/ecs/Transform64Editor.js +77 -70
- package/editor/tools/TransformToolV2.d.ts.map +1 -1
- package/editor/tools/TransformToolV2.js +4 -0
- package/editor/tools/v2/TransformControls.d.ts.map +1 -1
- package/editor/tools/v2/TransformControls.js +7 -0
- package/editor/view/ecs/EntityEditor.d.ts.map +1 -1
- package/editor/view/ecs/EntityEditor.js +4 -2
- 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_insert_at.d.ts +16 -0
- package/src/core/collection/array/array_insert_at.d.ts.map +1 -0
- package/src/core/collection/array/array_insert_at.js +32 -0
- package/src/core/collection/array/array_remove_at.d.ts +15 -0
- package/src/core/collection/array/array_remove_at.d.ts.map +1 -0
- package/src/core/collection/array/array_remove_at.js +30 -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/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/quaternion/quat3_look_rotation.d.ts +37 -0
- package/src/core/geom/3d/quaternion/quat3_look_rotation.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_look_rotation.js +172 -0
- package/src/core/geom/ConicRay.js +2 -2
- package/src/core/geom/Quaternion.d.ts +1 -0
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Quaternion.js +12 -48
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +8 -5
- 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/lookup/ParameterLookupTable.js +2 -2
- 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/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +9 -4
- 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/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +10 -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_look_rotation.d.ts +4 -4
- package/src/engine/ecs/transform/t64_look_rotation.d.ts.map +1 -1
- package/src/engine/ecs/transform/t64_look_rotation.js +7 -18
- 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/camera/topdown/TopDownCameraControllerSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js +30 -1
- 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/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/GPUParticleEmitterSystem.d.ts +6 -0
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +72 -29
- 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/grid/obstacle/GridObstacle.js +2 -2
- package/src/engine/input/devices/KeyboardDevice.d.ts +1 -0
- package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
- package/src/engine/input/devices/KeyboardDevice.js +7 -6
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +2 -2
- package/src/engine/interpolation/Interpolated.js +2 -2
- package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowingSystem.js +15 -2
- package/src/engine/network/CONGESTION_CONTROL.md +9 -9
- package/src/engine/network/MESSAGE_TRANSPORT.md +364 -0
- package/src/engine/network/NetworkSession.d.ts +31 -11
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +453 -286
- package/src/engine/network/README.md +77 -27
- package/src/engine/network/SMOOTHNESS_DESIGN.md +13 -5
- package/src/engine/network/diagnostics/BandwidthMeter.d.ts +1 -1
- package/src/engine/network/diagnostics/BandwidthMeter.js +1 -1
- package/src/engine/network/orchestrator/HostJoin.d.ts +111 -0
- package/src/engine/network/orchestrator/HostJoin.d.ts.map +1 -0
- package/src/engine/network/orchestrator/HostJoin.js +271 -0
- package/src/engine/network/orchestrator/NetworkPeer.d.ts +151 -112
- package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.js +450 -499
- package/src/engine/network/orchestrator/PendingSlices.d.ts +30 -0
- package/src/engine/network/orchestrator/PendingSlices.d.ts.map +1 -0
- package/src/engine/network/orchestrator/PendingSlices.js +83 -0
- package/src/engine/network/orchestrator/ReliableFrames.d.ts +34 -0
- package/src/engine/network/orchestrator/ReliableFrames.d.ts.map +1 -0
- package/src/engine/network/orchestrator/ReliableFrames.js +96 -0
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts +77 -10
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +236 -61
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +20 -6
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +33 -8
- package/src/engine/network/replication/Replicator.d.ts.map +1 -1
- package/src/engine/network/replication/Replicator.js +7 -1
- package/src/engine/network/sim/ActionLog.d.ts +32 -5
- package/src/engine/network/sim/ActionLog.d.ts.map +1 -1
- package/src/engine/network/sim/ActionLog.js +47 -5
- package/src/engine/network/sim/SimActionExecutor.d.ts +42 -2
- package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
- package/src/engine/network/sim/SimActionExecutor.js +100 -4
- package/src/engine/network/sim/Snapshotter.d.ts +12 -0
- package/src/engine/network/sim/Snapshotter.d.ts.map +1 -1
- package/src/engine/network/sim/Snapshotter.js +43 -0
- package/src/engine/network/state/Baseline.d.ts +1 -1
- package/src/engine/network/state/Baseline.js +1 -1
- package/src/engine/network/state/FrameBufferRing.d.ts +25 -6
- package/src/engine/network/state/FrameBufferRing.d.ts.map +1 -1
- package/src/engine/network/state/FrameBufferRing.js +51 -6
- package/src/engine/network/state/InputRing.d.ts +4 -0
- package/src/engine/network/state/InputRing.d.ts.map +1 -1
- package/src/engine/network/state/InputRing.js +7 -0
- package/src/engine/network/transport/DeferredTransport.d.ts.map +1 -1
- package/src/engine/network/transport/DeferredTransport.js +1 -0
- package/src/engine/network/transport/LoopbackTransport.d.ts.map +1 -1
- package/src/engine/network/transport/LoopbackTransport.js +4 -2
- package/src/engine/network/transport/Transport.d.ts +7 -0
- package/src/engine/network/transport/Transport.d.ts.map +1 -1
- package/src/engine/network/transport/Transport.js +8 -0
- package/src/engine/network/transport/adapters/NodeUDPTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/NodeUDPTransport.js +20 -5
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.js +8 -0
- package/src/engine/network/transport/adapters/WebTransportTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/WebTransportTransport.js +6 -0
- package/src/engine/network/transport/connection/Connection.d.ts +191 -0
- package/src/engine/network/transport/connection/Connection.d.ts.map +1 -0
- package/src/engine/network/transport/connection/Connection.js +1262 -0
- package/src/engine/network/transport/connection/RangeSet.d.ts +94 -0
- package/src/engine/network/transport/connection/RangeSet.d.ts.map +1 -0
- package/src/engine/network/transport/connection/RangeSet.js +260 -0
- package/src/engine/network/transport/connection/RxStream.d.ts +48 -0
- package/src/engine/network/transport/connection/RxStream.d.ts.map +1 -0
- package/src/engine/network/transport/connection/RxStream.js +211 -0
- package/src/engine/network/transport/connection/TxStream.d.ts +90 -0
- package/src/engine/network/transport/connection/TxStream.d.ts.map +1 -0
- package/src/engine/network/transport/connection/TxStream.js +243 -0
- package/src/engine/network/transport/connection/bytes_copy.d.ts +17 -0
- package/src/engine/network/transport/connection/bytes_copy.d.ts.map +1 -0
- package/src/engine/network/transport/connection/bytes_copy.js +34 -0
- package/src/engine/network/transport/connection/varint.d.ts +46 -0
- package/src/engine/network/transport/connection/varint.d.ts.map +1 -0
- package/src/engine/network/transport/connection/varint.js +107 -0
- 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/ClothDynamics.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothDynamics.js +20 -11
- 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/FluidObstacleSystem.d.ts +4 -4
- 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/sound/ecs/audio/AudioEmitter.d.ts +38 -7
- package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitter.js +47 -14
- package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.js +5 -1
- package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.d.ts +18 -0
- package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.js +48 -0
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts +12 -2
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +173 -9
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +9 -3
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/LiveEmitterSet.js +28 -8
- package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts +8 -0
- 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/ecs/trigger/AudioEventTriggerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationAdapter.js +5 -1
- package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.d.ts +18 -0
- package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.js +51 -0
- package/src/engine/sound/ecs/trigger/AudioEventTriggerSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/trigger/AudioEventTriggerSystem.js +15 -1
- 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/README.md +768 -644
- package/src/engine/sound/sopra/SopraEngine.d.ts +104 -8
- package/src/engine/sound/sopra/SopraEngine.d.ts.map +1 -1
- package/src/engine/sound/sopra/SopraEngine.js +327 -12
- 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 +28 -2
- package/src/engine/sound/sopra/definition/EventDescription.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/EventDescription.js +77 -17
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts +10 -0
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.js +77 -55
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.d.ts +31 -0
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.js +75 -0
- 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/AbstractAudioEffect.d.ts +38 -9
- package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.js +34 -5
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts +7 -2
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/CompressorEffect.js +137 -120
- package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts +3 -1
- package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/EqEffect.js +146 -128
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts +1 -0
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +8 -3
- 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/engine/sound/sopra/runtime/BusGraph.d.ts +44 -2
- package/src/engine/sound/sopra/runtime/BusGraph.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/BusGraph.js +83 -43
- package/src/engine/sound/sopra/runtime/EffectChain.d.ts +96 -0
- package/src/engine/sound/sopra/runtime/EffectChain.d.ts.map +1 -0
- package/src/engine/sound/sopra/runtime/EffectChain.js +286 -0
- package/src/engine/sound/sopra/runtime/EffectParamOverrides.d.ts +123 -0
- package/src/engine/sound/sopra/runtime/EffectParamOverrides.d.ts.map +1 -0
- package/src/engine/sound/sopra/runtime/EffectParamOverrides.js +320 -0
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts +55 -5
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/EventInstance.js +201 -26
- package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.d.ts +2 -1
- package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.d.ts.map +1 -1
- package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.js +6 -1
- package/src/engine/sound/sopra/serialization/sopraSerializationHarness.d.ts +15 -0
- package/src/engine/sound/sopra/serialization/sopraSerializationHarness.d.ts.map +1 -1
- package/src/engine/sound/sopra/serialization/sopraSerializationHarness.js +32 -0
- package/src/engine/sound/sopra/util/MockAudioContext.d.ts.map +1 -1
- package/src/engine/sound/sopra/util/MockAudioContext.js +3 -0
- package/src/engine/sound/sopra/util/fadeOutAndStop.d.ts +13 -3
- package/src/engine/sound/sopra/util/fadeOutAndStop.d.ts.map +1 -1
- package/src/engine/sound/sopra/util/fadeOutAndStop.js +25 -13
- 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/shade/RENDERER_CONTRACT.md +6 -3
- 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/SHADE_DEVICE_FLOOR.d.ts +24 -0
- package/src/shade/device/SHADE_DEVICE_FLOOR.d.ts.map +1 -0
- package/src/shade/device/SHADE_DEVICE_FLOOR.js +34 -0
- package/src/shade/device/ShadeDeviceFailure.d.ts +12 -5
- package/src/shade/device/ShadeDeviceFailure.d.ts.map +1 -1
- package/src/shade/device/ShadeDeviceFailure.js +17 -8
- package/src/shade/device/ShadeDeviceFailureReason.d.ts +1 -1
- package/src/shade/device/ShadeDeviceFailureReason.js +2 -2
- 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/shade_device_floor_unmet.d.ts +13 -0
- package/src/shade/device/shade_device_floor_unmet.d.ts.map +1 -0
- package/src/shade/device/shade_device_floor_unmet.js +32 -0
- 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/renderer/Renderer.d.ts +2 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +29 -55
- package/src/shade/renderer/binding/BufferBinding.js +2 -2
- package/src/shade/renderer/buffer/GPUBufferAllocator.d.ts.map +1 -1
- package/src/shade/renderer/buffer/GPUBufferAllocator.js +9 -0
- package/src/shade/renderer/buffer/buffer_pool_ops.d.ts +21 -12
- package/src/shade/renderer/buffer/buffer_pool_ops.d.ts.map +1 -1
- package/src/shade/renderer/buffer/buffer_pool_ops.js +18 -19
- 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/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/gpu_primitive/test/gpu_test.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/test/gpu_test.js +8 -11
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/StandardShadeMaterial.d.ts.map +1 -1
- package/src/shade/renderer/material/StandardShadeMaterial.js +13 -8
- package/src/shade/renderer/pool/TransientResourcePool.d.ts +24 -0
- package/src/shade/renderer/pool/TransientResourcePool.d.ts.map +1 -1
- package/src/shade/renderer/pool/TransientResourcePool.js +41 -10
- 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/ComputeShader.d.ts.map +1 -1
- package/src/shade/renderer/shader/ComputeShader.js +18 -2
- package/src/shade/renderer/shader/ImageShader.d.ts.map +1 -1
- package/src/shade/renderer/shader/ImageShader.js +230 -218
- 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/graphics/GraphicsContextFailureView.d.ts +1 -2
- package/src/view/graphics/GraphicsContextFailureView.d.ts.map +1 -1
- package/src/view/graphics/GraphicsContextFailureView.js +1 -2
- package/src/view/minimap/MinimapMarker.js +2 -2
- package/src/engine/network/transport/Channel.js +0 -336
- package/src/engine/network/transport/ReliableCommandPipeline.js +0 -335
- package/src/engine/network/transport/fragments/FragmentAssembler.js +0 -350
- package/src/engine/network/transport/fragments/FragmentRetention.js +0 -191
- package/src/engine/network/transport/fragments/fragment_send.js +0 -157
- package/src/engine/network/transport/fragments/packet_size.js +0 -107
|
@@ -1,476 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Two's-complement 64-bit subtraction.
|
|
93
|
-
* @param {bigint} a
|
|
94
|
-
* @param {bigint} b
|
|
95
|
-
* @returns {bigint}
|
|
96
|
-
*/
|
|
97
|
-
export function sub64(a, b) {
|
|
98
|
-
return (a - b) & XXH_MASK_64;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @param {bigint} v
|
|
103
|
-
* @param {number} bits
|
|
104
|
-
* @returns {bigint}
|
|
105
|
-
*/
|
|
106
|
-
export function rotl64(v, bits) {
|
|
107
|
-
const n = BigInt(bits);
|
|
108
|
-
|
|
109
|
-
return ((v << n) | (v >> (64n - n))) & XXH_MASK_64;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Rotate within 32 bits, as the reference's `XXH_rotl32`.
|
|
114
|
-
* @param {bigint} v
|
|
115
|
-
* @param {number} bits
|
|
116
|
-
* @returns {bigint}
|
|
117
|
-
*/
|
|
118
|
-
export function rotl32(v, bits) {
|
|
119
|
-
const x = v & MASK_32;
|
|
120
|
-
const n = BigInt(bits);
|
|
121
|
-
|
|
122
|
-
return ((x << n) | (x >> (32n - n))) & MASK_32;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* @param {bigint} v
|
|
127
|
-
* @param {number} bits
|
|
128
|
-
* @returns {bigint}
|
|
129
|
-
*/
|
|
130
|
-
export function xorshift64(v, bits) {
|
|
131
|
-
return v ^ (v >> BigInt(bits));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Byte-reverse a 32-bit value, as the reference's `XXH_swap32`.
|
|
136
|
-
* @param {bigint} v
|
|
137
|
-
* @returns {bigint}
|
|
138
|
-
*/
|
|
139
|
-
export function swap32(v) {
|
|
140
|
-
const x = v & MASK_32;
|
|
141
|
-
|
|
142
|
-
return ((x << 24n) | ((x & 0xFF00n) << 8n) | ((x >> 8n) & 0xFF00n) | (x >> 24n)) & MASK_32;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Byte-reverse a 64-bit value, as the reference's `XXH_swap64`.
|
|
147
|
-
* @param {bigint} v
|
|
148
|
-
* @returns {bigint}
|
|
149
|
-
*/
|
|
150
|
-
export function swap64(v) {
|
|
151
|
-
return ((v & 0x00000000000000FFn) << 56n)
|
|
152
|
-
| ((v & 0x000000000000FF00n) << 40n)
|
|
153
|
-
| ((v & 0x0000000000FF0000n) << 24n)
|
|
154
|
-
| ((v & 0x00000000FF000000n) << 8n)
|
|
155
|
-
| ((v & 0x000000FF00000000n) >> 8n)
|
|
156
|
-
| ((v & 0x0000FF0000000000n) >> 24n)
|
|
157
|
-
| ((v & 0x00FF000000000000n) >> 40n)
|
|
158
|
-
| ((v & 0xFF00000000000000n) >> 56n);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Widening 32x32 -> 64 multiply of the low halves of both operands, as the reference's
|
|
163
|
-
* `XXH_mult32to64`.
|
|
164
|
-
*
|
|
165
|
-
* @param {bigint} a
|
|
166
|
-
* @param {bigint} b
|
|
167
|
-
* @returns {bigint}
|
|
168
|
-
*/
|
|
169
|
-
export function mult32to64(a, b) {
|
|
170
|
-
return (a & MASK_32) * (b & MASK_32);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* 64x64 -> 128 multiply, folded down by XOR of the two halves.
|
|
175
|
-
*
|
|
176
|
-
* @param {bigint} a
|
|
177
|
-
* @param {bigint} b
|
|
178
|
-
* @returns {bigint}
|
|
179
|
-
*/
|
|
180
|
-
export function mul128_fold64(a, b) {
|
|
181
|
-
const product = a * b;
|
|
182
|
-
|
|
183
|
-
return (product ^ (product >> 64n)) & XXH_MASK_64;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* The fast finalizing mix, for input whose bits are already partially mixed.
|
|
188
|
-
* @param {bigint} h64
|
|
189
|
-
* @returns {bigint}
|
|
190
|
-
*/
|
|
191
|
-
export function xxh3_avalanche(h64) {
|
|
192
|
-
let h = xorshift64(h64, 37);
|
|
193
|
-
|
|
194
|
-
h = mul64(h, XXH_PRIME_MX1);
|
|
195
|
-
h = xorshift64(h, 32);
|
|
196
|
-
|
|
197
|
-
return h & XXH_MASK_64;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* The stronger finalizing mix (after Pelle Evensen's rrmxmx), for input that has not been mixed yet.
|
|
202
|
-
* @param {bigint} h64
|
|
203
|
-
* @param {number} len
|
|
204
|
-
* @returns {bigint}
|
|
205
|
-
*/
|
|
206
|
-
export function xxh3_rrmxmx(h64, len) {
|
|
207
|
-
let h = h64 ^ rotl64(h64, 49) ^ rotl64(h64, 24);
|
|
208
|
-
|
|
209
|
-
h = mul64(h, XXH_PRIME_MX2);
|
|
210
|
-
h = u64(h ^ add64(h >> 35n, BigInt(len)));
|
|
211
|
-
h = mul64(h, XXH_PRIME_MX2);
|
|
212
|
-
|
|
213
|
-
return xorshift64(h, 28) & XXH_MASK_64;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* XXH64's finalizing mix, which XXH3 reuses for its shortest inputs.
|
|
218
|
-
* @param {bigint} hash
|
|
219
|
-
* @returns {bigint}
|
|
220
|
-
*/
|
|
221
|
-
export function xxh64_avalanche(hash) {
|
|
222
|
-
let h = hash ^ (hash >> 33n);
|
|
223
|
-
|
|
224
|
-
h = mul64(h, XXH_PRIME64_2);
|
|
225
|
-
h ^= h >> 29n;
|
|
226
|
-
h = mul64(h, XXH_PRIME64_3);
|
|
227
|
-
h ^= h >> 32n;
|
|
228
|
-
|
|
229
|
-
return h & XXH_MASK_64;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Read a little-endian u32 at `offset`.
|
|
234
|
-
*
|
|
235
|
-
* @param {Uint8Array} bytes
|
|
236
|
-
* @param {number} offset
|
|
237
|
-
* @returns {bigint}
|
|
238
|
-
*/
|
|
239
|
-
export function read_u32(bytes, offset) {
|
|
240
|
-
return BigInt(
|
|
241
|
-
bytes[offset]
|
|
242
|
-
| (bytes[offset + 1] << 8)
|
|
243
|
-
| (bytes[offset + 2] << 16)
|
|
244
|
-
| (bytes[offset + 3] << 24)
|
|
245
|
-
) & MASK_32;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Read a little-endian u64 at `offset`.
|
|
250
|
-
*
|
|
251
|
-
* @param {Uint8Array} bytes
|
|
252
|
-
* @param {number} offset
|
|
253
|
-
* @returns {bigint}
|
|
254
|
-
*/
|
|
255
|
-
export function read_u64(bytes, offset) {
|
|
256
|
-
return read_u32(bytes, offset) | (read_u32(bytes, offset + 4) << 32n);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Write a little-endian u64 at `offset`.
|
|
261
|
-
*
|
|
262
|
-
* @param {Uint8Array} bytes
|
|
263
|
-
* @param {number} offset
|
|
264
|
-
* @param {bigint} value
|
|
265
|
-
*/
|
|
266
|
-
export function write_u64(bytes, offset, value) {
|
|
267
|
-
let v = value & XXH_MASK_64;
|
|
268
|
-
|
|
269
|
-
for (let i = 0; i < 8; i++) {
|
|
270
|
-
bytes[offset + i] = Number(v & 0xFFn);
|
|
271
|
-
v >>= 8n;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* The 16-byte mixing step shared by every mid-size path.
|
|
277
|
-
*
|
|
278
|
-
* @param {Uint8Array} input
|
|
279
|
-
* @param {number} input_offset
|
|
280
|
-
* @param {Uint8Array} secret
|
|
281
|
-
* @param {number} secret_offset
|
|
282
|
-
* @param {bigint} seed
|
|
283
|
-
* @returns {bigint}
|
|
284
|
-
*/
|
|
285
|
-
export function xxh3_mix16b(input, input_offset, secret, secret_offset, seed) {
|
|
286
|
-
const input_lo = read_u64(input, input_offset);
|
|
287
|
-
const input_hi = read_u64(input, input_offset + 8);
|
|
288
|
-
|
|
289
|
-
return mul128_fold64(
|
|
290
|
-
input_lo ^ add64(read_u64(secret, secret_offset), seed),
|
|
291
|
-
input_hi ^ sub64(read_u64(secret, secret_offset + 8), seed)
|
|
292
|
-
);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Derive a 192-byte secret from `seed`, as the reference's `XXH3_initCustomSecret`. This is what
|
|
297
|
-
* makes a seeded hash of a long input differ from the unseeded one.
|
|
298
|
-
*
|
|
299
|
-
* @param {bigint} seed
|
|
300
|
-
* @returns {Uint8Array} freshly allocated, {@link XXH3_SECRET}'s length
|
|
301
|
-
*/
|
|
302
|
-
export function xxh3_init_custom_secret(seed) {
|
|
303
|
-
const result = new Uint8Array(XXH3_SECRET.length);
|
|
304
|
-
|
|
305
|
-
const pair_count = XXH3_SECRET.length / 16;
|
|
306
|
-
|
|
307
|
-
for (let i = 0; i < pair_count; i++) {
|
|
308
|
-
const lo = add64(read_u64(XXH3_SECRET, 16 * i), seed);
|
|
309
|
-
const hi = sub64(read_u64(XXH3_SECRET, 16 * i + 8), seed);
|
|
310
|
-
|
|
311
|
-
write_u64(result, 16 * i, lo);
|
|
312
|
-
write_u64(result, 16 * i + 8, hi);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
return result;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Accumulate one 64-byte stripe into the eight lanes.
|
|
320
|
-
*
|
|
321
|
-
* @param {BigUint64Array} acc
|
|
322
|
-
* @param {Uint8Array} input
|
|
323
|
-
* @param {number} input_offset
|
|
324
|
-
* @param {Uint8Array} secret
|
|
325
|
-
* @param {number} secret_offset
|
|
326
|
-
*/
|
|
327
|
-
function accumulate_512(acc, input, input_offset, secret, secret_offset) {
|
|
328
|
-
for (let lane = 0; lane < XXH_ACC_NB; lane++) {
|
|
329
|
-
const data_val = read_u64(input, input_offset + lane * 8);
|
|
330
|
-
const data_key = data_val ^ read_u64(secret, secret_offset + lane * 8);
|
|
331
|
-
|
|
332
|
-
acc[lane ^ 1] = add64(acc[lane ^ 1], data_val);
|
|
333
|
-
acc[lane] = add64(mult32to64(data_key, data_key >> 32n), acc[lane]);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Accumulate `stripe_count` consecutive stripes, advancing the secret by
|
|
339
|
-
* {@link XXH_SECRET_CONSUME_RATE} per stripe.
|
|
340
|
-
*
|
|
341
|
-
* @param {BigUint64Array} acc
|
|
342
|
-
* @param {Uint8Array} input
|
|
343
|
-
* @param {number} input_offset
|
|
344
|
-
* @param {Uint8Array} secret
|
|
345
|
-
* @param {number} stripe_count
|
|
346
|
-
*/
|
|
347
|
-
function accumulate(acc, input, input_offset, secret, stripe_count) {
|
|
348
|
-
for (let n = 0; n < stripe_count; n++) {
|
|
349
|
-
accumulate_512(
|
|
350
|
-
acc,
|
|
351
|
-
input, input_offset + n * XXH_STRIPE_LEN,
|
|
352
|
-
secret, n * XXH_SECRET_CONSUME_RATE
|
|
353
|
-
);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Scramble the lanes between blocks, so that a block's contribution cannot be undone by a later one.
|
|
359
|
-
*
|
|
360
|
-
* @param {BigUint64Array} acc
|
|
361
|
-
* @param {Uint8Array} secret
|
|
362
|
-
* @param {number} secret_offset
|
|
363
|
-
*/
|
|
364
|
-
function scramble_acc(acc, secret, secret_offset) {
|
|
365
|
-
for (let lane = 0; lane < XXH_ACC_NB; lane++) {
|
|
366
|
-
const key64 = read_u64(secret, secret_offset + lane * 8);
|
|
367
|
-
|
|
368
|
-
let acc64 = xorshift64(acc[lane], 47);
|
|
369
|
-
|
|
370
|
-
acc64 ^= key64;
|
|
371
|
-
acc64 = mul64(acc64, XXH_PRIME32_1);
|
|
372
|
-
|
|
373
|
-
acc[lane] = acc64;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Run the whole long-input accumulator loop: whole blocks with a scramble after each, then the
|
|
379
|
-
* trailing partial block, then the (possibly overlapping) final stripe.
|
|
380
|
-
*
|
|
381
|
-
* @param {BigUint64Array} acc
|
|
382
|
-
* @param {Uint8Array} input
|
|
383
|
-
* @param {Uint8Array} secret
|
|
384
|
-
*/
|
|
385
|
-
export function xxh3_hash_long_loop(acc, input, secret) {
|
|
386
|
-
const len = input.length;
|
|
387
|
-
const secret_size = secret.length;
|
|
388
|
-
|
|
389
|
-
const stripes_per_block = ((secret_size - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE) | 0;
|
|
390
|
-
const block_len = XXH_STRIPE_LEN * stripes_per_block;
|
|
391
|
-
const block_count = ((len - 1) / block_len) | 0;
|
|
392
|
-
|
|
393
|
-
for (let n = 0; n < block_count; n++) {
|
|
394
|
-
accumulate(acc, input, n * block_len, secret, stripes_per_block);
|
|
395
|
-
scramble_acc(acc, secret, secret_size - XXH_STRIPE_LEN);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
const trailing_stripes = (((len - 1) - (block_len * block_count)) / XXH_STRIPE_LEN) | 0;
|
|
399
|
-
|
|
400
|
-
accumulate(acc, input, block_count * block_len, secret, trailing_stripes);
|
|
401
|
-
|
|
402
|
-
accumulate_512(
|
|
403
|
-
acc,
|
|
404
|
-
input, len - XXH_STRIPE_LEN,
|
|
405
|
-
secret, secret_size - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START
|
|
406
|
-
);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Fold the eight lanes down to one 64-bit value.
|
|
411
|
-
*
|
|
412
|
-
* @param {BigUint64Array} acc
|
|
413
|
-
* @param {Uint8Array} secret
|
|
414
|
-
* @param {number} secret_offset
|
|
415
|
-
* @param {bigint} start
|
|
416
|
-
* @returns {bigint}
|
|
417
|
-
*/
|
|
418
|
-
export function xxh3_merge_accs(acc, secret, secret_offset, start) {
|
|
419
|
-
let result = start & XXH_MASK_64;
|
|
420
|
-
|
|
421
|
-
for (let i = 0; i < 4; i++) {
|
|
422
|
-
result = add64(result, mul128_fold64(
|
|
423
|
-
acc[2 * i] ^ read_u64(secret, secret_offset + 16 * i),
|
|
424
|
-
acc[2 * i + 1] ^ read_u64(secret, secret_offset + 16 * i + 8)
|
|
425
|
-
));
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
return xxh3_avalanche(result);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* The accumulator lanes' initial state.
|
|
433
|
-
* @returns {BigUint64Array} freshly allocated, {@link XXH_ACC_NB} lanes
|
|
434
|
-
*/
|
|
435
|
-
export function xxh3_init_acc() {
|
|
436
|
-
const acc = new BigUint64Array(XXH_ACC_NB);
|
|
437
|
-
|
|
438
|
-
acc[0] = XXH_PRIME32_3;
|
|
439
|
-
acc[1] = XXH_PRIME64_1;
|
|
440
|
-
acc[2] = XXH_PRIME64_2;
|
|
441
|
-
acc[3] = XXH_PRIME64_3;
|
|
442
|
-
acc[4] = XXH_PRIME64_4;
|
|
443
|
-
acc[5] = XXH_PRIME32_2;
|
|
444
|
-
acc[6] = XXH_PRIME64_5;
|
|
445
|
-
acc[7] = XXH_PRIME32_1;
|
|
446
|
-
|
|
447
|
-
return acc;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* The secret a seeded hash of a long input runs against: the default one for seed 0, a derived one
|
|
452
|
-
* otherwise. Shared by both variants so they agree on the seed-0 shortcut.
|
|
453
|
-
*
|
|
454
|
-
* @param {bigint} seed
|
|
455
|
-
* @returns {Uint8Array}
|
|
456
|
-
*/
|
|
457
|
-
export function xxh3_long_secret(seed) {
|
|
458
|
-
if (seed === 0n) {
|
|
459
|
-
return XXH3_SECRET;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
return xxh3_init_custom_secret(seed);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Common argument checks for the public entry points.
|
|
467
|
-
*
|
|
468
|
-
* @param {Uint8Array} input
|
|
469
|
-
* @param {bigint} seed
|
|
470
|
-
*/
|
|
471
|
-
export function xxh3_assert_arguments(input, seed) {
|
|
472
|
-
assert.defined(input, 'input');
|
|
473
|
-
assert.notNull(input, 'input');
|
|
474
|
-
assert.isArrayLike(input, 'input');
|
|
475
|
-
assert.equal(typeof seed, 'bigint', `seed must be a bigint, instead was '${typeof seed}'`);
|
|
476
|
-
}
|
|
1
|
+
export {
|
|
2
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
3
|
+
XXH_MASK_64,
|
|
4
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
5
|
+
XXH_PRIME32_1,
|
|
6
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
7
|
+
XXH_PRIME32_2,
|
|
8
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
9
|
+
XXH_PRIME32_3,
|
|
10
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
11
|
+
XXH_PRIME64_1,
|
|
12
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
13
|
+
XXH_PRIME64_2,
|
|
14
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
15
|
+
XXH_PRIME64_3,
|
|
16
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
17
|
+
XXH_PRIME64_4,
|
|
18
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
19
|
+
XXH_PRIME64_5,
|
|
20
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
21
|
+
XXH_PRIME_MX1,
|
|
22
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
23
|
+
XXH_PRIME_MX2,
|
|
24
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
25
|
+
XXH3_SECRET_SIZE_MIN,
|
|
26
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
27
|
+
XXH3_MIDSIZE_MAX,
|
|
28
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
29
|
+
XXH3_MIDSIZE_STARTOFFSET,
|
|
30
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
31
|
+
XXH3_MIDSIZE_LASTOFFSET,
|
|
32
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
33
|
+
XXH_STRIPE_LEN,
|
|
34
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
35
|
+
XXH_SECRET_CONSUME_RATE,
|
|
36
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
37
|
+
XXH_ACC_NB,
|
|
38
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
39
|
+
XXH_SECRET_LASTACC_START,
|
|
40
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
41
|
+
XXH_SECRET_MERGEACCS_START,
|
|
42
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
43
|
+
u64,
|
|
44
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
45
|
+
mul64,
|
|
46
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
47
|
+
add64,
|
|
48
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
49
|
+
sub64,
|
|
50
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
51
|
+
rotl64,
|
|
52
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
53
|
+
rotl32,
|
|
54
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
55
|
+
xorshift64,
|
|
56
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
57
|
+
swap32,
|
|
58
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
59
|
+
swap64,
|
|
60
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
61
|
+
mult32to64,
|
|
62
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
63
|
+
mul128_fold64,
|
|
64
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
65
|
+
xxh3_avalanche,
|
|
66
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
67
|
+
xxh3_rrmxmx,
|
|
68
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
69
|
+
xxh64_avalanche,
|
|
70
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
71
|
+
read_u32,
|
|
72
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
73
|
+
read_u64,
|
|
74
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
75
|
+
write_u64,
|
|
76
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
77
|
+
xxh3_mix16b,
|
|
78
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
79
|
+
xxh3_init_custom_secret,
|
|
80
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
81
|
+
xxh3_hash_long_loop,
|
|
82
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
83
|
+
xxh3_merge_accs,
|
|
84
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
85
|
+
xxh3_init_acc,
|
|
86
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
87
|
+
xxh3_long_secret,
|
|
88
|
+
/** @deprecated moved to core/math/hash/xxh3_common.js; import it from there */
|
|
89
|
+
xxh3_assert_arguments
|
|
90
|
+
} from "../../math/hash/xxh3_common.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Insert `value` at `index`, keeping the order of the rest: what `array.splice(index, 0, value)` does to
|
|
3
|
+
* the array, in place, without the empty array `splice` builds and returns every call.
|
|
4
|
+
*
|
|
5
|
+
* The elements from `index` on move up one slot each, and the array ends one longer.
|
|
6
|
+
*
|
|
7
|
+
* @template T
|
|
8
|
+
* @param {T[]} array
|
|
9
|
+
* @param {number} index where `value` lands, `0 <= index <= array.length`
|
|
10
|
+
* @param {T} value
|
|
11
|
+
*
|
|
12
|
+
* @author Alex Goldring
|
|
13
|
+
* @copyright Company Named Limited (c) 2026
|
|
14
|
+
*/
|
|
15
|
+
export function array_insert_at<T>(array: T[], index: number, value: T): void;
|
|
16
|
+
//# sourceMappingURL=array_insert_at.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_insert_at.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_insert_at.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,sDANW,MAAM,kBAqBhB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Insert `value` at `index`, keeping the order of the rest: what `array.splice(index, 0, value)` does to
|
|
5
|
+
* the array, in place, without the empty array `splice` builds and returns every call.
|
|
6
|
+
*
|
|
7
|
+
* The elements from `index` on move up one slot each, and the array ends one longer.
|
|
8
|
+
*
|
|
9
|
+
* @template T
|
|
10
|
+
* @param {T[]} array
|
|
11
|
+
* @param {number} index where `value` lands, `0 <= index <= array.length`
|
|
12
|
+
* @param {T} value
|
|
13
|
+
*
|
|
14
|
+
* @author Alex Goldring
|
|
15
|
+
* @copyright Company Named Limited (c) 2026
|
|
16
|
+
*/
|
|
17
|
+
export function array_insert_at(array, index, value) {
|
|
18
|
+
// past the end, splice appends, and this would leave a hole; below 0 it writes a "-1" property
|
|
19
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
20
|
+
assert.lessThanOrEqual(index, array.length, 'index');
|
|
21
|
+
|
|
22
|
+
let i = array.length;
|
|
23
|
+
|
|
24
|
+
// grow by one first, through push, so the store grows the way an append grows it
|
|
25
|
+
array.push(value);
|
|
26
|
+
|
|
27
|
+
for (; i > index; i--) {
|
|
28
|
+
array[i] = array[i - 1];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
array[index] = value;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remove the element at `index`, keeping the order of the rest: what `array.splice(index, 1)` does to
|
|
3
|
+
* the array, in place, without the array of removed elements `splice` builds and returns every call.
|
|
4
|
+
*
|
|
5
|
+
* The elements after `index` move down one slot each, and the array ends one shorter.
|
|
6
|
+
*
|
|
7
|
+
* @template T
|
|
8
|
+
* @param {T[]} array
|
|
9
|
+
* @param {number} index an index into `array`, `0 <= index < array.length`
|
|
10
|
+
*
|
|
11
|
+
* @author Alex Goldring
|
|
12
|
+
* @copyright Company Named Limited (c) 2026
|
|
13
|
+
*/
|
|
14
|
+
export function array_remove_at<T>(array: T[], index: number): void;
|
|
15
|
+
//# sourceMappingURL=array_remove_at.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_remove_at.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_remove_at.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,sDALW,MAAM,QAmBhB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Remove the element at `index`, keeping the order of the rest: what `array.splice(index, 1)` does to
|
|
5
|
+
* the array, in place, without the array of removed elements `splice` builds and returns every call.
|
|
6
|
+
*
|
|
7
|
+
* The elements after `index` move down one slot each, and the array ends one shorter.
|
|
8
|
+
*
|
|
9
|
+
* @template T
|
|
10
|
+
* @param {T[]} array
|
|
11
|
+
* @param {number} index an index into `array`, `0 <= index < array.length`
|
|
12
|
+
*
|
|
13
|
+
* @author Alex Goldring
|
|
14
|
+
* @copyright Company Named Limited (c) 2026
|
|
15
|
+
*/
|
|
16
|
+
export function array_remove_at(array, index) {
|
|
17
|
+
// outside the array, splice removes nothing, and this would drop the last element instead
|
|
18
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
19
|
+
assert.lessThan(index, array.length, 'index');
|
|
20
|
+
|
|
21
|
+
const last = array.length - 1;
|
|
22
|
+
|
|
23
|
+
for (let i = index; i < last; i++) {
|
|
24
|
+
array[i] = array[i + 1];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// pop rather than `length = last`: setting the length lets V8 trim the store, which a pool removing and
|
|
28
|
+
// inserting every frame would only grow back
|
|
29
|
+
array.pop();
|
|
30
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Computes hash on integer values, useful for building composite hashes
|
|
3
|
+
*
|
|
4
|
+
* @deprecated Varargs, so every call allocates a rest array. Use `hash_mix2` / `hash_mix3` from
|
|
5
|
+
* `core/math/hash/`, which fold the same `h * 31 + x` step without allocating. Their values differ
|
|
6
|
+
* from this function's: it seeds the fold with the argument count and returns uint32, while the
|
|
7
|
+
* mixers are unseeded and return int32. Kept, with its values unchanged, for code outside the engine.
|
|
8
|
+
*
|
|
3
9
|
* @param {...number} value
|
|
4
10
|
* @returns {number}
|
|
5
11
|
*/
|