@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
|
@@ -13,8 +13,15 @@
|
|
|
13
13
|
* immediately (within and across frames) — there is no frames-in-flight reuse gate; only
|
|
14
14
|
* *destruction* is deferred, by {@link update}.
|
|
15
15
|
*
|
|
16
|
+
* A record carries what the pool is ordered and accounted by, cached when its resource enters the
|
|
17
|
+
* pool: `size` here, and whatever else {@link describeRecord} adds for {@link compare} and
|
|
18
|
+
* {@link find}. A resource can be a platform object — a `GPUBuffer`'s `size` and `usage` are native
|
|
19
|
+
* reads — and the binary search and scan visit records many times a frame, so they read the record,
|
|
20
|
+
* never the resource.
|
|
21
|
+
*
|
|
16
22
|
* @typedef {object} PoolRecord
|
|
17
23
|
* @property {*} resource the pooled resource (or null while the record sits on the free-list)
|
|
24
|
+
* @property {number} size {@link sizeOf} the resource, as it was when it entered the pool
|
|
18
25
|
* @property {number} last_used_frame frame the resource was last released into the pool
|
|
19
26
|
* @property {boolean} referenced CLOCK second-chance bit; set on release and on reuse
|
|
20
27
|
*/
|
|
@@ -83,6 +90,13 @@ export class TransientResourcePool {
|
|
|
83
90
|
* @abstract
|
|
84
91
|
*/
|
|
85
92
|
destroyResource(resource: any): void;
|
|
93
|
+
/**
|
|
94
|
+
* Cache on a record entering the pool whatever {@link compare} and {@link find} read beyond `size`,
|
|
95
|
+
* so neither has to ask the resource. Called on {@link release} once `resource` and `size` are set,
|
|
96
|
+
* and before the record is placed in order. Default: nothing.
|
|
97
|
+
* @param {PoolRecord} record
|
|
98
|
+
*/
|
|
99
|
+
describeRecord(record: PoolRecord): void;
|
|
86
100
|
/**
|
|
87
101
|
* Hook invoked at the end of {@link get}, after the resource is acquired and tracked. Subclasses
|
|
88
102
|
* override it for post-acquire work (clear-on-reuse, postcondition asserts). Default: nothing.
|
|
@@ -147,12 +161,22 @@ export class TransientResourcePool {
|
|
|
147
161
|
* Reuse safety: within WebGPU's single in-order queue, reusing a GPU-only transient is safe
|
|
148
162
|
* immediately (within and across frames) — there is no frames-in-flight reuse gate; only
|
|
149
163
|
* *destruction* is deferred, by {@link update }.
|
|
164
|
+
*
|
|
165
|
+
* A record carries what the pool is ordered and accounted by, cached when its resource enters the
|
|
166
|
+
* pool: `size` here, and whatever else {@link describeRecord } adds for {@link compare } and
|
|
167
|
+
* {@link find }. A resource can be a platform object — a `GPUBuffer`'s `size` and `usage` are native
|
|
168
|
+
* reads — and the binary search and scan visit records many times a frame, so they read the record,
|
|
169
|
+
* never the resource.
|
|
150
170
|
*/
|
|
151
171
|
export type PoolRecord = {
|
|
152
172
|
/**
|
|
153
173
|
* the pooled resource (or null while the record sits on the free-list)
|
|
154
174
|
*/
|
|
155
175
|
resource: any;
|
|
176
|
+
/**
|
|
177
|
+
* {@link sizeOf } the resource, as it was when it entered the pool
|
|
178
|
+
*/
|
|
179
|
+
size: number;
|
|
156
180
|
/**
|
|
157
181
|
* frame the resource was last released into the pool
|
|
158
182
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransientResourcePool.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/pool/TransientResourcePool.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransientResourcePool.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/pool/TransientResourcePool.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;IAII,+EAA+E;IAC/E,wBADqE,MAAM,CACjC;IAE1C,6EAA6E;IAC7E,mBADmE,MAAM,CAClD;IAEvB,oEAAoE;IACpE,6BAD0D,MAAM,CAChC;IAEhC,sGAAsG;IACtG,uBAD4F,MAAM,CACtE;IAE5B,6EAA6E;IAC7E,mBADmE,MAAM,CACjD;IAExB,0EAA0E;IAC1E,mBADgE,MAAM,CAC9C;IAExB;;;;OAIG;IACH,SAFU,UAAU,EAAE,CAET;IAEb;;;OAGG;IACH,OAFU,QAAM,CAEE;IAElB;;;;OAIG;IACH,kBAFU,OAAO,CAEQ;IAyBzB;;;;;OAKG;IACH,uBAHa,MAAM,CAKlB;IAED;;;;;;OAMG;IACH,WALW,UAAU,KACV,UAAU,GACR,MAAM,CAKlB;IAED;;;;;OAKG;IACH,uBAHa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,2BAEC;IAED;;;;OAIG;IACH,qCAEC;IAED;;;;;OAKG;IACH,uBAFW,UAAU,QAGpB;IAED;;;;;;;OAOG;IACH,qDAHW,OAAO,uBAIjB;IAID,uBAEC;IAED,oBAEC;IAqBD;;;;;;;OAOG;IACH,yCA0CC;IAED;;;;;;OAMG;IACH,wBAFa,OAAO,CAiCnB;IAED;;;;;OAKG;IACH,eAsDC;IAED;;OAEG;IACH,+BAEC;IAED;;OAEG;IACH,gBAcC;IAED;;;OAGG;IACH,yBAwCC;;CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA1Ya,MAAM;;;;qBACN,MAAM;;;;gBACN,OAAO"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { assert } from "../../../core/assert.js";
|
|
2
|
+
import { array_insert_at } from "../../../core/collection/array/array_insert_at.js";
|
|
3
|
+
import { array_remove_at } from "../../../core/collection/array/array_remove_at.js";
|
|
2
4
|
import { binarySearchHighIndex } from "../../../core/collection/array/binarySearchHighIndex.js";
|
|
3
5
|
|
|
4
6
|
/**
|
|
@@ -16,8 +18,15 @@ import { binarySearchHighIndex } from "../../../core/collection/array/binarySear
|
|
|
16
18
|
* immediately (within and across frames) — there is no frames-in-flight reuse gate; only
|
|
17
19
|
* *destruction* is deferred, by {@link update}.
|
|
18
20
|
*
|
|
21
|
+
* A record carries what the pool is ordered and accounted by, cached when its resource enters the
|
|
22
|
+
* pool: `size` here, and whatever else {@link describeRecord} adds for {@link compare} and
|
|
23
|
+
* {@link find}. A resource can be a platform object — a `GPUBuffer`'s `size` and `usage` are native
|
|
24
|
+
* reads — and the binary search and scan visit records many times a frame, so they read the record,
|
|
25
|
+
* never the resource.
|
|
26
|
+
*
|
|
19
27
|
* @typedef {object} PoolRecord
|
|
20
28
|
* @property {*} resource the pooled resource (or null while the record sits on the free-list)
|
|
29
|
+
* @property {number} size {@link sizeOf} the resource, as it was when it entered the pool
|
|
21
30
|
* @property {number} last_used_frame frame the resource was last released into the pool
|
|
22
31
|
* @property {boolean} referenced CLOCK second-chance bit; set on release and on reuse
|
|
23
32
|
*/
|
|
@@ -137,6 +146,15 @@ export class TransientResourcePool {
|
|
|
137
146
|
throw new Error('TransientResourcePool.destroyResource is abstract');
|
|
138
147
|
}
|
|
139
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Cache on a record entering the pool whatever {@link compare} and {@link find} read beyond `size`,
|
|
151
|
+
* so neither has to ask the resource. Called on {@link release} once `resource` and `size` are set,
|
|
152
|
+
* and before the record is placed in order. Default: nothing.
|
|
153
|
+
* @param {PoolRecord} record
|
|
154
|
+
*/
|
|
155
|
+
describeRecord(record) {
|
|
156
|
+
}
|
|
157
|
+
|
|
140
158
|
/**
|
|
141
159
|
* Hook invoked at the end of {@link get}, after the resource is acquired and tracked. Subclasses
|
|
142
160
|
* override it for post-acquire work (clear-on-reuse, postcondition asserts). Default: nothing.
|
|
@@ -164,7 +182,7 @@ export class TransientResourcePool {
|
|
|
164
182
|
const record = this.#free_records.pop();
|
|
165
183
|
|
|
166
184
|
if (record === undefined) {
|
|
167
|
-
return { resource: null, last_used_frame: 0, referenced: false };
|
|
185
|
+
return { resource: null, size: 0, last_used_frame: 0, referenced: false };
|
|
168
186
|
}
|
|
169
187
|
|
|
170
188
|
return record;
|
|
@@ -191,21 +209,25 @@ export class TransientResourcePool {
|
|
|
191
209
|
const index = this.find(descriptor);
|
|
192
210
|
|
|
193
211
|
let resource;
|
|
212
|
+
let size;
|
|
194
213
|
let reused;
|
|
195
214
|
|
|
196
215
|
if (index !== -1) {
|
|
197
216
|
const record = this.records[index];
|
|
198
217
|
|
|
199
218
|
resource = record.resource;
|
|
219
|
+
size = record.size;
|
|
200
220
|
|
|
201
|
-
this.records
|
|
202
|
-
this.#bytes_pooled -=
|
|
221
|
+
array_remove_at(this.records, index);
|
|
222
|
+
this.#bytes_pooled -= size;
|
|
203
223
|
|
|
204
224
|
this.#recycle_record(record);
|
|
205
225
|
|
|
206
226
|
reused = true;
|
|
207
227
|
} else {
|
|
208
228
|
resource = this.make(descriptor);
|
|
229
|
+
size = this.sizeOf(resource);
|
|
230
|
+
|
|
209
231
|
this.#surge++;
|
|
210
232
|
|
|
211
233
|
reused = false;
|
|
@@ -214,7 +236,7 @@ export class TransientResourcePool {
|
|
|
214
236
|
assert.notOk(this.bound.has(resource), 'resource is already bound');
|
|
215
237
|
|
|
216
238
|
this.bound.add(resource);
|
|
217
|
-
this.#bytes_bound +=
|
|
239
|
+
this.#bytes_bound += size;
|
|
218
240
|
|
|
219
241
|
this.afterAcquire(resource, descriptor, reused, context);
|
|
220
242
|
|
|
@@ -238,18 +260,25 @@ export class TransientResourcePool {
|
|
|
238
260
|
}
|
|
239
261
|
|
|
240
262
|
this.bound.delete(resource);
|
|
241
|
-
|
|
263
|
+
|
|
264
|
+
// the one time a pooling asks the resource its size: the record keeps it from here on
|
|
265
|
+
const size = this.sizeOf(resource);
|
|
266
|
+
|
|
267
|
+
this.#bytes_bound -= size;
|
|
242
268
|
|
|
243
269
|
const record = this.#take_record();
|
|
244
270
|
|
|
245
271
|
record.resource = resource;
|
|
272
|
+
record.size = size;
|
|
246
273
|
record.last_used_frame = this.#frame;
|
|
247
274
|
record.referenced = true;
|
|
248
275
|
|
|
276
|
+
this.describeRecord(record);
|
|
277
|
+
|
|
249
278
|
const index = binarySearchHighIndex(this.records, record, this.#compare);
|
|
250
279
|
|
|
251
|
-
this.records
|
|
252
|
-
this.#bytes_pooled +=
|
|
280
|
+
array_insert_at(this.records, index, record);
|
|
281
|
+
this.#bytes_pooled += size;
|
|
253
282
|
|
|
254
283
|
if (this.debug_invariants) {
|
|
255
284
|
this.assertInvariants();
|
|
@@ -294,9 +323,9 @@ export class TransientResourcePool {
|
|
|
294
323
|
|
|
295
324
|
if (reclaim_budget > 0 && (under_pressure || idle_too_long)) {
|
|
296
325
|
const resource = record.resource;
|
|
297
|
-
const size =
|
|
326
|
+
const size = record.size;
|
|
298
327
|
|
|
299
|
-
records
|
|
328
|
+
array_remove_at(records, cursor);
|
|
300
329
|
this.#bytes_pooled -= size;
|
|
301
330
|
over_budget -= size;
|
|
302
331
|
record_count--;
|
|
@@ -371,7 +400,9 @@ export class TransientResourcePool {
|
|
|
371
400
|
assert.lessThanOrEqual(this.compare(record, records[i + 1]), 0, `records not sorted at index ${i}`);
|
|
372
401
|
}
|
|
373
402
|
|
|
374
|
-
|
|
403
|
+
assert.equal(record.size, this.sizeOf(record.resource), `records[${i}].size is not its resource's`);
|
|
404
|
+
|
|
405
|
+
pooled_bytes += record.size;
|
|
375
406
|
}
|
|
376
407
|
|
|
377
408
|
assert.equal(this.#bytes_pooled, pooled_bytes, 'bytes_pooled drifted from actual pooled total');
|
package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triangle_fingerprint_stream.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"triangle_fingerprint_stream.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js"],"names":[],"mappings":"AA8DA;;;;;;;;;;;;;;GAcG;AACH,iEAFa,WAAW,CAmFvB"}
|
package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { reinterpret_float32_as_int32 } from "../../../../../../core/binary/reinterpret_float32_as_int32.js";
|
|
2
|
-
import {
|
|
2
|
+
import { hash_mix2 } from "../../../../../../core/math/hash/hash_mix2.js";
|
|
3
|
+
import { hash_mix3 } from "../../../../../../core/math/hash/hash_mix3.js";
|
|
3
4
|
import { v3_distance } from "../../../../../../core/geom/vec3/v3_distance.js";
|
|
4
5
|
import { StandardAttributes } from "../../../../geometry/StandardAttributes.js";
|
|
5
6
|
|
|
@@ -15,7 +16,7 @@ function fold_strided(h, data, stride, vertex_index) {
|
|
|
15
16
|
if (data === null) return h;
|
|
16
17
|
const base = vertex_index * stride;
|
|
17
18
|
for (let i = 0; i < stride; i++) {
|
|
18
|
-
h =
|
|
19
|
+
h = hash_mix2(h, reinterpret_float32_as_int32(data[base + i]));
|
|
19
20
|
}
|
|
20
21
|
return h;
|
|
21
22
|
}
|
|
@@ -140,9 +141,17 @@ export function triangle_fingerprint_stream(geometry) {
|
|
|
140
141
|
|
|
141
142
|
sort_three(keys_scratch, attrs_scratch);
|
|
142
143
|
|
|
143
|
-
result[t] =
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
result[t] = hash_mix2(
|
|
145
|
+
hash_mix3(
|
|
146
|
+
hash_mix3(
|
|
147
|
+
keys_scratch[0],
|
|
148
|
+
keys_scratch[1],
|
|
149
|
+
keys_scratch[2]
|
|
150
|
+
),
|
|
151
|
+
attrs_scratch[0],
|
|
152
|
+
attrs_scratch[1]
|
|
153
|
+
),
|
|
154
|
+
attrs_scratch[2]
|
|
146
155
|
) | 0;
|
|
147
156
|
}
|
|
148
157
|
|
|
@@ -8,7 +8,7 @@ import html_canvas_to_sampler2d from "../../../../engine/graphics/texture/html_c
|
|
|
8
8
|
export function sampler2d_from_image_bitmap(bitmap) {
|
|
9
9
|
// 1. Draw the bitmap to a canvas
|
|
10
10
|
const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);
|
|
11
|
-
const ctx = canvas.getContext('2d');
|
|
11
|
+
const ctx = canvas.getContext('2d', { willReadFrequently: true });
|
|
12
12
|
ctx.drawImage(bitmap, 0, 0);
|
|
13
13
|
|
|
14
14
|
return html_canvas_to_sampler2d(canvas);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComputeShader.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/shader/ComputeShader.js"],"names":[],"mappings":"AAMA;
|
|
1
|
+
{"version":3,"file":"ComputeShader.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/shader/ComputeShader.js"],"names":[],"mappings":"AAMA;IA0GI;;;;;;;;;;OAUG;IACH;QAR4B,KAAK,GAAtB,MAAM;QAC+B,SAAS;QAC3B,IAAI;QACJ,UAAU,GAA7B,MAAM,EAAE;QAGN,aAAa,CAuBzB;IA5DD;;;OAGG;IACH,wBAFW,gBAAgB,EAwB1B;IAhFD;;;OAGG;IACH,0CAEC;IAgBD;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,mCAEC;IAgED;;;;;;OAMG;IACH;QAJ2C,OAAO;QACvB,QAAQ;mCA8BlC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH;QAP2C,OAAO;QACvB,QAAQ;QACP,cAAc,GAA/B,MAAM;QACW,cAAc,GAA/B,MAAM;QACW,cAAc,GAA/B,MAAM;aAgChB;IAED;;;;;;;;;;;;OAYG;IACH;QAL2C,OAAO;QACvB,QAAQ;QACR,aAAa,EAA7B,MAAM;aAsBhB;IAED;;;;;;;;OAQG;IACH;QAN2C,OAAO;QACvB,QAAQ;QACP,aAAa,GAA9B,MAAM;QACW,aAAa,GAA9B,MAAM;QACW,aAAa,GAA9B,MAAM;aA2ChB;IAED;;;;;;;;;;;;OAYG;IACH;QAL2C,OAAO;QACpB,OAAO;QACV,QAAQ;QACP,cAAc,GAA/B,MAAM;aAwChB;IAGL;;;OAGG;IACH,0BAFU,OAAO,CAEsB;;CANtC;0CA/WyC,gEAAgE;iCACzE,uBAAuB"}
|
|
@@ -16,6 +16,18 @@ export class ComputeShader {
|
|
|
16
16
|
*/
|
|
17
17
|
#pipeline;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* The device this shader last passed {@link ShaderDescriptor#validate_against_device} on, or null.
|
|
21
|
+
*
|
|
22
|
+
* A device's limits and features are fixed for its life, and what this shader asks of them is fixed
|
|
23
|
+
* once it compiles, at construction. So the check is one per device rather than one per pass, which
|
|
24
|
+
* was ~400 native reads of `device.limits` and `device.features` a frame. Set only once the check
|
|
25
|
+
* has passed: a refused device is asked again, and refused again, every time.
|
|
26
|
+
*
|
|
27
|
+
* @type {GPUDevice|null}
|
|
28
|
+
*/
|
|
29
|
+
#validated_device = null;
|
|
30
|
+
|
|
19
31
|
/**
|
|
20
32
|
*
|
|
21
33
|
* @return {ComputePipelineDescriptor}
|
|
@@ -147,8 +159,12 @@ export class ComputeShader {
|
|
|
147
159
|
assert.defined(encoder, 'encoder');
|
|
148
160
|
assert.defined(bindings, 'bindings');
|
|
149
161
|
|
|
150
|
-
|
|
151
|
-
|
|
162
|
+
const device = encoder.device;
|
|
163
|
+
|
|
164
|
+
if (VALIDATION_ENABLED && device !== this.#validated_device) {
|
|
165
|
+
this.#descriptor.validate_against_device(device);
|
|
166
|
+
|
|
167
|
+
this.#validated_device = device;
|
|
152
168
|
}
|
|
153
169
|
|
|
154
170
|
const resources = this.#descriptor.resources;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageShader.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/shader/ImageShader.js"],"names":[],"mappings":"AAQA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"ImageShader.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/shader/ImageShader.js"],"names":[],"mappings":"AAQA;;GAEG;AACH;IAiHI;;;;;;;OAOG;IACH;QALqC,UAAU;QACR,OAAO,EAAnC,kBAAkB;QACU,YAAY;QACtC,WAAW,CAavB;IAnFD;;;;;OAKG;IACH,sEAuDC;IAxGD;;;OAGG;IACH,mCAEC;IAED;;;OAGG;IACH,cAFU,MAAM,EAAE,EAAE,CAEF;IAelB;;;OAGG;IACH,yCAEC;IAED;;;OAGG;IACH,6BAEC;IAuFD;;;;;;;;;OASG;IACH,6HA0EC;;CACJ"}
|