@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.
Files changed (435) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/editor/actions/concrete/TransformModifyAction.d.ts.map +1 -1
  3. package/editor/actions/concrete/TransformModifyAction.js +10 -2
  4. package/editor/ecs/component/FieldDescriptor.js +15 -0
  5. package/editor/ecs/component/createObjectEditor.js +41 -12
  6. package/editor/ecs/component/editors/ecs/Transform64Editor.d.ts.map +1 -1
  7. package/editor/ecs/component/editors/ecs/Transform64Editor.js +77 -70
  8. package/editor/tools/TransformToolV2.d.ts.map +1 -1
  9. package/editor/tools/TransformToolV2.js +4 -0
  10. package/editor/tools/v2/TransformControls.d.ts.map +1 -1
  11. package/editor/tools/v2/TransformControls.js +7 -0
  12. package/editor/view/ecs/EntityEditor.d.ts.map +1 -1
  13. package/editor/view/ecs/EntityEditor.js +4 -2
  14. package/package.json +1 -1
  15. package/src/core/assert.d.ts.map +1 -1
  16. package/src/core/assert.js +5 -1
  17. package/src/core/binary/hash/XXH128Hash.d.ts +1 -37
  18. package/src/core/binary/hash/XXH128Hash.d.ts.map +1 -1
  19. package/src/core/binary/hash/XXH128Hash.js +4 -55
  20. package/src/core/binary/hash/XXH3_SECRET.d.ts +1 -12
  21. package/src/core/binary/hash/XXH3_SECRET.d.ts.map +1 -1
  22. package/src/core/binary/hash/XXH3_SECRET.js +4 -25
  23. package/src/core/binary/hash/crc32.d.ts +1 -15
  24. package/src/core/binary/hash/crc32.d.ts.map +1 -1
  25. package/src/core/binary/hash/crc32.js +4 -96
  26. package/src/core/binary/hash/xxh3_128.d.ts +1 -9
  27. package/src/core/binary/hash/xxh3_128.d.ts.map +1 -1
  28. package/src/core/binary/hash/xxh3_128.js +4 -341
  29. package/src/core/binary/hash/xxh3_64.d.ts +1 -8
  30. package/src/core/binary/hash/xxh3_64.d.ts.map +1 -1
  31. package/src/core/binary/hash/xxh3_64.js +4 -241
  32. package/src/core/binary/hash/xxh3_common.d.ts +1 -223
  33. package/src/core/binary/hash/xxh3_common.d.ts.map +1 -1
  34. package/src/core/binary/hash/xxh3_common.js +90 -476
  35. package/src/core/collection/array/array_insert_at.d.ts +16 -0
  36. package/src/core/collection/array/array_insert_at.d.ts.map +1 -0
  37. package/src/core/collection/array/array_insert_at.js +32 -0
  38. package/src/core/collection/array/array_remove_at.d.ts +15 -0
  39. package/src/core/collection/array/array_remove_at.d.ts.map +1 -0
  40. package/src/core/collection/array/array_remove_at.js +30 -0
  41. package/src/core/collection/array/combine_hash.d.ts +6 -0
  42. package/src/core/collection/array/combine_hash.d.ts.map +1 -1
  43. package/src/core/collection/array/combine_hash.js +6 -0
  44. package/src/core/function/FunctionCompiler.js +2 -2
  45. package/src/core/geom/3d/mat4/m4_multiply.d.ts +3 -0
  46. package/src/core/geom/3d/mat4/m4_multiply.d.ts.map +1 -1
  47. package/src/core/geom/3d/mat4/m4_multiply.js +3 -0
  48. package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts +30 -0
  49. package/src/core/geom/3d/mat4/m4_multiply_f64.d.ts.map +1 -0
  50. package/src/core/geom/3d/mat4/m4_multiply_f64.js +106 -0
  51. package/src/core/geom/3d/quaternion/quat3_look_rotation.d.ts +37 -0
  52. package/src/core/geom/3d/quaternion/quat3_look_rotation.d.ts.map +1 -0
  53. package/src/core/geom/3d/quaternion/quat3_look_rotation.js +172 -0
  54. package/src/core/geom/ConicRay.js +2 -2
  55. package/src/core/geom/Quaternion.d.ts +1 -0
  56. package/src/core/geom/Quaternion.d.ts.map +1 -1
  57. package/src/core/geom/Quaternion.js +12 -48
  58. package/src/core/geom/Vector4.d.ts.map +1 -1
  59. package/src/core/geom/Vector4.js +8 -5
  60. package/src/core/math/hash/XXH128Hash.d.ts +38 -0
  61. package/src/core/math/hash/XXH128Hash.d.ts.map +1 -0
  62. package/src/core/math/hash/XXH128Hash.js +55 -0
  63. package/src/core/math/hash/XXH3_SECRET.d.ts +13 -0
  64. package/src/core/math/hash/XXH3_SECRET.d.ts.map +1 -0
  65. package/src/core/math/hash/XXH3_SECRET.js +25 -0
  66. package/src/core/math/hash/crc32.d.ts +16 -0
  67. package/src/core/math/hash/crc32.d.ts.map +1 -0
  68. package/src/core/math/hash/crc32.js +96 -0
  69. package/src/core/math/hash/xxh3_128.d.ts +10 -0
  70. package/src/core/math/hash/xxh3_128.d.ts.map +1 -0
  71. package/src/core/math/hash/xxh3_128.js +341 -0
  72. package/src/core/math/hash/xxh3_64.d.ts +9 -0
  73. package/src/core/math/hash/xxh3_64.d.ts.map +1 -0
  74. package/src/core/math/hash/xxh3_64.js +241 -0
  75. package/src/core/math/hash/xxh3_common.d.ts +224 -0
  76. package/src/core/math/hash/xxh3_common.d.ts.map +1 -0
  77. package/src/core/math/hash/xxh3_common.js +476 -0
  78. package/src/core/math/lookup/ParameterLookupTable.js +2 -2
  79. package/src/core/model/node-graph/node/NodeInstancePortReference.js +2 -2
  80. package/src/core/model/reactive/model/ReactiveBinaryExpression.js +2 -2
  81. package/src/core/model/reactive/model/terminal/ReactiveReference.js +2 -2
  82. package/src/engine/Engine.d.ts.map +1 -1
  83. package/src/engine/Engine.js +9 -4
  84. package/src/engine/asset/AssetDescription.js +2 -2
  85. package/src/engine/ecs/animation/Animation.js +2 -2
  86. package/src/engine/ecs/animation/AnimationClip.d.ts.map +1 -1
  87. package/src/engine/ecs/animation/AnimationClip.js +7 -5
  88. package/src/engine/ecs/gui/GUIElement.d.ts.map +1 -1
  89. package/src/engine/ecs/gui/GUIElement.js +7 -5
  90. package/src/engine/ecs/gui/hud/HeadsUpDisplay.js +2 -2
  91. package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
  92. package/src/engine/ecs/gui/position/ViewportPosition.js +11 -7
  93. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  94. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +10 -0
  95. package/src/engine/ecs/transform/Transform64.d.ts +1 -1
  96. package/src/engine/ecs/transform/Transform64.d.ts.map +1 -1
  97. package/src/engine/ecs/transform/Transform64.js +5 -4
  98. package/src/engine/ecs/transform/t64_look_rotation.d.ts +4 -4
  99. package/src/engine/ecs/transform/t64_look_rotation.d.ts.map +1 -1
  100. package/src/engine/ecs/transform/t64_look_rotation.js +7 -18
  101. package/src/engine/graphics/ecs/animation/animator/AnimationClip.d.ts.map +1 -1
  102. package/src/engine/graphics/ecs/animation/animator/AnimationClip.js +8 -5
  103. package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.js +2 -2
  104. package/src/engine/graphics/ecs/animation/animator/AnimationNotification.js +2 -2
  105. package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.js +2 -2
  106. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationGraphDefinition.js +2 -2
  107. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.js +2 -2
  108. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.d.ts.map +1 -1
  109. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +8 -5
  110. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts.map +1 -1
  111. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js +30 -1
  112. package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
  113. package/src/engine/graphics/ecs/decal/v2/Decal.js +9 -8
  114. package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.d.ts.map +1 -1
  115. package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.js +9 -6
  116. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +6 -0
  117. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  118. package/src/engine/graphics3/GPUParticleEmitterSystem.js +72 -29
  119. package/src/engine/graphics3/ParticipatingMedia.js +204 -204
  120. package/src/engine/graphics3/animation/AnimationClips.d.ts +5 -0
  121. package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -1
  122. package/src/engine/graphics3/animation/AnimationClips.js +5 -0
  123. package/src/engine/grid/obstacle/GridObstacle.js +2 -2
  124. package/src/engine/input/devices/KeyboardDevice.d.ts +1 -0
  125. package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
  126. package/src/engine/input/devices/KeyboardDevice.js +7 -6
  127. package/src/engine/intelligence/behavior/selector/WeightedElement.js +2 -2
  128. package/src/engine/interpolation/Interpolated.js +2 -2
  129. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
  130. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.js +15 -2
  131. package/src/engine/network/CONGESTION_CONTROL.md +9 -9
  132. package/src/engine/network/MESSAGE_TRANSPORT.md +364 -0
  133. package/src/engine/network/NetworkSession.d.ts +31 -11
  134. package/src/engine/network/NetworkSession.d.ts.map +1 -1
  135. package/src/engine/network/NetworkSession.js +453 -286
  136. package/src/engine/network/README.md +77 -27
  137. package/src/engine/network/SMOOTHNESS_DESIGN.md +13 -5
  138. package/src/engine/network/diagnostics/BandwidthMeter.d.ts +1 -1
  139. package/src/engine/network/diagnostics/BandwidthMeter.js +1 -1
  140. package/src/engine/network/orchestrator/HostJoin.d.ts +111 -0
  141. package/src/engine/network/orchestrator/HostJoin.d.ts.map +1 -0
  142. package/src/engine/network/orchestrator/HostJoin.js +271 -0
  143. package/src/engine/network/orchestrator/NetworkPeer.d.ts +151 -112
  144. package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
  145. package/src/engine/network/orchestrator/NetworkPeer.js +450 -499
  146. package/src/engine/network/orchestrator/PendingSlices.d.ts +30 -0
  147. package/src/engine/network/orchestrator/PendingSlices.d.ts.map +1 -0
  148. package/src/engine/network/orchestrator/PendingSlices.js +83 -0
  149. package/src/engine/network/orchestrator/ReliableFrames.d.ts +34 -0
  150. package/src/engine/network/orchestrator/ReliableFrames.d.ts.map +1 -0
  151. package/src/engine/network/orchestrator/ReliableFrames.js +96 -0
  152. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts +77 -10
  153. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
  154. package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +236 -61
  155. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +20 -6
  156. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
  157. package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +33 -8
  158. package/src/engine/network/replication/Replicator.d.ts.map +1 -1
  159. package/src/engine/network/replication/Replicator.js +7 -1
  160. package/src/engine/network/sim/ActionLog.d.ts +32 -5
  161. package/src/engine/network/sim/ActionLog.d.ts.map +1 -1
  162. package/src/engine/network/sim/ActionLog.js +47 -5
  163. package/src/engine/network/sim/SimActionExecutor.d.ts +42 -2
  164. package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
  165. package/src/engine/network/sim/SimActionExecutor.js +100 -4
  166. package/src/engine/network/sim/Snapshotter.d.ts +12 -0
  167. package/src/engine/network/sim/Snapshotter.d.ts.map +1 -1
  168. package/src/engine/network/sim/Snapshotter.js +43 -0
  169. package/src/engine/network/state/Baseline.d.ts +1 -1
  170. package/src/engine/network/state/Baseline.js +1 -1
  171. package/src/engine/network/state/FrameBufferRing.d.ts +25 -6
  172. package/src/engine/network/state/FrameBufferRing.d.ts.map +1 -1
  173. package/src/engine/network/state/FrameBufferRing.js +51 -6
  174. package/src/engine/network/state/InputRing.d.ts +4 -0
  175. package/src/engine/network/state/InputRing.d.ts.map +1 -1
  176. package/src/engine/network/state/InputRing.js +7 -0
  177. package/src/engine/network/transport/DeferredTransport.d.ts.map +1 -1
  178. package/src/engine/network/transport/DeferredTransport.js +1 -0
  179. package/src/engine/network/transport/LoopbackTransport.d.ts.map +1 -1
  180. package/src/engine/network/transport/LoopbackTransport.js +4 -2
  181. package/src/engine/network/transport/Transport.d.ts +7 -0
  182. package/src/engine/network/transport/Transport.d.ts.map +1 -1
  183. package/src/engine/network/transport/Transport.js +8 -0
  184. package/src/engine/network/transport/adapters/NodeUDPTransport.d.ts.map +1 -1
  185. package/src/engine/network/transport/adapters/NodeUDPTransport.js +20 -5
  186. package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.d.ts.map +1 -1
  187. package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.js +8 -0
  188. package/src/engine/network/transport/adapters/WebTransportTransport.d.ts.map +1 -1
  189. package/src/engine/network/transport/adapters/WebTransportTransport.js +6 -0
  190. package/src/engine/network/transport/connection/Connection.d.ts +191 -0
  191. package/src/engine/network/transport/connection/Connection.d.ts.map +1 -0
  192. package/src/engine/network/transport/connection/Connection.js +1262 -0
  193. package/src/engine/network/transport/connection/RangeSet.d.ts +94 -0
  194. package/src/engine/network/transport/connection/RangeSet.d.ts.map +1 -0
  195. package/src/engine/network/transport/connection/RangeSet.js +260 -0
  196. package/src/engine/network/transport/connection/RxStream.d.ts +48 -0
  197. package/src/engine/network/transport/connection/RxStream.d.ts.map +1 -0
  198. package/src/engine/network/transport/connection/RxStream.js +211 -0
  199. package/src/engine/network/transport/connection/TxStream.d.ts +90 -0
  200. package/src/engine/network/transport/connection/TxStream.d.ts.map +1 -0
  201. package/src/engine/network/transport/connection/TxStream.js +243 -0
  202. package/src/engine/network/transport/connection/bytes_copy.d.ts +17 -0
  203. package/src/engine/network/transport/connection/bytes_copy.d.ts.map +1 -0
  204. package/src/engine/network/transport/connection/bytes_copy.js +34 -0
  205. package/src/engine/network/transport/connection/varint.d.ts +46 -0
  206. package/src/engine/network/transport/connection/varint.d.ts.map +1 -0
  207. package/src/engine/network/transport/connection/varint.js +107 -0
  208. package/src/engine/physics/cloth/ecs/Cloth.d.ts.map +1 -1
  209. package/src/engine/physics/cloth/ecs/Cloth.js +7 -5
  210. package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -1
  211. package/src/engine/physics/cloth/ecs/ClothCollider.js +7 -5
  212. package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
  213. package/src/engine/physics/cloth/ecs/ClothDynamics.js +20 -11
  214. package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
  215. package/src/engine/physics/fluid/FluidField.js +7 -5
  216. package/src/engine/physics/fluid/ecs/FluidComponent.d.ts.map +1 -1
  217. package/src/engine/physics/fluid/ecs/FluidComponent.js +19 -11
  218. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  219. package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +2 -2
  220. package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +2 -2
  221. package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
  222. package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +11 -7
  223. package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts.map +1 -1
  224. package/src/engine/physics/fluid/effector/ImpulseFluidEffector.js +11 -7
  225. package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
  226. package/src/engine/physics/fluid/effector/WakeFluidEffector.js +16 -9
  227. package/src/engine/sound/ecs/audio/AudioEmitter.d.ts +38 -7
  228. package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
  229. package/src/engine/sound/ecs/audio/AudioEmitter.js +47 -14
  230. package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.d.ts.map +1 -1
  231. package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.js +5 -1
  232. package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.d.ts +18 -0
  233. package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.d.ts.map +1 -0
  234. package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.js +48 -0
  235. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts +12 -2
  236. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  237. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +173 -9
  238. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +9 -3
  239. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
  240. package/src/engine/sound/ecs/audio/LiveEmitterSet.js +28 -8
  241. package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts +8 -0
  242. package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts.map +1 -1
  243. package/src/engine/sound/ecs/trigger/AudioEventTrigger.js +192 -191
  244. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationAdapter.d.ts.map +1 -1
  245. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationAdapter.js +5 -1
  246. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.d.ts +18 -0
  247. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.d.ts.map +1 -0
  248. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.js +51 -0
  249. package/src/engine/sound/ecs/trigger/AudioEventTriggerSystem.d.ts.map +1 -1
  250. package/src/engine/sound/ecs/trigger/AudioEventTriggerSystem.js +15 -1
  251. package/src/engine/sound/simulation/core/AcousticMedium.js +2 -2
  252. package/src/engine/sound/simulation/definition/AcousticDirectivity.js +2 -2
  253. package/src/engine/sound/simulation/definition/AcousticMaterial.d.ts.map +1 -1
  254. package/src/engine/sound/simulation/definition/AcousticMaterial.js +11 -7
  255. package/src/engine/sound/sopra/README.md +768 -644
  256. package/src/engine/sound/sopra/SopraEngine.d.ts +104 -8
  257. package/src/engine/sound/sopra/SopraEngine.d.ts.map +1 -1
  258. package/src/engine/sound/sopra/SopraEngine.js +327 -12
  259. package/src/engine/sound/sopra/definition/BusDefinition.d.ts.map +1 -1
  260. package/src/engine/sound/sopra/definition/BusDefinition.js +5 -4
  261. package/src/engine/sound/sopra/definition/DuckingRule.d.ts.map +1 -1
  262. package/src/engine/sound/sopra/definition/DuckingRule.js +7 -5
  263. package/src/engine/sound/sopra/definition/EventDescription.d.ts +28 -2
  264. package/src/engine/sound/sopra/definition/EventDescription.d.ts.map +1 -1
  265. package/src/engine/sound/sopra/definition/EventDescription.js +77 -17
  266. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts +10 -0
  267. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts.map +1 -1
  268. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.js +77 -55
  269. package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.d.ts +31 -0
  270. package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.d.ts.map +1 -0
  271. package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.js +75 -0
  272. package/src/engine/sound/sopra/definition/MixerSnapshot.js +2 -2
  273. package/src/engine/sound/sopra/definition/ParameterDefinition.d.ts.map +1 -1
  274. package/src/engine/sound/sopra/definition/ParameterDefinition.js +7 -5
  275. package/src/engine/sound/sopra/definition/clip/AbstractAudioClip.js +2 -2
  276. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts.map +1 -1
  277. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.js +4 -3
  278. package/src/engine/sound/sopra/definition/clip/ContainerAudioClip.js +2 -2
  279. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.js +3 -3
  280. package/src/engine/sound/sopra/definition/clip/SampleAudioClip.d.ts.map +1 -1
  281. package/src/engine/sound/sopra/definition/clip/SampleAudioClip.js +16 -9
  282. package/src/engine/sound/sopra/definition/clip/SilenceAudioClip.js +2 -2
  283. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts +1 -1
  284. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts.map +1 -1
  285. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.js +2 -2
  286. package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.d.ts +38 -9
  287. package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.d.ts.map +1 -1
  288. package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.js +34 -5
  289. package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts +7 -2
  290. package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts.map +1 -1
  291. package/src/engine/sound/sopra/definition/effect/CompressorEffect.js +137 -120
  292. package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts +3 -1
  293. package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts.map +1 -1
  294. package/src/engine/sound/sopra/definition/effect/EqEffect.js +146 -128
  295. package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts +1 -0
  296. package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts.map +1 -1
  297. package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +8 -3
  298. package/src/engine/sound/sopra/legacy/SoundEmitter.d.ts.map +1 -1
  299. package/src/engine/sound/sopra/legacy/SoundEmitter.js +357 -352
  300. package/src/engine/sound/sopra/legacy/SoundTrack.d.ts.map +1 -1
  301. package/src/engine/sound/sopra/legacy/SoundTrack.js +281 -278
  302. package/src/engine/sound/sopra/runtime/BusGraph.d.ts +44 -2
  303. package/src/engine/sound/sopra/runtime/BusGraph.d.ts.map +1 -1
  304. package/src/engine/sound/sopra/runtime/BusGraph.js +83 -43
  305. package/src/engine/sound/sopra/runtime/EffectChain.d.ts +96 -0
  306. package/src/engine/sound/sopra/runtime/EffectChain.d.ts.map +1 -0
  307. package/src/engine/sound/sopra/runtime/EffectChain.js +286 -0
  308. package/src/engine/sound/sopra/runtime/EffectParamOverrides.d.ts +123 -0
  309. package/src/engine/sound/sopra/runtime/EffectParamOverrides.d.ts.map +1 -0
  310. package/src/engine/sound/sopra/runtime/EffectParamOverrides.js +320 -0
  311. package/src/engine/sound/sopra/runtime/EventInstance.d.ts +55 -5
  312. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  313. package/src/engine/sound/sopra/runtime/EventInstance.js +201 -26
  314. package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.d.ts +2 -1
  315. package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.d.ts.map +1 -1
  316. package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.js +6 -1
  317. package/src/engine/sound/sopra/serialization/sopraSerializationHarness.d.ts +15 -0
  318. package/src/engine/sound/sopra/serialization/sopraSerializationHarness.d.ts.map +1 -1
  319. package/src/engine/sound/sopra/serialization/sopraSerializationHarness.js +32 -0
  320. package/src/engine/sound/sopra/util/MockAudioContext.d.ts.map +1 -1
  321. package/src/engine/sound/sopra/util/MockAudioContext.js +3 -0
  322. package/src/engine/sound/sopra/util/fadeOutAndStop.d.ts +13 -3
  323. package/src/engine/sound/sopra/util/fadeOutAndStop.d.ts.map +1 -1
  324. package/src/engine/sound/sopra/util/fadeOutAndStop.js +25 -13
  325. package/src/format/image/png/PNGReader.js +644 -644
  326. package/src/format/image/png/crc32.d.ts +1 -1
  327. package/src/format/image/png/crc32.js +7 -8
  328. package/src/shade/RENDERER_CONTRACT.md +6 -3
  329. package/src/shade/descriptor/binding/BindGroupLayoutDescriptor.js +2 -2
  330. package/src/shade/descriptor/binding/BindGroupLayoutEntry.d.ts.map +1 -1
  331. package/src/shade/descriptor/binding/BindGroupLayoutEntry.js +12 -8
  332. package/src/shade/descriptor/binding/StorageTextureBindingLayout.js +2 -2
  333. package/src/shade/descriptor/binding/TextureBindingLayout.js +2 -2
  334. package/src/shade/descriptor/blend/BlendComponent.js +2 -2
  335. package/src/shade/descriptor/pipeline/PipelineDescriptorBase.js +2 -2
  336. package/src/shade/descriptor/pipeline/PipelineLayoutDescriptor.js +2 -2
  337. package/src/shade/descriptor/pipeline/ProgrammableStage.js +2 -2
  338. package/src/shade/descriptor/pipeline/compute/ComputePipelineDescriptor.js +2 -2
  339. package/src/shade/descriptor/pipeline/render/ColorTargetState.js +2 -2
  340. package/src/shade/descriptor/pipeline/render/FragmentState.js +2 -2
  341. package/src/shade/descriptor/pipeline/render/PrimitiveState.js +2 -2
  342. package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.d.ts.map +1 -1
  343. package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js +8 -5
  344. package/src/shade/descriptor/pipeline/render/VertexAttribute.js +2 -2
  345. package/src/shade/descriptor/texture/SamplerDescriptor.d.ts.map +1 -1
  346. package/src/shade/descriptor/texture/SamplerDescriptor.js +20 -12
  347. package/src/shade/descriptor/texture/TextureDescriptor.d.ts.map +1 -1
  348. package/src/shade/descriptor/texture/TextureDescriptor.js +11 -7
  349. package/src/shade/device/SHADE_DEVICE_FLOOR.d.ts +24 -0
  350. package/src/shade/device/SHADE_DEVICE_FLOOR.d.ts.map +1 -0
  351. package/src/shade/device/SHADE_DEVICE_FLOOR.js +34 -0
  352. package/src/shade/device/ShadeDeviceFailure.d.ts +12 -5
  353. package/src/shade/device/ShadeDeviceFailure.d.ts.map +1 -1
  354. package/src/shade/device/ShadeDeviceFailure.js +17 -8
  355. package/src/shade/device/ShadeDeviceFailureReason.d.ts +1 -1
  356. package/src/shade/device/ShadeDeviceFailureReason.js +2 -2
  357. package/src/shade/device/graph/BufferResourceDescriptor.d.ts.map +1 -1
  358. package/src/shade/device/graph/BufferResourceDescriptor.js +196 -193
  359. package/src/shade/device/graph/TextureResourceDescriptor.d.ts.map +1 -1
  360. package/src/shade/device/graph/TextureResourceDescriptor.js +178 -173
  361. package/src/shade/device/shade_device_floor_unmet.d.ts +13 -0
  362. package/src/shade/device/shade_device_floor_unmet.d.ts.map +1 -0
  363. package/src/shade/device/shade_device_floor_unmet.js +32 -0
  364. package/src/shade/device/timing/profile/sgpt_read_header.js +1 -1
  365. package/src/shade/device/timing/profile/sgpt_read_records.js +1 -1
  366. package/src/shade/device/timing/profile/sgpt_write_header.js +1 -1
  367. package/src/shade/device/timing/profile/sgpt_write_record.js +1 -1
  368. package/src/shade/renderer/Renderer.d.ts +2 -0
  369. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  370. package/src/shade/renderer/Renderer.js +29 -55
  371. package/src/shade/renderer/binding/BufferBinding.js +2 -2
  372. package/src/shade/renderer/buffer/GPUBufferAllocator.d.ts.map +1 -1
  373. package/src/shade/renderer/buffer/GPUBufferAllocator.js +9 -0
  374. package/src/shade/renderer/buffer/buffer_pool_ops.d.ts +21 -12
  375. package/src/shade/renderer/buffer/buffer_pool_ops.d.ts.map +1 -1
  376. package/src/shade/renderer/buffer/buffer_pool_ops.js +18 -19
  377. package/src/shade/renderer/camera/Camera.js +2 -2
  378. package/src/shade/renderer/geometry/Attribute.js +2 -2
  379. package/src/shade/renderer/geometry/Geometry.js +2 -2
  380. package/src/shade/renderer/geometry/geometry_deduplicate_vertices.js +2 -2
  381. package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +2 -2
  382. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_asset_id.js +13 -13
  383. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_directory_block_checksum.js +41 -41
  384. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_frame_checksum.js +41 -41
  385. package/src/shade/renderer/geometry/virtual/format/checksum/vgeo_compute_header_checksum.js +25 -25
  386. package/src/shade/renderer/gpu_primitive/test/gpu_test.d.ts.map +1 -1
  387. package/src/shade/renderer/gpu_primitive/test/gpu_test.js +8 -11
  388. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  389. package/src/shade/renderer/material/StandardShadeMaterial.d.ts.map +1 -1
  390. package/src/shade/renderer/material/StandardShadeMaterial.js +13 -8
  391. package/src/shade/renderer/pool/TransientResourcePool.d.ts +24 -0
  392. package/src/shade/renderer/pool/TransientResourcePool.d.ts.map +1 -1
  393. package/src/shade/renderer/pool/TransientResourcePool.js +41 -10
  394. package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.d.ts.map +1 -1
  395. package/src/shade/renderer/scene/optimization/geometry/internal/triangle_fingerprint_stream.js +14 -5
  396. package/src/shade/renderer/scene/optimization/sampler2d_from_image_bitmap.js +1 -1
  397. package/src/shade/renderer/shader/ComputeShader.d.ts.map +1 -1
  398. package/src/shade/renderer/shader/ComputeShader.js +18 -2
  399. package/src/shade/renderer/shader/ImageShader.d.ts.map +1 -1
  400. package/src/shade/renderer/shader/ImageShader.js +230 -218
  401. package/src/shade/renderer/shader/type/WGSLStructField.js +2 -2
  402. package/src/shade/renderer/shader/type/WebGPUArray.js +2 -2
  403. package/src/shade/renderer/shader/type/WebGPUStruct.d.ts.map +1 -1
  404. package/src/shade/renderer/shader/type/WebGPUStruct.js +9 -6
  405. package/src/shade/renderer/texture/ShadeTexture.d.ts.map +1 -1
  406. package/src/shade/renderer/texture/ShadeTexture.js +17 -10
  407. package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +2 -2
  408. package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +4 -4
  409. package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +6 -6
  410. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
  411. package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +46 -55
  412. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts +3 -3
  413. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.d.ts.map +1 -1
  414. package/src/shade/renderer/water/surface/particles/WATER_PARTICLE_STRUCT.js +14 -4
  415. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts +10 -1
  416. package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
  417. package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +82 -40
  418. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts +4 -1
  419. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
  420. package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +8 -4
  421. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts +98 -86
  422. package/src/shade/renderer/water/surface/particles/shader_water_particles.d.ts.map +1 -1
  423. package/src/shade/renderer/water/surface/particles/shader_water_particles.js +440 -298
  424. package/src/view/common/HTMLElementCacheKey.d.ts.map +1 -1
  425. package/src/view/common/HTMLElementCacheKey.js +4 -3
  426. package/src/view/graphics/GraphicsContextFailureView.d.ts +1 -2
  427. package/src/view/graphics/GraphicsContextFailureView.d.ts.map +1 -1
  428. package/src/view/graphics/GraphicsContextFailureView.js +1 -2
  429. package/src/view/minimap/MinimapMarker.js +2 -2
  430. package/src/engine/network/transport/Channel.js +0 -336
  431. package/src/engine/network/transport/ReliableCommandPipeline.js +0 -335
  432. package/src/engine/network/transport/fragments/FragmentAssembler.js +0 -350
  433. package/src/engine/network/transport/fragments/FragmentRetention.js +0 -191
  434. package/src/engine/network/transport/fragments/fragment_send.js +0 -157
  435. package/src/engine/network/transport/fragments/packet_size.js +0 -107
@@ -1,2 +1,2 @@
1
- export { crc32 } from "../../../core/binary/hash/crc32.js";
1
+ export { crc32 } from "../../../core/math/hash/crc32.js";
2
2
  //# sourceMappingURL=crc32.d.ts.map
@@ -1,8 +1,7 @@
1
- /**
2
- * @deprecated Moved to `core/binary/hash/crc32.js`. CRC-32/ISO-3309 is not a PNG algorithm — PNG
3
- * merely happens to be the first thing in the tree that needed it.
4
- *
5
- * Kept as a re-export rather than removed: this is a library, and an import path is as much a
6
- * published interface as a function signature.
7
- */
8
- export { crc32 } from "../../../core/binary/hash/crc32.js";
1
+ // CRC-32/ISO-3309 is not a PNG algorithm — PNG merely happens to be the first thing in the tree that
2
+ // needed it. Kept as a re-export rather than removed: this is a library, and an import path is as much
3
+ // a published interface as a function signature.
4
+ export {
5
+ /** @deprecated moved to core/math/hash/crc32.js; import it from there */
6
+ crc32
7
+ } from "../../../core/math/hash/crc32.js";
@@ -56,12 +56,15 @@ beyond it and no branch that produces a lesser frame.
56
56
 
57
57
  **Required limits:**
58
58
 
59
- - `maxStorageBuffersPerShaderStage` ≥ **10** (checked against the adapter before the device is
60
- requested, so the failure names the number the adapter offered)
59
+ - `maxStorageBuffersPerShaderStage` ≥ **10**
61
60
  - `maxColorAttachmentBytesPerSample` ≥ **32** — the G-buffer is wide
62
61
  - `maxBufferSize` and `maxStorageBufferBindingSize` are requested at whatever the adapter offers,
63
62
  because the defaults are far too small
64
63
 
64
+ The required features and the two fixed limits are one definition, `device/SHADE_DEVICE_FLOOR.js`.
65
+ All of it is checked against the adapter before a device is requested, so a refusal names every
66
+ feature and limit the adapter lacks, with the value it offers, rather than the first one found.
67
+
65
68
  **Taken when offered, never required:** `timestamp-query`, `subgroups`, `texture-formats-tier1`.
66
69
  `timestamp-query` drives GPU timers and nothing else, and some browsers withhold it on hardware that
67
70
  is otherwise fine — so the timers go quiet when it is absent rather than the renderer refusing to
@@ -76,7 +79,7 @@ person rather than logged. It distinguishes:
76
79
  |---|---|
77
80
  | `webgpu_unavailable` | no `navigator.gpu` — WebGPU disabled or unsupported |
78
81
  | `adapter_unavailable` | no adapter at all |
79
- | `below_floor` | an adapter that does not meet §2, with the detail |
82
+ | `below_floor` | an adapter that does not meet §2; the message lists every unmet feature and limit |
80
83
  | `device_request_failed` | the adapter refused the device |
81
84
  | `device_lost` | a working device went away while running |
82
85
 
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../core/math/hash/hash_mix2.js";
3
3
  import { computeHashArray } from "../../../core/collection/array/computeHashArray.js";
4
4
  import { isArrayEqual } from "../../../core/collection/array/isArrayEqual.js";
5
5
  import { invokeObjectHash } from "../../../core/model/object/invokeObjectHash.js";
@@ -120,7 +120,7 @@ export class BindGroupLayoutDescriptor extends ObjectDescriptorBase {
120
120
  }
121
121
 
122
122
  hash() {
123
- return combine_hash(
123
+ return hash_mix2(
124
124
  super.hash(),
125
125
  computeHashArray(this.entries, invokeObjectHash),
126
126
  );
@@ -1 +1 @@
1
- {"version":3,"file":"BindGroupLayoutEntry.d.ts","sourceRoot":"","sources":["../../../../../src/shade/descriptor/binding/BindGroupLayoutEntry.js"],"names":[],"mappings":"AAWA;;GAEG;AACH,6CAFgB,uBAAuB;IA8CnC;;;;;OAKG;IACH,2BAJW,oBAAoB,KACpB,oBAAoB,GAClB,MAAM,CAIlB;IAED,iDAMC;IA3DD;;;OAGG;IACH,SAFU,MAAM,CAEL;IAEX;;;OAGG;IACH,YAFU,MAAM,sBAAoB,CAEtB;IAEd;;;OAGG;IACH,QAFU,mBAAmB,CAEvB;IAEN;;;OAGG;IACH,SAFU,oBAAoB,CAEvB;IAEP;;;OAGG;IACH,SAFU,oBAAoB,CAEvB;IAEP;;;OAGG;IACH,gBAFU,2BAA2B,CAEvB;IAGd;;;OAGG;IACH,iBAFU,4BAA4B,CAEvB;IAoBf;;;OAGG;IACH,oBAFW,mBAAmB,GAAC,oBAAoB,GAAC,oBAAoB,GAAC,2BAA2B,GAAC,4BAA4B,QAmBhI;IAGD;;;;;;;;aA6CC;IAED,eAUC;IAED;;;;OAIG;IACH,cAHW,oBAAoB,GAClB,OAAO,CAanB;IAED;;;OAGG;IACH,YAFW,oBAAoB,QAU9B;IAED;;;OAGG;IACH,SAFY,oBAAoB,CAQ/B;CACJ;oCArMmC,0BAA0B;qCAEzB,2BAA2B;qCAE3B,2BAA2B;4CADpB,kCAAkC;6CAFjC,mCAAmC"}
1
+ {"version":3,"file":"BindGroupLayoutEntry.d.ts","sourceRoot":"","sources":["../../../../../src/shade/descriptor/binding/BindGroupLayoutEntry.js"],"names":[],"mappings":"AAWA;;GAEG;AACH,6CAFgB,uBAAuB;IA8CnC;;;;;OAKG;IACH,2BAJW,oBAAoB,KACpB,oBAAoB,GAClB,MAAM,CAIlB;IAED,iDAMC;IA3DD;;;OAGG;IACH,SAFU,MAAM,CAEL;IAEX;;;OAGG;IACH,YAFU,MAAM,sBAAoB,CAEtB;IAEd;;;OAGG;IACH,QAFU,mBAAmB,CAEvB;IAEN;;;OAGG;IACH,SAFU,oBAAoB,CAEvB;IAEP;;;OAGG;IACH,SAFU,oBAAoB,CAEvB;IAEP;;;OAGG;IACH,gBAFU,2BAA2B,CAEvB;IAGd;;;OAGG;IACH,iBAFU,4BAA4B,CAEvB;IAoBf;;;OAGG;IACH,oBAFW,mBAAmB,GAAC,oBAAoB,GAAC,oBAAoB,GAAC,2BAA2B,GAAC,4BAA4B,QAmBhI;IAGD;;;;;;;;aA6CC;IAED,eAcC;IAED;;;;OAIG;IACH,cAHW,oBAAoB,GAClB,OAAO,CAanB;IAED;;;OAGG;IACH,YAFW,oBAAoB,QAU9B;IAED;;;OAGG;IACH,SAFY,oBAAoB,CAQ/B;CACJ;oCAzMmC,0BAA0B;qCAEzB,2BAA2B;qCAE3B,2BAA2B;4CADpB,kCAAkC;6CAFjC,mCAAmC"}
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
3
3
  import { optional_clone } from "../../../core/model/object/optional_clone.js";
4
4
  import { optional_equality } from "../../../core/model/object/optional_equality.js";
5
5
  import { optional_hash } from "../../../core/model/object/optional_hash.js";
@@ -146,14 +146,18 @@ export class BindGroupLayoutEntry {
146
146
  }
147
147
 
148
148
  hash() {
149
- return combine_hash(
150
- this.binding,
151
- this.visibility,
152
- optional_hash(this.buffer),
153
- optional_hash(this.sampler),
154
- optional_hash(this.texture),
149
+ return hash_mix3(
150
+ hash_mix3(
151
+ hash_mix3(
152
+ this.binding,
153
+ this.visibility,
154
+ optional_hash(this.buffer)
155
+ ),
156
+ optional_hash(this.sampler),
157
+ optional_hash(this.texture)
158
+ ),
155
159
  optional_hash(this.storageTexture),
156
- optional_hash(this.externalTexture),
160
+ optional_hash(this.externalTexture)
157
161
  )
158
162
  }
159
163
 
@@ -1,4 +1,4 @@
1
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
1
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
2
2
  import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
3
3
 
4
4
  export class StorageTextureBindingLayout {
@@ -45,7 +45,7 @@ export class StorageTextureBindingLayout {
45
45
 
46
46
 
47
47
  hash() {
48
- return combine_hash(
48
+ return hash_mix3(
49
49
  computeStringHash(this.access),
50
50
  computeStringHash(this.format),
51
51
  computeStringHash(this.viewDimension),
@@ -1,4 +1,4 @@
1
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
1
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
2
2
  import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
3
3
 
4
4
  export class TextureBindingLayout {
@@ -47,7 +47,7 @@ export class TextureBindingLayout {
47
47
  }
48
48
 
49
49
  hash() {
50
- return combine_hash(
50
+ return hash_mix3(
51
51
  computeStringHash(this.sampleType),
52
52
  computeStringHash(this.viewDimension),
53
53
  this.multisampled ? 1 : 0
@@ -1,4 +1,4 @@
1
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
1
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
2
2
  import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
3
3
 
4
4
  /**
@@ -41,7 +41,7 @@ export class BlendComponent {
41
41
  }
42
42
 
43
43
  hash() {
44
- return combine_hash(
44
+ return hash_mix3(
45
45
  computeStringHash(this.operation),
46
46
  computeStringHash(this.srcFactor),
47
47
  computeStringHash(this.dstFactor),
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../core/math/hash/hash_mix2.js";
3
3
  import { optional_clone } from "../../../core/model/object/optional_clone.js";
4
4
  import { ObjectDescriptorBase } from "../ObjectDescriptorBase.js";
5
5
  import { PipelineLayoutDescriptor } from "./PipelineLayoutDescriptor.js";
@@ -30,7 +30,7 @@ export class PipelineDescriptorBase extends ObjectDescriptorBase {
30
30
 
31
31
 
32
32
  hash() {
33
- return combine_hash(
33
+ return hash_mix2(
34
34
  super.hash(),
35
35
  this.layout.hash()
36
36
  );
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
3
3
  import { computeHashArray } from "../../../core/collection/array/computeHashArray.js";
4
4
  import { isArrayEqual } from "../../../core/collection/array/isArrayEqual.js";
5
5
  import { invokeObjectHash } from "../../../core/model/object/invokeObjectHash.js";
@@ -128,7 +128,7 @@ export class PipelineLayoutDescriptor extends ObjectDescriptorBase {
128
128
  }
129
129
 
130
130
  hash() {
131
- return combine_hash(
131
+ return hash_mix3(
132
132
  super.hash(),
133
133
  computeHashArray(this.bindGroupLayouts, invokeObjectHash),
134
134
  // two layouts that differ only in immediate size are different layouts; leaving this out
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../core/math/hash/hash_mix2.js";
3
3
  import { isArrayEqualStrict } from "../../../core/collection/array/isArrayEqualStrict.js";
4
4
  import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
5
5
  import { ShaderModuleDescriptor } from "./ShaderModuleDescriptor.js";
@@ -55,7 +55,7 @@ export class ProgrammableStage {
55
55
 
56
56
 
57
57
  hash() {
58
- return combine_hash(
58
+ return hash_mix2(
59
59
  this.module.hash(),
60
60
  computeStringHash(this.entryPoint)
61
61
  );
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
3
3
  import {
4
4
  compute_infer_workgroup_size_from_source
5
5
  } from "../../../renderer/shader/util/compute_infer_workgroup_size_from_source.js";
@@ -175,7 +175,7 @@ export class ComputePipelineDescriptor extends PipelineDescriptorBase {
175
175
  }
176
176
 
177
177
  hash() {
178
- return combine_hash(
178
+ return hash_mix2(
179
179
  super.hash(),
180
180
  this.compute.hash()
181
181
  );
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix3 } from "../../../../core/math/hash/hash_mix3.js";
3
3
  import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
4
4
  import { optional_clone } from "../../../../core/model/object/optional_clone.js";
5
5
  import { optional_equality } from "../../../../core/model/object/optional_equality.js";
@@ -96,7 +96,7 @@ export class ColorTargetState {
96
96
  }
97
97
 
98
98
  hash() {
99
- return combine_hash(
99
+ return hash_mix3(
100
100
  computeStringHash(this.format),
101
101
  this.writeMask,
102
102
  optional_hash(this.blend)
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
3
3
  import { computeHashArray } from "../../../../core/collection/array/computeHashArray.js";
4
4
  import { isArrayEqual } from "../../../../core/collection/array/isArrayEqual.js";
5
5
  import { invokeObjectHash } from "../../../../core/model/object/invokeObjectHash.js";
@@ -78,7 +78,7 @@ export class FragmentState extends ProgrammableStage {
78
78
  }
79
79
 
80
80
  hash() {
81
- return combine_hash(
81
+ return hash_mix2(
82
82
  super.hash(),
83
83
  computeHashArray(this.targets, invokeObjectHash)
84
84
  );
@@ -1,4 +1,4 @@
1
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
1
+ import { hash_mix3 } from "../../../../core/math/hash/hash_mix3.js";
2
2
  import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
3
3
 
4
4
  const DEFAULT_TOPOLOGY = "triangle-list";
@@ -101,7 +101,7 @@ export class PrimitiveState {
101
101
  }
102
102
 
103
103
  hash() {
104
- return combine_hash(
104
+ return hash_mix3(
105
105
  computeStringHash(this.topology),
106
106
  computeStringHash(this.frontFace),
107
107
  computeStringHash(this.cullMode),
@@ -1 +1 @@
1
- {"version":3,"file":"RenderPipelineDescriptor.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH;IA6BI;;;OAGG;IACH,iDAMC;IAtCD;;;OAGG;IACH,QAFU,WAAW,CAEM;IAE3B;;OAEG;IACH,WAFU,cAAc,CAES;IAEjC;;OAEG;IACH,cAFU,iBAAiB,GAAC,SAAS,CAExB;IAEb;;OAEG;IACH,aAFU,gBAAgB,CAEW;IAErC;;;OAGG;IACH,UAFU,aAAa,GAAC,SAAS,CAExB;IAeT;;;OAGG;IACH,kDA4BC;IAED;;;;OAIG;IACH,cAHW,wBAAwB,GACvB,OAAO,CA4BlB;IAeD;;;OAGG;IACH,YAFW,wBAAwB,QAUlC;IAED;;;OAGG;IACH,SAFY,wBAAwB,CAQnC;IAGL,oCAA6D;CAF5D;uCAjKsC,8BAA8B;4BAKzC,kBAAkB;+BADf,qBAAqB;kCAHlB,wBAAwB;iCAEzB,uBAAuB;8BAD1B,oBAAoB"}
1
+ {"version":3,"file":"RenderPipelineDescriptor.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH;IA6BI;;;OAGG;IACH,iDAMC;IAtCD;;;OAGG;IACH,QAFU,WAAW,CAEM;IAE3B;;OAEG;IACH,WAFU,cAAc,CAES;IAEjC;;OAEG;IACH,cAFU,iBAAiB,GAAC,SAAS,CAExB;IAEb;;OAEG;IACH,aAFU,gBAAgB,CAEW;IAErC;;;OAGG;IACH,UAFU,aAAa,GAAC,SAAS,CAExB;IAeT;;;OAGG;IACH,kDA4BC;IAED;;;;OAIG;IACH,cAHW,wBAAwB,GACvB,OAAO,CA4BlB;IAiBD;;;OAGG;IACH,YAFW,wBAAwB,QAUlC;IAED;;;OAGG;IACH,SAFY,wBAAwB,CAQnC;IAGL,oCAA6D;CAF5D;uCAnKsC,8BAA8B;4BAKzC,kBAAkB;+BADf,qBAAqB;kCAHlB,wBAAwB;iCAEzB,uBAAuB;8BAD1B,oBAAoB"}
@@ -1,5 +1,6 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix2 } from "../../../../core/math/hash/hash_mix2.js";
3
+ import { hash_mix3 } from "../../../../core/math/hash/hash_mix3.js";
3
4
  import { optional_clone } from "../../../../core/model/object/optional_clone.js";
4
5
  import { optional_equality } from "../../../../core/model/object/optional_equality.js";
5
6
  import { optional_hash } from "../../../../core/model/object/optional_hash.js";
@@ -131,10 +132,12 @@ export class RenderPipelineDescriptor extends PipelineDescriptorBase {
131
132
  * @returns {number}
132
133
  */
133
134
  hash() {
134
- return combine_hash(
135
- super.hash(),
136
- this.vertex.hash(),
137
- this.primitive.hash(),
135
+ return hash_mix2(
136
+ hash_mix3(
137
+ super.hash(),
138
+ this.vertex.hash(),
139
+ this.primitive.hash()
140
+ ),
138
141
  optional_hash(this.fragment)
139
142
  );
140
143
  }
@@ -1,4 +1,4 @@
1
- import { combine_hash } from "../../../../core/collection/array/combine_hash.js";
1
+ import { hash_mix3 } from "../../../../core/math/hash/hash_mix3.js";
2
2
  import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
3
3
 
4
4
  /**
@@ -50,7 +50,7 @@ export class VertexAttribute {
50
50
  }
51
51
 
52
52
  hash() {
53
- return combine_hash(
53
+ return hash_mix3(
54
54
  computeStringHash(this.format),
55
55
  this.offset,
56
56
  this.shaderLocation
@@ -1 +1 @@
1
- {"version":3,"file":"SamplerDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/shade/descriptor/texture/SamplerDescriptor.js"],"names":[],"mappings":"AAIA;;GAEG;AACH,uEAFe,oBAAoB;IAyE/B;;;OAGG;IACH,wDAOC;IAjFD;;OAEG;IACH,6BAA8B;IAC9B;;OAEG;IACH,6BAA8B;IAC9B;;OAEG;IACH,6BAA8B;IAE9B;;OAEG;IACH,yBAAqB;IACrB;;OAEG;IACH,yBAAqB;IACrB;;OAEG;IACH,kCAAwB;IAExB,oBAAgB;IAChB,oBAAiB;IAEjB,sBAAiB;IAEjB;;;OAGG;IACH,4BAAQ;IAIR;;;;;;;;;;;;aA6BC;IAeD,4BAgBC;IAmCL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;;CAN9C;qCA1IoC,4BAA4B"}
1
+ {"version":3,"file":"SamplerDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/shade/descriptor/texture/SamplerDescriptor.js"],"names":[],"mappings":"AAIA;;GAEG;AACH,uEAFe,oBAAoB;IAyE/B;;;OAGG;IACH,wDAOC;IAjFD;;OAEG;IACH,6BAA8B;IAC9B;;OAEG;IACH,6BAA8B;IAC9B;;OAEG;IACH,6BAA8B;IAE9B;;OAEG;IACH,yBAAqB;IACrB;;OAEG;IACH,yBAAqB;IACrB;;OAEG;IACH,kCAAwB;IAExB,oBAAgB;IAChB,oBAAiB;IAEjB,sBAAiB;IAEjB;;;OAGG;IACH,4BAAQ;IAIR;;;;;;;;;;;;aA6BC;IAeD,4BAgBC;IA2CL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;;CAN9C;qCAlJoC,4BAA4B"}
@@ -1,4 +1,4 @@
1
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
1
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
2
2
  import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
3
3
  import { ObjectDescriptorBase } from "../ObjectDescriptorBase.js";
4
4
 
@@ -108,18 +108,26 @@ export class SamplerDescriptor extends ObjectDescriptorBase {
108
108
  }
109
109
 
110
110
  #compute_hash(){
111
- let h = combine_hash(
112
- super.hash(),
113
- computeStringHash(this.addressModeU),
114
- computeStringHash(this.addressModeV),
115
- computeStringHash(this.addressModeW),
116
- computeStringHash(this.magFilter),
117
- computeStringHash(this.minFilter),
118
- computeStringHash(this.mipmapFilter),
119
- this.lodMinClamp,
120
- this.lodMaxClamp,
111
+ let h = hash_mix3(
112
+ hash_mix3(
113
+ hash_mix3(
114
+ hash_mix3(
115
+ hash_mix3(
116
+ super.hash(),
117
+ computeStringHash(this.addressModeU),
118
+ computeStringHash(this.addressModeV)
119
+ ),
120
+ computeStringHash(this.addressModeW),
121
+ computeStringHash(this.magFilter)
122
+ ),
123
+ computeStringHash(this.minFilter),
124
+ computeStringHash(this.mipmapFilter)
125
+ ),
126
+ this.lodMinClamp,
127
+ this.lodMaxClamp
128
+ ),
121
129
  this.maxAnisotropy,
122
- computeStringHash(this.compare),
130
+ computeStringHash(this.compare)
123
131
  );
124
132
 
125
133
  if(h === -1){
@@ -1 +1 @@
1
- {"version":3,"file":"TextureDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/shade/descriptor/texture/TextureDescriptor.js"],"names":[],"mappings":"AAgCA;;;GAGG;AACH,uEAFe,oBAAoB;IA6J/B;;;;OAIG;IACH,yCAFY,iBAAiB,CAQ5B;IA9JD,sBAAkB;IAClB,oBAAgB;IAEhB;;;OAGG;IACH,+BAAiB;IAEjB;;OAEG;IACH,yBAAsB;IAEtB;;OAEG;IACH,OAFU,MAAM,uBAAqB,CAEG;IAExC;;;OAGG;IACH,aAFU,kBAAkB,CAEX;IAEjB;;;OAGG;IACH,eAAyB;IAEzB;;;OAGG;IACH;eAU4B,MAAM;gBAAS,MAAM;4BAAqB,MAAM;OAJ3E;IAED;;;OAGG;IACH;eAF4B,MAAM;gBAAS,MAAM;4BAAqB,MAAM;MAI3E;IAGD;;;;;OAKG;IACH,+BAuBC;IAED;;;;OAIG;IACH,cAHW,iBAAiB,GAChB,OAAO,CAelB;IAED;;;OAGG;IACH,YAFW,iBAAiB,QAa3B;IAcD;;;OAGG;IACH,uCASC;IAeD;;;OAGG;IACH,2CAwCC;IAIL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;;CAP9C;qCAjPoC,4BAA4B"}
1
+ {"version":3,"file":"TextureDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/shade/descriptor/texture/TextureDescriptor.js"],"names":[],"mappings":"AAgCA;;;GAGG;AACH,uEAFe,oBAAoB;IAiK/B;;;;OAIG;IACH,yCAFY,iBAAiB,CAQ5B;IAlKD,sBAAkB;IAClB,oBAAgB;IAEhB;;;OAGG;IACH,+BAAiB;IAEjB;;OAEG;IACH,yBAAsB;IAEtB;;OAEG;IACH,OAFU,MAAM,uBAAqB,CAEG;IAExC;;;OAGG;IACH,aAFU,kBAAkB,CAEX;IAEjB;;;OAGG;IACH,eAAyB;IAEzB;;;OAGG;IACH;eAU4B,MAAM;gBAAS,MAAM;4BAAqB,MAAM;OAJ3E;IAED;;;OAGG;IACH;eAF4B,MAAM;gBAAS,MAAM;4BAAqB,MAAM;MAI3E;IAGD;;;;;OAKG;IACH,+BAuBC;IAED;;;;OAIG;IACH,cAHW,iBAAiB,GAChB,OAAO,CAelB;IAED;;;OAGG;IACH,YAFW,iBAAiB,QAa3B;IAkBD;;;OAGG;IACH,uCASC;IAeD;;;OAGG;IACH,2CAwCC;IAIL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;;CAP9C;qCArPoC,4BAA4B"}
@@ -1,5 +1,5 @@
1
1
  import { assert } from "../../../core/assert.js";
2
- import { combine_hash } from "../../../core/collection/array/combine_hash.js";
2
+ import { hash_mix3 } from "../../../core/math/hash/hash_mix3.js";
3
3
  import { computeIntegerArrayHash } from "../../../core/collection/array/computeIntegerArrayHash.js";
4
4
  import { isArrayEqualStrict } from "../../../core/collection/array/isArrayEqualStrict.js";
5
5
  import Signal from "../../../core/events/signal/Signal.js";
@@ -163,12 +163,16 @@ export class TextureDescriptor extends ObjectDescriptorBase {
163
163
  }
164
164
 
165
165
  hash() {
166
- return combine_hash(
167
- computeIntegerArrayHash(this.#size, 0, this.#size.length),
168
- this.mipLevelCount,
169
- this.sampleCount,
170
- computeStringHash(this.dimension),
171
- computeStringHash(this.format),
166
+ return hash_mix3(
167
+ hash_mix3(
168
+ hash_mix3(
169
+ computeIntegerArrayHash(this.#size, 0, this.#size.length),
170
+ this.mipLevelCount,
171
+ this.sampleCount
172
+ ),
173
+ computeStringHash(this.dimension),
174
+ computeStringHash(this.format)
175
+ ),
172
176
  this.usage,
173
177
  super.hash()
174
178
  )
@@ -0,0 +1,24 @@
1
+ /**
2
+ * What an adapter must offer for Shade to run at all — `RENDERER_CONTRACT.md` §2.
3
+ *
4
+ * Fixed, with no tiers below it: `Renderer.initialize()` checks an adapter against this before it
5
+ * asks for a device, refuses one that falls short with every gap named (see
6
+ * {@link shade_device_floor_unmet}), and requests exactly this from one that does not.
7
+ *
8
+ * Every limit here is `maximum`-class — an adapter meets it by offering at least the value. An
9
+ * `alignment`-class limit is met by offering at most, and would need its own comparison.
10
+ *
11
+ * @readonly
12
+ */
13
+ export const SHADE_DEVICE_FLOOR: Readonly<{
14
+ /**
15
+ * @type {ReadonlyArray<WebGPUExtensionType>}
16
+ */
17
+ features: ReadonlyArray<WebGPUExtensionType>;
18
+ /**
19
+ * @type {Readonly<Record<string, number>>}
20
+ */
21
+ limits: Readonly<Record<string, number>>;
22
+ }>;
23
+ import { WebGPUExtensionType } from "../descriptor/WebGPUExtensionType.js";
24
+ //# sourceMappingURL=SHADE_DEVICE_FLOOR.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SHADE_DEVICE_FLOOR.d.ts","sourceRoot":"","sources":["../../../../src/shade/device/SHADE_DEVICE_FLOOR.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH;IACI;;OAEG;cADO,cAAc,mBAAmB,CAAC;IAS5C;;OAEG;YADO,SAAS,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC;GAO3C;oCAjCiC,sCAAsC"}
@@ -0,0 +1,34 @@
1
+ import { WebGPUExtensionType } from "../descriptor/WebGPUExtensionType.js";
2
+
3
+ /**
4
+ * What an adapter must offer for Shade to run at all — `RENDERER_CONTRACT.md` §2.
5
+ *
6
+ * Fixed, with no tiers below it: `Renderer.initialize()` checks an adapter against this before it
7
+ * asks for a device, refuses one that falls short with every gap named (see
8
+ * {@link shade_device_floor_unmet}), and requests exactly this from one that does not.
9
+ *
10
+ * Every limit here is `maximum`-class — an adapter meets it by offering at least the value. An
11
+ * `alignment`-class limit is met by offering at most, and would need its own comparison.
12
+ *
13
+ * @readonly
14
+ */
15
+ export const SHADE_DEVICE_FLOOR = Object.freeze({
16
+ /**
17
+ * @type {ReadonlyArray<WebGPUExtensionType>}
18
+ */
19
+ features: Object.freeze([
20
+ // indirect draw is used throughout
21
+ WebGPUExtensionType.IndirectFirstInstance,
22
+ // the MBOIT transparency mode blends into 32-bit float targets; stays while MBOIT is selectable
23
+ WebGPUExtensionType.Float32Blendable,
24
+ ]),
25
+
26
+ /**
27
+ * @type {Readonly<Record<string, number>>}
28
+ */
29
+ limits: Object.freeze({
30
+ maxStorageBuffersPerShaderStage: 10,
31
+ // the G-buffer is wide
32
+ maxColorAttachmentBytesPerSample: 32,
33
+ }),
34
+ });
@@ -2,12 +2,18 @@
2
2
  * Why there is no usable device, in a form a host can act on.
3
3
  *
4
4
  * It is an `Error` because that is what the failure paths already throw and callers already
5
- * `catch`, and it carries a {@link ShadeDeviceFailureReason} because a host showing this to a player
5
+ * `catch`, and it carries a {@link ShadeDeviceFailureReason} because a host showing this to a person
6
6
  * needs to distinguish "your browser cannot do this at all" from "your GPU is below what this needs"
7
7
  * from "the GPU went away" — three different things to tell somebody, and none of them a stack
8
8
  * trace.
9
9
  *
10
- * `detail` holds the specific thing that was missing, for the log rather than the player.
10
+ * The `message` is written to be shown as it is. Where the specifics are something a person can act
11
+ * on — which features and limits the hardware lacks, what the browser refused — it names them, so
12
+ * that what reaches a support thread is the answer rather than a request for logs. `detail` holds
13
+ * the specifics alone, for a host that phrases its own message.
14
+ *
15
+ * Nothing here assumes what the application is: the same engine runs games, CAD tools and product
16
+ * visualizers, and they all show these messages.
11
17
  */
12
18
  export class ShadeDeviceFailure extends Error {
13
19
  /**
@@ -19,12 +25,13 @@ export class ShadeDeviceFailure extends Error {
19
25
  */
20
26
  static adapter_unavailable(): ShadeDeviceFailure;
21
27
  /**
22
- * @param {string} detail what was missing
28
+ * @param {string[]} unmet every requirement the adapter falls short of, as
29
+ * {@link shade_device_floor_unmet} phrases them
23
30
  * @returns {ShadeDeviceFailure}
24
31
  */
25
- static below_floor(detail: string): ShadeDeviceFailure;
32
+ static below_floor(unmet: string[]): ShadeDeviceFailure;
26
33
  /**
27
- * @param {string} detail
34
+ * @param {string} detail what the browser said when it refused
28
35
  * @returns {ShadeDeviceFailure}
29
36
  */
30
37
  static device_request_failed(detail: string): ShadeDeviceFailure;
@@ -1 +1 @@
1
- {"version":3,"file":"ShadeDeviceFailure.d.ts","sourceRoot":"","sources":["../../../../src/shade/device/ShadeDeviceFailure.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH;IA2BI;;OAEG;IACH,6BAFa,kBAAkB,CAQ9B;IAED;;OAEG;IACH,8BAFa,kBAAkB,CAQ9B;IAED;;;OAGG;IACH,2BAHW,MAAM,GACJ,kBAAkB,CAQ9B;IAED;;;OAGG;IACH,qCAHW,MAAM,GACJ,kBAAkB,CAQ9B;IAED;;;OAGG;IACH,2BAHW,MAAM,GACJ,kBAAkB,CAQ9B;IArED;;;;OAIG;IACH,oBAJW,wBAAwB,WACxB,MAAM,WACN,MAAM,EAQhB;IAxBD;;OAEG;IACH,QAFU,wBAAwB,CAEkB;IAEpD;;;;;OAKG;IACH,QAFU,MAAM,CAEJ;IA0EhB;;;OAGG;IACH,+BAFU,OAAO,CAEgC;CANhD;yCAjGwC,+BAA+B"}
1
+ {"version":3,"file":"ShadeDeviceFailure.d.ts","sourceRoot":"","sources":["../../../../src/shade/device/ShadeDeviceFailure.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH;IA2BI;;OAEG;IACH,6BAFa,kBAAkB,CAQ9B;IAED;;OAEG;IACH,8BAFa,kBAAkB,CAQ9B;IAED;;;;OAIG;IACH,0BAJW,MAAM,EAAE,GAEN,kBAAkB,CAU9B;IAED;;;OAGG;IACH,qCAHW,MAAM,GACJ,kBAAkB,CAQ9B;IAED;;;OAGG;IACH,2BAHW,MAAM,GACJ,kBAAkB,CAQ9B;IAxED;;;;OAIG;IACH,oBAJW,wBAAwB,WACxB,MAAM,WACN,MAAM,EAQhB;IAxBD;;OAEG;IACH,QAFU,wBAAwB,CAEkB;IAEpD;;;;;OAKG;IACH,QAFU,MAAM,CAEJ;IA6EhB;;;OAGG;IACH,+BAFU,OAAO,CAEgC;CANhD;yCA1GwC,+BAA+B"}
@@ -4,12 +4,18 @@ import { ShadeDeviceFailureReason } from "./ShadeDeviceFailureReason.js";
4
4
  * Why there is no usable device, in a form a host can act on.
5
5
  *
6
6
  * It is an `Error` because that is what the failure paths already throw and callers already
7
- * `catch`, and it carries a {@link ShadeDeviceFailureReason} because a host showing this to a player
7
+ * `catch`, and it carries a {@link ShadeDeviceFailureReason} because a host showing this to a person
8
8
  * needs to distinguish "your browser cannot do this at all" from "your GPU is below what this needs"
9
9
  * from "the GPU went away" — three different things to tell somebody, and none of them a stack
10
10
  * trace.
11
11
  *
12
- * `detail` holds the specific thing that was missing, for the log rather than the player.
12
+ * The `message` is written to be shown as it is. Where the specifics are something a person can act
13
+ * on — which features and limits the hardware lacks, what the browser refused — it names them, so
14
+ * that what reaches a support thread is the answer rather than a request for logs. `detail` holds
15
+ * the specifics alone, for a host that phrases its own message.
16
+ *
17
+ * Nothing here assumes what the application is: the same engine runs games, CAD tools and product
18
+ * visualizers, and they all show these messages.
13
19
  */
14
20
  export class ShadeDeviceFailure extends Error {
15
21
  /**
@@ -44,7 +50,7 @@ export class ShadeDeviceFailure extends Error {
44
50
  static webgpu_unavailable() {
45
51
  return new ShadeDeviceFailure(
46
52
  ShadeDeviceFailureReason.WebGPUUnavailable,
47
- "This browser does not support WebGPU, which this game requires.",
53
+ "This browser does not support WebGPU, which this application requires.",
48
54
  "navigator.gpu is undefined"
49
55
  );
50
56
  }
@@ -61,25 +67,28 @@ export class ShadeDeviceFailure extends Error {
61
67
  }
62
68
 
63
69
  /**
64
- * @param {string} detail what was missing
70
+ * @param {string[]} unmet every requirement the adapter falls short of, as
71
+ * {@link shade_device_floor_unmet} phrases them
65
72
  * @returns {ShadeDeviceFailure}
66
73
  */
67
- static below_floor(detail) {
74
+ static below_floor(unmet) {
75
+ const detail = unmet.join('; ');
76
+
68
77
  return new ShadeDeviceFailure(
69
78
  ShadeDeviceFailureReason.BelowFloor,
70
- "This graphics hardware is below the minimum this game requires.",
79
+ `This graphics hardware does not meet this application's minimum requirements: ${detail}.`,
71
80
  detail
72
81
  );
73
82
  }
74
83
 
75
84
  /**
76
- * @param {string} detail
85
+ * @param {string} detail what the browser said when it refused
77
86
  * @returns {ShadeDeviceFailure}
78
87
  */
79
88
  static device_request_failed(detail) {
80
89
  return new ShadeDeviceFailure(
81
90
  ShadeDeviceFailureReason.DeviceRequestFailed,
82
- "The graphics device could not be created.",
91
+ `The graphics device could not be created: ${detail}`,
83
92
  detail
84
93
  );
85
94
  }
@@ -4,7 +4,7 @@
4
4
  * The device floor is deliberate and fixed (D6/I-8): there are no degradation tiers, no WebGL
5
5
  * fallback and no feature-detection branches. Hardware below the floor is not accommodated — it is
6
6
  * told, clearly, that it cannot run this. That makes the *message* the entire below-floor
7
- * behaviour the engine owes, and a reason code is what lets a host phrase it for a player rather
7
+ * behaviour the engine owes, and a reason code is what lets a host phrase it for a person rather
8
8
  * than showing them a stack trace.
9
9
  */
10
10
  export type ShadeDeviceFailureReason = number;
@@ -4,7 +4,7 @@
4
4
  * The device floor is deliberate and fixed (D6/I-8): there are no degradation tiers, no WebGL
5
5
  * fallback and no feature-detection branches. Hardware below the floor is not accommodated — it is
6
6
  * told, clearly, that it cannot run this. That makes the *message* the entire below-floor
7
- * behaviour the engine owes, and a reason code is what lets a host phrase it for a player rather
7
+ * behaviour the engine owes, and a reason code is what lets a host phrase it for a person rather
8
8
  * than showing them a stack trace.
9
9
  *
10
10
  * @enum {number}
@@ -23,7 +23,7 @@ export const ShadeDeviceFailureReason = {
23
23
 
24
24
  /**
25
25
  * An adapter exists and is below the floor — a required feature or limit is missing. The
26
- * failure names which one.
26
+ * failure names every one.
27
27
  */
28
28
  BelowFloor: 2,
29
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"BufferResourceDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/graph/BufferResourceDescriptor.js"],"names":[],"mappings":"AAUA;IAkGI;;;;OAIG;IACH,0CAFa,wBAAwB,CAWpC;IAED;;;;;;;;OAQG;IACH,mBAJW,MAAM,SACN,iBAAe,MAAM,GACnB,wBAAwB,CASpC;IAED;;;;;;;OAOG;IACH,kBANW,MAAM,SACN,iBAAe,MAAM,iBACrB,MAAM,eACN,MAAM,GACJ,wBAAwB,CAsCpC;IA/KD;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;;;;OAMG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,4BAAoC;IAUpC;;;OAGG;IACH,YAFW,wBAAwB,QAOlC;IAED;;;OAGG;IACH,SAFY,wBAAwB,CAQnC;IAcD,4BAMC;IAED;;;;OAIG;IACH,eAHW,wBAAwB,GACvB,MAAM,CAoBjB;IAmFL;;;OAGG;IACH,4BAFU,OAAO,CAE4C;CAN5D;mCArLM,4EAA4E"}
1
+ {"version":3,"file":"BufferResourceDescriptor.d.ts","sourceRoot":"","sources":["../../../../../src/shade/device/graph/BufferResourceDescriptor.js"],"names":[],"mappings":"AAWA;IAoGI;;;;OAIG;IACH,0CAFa,wBAAwB,CAWpC;IAED;;;;;;;;OAQG;IACH,mBAJW,MAAM,SACN,iBAAe,MAAM,GACnB,wBAAwB,CASpC;IAED;;;;;;;OAOG;IACH,kBANW,MAAM,SACN,iBAAe,MAAM,iBACrB,MAAM,eACN,MAAM,GACJ,wBAAwB,CAsCpC;IAjLD;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;;;;OAMG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,4BAAoC;IAUpC;;;OAGG;IACH,YAFW,wBAAwB,QAOlC;IAED;;;OAGG;IACH,SAFY,wBAAwB,CAQnC;IAgBD,4BAMC;IAED;;;;OAIG;IACH,eAHW,wBAAwB,GACvB,MAAM,CAoBjB;IAmFL;;;OAGG;IACH,4BAFU,OAAO,CAE4C;CAN5D;mCAvLM,4EAA4E"}