@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,174 +1,179 @@
|
|
|
1
|
-
import { assert } from "../../../core/assert.js";
|
|
2
|
-
import { array_copy } from "../../../core/collection/array/array_copy.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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
|
-
* @param {
|
|
63
|
-
* @param {
|
|
64
|
-
* @param {
|
|
65
|
-
* @param {
|
|
66
|
-
* @param {
|
|
67
|
-
* @
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
assert.
|
|
79
|
-
assert.
|
|
80
|
-
assert.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
r.
|
|
86
|
-
r.
|
|
87
|
-
r.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
//
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
*
|
|
106
|
-
* @
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
r.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
r.
|
|
116
|
-
r.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
r.resolution[
|
|
120
|
-
r.resolution[
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
&& this.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
1
|
+
import { assert } from "../../../core/assert.js";
|
|
2
|
+
import { array_copy } from "../../../core/collection/array/array_copy.js";
|
|
3
|
+
import { hash_mix2 } from "../../../core/math/hash/hash_mix2.js";
|
|
4
|
+
import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
|
|
5
|
+
import { isArrayEqualStrict } from "../../../core/collection/array/isArrayEqualStrict.js";
|
|
6
|
+
import { computeHashFloatArray } from "../../../core/math/hash/computeHashFloatArray.js";
|
|
7
|
+
import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
|
|
8
|
+
import {
|
|
9
|
+
ResourceDescriptor
|
|
10
|
+
} from "../../../engine/graphics/render/frame_graph/resource/ResourceDescriptor.js";
|
|
11
|
+
import { texture_mip_level_count } from "../../util/texture_mip_extent.js";
|
|
12
|
+
import { decode_bitmask_enum } from "../decode_bitmask_enum.js";
|
|
13
|
+
import { GPUTextureUsage } from "../../descriptor/GPUTextureUsage.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* **Vestigial.** Nothing branches on it — see {@link TextureResourceDescriptor.resolution_domain}.
|
|
17
|
+
*
|
|
18
|
+
* @enum {number}
|
|
19
|
+
*/
|
|
20
|
+
export const TextureResolutionDomain = {
|
|
21
|
+
Absolute: 0,
|
|
22
|
+
PresentationRelative: 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class TextureResourceDescriptor extends ResourceDescriptor {
|
|
26
|
+
/**
|
|
27
|
+
* **Vestigial. Do not read this to decide how to interpret {@link resolution}.**
|
|
28
|
+
*
|
|
29
|
+
* No code branches on it; only {@link hash} folds it in. {@link from} stores whatever
|
|
30
|
+
* resolution it is given without touching this field, and every caller gives it pixels — so a
|
|
31
|
+
* descriptor's resolution is absolute pixels whatever this says, including on the default
|
|
32
|
+
* `PresentationRelative` that {@link from} leaves in place.
|
|
33
|
+
*
|
|
34
|
+
* @type {TextureResolutionDomain|number}
|
|
35
|
+
*/
|
|
36
|
+
resolution_domain = TextureResolutionDomain.PresentationRelative;
|
|
37
|
+
|
|
38
|
+
// TODO use Uint32 instead
|
|
39
|
+
resolution = new Float64Array([1, 1, 1]);
|
|
40
|
+
sampleCount = 1;
|
|
41
|
+
|
|
42
|
+
mipLevelCount = 1;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {GPUTextureDimension|string}
|
|
47
|
+
*/
|
|
48
|
+
dimension = "2d"
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @type {string|GPUTextureFormat}
|
|
52
|
+
*/
|
|
53
|
+
format = "rgba8unorm";
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @type {number|GPUTextureUsageFlags}
|
|
57
|
+
*/
|
|
58
|
+
usage = GPUTextureUsage.TEXTURE_BINDING;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @param {Object} options
|
|
63
|
+
* @param {number[]} options.resolution
|
|
64
|
+
* @param {GPUTextureDimension|string} [options.dimension]
|
|
65
|
+
* @param {GPUTextureFormat|string} options.format
|
|
66
|
+
* @param {GPUTextureUsageFlags|number} [options.usage]
|
|
67
|
+
* @param {boolean} [options.enableMips]
|
|
68
|
+
* @returns {TextureResourceDescriptor}
|
|
69
|
+
*/
|
|
70
|
+
static from({
|
|
71
|
+
resolution,
|
|
72
|
+
dimension = "2d",
|
|
73
|
+
format,
|
|
74
|
+
usage = GPUTextureUsage.TEXTURE_BINDING,
|
|
75
|
+
enableMips = false
|
|
76
|
+
}) {
|
|
77
|
+
|
|
78
|
+
assert.isString(format, 'format');
|
|
79
|
+
assert.defined(resolution, 'resolution');
|
|
80
|
+
assert.isArrayLike(resolution, 'resolution');
|
|
81
|
+
assert.isBoolean(enableMips, 'enableMips');
|
|
82
|
+
|
|
83
|
+
const r = new TextureResourceDescriptor();
|
|
84
|
+
|
|
85
|
+
array_copy(resolution, 0, r.resolution, 0, Math.min(r.resolution.length, resolution.length));
|
|
86
|
+
r.dimension = dimension;
|
|
87
|
+
r.format = format;
|
|
88
|
+
r.usage = usage;
|
|
89
|
+
|
|
90
|
+
if (enableMips === true) {
|
|
91
|
+
|
|
92
|
+
// `r.resolution` rather than the argument: it has already been padded to three, so a
|
|
93
|
+
// caller that gave two axes reads as depth 1 instead of `undefined`
|
|
94
|
+
r.mipLevelCount = texture_mip_level_count(
|
|
95
|
+
r.resolution[0], r.resolution[1], r.resolution[2], r.dimension
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return r;
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @param {GPUTexture} texture
|
|
107
|
+
* @returns {TextureResourceDescriptor}
|
|
108
|
+
*/
|
|
109
|
+
static fromTexture(texture) {
|
|
110
|
+
const r = new TextureResourceDescriptor();
|
|
111
|
+
|
|
112
|
+
r.format = texture.format;
|
|
113
|
+
r.dimension = texture.dimension;
|
|
114
|
+
|
|
115
|
+
r.usage = texture.usage;
|
|
116
|
+
r.sampleCount = texture.sampleCount;
|
|
117
|
+
r.resolution_domain = TextureResolutionDomain.Absolute;
|
|
118
|
+
|
|
119
|
+
r.resolution[0] = texture.width;
|
|
120
|
+
r.resolution[1] = texture.height;
|
|
121
|
+
r.resolution[2] = texture.depthOrArrayLayers;
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
r.mipLevelCount = texture.mipLevelCount;
|
|
125
|
+
|
|
126
|
+
return r;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
get type() {
|
|
130
|
+
return "texture";
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
hash() {
|
|
134
|
+
return hash_mix2(
|
|
135
|
+
hash_mix3(
|
|
136
|
+
hash_mix3(
|
|
137
|
+
this.resolution_domain,
|
|
138
|
+
this.mipLevelCount,
|
|
139
|
+
computeHashFloatArray(this.resolution)
|
|
140
|
+
),
|
|
141
|
+
this.sampleCount,
|
|
142
|
+
this.usage
|
|
143
|
+
),
|
|
144
|
+
computeStringHash(this.format)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @param {TextureResourceDescriptor} other
|
|
151
|
+
* @returns {boolean}
|
|
152
|
+
*/
|
|
153
|
+
equals(other) {
|
|
154
|
+
if (this === other) {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// A texture and a buffer descriptor share one `ImmutableObjectPool` in
|
|
159
|
+
// `RenderResourceManager`, so a hash collision puts a buffer in front of this method. The
|
|
160
|
+
// type check has to come first: without it the very next line reads `other.resolution.length`
|
|
161
|
+
// on undefined and the probe throws instead of missing the cache.
|
|
162
|
+
if (!super.equals(other)) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return isArrayEqualStrict(this.resolution, other.resolution)
|
|
167
|
+
&& this.mipLevelCount === other.mipLevelCount
|
|
168
|
+
&& this.resolution_domain === other.resolution_domain
|
|
169
|
+
&& this.sampleCount === other.sampleCount
|
|
170
|
+
&& this.dimension === other.dimension
|
|
171
|
+
&& this.format === other.format
|
|
172
|
+
&& this.usage === other.usage
|
|
173
|
+
;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
toString() {
|
|
177
|
+
return `Texture{ resolution = [${this.resolution.join(",")}], mipLevelCount = ${this.mipLevelCount}, dimension = ${this.dimension}, format = ${this.format}, usage = ${decode_bitmask_enum(this.usage, GPUTextureUsage).join(' | ')}, sampleCount = ${this.sampleCount} }`;
|
|
178
|
+
}
|
|
174
179
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every way `adapter` falls short of {@link SHADE_DEVICE_FLOOR}, one phrase per gap, naming the
|
|
3
|
+
* feature or the limit and, for a limit, what the adapter offers against what is required. Empty
|
|
4
|
+
* when the adapter meets the floor.
|
|
5
|
+
*
|
|
6
|
+
* All of them rather than the first: somebody told about one gap at a time has to come back once per
|
|
7
|
+
* gap to learn whether their hardware can ever run this.
|
|
8
|
+
*
|
|
9
|
+
* @param {GPUAdapter} adapter
|
|
10
|
+
* @returns {string[]}
|
|
11
|
+
*/
|
|
12
|
+
export function shade_device_floor_unmet(adapter: GPUAdapter): string[];
|
|
13
|
+
//# sourceMappingURL=shade_device_floor_unmet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shade_device_floor_unmet.d.ts","sourceRoot":"","sources":["../../../../src/shade/device/shade_device_floor_unmet.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,+DAFa,MAAM,EAAE,CAoBpB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SHADE_DEVICE_FLOOR } from "./SHADE_DEVICE_FLOOR.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Every way `adapter` falls short of {@link SHADE_DEVICE_FLOOR}, one phrase per gap, naming the
|
|
5
|
+
* feature or the limit and, for a limit, what the adapter offers against what is required. Empty
|
|
6
|
+
* when the adapter meets the floor.
|
|
7
|
+
*
|
|
8
|
+
* All of them rather than the first: somebody told about one gap at a time has to come back once per
|
|
9
|
+
* gap to learn whether their hardware can ever run this.
|
|
10
|
+
*
|
|
11
|
+
* @param {GPUAdapter} adapter
|
|
12
|
+
* @returns {string[]}
|
|
13
|
+
*/
|
|
14
|
+
export function shade_device_floor_unmet(adapter) {
|
|
15
|
+
const unmet = [];
|
|
16
|
+
|
|
17
|
+
for (const feature of SHADE_DEVICE_FLOOR.features) {
|
|
18
|
+
if (!adapter.features.has(feature)) {
|
|
19
|
+
unmet.push(`feature '${feature}' is not supported`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
for (const [name, required] of Object.entries(SHADE_DEVICE_FLOOR.limits)) {
|
|
24
|
+
const offered = adapter.limits[name];
|
|
25
|
+
|
|
26
|
+
if (offered < required) {
|
|
27
|
+
unmet.push(`limit ${name} is ${offered}, at least ${required} is required`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return unmet;
|
|
32
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
-
import { crc32 } from "../../../../core/
|
|
2
|
+
import { crc32 } from "../../../../core/math/hash/crc32.js";
|
|
3
3
|
import { SGPT_DEFECT } from "./SGPT_DEFECT.js";
|
|
4
4
|
import { SGPTDefect } from "./SGPTDefect.js";
|
|
5
5
|
import { SGPT_FORMAT_VERSION } from "./SGPT_FORMAT_VERSION.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
-
import { crc32 } from "../../../../core/
|
|
2
|
+
import { crc32 } from "../../../../core/math/hash/crc32.js";
|
|
3
3
|
import { SGPT_DEFECT } from "./SGPT_DEFECT.js";
|
|
4
4
|
import { SGPTDefect } from "./SGPTDefect.js";
|
|
5
5
|
import { SGPT_HEADER_SIZE } from "./SGPT_HEADER_SIZE.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
-
import { crc32 } from "../../../../core/
|
|
2
|
+
import { crc32 } from "../../../../core/math/hash/crc32.js";
|
|
3
3
|
import { SGPT_FORMAT_VERSION } from "./SGPT_FORMAT_VERSION.js";
|
|
4
4
|
import { SGPT_HEADER_CHECKSUM_COVERAGE } from "./SGPT_HEADER_CHECKSUM_COVERAGE.js";
|
|
5
5
|
import { SGPT_HEADER_OFFSET } from "./SGPT_HEADER_OFFSET.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
-
import { crc32 } from "../../../../core/
|
|
2
|
+
import { crc32 } from "../../../../core/math/hash/crc32.js";
|
|
3
3
|
import { SGPT_RECORD_HEADER_SIZE } from "./SGPT_RECORD_HEADER_SIZE.js";
|
|
4
4
|
import { SGPT_RECORD_SYNC } from "./SGPT_RECORD_SYNC.js";
|
|
5
5
|
|
|
@@ -421,6 +421,8 @@ export class Renderer {
|
|
|
421
421
|
*/
|
|
422
422
|
get nss(): NSS;
|
|
423
423
|
/**
|
|
424
|
+
* Rejects with a {@link ShadeDeviceFailure} when there is no usable device — no WebGPU, no
|
|
425
|
+
* adapter, an adapter below {@link SHADE_DEVICE_FLOOR}, or a refused device request.
|
|
424
426
|
*
|
|
425
427
|
* @param {Object} [options]
|
|
426
428
|
* @param {GPUCanvasContext} [options.context] Optional, if not provided - one will be created.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Renderer.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/Renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Renderer.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/Renderer.js"],"names":[],"mappings":"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"}
|
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
import { FrameGraph } from "../../engine/graphics/render/frame_graph/FrameGraph.js";
|
|
12
12
|
import { TextureDescriptor } from "../descriptor/texture/TextureDescriptor.js";
|
|
13
13
|
import { WebGPUExtensionType } from "../descriptor/WebGPUExtensionType.js";
|
|
14
|
+
import { SHADE_DEVICE_FLOOR } from "../device/SHADE_DEVICE_FLOOR.js";
|
|
15
|
+
import { shade_device_floor_unmet } from "../device/shade_device_floor_unmet.js";
|
|
14
16
|
import { ShadeDeviceFailure } from "../device/ShadeDeviceFailure.js";
|
|
15
17
|
import { ShadeGPUCommandContext } from "../device/ShadeGPUCommandContext.js";
|
|
16
18
|
import { CameraManager } from "./camera/CameraManager.js";
|
|
@@ -1375,6 +1377,8 @@ export class Renderer {
|
|
|
1375
1377
|
}
|
|
1376
1378
|
|
|
1377
1379
|
/**
|
|
1380
|
+
* Rejects with a {@link ShadeDeviceFailure} when there is no usable device — no WebGPU, no
|
|
1381
|
+
* adapter, an adapter below {@link SHADE_DEVICE_FLOOR}, or a refused device request.
|
|
1378
1382
|
*
|
|
1379
1383
|
* @param {Object} [options]
|
|
1380
1384
|
* @param {GPUCanvasContext} [options.context] Optional, if not provided - one will be created.
|
|
@@ -1387,8 +1391,8 @@ export class Renderer {
|
|
|
1387
1391
|
pixelRatio = window.devicePixelRatio,
|
|
1388
1392
|
} = {}) {
|
|
1389
1393
|
|
|
1390
|
-
if (
|
|
1391
|
-
throw
|
|
1394
|
+
if (navigator.gpu === undefined) {
|
|
1395
|
+
throw ShadeDeviceFailure.webgpu_unavailable();
|
|
1392
1396
|
}
|
|
1393
1397
|
|
|
1394
1398
|
this.#update_presentation_format();
|
|
@@ -1414,13 +1418,7 @@ export class Renderer {
|
|
|
1414
1418
|
if (device === undefined) {
|
|
1415
1419
|
// no device present, let's create one
|
|
1416
1420
|
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
if (gpu === undefined) {
|
|
1420
|
-
throw ShadeDeviceFailure.webgpu_unavailable();
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
const adapter = await gpu.requestAdapter({
|
|
1421
|
+
const adapter = await navigator.gpu.requestAdapter({
|
|
1424
1422
|
powerPreference: "high-performance",
|
|
1425
1423
|
});
|
|
1426
1424
|
|
|
@@ -1441,27 +1439,22 @@ export class Renderer {
|
|
|
1441
1439
|
//
|
|
1442
1440
|
// console.warn('adapter limits:', adapter.limits);
|
|
1443
1441
|
|
|
1444
|
-
|
|
1442
|
+
// The whole floor is checked before a device is asked for, so a refusal names every gap,
|
|
1443
|
+
// with the numbers this adapter offers, rather than whichever one requestDevice trips on.
|
|
1444
|
+
const unmet = shade_device_floor_unmet(adapter);
|
|
1445
1445
|
|
|
1446
|
-
if (
|
|
1447
|
-
throw ShadeDeviceFailure.below_floor(
|
|
1448
|
-
`requires at least 10 storage buffers per shader stage, adapter offers ${maxStorageBuffersPerShaderStage}`
|
|
1449
|
-
);
|
|
1446
|
+
if (unmet.length > 0) {
|
|
1447
|
+
throw ShadeDeviceFailure.below_floor(unmet);
|
|
1450
1448
|
}
|
|
1451
1449
|
|
|
1452
|
-
const requiredFeatures =
|
|
1453
|
-
// required for indirect draw that's used extensively in Shade
|
|
1454
|
-
WebGPUExtensionType.IndirectFirstInstance,
|
|
1455
|
-
// required for OIT (might be unavailable)
|
|
1456
|
-
WebGPUExtensionType.Float32Blendable,
|
|
1457
|
-
];
|
|
1450
|
+
const requiredFeatures = SHADE_DEVICE_FLOOR.features.slice();
|
|
1458
1451
|
|
|
1459
1452
|
// add features if they are available
|
|
1460
1453
|
const optional_desired = [
|
|
1461
1454
|
// Profiling only, and some browsers withhold it on hardware that is otherwise
|
|
1462
1455
|
// fine — so it is taken when offered and the timers go quiet when it is not
|
|
1463
1456
|
// (E7, sponsor 2026-08-16). Requiring it would refuse to start on those browsers
|
|
1464
|
-
// for the sake of a feature the
|
|
1457
|
+
// for the sake of a feature the renderer does not need to run.
|
|
1465
1458
|
WebGPUExtensionType.TimestampQuery,
|
|
1466
1459
|
WebGPUExtensionType.Subgroups,
|
|
1467
1460
|
WebGPUExtensionType.TextureFormatsTier1,
|
|
@@ -1475,35 +1468,28 @@ export class Renderer {
|
|
|
1475
1468
|
WebGPUExtensionType.TextureCompressionASTC,
|
|
1476
1469
|
];
|
|
1477
1470
|
|
|
1478
|
-
// valid required features
|
|
1479
|
-
for (const feature of requiredFeatures) {
|
|
1480
|
-
if (!adapter.features.has(feature)) {
|
|
1481
|
-
throw ShadeDeviceFailure.below_floor(`adapter does not support required feature '${feature}'`);
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
1471
|
for (const feature of optional_desired) {
|
|
1486
1472
|
if (adapter.features.has(feature)) {
|
|
1487
1473
|
requiredFeatures.push(feature);
|
|
1488
1474
|
}
|
|
1489
1475
|
}
|
|
1490
1476
|
|
|
1477
|
+
try {
|
|
1478
|
+
device = await adapter.requestDevice({
|
|
1479
|
+
requiredLimits: {
|
|
1480
|
+
...SHADE_DEVICE_FLOOR.limits,
|
|
1491
1481
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
maxStorageBuffersPerShaderStage: 10,
|
|
1504
|
-
},
|
|
1505
|
-
requiredFeatures
|
|
1506
|
-
});
|
|
1482
|
+
/*
|
|
1483
|
+
grab the largest buffer limit we can get, default limits are super-low
|
|
1484
|
+
*/
|
|
1485
|
+
maxBufferSize: adapter.limits.maxBufferSize,
|
|
1486
|
+
maxStorageBufferBindingSize: adapter.limits.maxStorageBufferBindingSize,
|
|
1487
|
+
},
|
|
1488
|
+
requiredFeatures
|
|
1489
|
+
});
|
|
1490
|
+
} catch (error) {
|
|
1491
|
+
throw ShadeDeviceFailure.device_request_failed(error.message);
|
|
1492
|
+
}
|
|
1507
1493
|
|
|
1508
1494
|
// NOTE: according to spec (as of 2025/09/19) - adapter can only be used to create one device, after which it becomes "consumed"
|
|
1509
1495
|
// see https://www.w3.org/TR/webgpu/#adapters
|
|
@@ -1515,18 +1501,6 @@ export class Renderer {
|
|
|
1515
1501
|
this.#handle_device_lost(info);
|
|
1516
1502
|
})
|
|
1517
1503
|
|
|
1518
|
-
if (context === undefined) {
|
|
1519
|
-
const canvas = document.createElement('canvas');
|
|
1520
|
-
canvas.width = window.innerWidth;
|
|
1521
|
-
canvas.height = window.innerHeight;
|
|
1522
|
-
|
|
1523
|
-
context = canvas.getContext('webgpu');
|
|
1524
|
-
|
|
1525
|
-
if (context === null) {
|
|
1526
|
-
throw new Error('Failed to bind GPUCanvasContext');
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
1504
|
assert.ok(device.features.has("indirect-first-instance"), '"indirect-first-instance" feature needs to be enabled for non-zero firstInstance values to be used.')
|
|
1531
1505
|
assert.isInstanceOf(context, GPUCanvasContext, 'context', 'GPUCanvasContext');
|
|
1532
1506
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
|
|
2
2
|
import { BindingResource } from "./BindingResource.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -35,7 +35,7 @@ export class BufferBinding extends BindingResource {
|
|
|
35
35
|
* @returns {number}
|
|
36
36
|
*/
|
|
37
37
|
hash() {
|
|
38
|
-
return
|
|
38
|
+
return hash_mix3(
|
|
39
39
|
this.offset,
|
|
40
40
|
this.actual_size,
|
|
41
41
|
this.buffer.id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GPUBufferAllocator.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/buffer/GPUBufferAllocator.js"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH;IAOI;;OAEG;IACH,+BAKC;IAED,8BAEC;IAED,gCAEC;
|
|
1
|
+
{"version":3,"file":"GPUBufferAllocator.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/buffer/GPUBufferAllocator.js"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH;IAOI;;OAEG;IACH,+BAKC;IAED,8BAEC;IAED,gCAEC;IAWD,yBAEC;IAED,2BAWC;IAED,mCAEC;;CAoDJ;sCA3HqC,kCAAkC"}
|