@flighthq/render-wgpu 0.5.1-next.973.788d3d7 → 0.6.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 (407) hide show
  1. package/README.md +2 -2
  2. package/dist/.tsbuildinfo.compressed-texture-decoder-contract +1 -0
  3. package/dist/.tsbuildinfo.contract +1 -0
  4. package/dist/.tsbuildinfo.runtime +1 -0
  5. package/dist/compressed-texture-decoder-contract/WgpuCompressedTextureDecoder.d.ts +3 -0
  6. package/dist/compressed-texture-decoder-contract/WgpuCompressedTextureDecoder.d.ts.map +1 -0
  7. package/dist/compressed-texture-decoder-contract/WgpuCompressedTextureDecoder.js +2 -0
  8. package/dist/compressed-texture-decoder-contract/WgpuCompressedTextureDecoder.js.map +1 -0
  9. package/dist/compressed-texture-decoder-contract/compressedTextureDecoderContract.d.ts +2 -0
  10. package/dist/compressed-texture-decoder-contract/compressedTextureDecoderContract.d.ts.map +1 -0
  11. package/dist/compressed-texture-decoder-contract/compressedTextureDecoderContract.js +2 -0
  12. package/dist/compressed-texture-decoder-contract/compressedTextureDecoderContract.js.map +1 -0
  13. package/dist/contract.d.ts +32 -34
  14. package/dist/contract.d.ts.map +1 -1
  15. package/dist/contract.js +32 -34
  16. package/dist/contract.js.map +1 -1
  17. package/dist/contract.render-wgpu-types.d.ts +55 -0
  18. package/dist/contract.render-wgpu-types.d.ts.map +1 -0
  19. package/dist/contract.render-wgpu-types.js +5 -0
  20. package/dist/contract.render-wgpu-types.js.map +1 -0
  21. package/dist/enableWgpuTextureResolverGuards.d.ts +3 -2
  22. package/dist/enableWgpuTextureResolverGuards.d.ts.map +1 -1
  23. package/dist/enableWgpuTextureResolverGuards.js +12 -9
  24. package/dist/enableWgpuTextureResolverGuards.js.map +1 -1
  25. package/dist/explainWgpuTextureResolution.d.ts +2 -1
  26. package/dist/explainWgpuTextureResolution.d.ts.map +1 -1
  27. package/dist/explainWgpuTextureResolution.js +2 -5
  28. package/dist/explainWgpuTextureResolution.js.map +1 -1
  29. package/dist/explainWgpuUniformEndianness.d.ts +3 -0
  30. package/dist/explainWgpuUniformEndianness.d.ts.map +1 -0
  31. package/dist/explainWgpuUniformEndianness.js +25 -0
  32. package/dist/explainWgpuUniformEndianness.js.map +1 -0
  33. package/dist/index.d.ts +20 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +20 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/types/Host.d.ts +5 -0
  38. package/dist/types/Host.d.ts.map +1 -0
  39. package/dist/types/Host.js +2 -0
  40. package/dist/types/Host.js.map +1 -0
  41. package/dist/types/WgpuAdapter.d.ts +14 -0
  42. package/dist/types/WgpuAdapter.d.ts.map +1 -0
  43. package/dist/types/WgpuAdapter.js +2 -0
  44. package/dist/types/WgpuAdapter.js.map +1 -0
  45. package/dist/types/WgpuAdapterCapabilities.d.ts +7 -0
  46. package/dist/types/WgpuAdapterCapabilities.d.ts.map +1 -0
  47. package/dist/types/WgpuAdapterCapabilities.js +2 -0
  48. package/dist/types/WgpuAdapterCapabilities.js.map +1 -0
  49. package/dist/types/WgpuBindGroup.d.ts +23 -0
  50. package/dist/types/WgpuBindGroup.d.ts.map +1 -0
  51. package/dist/types/WgpuBindGroup.js +2 -0
  52. package/dist/types/WgpuBindGroup.js.map +1 -0
  53. package/dist/types/WgpuBindGroupLayout.d.ts +45 -0
  54. package/dist/types/WgpuBindGroupLayout.d.ts.map +1 -0
  55. package/dist/types/WgpuBindGroupLayout.js +7 -0
  56. package/dist/types/WgpuBindGroupLayout.js.map +1 -0
  57. package/dist/types/WgpuBuffer.d.ts +34 -0
  58. package/dist/types/WgpuBuffer.d.ts.map +1 -0
  59. package/dist/types/WgpuBuffer.js +19 -0
  60. package/dist/types/WgpuBuffer.js.map +1 -0
  61. package/dist/types/WgpuCanvasContext.d.ts +17 -0
  62. package/dist/types/WgpuCanvasContext.d.ts.map +1 -0
  63. package/dist/types/WgpuCanvasContext.js +2 -0
  64. package/dist/types/WgpuCanvasContext.js.map +1 -0
  65. package/dist/types/WgpuColorAdjustmentMaterialFeature.d.ts +14 -0
  66. package/dist/types/WgpuColorAdjustmentMaterialFeature.d.ts.map +1 -0
  67. package/dist/types/WgpuColorAdjustmentMaterialFeature.js +2 -0
  68. package/dist/types/WgpuColorAdjustmentMaterialFeature.js.map +1 -0
  69. package/dist/types/WgpuCommandBuffer.d.ts +5 -0
  70. package/dist/types/WgpuCommandBuffer.d.ts.map +1 -0
  71. package/dist/types/WgpuCommandBuffer.js +2 -0
  72. package/dist/types/WgpuCommandBuffer.js.map +1 -0
  73. package/dist/types/WgpuCommandEncoder.d.ts +12 -0
  74. package/dist/types/WgpuCommandEncoder.d.ts.map +1 -0
  75. package/dist/types/WgpuCommandEncoder.js +2 -0
  76. package/dist/types/WgpuCommandEncoder.js.map +1 -0
  77. package/dist/types/WgpuCompressedTextureSupport.d.ts +6 -0
  78. package/dist/types/WgpuCompressedTextureSupport.d.ts.map +1 -0
  79. package/dist/types/WgpuCompressedTextureSupport.js +2 -0
  80. package/dist/types/WgpuCompressedTextureSupport.js.map +1 -0
  81. package/dist/types/WgpuCompressedTextureUploader.d.ts +6 -0
  82. package/dist/types/WgpuCompressedTextureUploader.d.ts.map +1 -0
  83. package/dist/types/WgpuCompressedTextureUploader.js +2 -0
  84. package/dist/types/WgpuCompressedTextureUploader.js.map +1 -0
  85. package/dist/types/WgpuCustomMaterialShaderSource.d.ts +2 -0
  86. package/dist/types/WgpuCustomMaterialShaderSource.d.ts.map +1 -0
  87. package/dist/types/WgpuCustomMaterialShaderSource.js +2 -0
  88. package/dist/types/WgpuCustomMaterialShaderSource.js.map +1 -0
  89. package/dist/types/WgpuDevice.d.ts +76 -0
  90. package/dist/types/WgpuDevice.d.ts.map +1 -0
  91. package/dist/types/WgpuDevice.js +2 -0
  92. package/dist/types/WgpuDevice.js.map +1 -0
  93. package/dist/types/WgpuDeviceRuntime.d.ts +53 -0
  94. package/dist/types/WgpuDeviceRuntime.d.ts.map +1 -0
  95. package/dist/types/WgpuDeviceRuntime.js +2 -0
  96. package/dist/types/WgpuDeviceRuntime.js.map +1 -0
  97. package/dist/types/WgpuDeviceSignals.d.ts +6 -0
  98. package/dist/types/WgpuDeviceSignals.d.ts.map +1 -0
  99. package/dist/types/WgpuDeviceSignals.js +2 -0
  100. package/dist/types/WgpuDeviceSignals.js.map +1 -0
  101. package/dist/types/WgpuDeviceState.d.ts +7 -0
  102. package/dist/types/WgpuDeviceState.d.ts.map +1 -0
  103. package/dist/types/WgpuDeviceState.js +2 -0
  104. package/dist/types/WgpuDeviceState.js.map +1 -0
  105. package/dist/types/WgpuEffectState.d.ts +19 -0
  106. package/dist/types/WgpuEffectState.d.ts.map +1 -0
  107. package/dist/types/WgpuEffectState.js +2 -0
  108. package/dist/types/WgpuEffectState.js.map +1 -0
  109. package/dist/types/WgpuExternalImageSource.d.ts +18 -0
  110. package/dist/types/WgpuExternalImageSource.d.ts.map +1 -0
  111. package/dist/types/WgpuExternalImageSource.js +2 -0
  112. package/dist/types/WgpuExternalImageSource.js.map +1 -0
  113. package/dist/types/WgpuFullscreenPipeline.d.ts +14 -0
  114. package/dist/types/WgpuFullscreenPipeline.d.ts.map +1 -0
  115. package/dist/types/WgpuFullscreenPipeline.js +2 -0
  116. package/dist/types/WgpuFullscreenPipeline.js.map +1 -0
  117. package/dist/types/WgpuGpu.d.ts +7 -0
  118. package/dist/types/WgpuGpu.d.ts.map +1 -0
  119. package/dist/types/WgpuGpu.js +2 -0
  120. package/dist/types/WgpuGpu.js.map +1 -0
  121. package/dist/types/WgpuHost.d.ts +44 -0
  122. package/dist/types/WgpuHost.d.ts.map +1 -0
  123. package/dist/types/WgpuHost.js +2 -0
  124. package/dist/types/WgpuHost.js.map +1 -0
  125. package/dist/types/WgpuMeshMaterialRenderer.d.ts +11 -0
  126. package/dist/types/WgpuMeshMaterialRenderer.d.ts.map +1 -0
  127. package/dist/types/WgpuMeshMaterialRenderer.js +2 -0
  128. package/dist/types/WgpuMeshMaterialRenderer.js.map +1 -0
  129. package/dist/types/WgpuModifierSnippet.d.ts +16 -0
  130. package/dist/types/WgpuModifierSnippet.d.ts.map +1 -0
  131. package/dist/types/WgpuModifierSnippet.js +2 -0
  132. package/dist/types/WgpuModifierSnippet.js.map +1 -0
  133. package/dist/types/WgpuParticleResources.d.ts +12 -0
  134. package/dist/types/WgpuParticleResources.d.ts.map +1 -0
  135. package/dist/types/WgpuParticleResources.js +2 -0
  136. package/dist/types/WgpuParticleResources.js.map +1 -0
  137. package/dist/types/WgpuPipelineLayout.d.ts +8 -0
  138. package/dist/types/WgpuPipelineLayout.d.ts.map +1 -0
  139. package/dist/types/WgpuPipelineLayout.js +2 -0
  140. package/dist/types/WgpuPipelineLayout.js.map +1 -0
  141. package/dist/types/WgpuQuadBatchResources.d.ts +12 -0
  142. package/dist/types/WgpuQuadBatchResources.d.ts.map +1 -0
  143. package/dist/types/WgpuQuadBatchResources.js +2 -0
  144. package/dist/types/WgpuQuadBatchResources.js.map +1 -0
  145. package/dist/types/WgpuQuadMaterialRenderer.d.ts +9 -0
  146. package/dist/types/WgpuQuadMaterialRenderer.d.ts.map +1 -0
  147. package/dist/types/WgpuQuadMaterialRenderer.js +2 -0
  148. package/dist/types/WgpuQuadMaterialRenderer.js.map +1 -0
  149. package/dist/types/WgpuQueue.d.ts +12 -0
  150. package/dist/types/WgpuQueue.d.ts.map +1 -0
  151. package/dist/types/WgpuQueue.js +2 -0
  152. package/dist/types/WgpuQueue.js.map +1 -0
  153. package/dist/types/WgpuRenderOptions.d.ts +14 -0
  154. package/dist/types/WgpuRenderOptions.d.ts.map +1 -0
  155. package/dist/types/WgpuRenderOptions.js +2 -0
  156. package/dist/types/WgpuRenderOptions.js.map +1 -0
  157. package/dist/types/WgpuRenderPass.d.ts +31 -0
  158. package/dist/types/WgpuRenderPass.d.ts.map +1 -0
  159. package/dist/types/WgpuRenderPass.js +2 -0
  160. package/dist/types/WgpuRenderPass.js.map +1 -0
  161. package/dist/types/WgpuRenderPassEncoder.d.ts +52 -0
  162. package/dist/types/WgpuRenderPassEncoder.d.ts.map +1 -0
  163. package/dist/types/WgpuRenderPassEncoder.js +2 -0
  164. package/dist/types/WgpuRenderPassEncoder.js.map +1 -0
  165. package/dist/types/WgpuRenderPipeline.d.ts +96 -0
  166. package/dist/types/WgpuRenderPipeline.d.ts.map +1 -0
  167. package/dist/types/WgpuRenderPipeline.js +9 -0
  168. package/dist/types/WgpuRenderPipeline.js.map +1 -0
  169. package/dist/types/WgpuRenderState.d.ts +249 -0
  170. package/dist/types/WgpuRenderState.d.ts.map +1 -0
  171. package/dist/types/WgpuRenderState.js +2 -0
  172. package/dist/types/WgpuRenderState.js.map +1 -0
  173. package/dist/types/WgpuRenderStateOptions.d.ts +31 -0
  174. package/dist/types/WgpuRenderStateOptions.d.ts.map +1 -0
  175. package/dist/types/WgpuRenderStateOptions.js +2 -0
  176. package/dist/types/WgpuRenderStateOptions.js.map +1 -0
  177. package/dist/types/WgpuRenderTarget.d.ts +62 -0
  178. package/dist/types/WgpuRenderTarget.d.ts.map +1 -0
  179. package/dist/types/WgpuRenderTarget.js +2 -0
  180. package/dist/types/WgpuRenderTarget.js.map +1 -0
  181. package/dist/types/WgpuRenderTexture.d.ts +25 -0
  182. package/dist/types/WgpuRenderTexture.d.ts.map +1 -0
  183. package/dist/types/WgpuRenderTexture.js +2 -0
  184. package/dist/types/WgpuRenderTexture.js.map +1 -0
  185. package/dist/types/WgpuSampler.d.ts +19 -0
  186. package/dist/types/WgpuSampler.d.ts.map +1 -0
  187. package/dist/types/WgpuSampler.js +2 -0
  188. package/dist/types/WgpuSampler.js.map +1 -0
  189. package/dist/types/WgpuScene3DRuntime.d.ts +6 -0
  190. package/dist/types/WgpuScene3DRuntime.d.ts.map +1 -0
  191. package/dist/types/WgpuScene3DRuntime.js +2 -0
  192. package/dist/types/WgpuScene3DRuntime.js.map +1 -0
  193. package/dist/types/WgpuShaderModule.d.ts +6 -0
  194. package/dist/types/WgpuShaderModule.d.ts.map +1 -0
  195. package/dist/types/WgpuShaderModule.js +2 -0
  196. package/dist/types/WgpuShaderModule.js.map +1 -0
  197. package/dist/types/WgpuShapeMesh.d.ts +7 -0
  198. package/dist/types/WgpuShapeMesh.d.ts.map +1 -0
  199. package/dist/types/WgpuShapeMesh.js +2 -0
  200. package/dist/types/WgpuShapeMesh.js.map +1 -0
  201. package/dist/types/WgpuSkinningAdapter.d.ts +18 -0
  202. package/dist/types/WgpuSkinningAdapter.d.ts.map +1 -0
  203. package/dist/types/WgpuSkinningAdapter.js +2 -0
  204. package/dist/types/WgpuSkinningAdapter.js.map +1 -0
  205. package/dist/types/WgpuSurface.d.ts +5 -0
  206. package/dist/types/WgpuSurface.d.ts.map +1 -0
  207. package/dist/types/WgpuSurface.js +2 -0
  208. package/dist/types/WgpuSurface.js.map +1 -0
  209. package/dist/types/WgpuTexture.d.ts +58 -0
  210. package/dist/types/WgpuTexture.d.ts.map +1 -0
  211. package/dist/types/WgpuTexture.js +9 -0
  212. package/dist/types/WgpuTexture.js.map +1 -0
  213. package/dist/types/WgpuTextureFormat.d.ts +2 -0
  214. package/dist/types/WgpuTextureFormat.d.ts.map +1 -0
  215. package/dist/types/WgpuTextureFormat.js +2 -0
  216. package/dist/types/WgpuTextureFormat.js.map +1 -0
  217. package/dist/types/WgpuTextureResolver.d.ts +4 -0
  218. package/dist/types/WgpuTextureResolver.d.ts.map +1 -0
  219. package/dist/types/WgpuTextureResolver.js +2 -0
  220. package/dist/types/WgpuTextureResolver.js.map +1 -0
  221. package/dist/types/WgpuTextureView.d.ts +16 -0
  222. package/dist/types/WgpuTextureView.d.ts.map +1 -0
  223. package/dist/types/WgpuTextureView.js +2 -0
  224. package/dist/types/WgpuTextureView.js.map +1 -0
  225. package/dist/types/WgpuUniformEndianness.d.ts +7 -0
  226. package/dist/types/WgpuUniformEndianness.d.ts.map +1 -0
  227. package/dist/types/WgpuUniformEndianness.js +2 -0
  228. package/dist/types/WgpuUniformEndianness.js.map +1 -0
  229. package/dist/types/WgpuVelocityWriter.d.ts +11 -0
  230. package/dist/types/WgpuVelocityWriter.d.ts.map +1 -0
  231. package/dist/types/WgpuVelocityWriter.js +2 -0
  232. package/dist/types/WgpuVelocityWriter.js.map +1 -0
  233. package/dist/wgpuAdapterCapabilities.d.ts +2 -2
  234. package/dist/wgpuAdapterCapabilities.d.ts.map +1 -1
  235. package/dist/wgpuAdapterCapabilities.js.map +1 -1
  236. package/dist/wgpuCompressedTexture.d.ts +7 -5
  237. package/dist/wgpuCompressedTexture.d.ts.map +1 -1
  238. package/dist/wgpuCompressedTexture.js +10 -18
  239. package/dist/wgpuCompressedTexture.js.map +1 -1
  240. package/dist/wgpuDeviceLoss.d.ts +2 -2
  241. package/dist/wgpuDeviceLoss.d.ts.map +1 -1
  242. package/dist/wgpuDeviceLoss.js +1 -1
  243. package/dist/wgpuDeviceLoss.js.map +1 -1
  244. package/dist/wgpuDraw.d.ts +11 -5
  245. package/dist/wgpuDraw.d.ts.map +1 -1
  246. package/dist/wgpuDraw.js +21 -20
  247. package/dist/wgpuDraw.js.map +1 -1
  248. package/dist/wgpuExternalImageSource.d.ts +3 -2
  249. package/dist/wgpuExternalImageSource.d.ts.map +1 -1
  250. package/dist/wgpuExternalImageSource.js.map +1 -1
  251. package/dist/wgpuExternalTexture.d.ts +7 -3
  252. package/dist/wgpuExternalTexture.d.ts.map +1 -1
  253. package/dist/wgpuExternalTexture.js +5 -5
  254. package/dist/wgpuExternalTexture.js.map +1 -1
  255. package/dist/wgpuFrame.d.ts +23 -0
  256. package/dist/wgpuFrame.d.ts.map +1 -0
  257. package/dist/{wgpuBackground.js → wgpuFrame.js} +67 -122
  258. package/dist/wgpuFrame.js.map +1 -0
  259. package/dist/wgpuFullscreenPass.d.ts +5 -4
  260. package/dist/wgpuFullscreenPass.d.ts.map +1 -1
  261. package/dist/wgpuFullscreenPass.js +22 -8
  262. package/dist/wgpuFullscreenPass.js.map +1 -1
  263. package/dist/wgpuHost.d.ts +4 -7
  264. package/dist/wgpuHost.d.ts.map +1 -1
  265. package/dist/wgpuHost.js +81 -70
  266. package/dist/wgpuHost.js.map +1 -1
  267. package/dist/wgpuMipmap.d.ts +2 -2
  268. package/dist/wgpuMipmap.d.ts.map +1 -1
  269. package/dist/wgpuMipmap.js +4 -3
  270. package/dist/wgpuMipmap.js.map +1 -1
  271. package/dist/wgpuQuadMaterialRegistry.d.ts +7 -0
  272. package/dist/wgpuQuadMaterialRegistry.d.ts.map +1 -0
  273. package/dist/wgpuQuadMaterialRegistry.js +33 -0
  274. package/dist/wgpuQuadMaterialRegistry.js.map +1 -0
  275. package/dist/wgpuRenderPass.d.ts +9 -0
  276. package/dist/wgpuRenderPass.d.ts.map +1 -0
  277. package/dist/wgpuRenderPass.js +210 -0
  278. package/dist/wgpuRenderPass.js.map +1 -0
  279. package/dist/wgpuRenderState.d.ts +16 -12
  280. package/dist/wgpuRenderState.d.ts.map +1 -1
  281. package/dist/wgpuRenderState.js +104 -149
  282. package/dist/wgpuRenderState.js.map +1 -1
  283. package/dist/wgpuRenderTarget.d.ts +13 -29
  284. package/dist/wgpuRenderTarget.d.ts.map +1 -1
  285. package/dist/wgpuRenderTarget.js +20 -253
  286. package/dist/wgpuRenderTarget.js.map +1 -1
  287. package/dist/wgpuRenderTargetPool.d.ts +8 -6
  288. package/dist/wgpuRenderTargetPool.d.ts.map +1 -1
  289. package/dist/wgpuRenderTargetPool.js +9 -9
  290. package/dist/wgpuRenderTargetPool.js.map +1 -1
  291. package/dist/wgpuRenderTexture.d.ts +7 -4
  292. package/dist/wgpuRenderTexture.d.ts.map +1 -1
  293. package/dist/wgpuRenderTexture.js +15 -17
  294. package/dist/wgpuRenderTexture.js.map +1 -1
  295. package/dist/wgpuRenderTexturePool.d.ts +3 -1
  296. package/dist/wgpuRenderTexturePool.d.ts.map +1 -1
  297. package/dist/wgpuRenderTexturePool.js +5 -7
  298. package/dist/wgpuRenderTexturePool.js.map +1 -1
  299. package/dist/wgpuScissor.d.ts +3 -3
  300. package/dist/wgpuScissor.d.ts.map +1 -1
  301. package/dist/wgpuScissor.js +8 -5
  302. package/dist/wgpuScissor.js.map +1 -1
  303. package/dist/wgpuScreenAntialias.d.ts +3 -0
  304. package/dist/wgpuScreenAntialias.d.ts.map +1 -0
  305. package/dist/wgpuScreenAntialias.js +120 -0
  306. package/dist/wgpuScreenAntialias.js.map +1 -0
  307. package/dist/wgpuScreenCapture.d.ts +6 -0
  308. package/dist/wgpuScreenCapture.d.ts.map +1 -0
  309. package/dist/wgpuScreenCapture.js +138 -0
  310. package/dist/wgpuScreenCapture.js.map +1 -0
  311. package/dist/wgpuScreenRenderTarget.d.ts +11 -0
  312. package/dist/wgpuScreenRenderTarget.d.ts.map +1 -0
  313. package/dist/wgpuScreenRenderTarget.js +121 -0
  314. package/dist/wgpuScreenRenderTarget.js.map +1 -0
  315. package/dist/wgpuShader.d.ts +11 -8
  316. package/dist/wgpuShader.d.ts.map +1 -1
  317. package/dist/wgpuShader.js +11 -10
  318. package/dist/wgpuShader.js.map +1 -1
  319. package/dist/wgpuShaderBinding.d.ts +3 -1
  320. package/dist/wgpuShaderBinding.d.ts.map +1 -1
  321. package/dist/wgpuShaderBinding.js +1 -1
  322. package/dist/wgpuShaderBinding.js.map +1 -1
  323. package/dist/wgpuShaderRegistry.d.ts +1 -1
  324. package/dist/wgpuShaderRegistry.d.ts.map +1 -1
  325. package/dist/wgpuShaderRegistry.js +1 -1
  326. package/dist/wgpuShaderRegistry.js.map +1 -1
  327. package/dist/wgpuTestHelper.d.ts +11 -2
  328. package/dist/wgpuTestHelper.d.ts.map +1 -1
  329. package/dist/wgpuTestHelper.js +50 -38
  330. package/dist/wgpuTestHelper.js.map +1 -1
  331. package/dist/wgpuTextureRenderTarget.d.ts +22 -0
  332. package/dist/wgpuTextureRenderTarget.d.ts.map +1 -0
  333. package/dist/wgpuTextureRenderTarget.js +123 -0
  334. package/dist/wgpuTextureRenderTarget.js.map +1 -0
  335. package/dist/wgpuTextureResolver.d.ts +5 -1
  336. package/dist/wgpuTextureResolver.d.ts.map +1 -1
  337. package/dist/wgpuTextureResolver.js +13 -12
  338. package/dist/wgpuTextureResolver.js.map +1 -1
  339. package/dist/wgpuTextureUpload.d.ts +5 -4
  340. package/dist/wgpuTextureUpload.d.ts.map +1 -1
  341. package/dist/wgpuTextureUpload.js +1 -1
  342. package/dist/wgpuTextureUpload.js.map +1 -1
  343. package/package.json +33 -13
  344. package/src/enableWgpuTextureResolverGuards.test.ts +40 -19
  345. package/src/explainWgpuTextureResolution.test.ts +6 -6
  346. package/src/explainWgpuUniformEndianness.test.ts +11 -0
  347. package/src/types/WgpuBindGroupLayout.test.ts +9 -0
  348. package/src/types/WgpuBuffer.test.ts +26 -0
  349. package/src/types/WgpuGpu.test.ts +56 -0
  350. package/src/types/WgpuRenderPipeline.test.ts +12 -0
  351. package/src/types/WgpuTexture.test.ts +15 -0
  352. package/src/wgpuAdapterCapabilities.test.ts +5 -4
  353. package/src/wgpuCompressedTexture.test.ts +31 -37
  354. package/src/wgpuDeviceLoss.test.ts +31 -24
  355. package/src/wgpuDraw.test.ts +21 -24
  356. package/src/wgpuExternalImageSource.test.ts +12 -11
  357. package/src/wgpuExternalTexture.test.ts +7 -6
  358. package/src/{wgpuBackground.test.ts → wgpuFrame.test.ts} +47 -29
  359. package/src/wgpuFullscreenPass.test.ts +8 -8
  360. package/src/wgpuHost.test.ts +57 -186
  361. package/src/wgpuMipmap.test.ts +15 -9
  362. package/src/wgpuQuadMaterialRegistry.test.ts +132 -0
  363. package/src/wgpuRenderPass.test.ts +239 -0
  364. package/src/wgpuRenderState.test.ts +215 -550
  365. package/src/wgpuRenderTarget.test.ts +44 -220
  366. package/src/wgpuRenderTargetPool.test.ts +23 -23
  367. package/src/wgpuRenderTexture.test.ts +21 -18
  368. package/src/wgpuRenderTexturePool.test.ts +3 -3
  369. package/src/wgpuScissor.test.ts +50 -19
  370. package/src/wgpuScreenAntialias.test.ts +65 -0
  371. package/src/wgpuScreenCapture.test.ts +165 -0
  372. package/src/wgpuScreenRenderTarget.test.ts +172 -0
  373. package/src/wgpuShader.test.ts +12 -11
  374. package/src/wgpuShaderBinding.test.ts +4 -4
  375. package/src/wgpuShaderRegistry.test.ts +4 -5
  376. package/src/wgpuTestHelper.test.ts +8 -7
  377. package/src/wgpuTextureRenderTarget.test.ts +129 -0
  378. package/src/wgpuTextureResolver.test.ts +25 -14
  379. package/src/wgpuTextureUpload.test.ts +15 -10
  380. package/dist/wgpuAntialias.d.ts +0 -14
  381. package/dist/wgpuAntialias.d.ts.map +0 -1
  382. package/dist/wgpuAntialias.js +0 -155
  383. package/dist/wgpuAntialias.js.map +0 -1
  384. package/dist/wgpuBackground.d.ts +0 -20
  385. package/dist/wgpuBackground.d.ts.map +0 -1
  386. package/dist/wgpuBackground.js.map +0 -1
  387. package/dist/wgpuElement.d.ts +0 -7
  388. package/dist/wgpuElement.d.ts.map +0 -1
  389. package/dist/wgpuElement.js +0 -20
  390. package/dist/wgpuElement.js.map +0 -1
  391. package/dist/wgpuMaterialRegistry.d.ts +0 -5
  392. package/dist/wgpuMaterialRegistry.d.ts.map +0 -1
  393. package/dist/wgpuMaterialRegistry.js +0 -32
  394. package/dist/wgpuMaterialRegistry.js.map +0 -1
  395. package/dist/wgpuPipeline.d.ts +0 -6
  396. package/dist/wgpuPipeline.d.ts.map +0 -1
  397. package/dist/wgpuPipeline.js +0 -33
  398. package/dist/wgpuPipeline.js.map +0 -1
  399. package/dist/wgpuSurface.d.ts +0 -6
  400. package/dist/wgpuSurface.d.ts.map +0 -1
  401. package/dist/wgpuSurface.js +0 -155
  402. package/dist/wgpuSurface.js.map +0 -1
  403. package/src/wgpuAntialias.test.ts +0 -239
  404. package/src/wgpuElement.test.ts +0 -145
  405. package/src/wgpuMaterialRegistry.test.ts +0 -100
  406. package/src/wgpuPipeline.test.ts +0 -62
  407. package/src/wgpuSurface.test.ts +0 -141
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuRenderStateOptions.js","sourceRoot":"","sources":["../../src/types/WgpuRenderStateOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import type { EntityRaw, EntityRuntime, EntityRuntimeKey } from '@flighthq/entity/contract';
2
+ import type { RenderTargetColorSpace, RenderTargetDimensions } from '@flighthq/render/contract';
3
+ import type { WgpuBindGroup } from './WgpuBindGroup.ts';
4
+ import type { WgpuBuffer } from './WgpuBuffer.ts';
5
+ import type { WgpuCanvasAlphaMode, WgpuCanvasContext } from './WgpuCanvasContext.ts';
6
+ import type { WgpuCommandEncoder } from './WgpuCommandEncoder.ts';
7
+ import type { WgpuDevice } from './WgpuDevice.ts';
8
+ import type { WgpuPresentationSurface } from './WgpuHost.ts';
9
+ import type { WgpuRenderState, WgpuTextureBindings } from './WgpuRenderState.ts';
10
+ import type { WgpuTexture } from './WgpuTexture.ts';
11
+ import type { WgpuTextureFormat } from './WgpuTextureFormat.ts';
12
+ import type { WgpuTextureView } from './WgpuTextureView.ts';
13
+ export interface WgpuRenderTarget extends RenderTargetDimensions, EntityRaw {
14
+ [EntityRuntimeKey]: EntityRuntime | undefined;
15
+ colorAttachments: number;
16
+ colorSpace: RenderTargetColorSpace;
17
+ context: WgpuCanvasContext | null;
18
+ depthStencilTexture: WgpuTexture;
19
+ depthStencilView: WgpuTextureView;
20
+ format: WgpuTextureFormat;
21
+ height: number;
22
+ sampleCount: number;
23
+ width: number;
24
+ }
25
+ export type WgpuRenderTargetPool = EntityRaw & {
26
+ [EntityRuntimeKey]: EntityRuntime | undefined;
27
+ } & {
28
+ free: WgpuTextureRenderTarget[];
29
+ };
30
+ export interface WgpuScreenRenderTarget extends WgpuRenderTarget {
31
+ antialias: boolean;
32
+ antialiasResolveBindGroup: WgpuBindGroup | null;
33
+ antialiasTexture: WgpuTexture | null;
34
+ antialiasView: WgpuTextureView | null;
35
+ acquireAntialiasView: ((state: WgpuRenderState, target: WgpuScreenRenderTarget) => WgpuTextureView) | null;
36
+ encodeAntialiasResolve: ((state: WgpuRenderState, target: Readonly<WgpuScreenRenderTarget>, encoder: WgpuCommandEncoder) => void) | null;
37
+ captureBuffer: WgpuBuffer | null;
38
+ captureBytesPerRow: number;
39
+ captureEnabled: boolean;
40
+ captureHeight: number;
41
+ captureTexture: WgpuTexture | null;
42
+ captureWidth: number;
43
+ acquireCaptureTexture: ((target: WgpuScreenRenderTarget) => WgpuTexture) | null;
44
+ encodeCapture: ((target: WgpuScreenRenderTarget, encoder: WgpuCommandEncoder) => void) | null;
45
+ context: WgpuCanvasContext;
46
+ device: WgpuDevice;
47
+ presentationView: WgpuTextureView | null;
48
+ surface: WgpuPresentationSurface;
49
+ }
50
+ export interface WgpuScreenRenderTargetOptions {
51
+ alphaMode?: WgpuCanvasAlphaMode;
52
+ colorSpace?: RenderTargetColorSpace;
53
+ format?: WgpuTextureFormat;
54
+ }
55
+ export interface WgpuTextureRenderTarget extends WgpuRenderTarget {
56
+ bindings: WgpuTextureBindings;
57
+ context: null;
58
+ mipLevelCount: number;
59
+ texture: WgpuTexture;
60
+ view: WgpuTextureView;
61
+ }
62
+ //# sourceMappingURL=WgpuRenderTarget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuRenderTarget.d.ts","sourceRoot":"","sources":["../../src/types/WgpuRenderTarget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEhG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAA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derTarget.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import type { EntityRaw, EntityRuntime, EntityRuntimeKey } from '@flighthq/entity/contract';
2
+ import type { RenderTexture } from '@flighthq/render/contract';
3
+ import type { WgpuDevice } from './WgpuDevice.ts';
4
+ import type { WgpuRenderState } from './WgpuRenderState.ts';
5
+ import type { WgpuRenderTargetPool, WgpuTextureRenderTarget } from './WgpuRenderTarget.ts';
6
+ export type WgpuRenderTextureStatus = 'ready' | 'released' | 'unrendered' | 'writing';
7
+ export interface WgpuRenderTextureExplanation {
8
+ height: number;
9
+ status: WgpuRenderTextureStatus;
10
+ width: number;
11
+ }
12
+ export interface WgpuRenderTextureEntry {
13
+ status: WgpuRenderTextureStatus;
14
+ target: WgpuTextureRenderTarget;
15
+ }
16
+ export interface WgpuRenderTexturePool extends EntityRaw {
17
+ [EntityRuntimeKey]: EntityRuntime | undefined;
18
+ device: WgpuDevice | null;
19
+ destroyed: boolean;
20
+ effectTargets: WgpuRenderTargetPool;
21
+ free: RenderTexture[];
22
+ leased: Set<RenderTexture>;
23
+ }
24
+ export type WgpuRenderTextureGuard = (state: WgpuRenderState, renderTexture: Readonly<RenderTexture>, explanation: Readonly<WgpuRenderTextureExplanation>) => void;
25
+ //# sourceMappingURL=WgpuRenderTexture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuRenderTexture.d.ts","sourceRoot":"","sources":["../../src/types/WgpuRenderTexture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAE3F,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAEtF,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,uBAAuB,CAAC;IAChC,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAID,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC9C,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,oBAAoB,CAAC;IACpC,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;CAC5B;AAED,MAAM,MAAM,sBAAsB,GAAG,CACnC,KAAK,EAAE,eAAe,EACtB,aAAa,EAAE,QAAQ,CAAC,aAAa,CAAC,EACtC,WAAW,EAAE,QAAQ,CAAC,4BAA4B,CAAC,KAChD,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuRenderTexture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuRenderTexture.js","sourceRoot":"","sources":["../../src/types/WgpuRenderTexture.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export type WgpuSampler = GPUSampler;
2
+ export type WgpuAddressMode = 'clamp-to-edge' | 'mirror-repeat' | 'repeat';
3
+ export type WgpuCompareFunction = 'always' | 'equal' | 'greater' | 'greater-equal' | 'less' | 'less-equal' | 'never' | 'not-equal';
4
+ export type WgpuFilterMode = 'linear' | 'nearest';
5
+ export type WgpuMipmapFilterMode = 'linear' | 'nearest';
6
+ export interface WgpuSamplerDescriptor {
7
+ addressModeU?: WgpuAddressMode;
8
+ addressModeV?: WgpuAddressMode;
9
+ addressModeW?: WgpuAddressMode;
10
+ compare?: WgpuCompareFunction;
11
+ label?: string;
12
+ lodMaxClamp?: number;
13
+ lodMinClamp?: number;
14
+ magFilter?: WgpuFilterMode;
15
+ maxAnisotropy?: number;
16
+ minFilter?: WgpuFilterMode;
17
+ mipmapFilter?: WgpuMipmapFilterMode;
18
+ }
19
+ //# sourceMappingURL=WgpuSampler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuSampler.d.ts","sourceRoot":"","sources":["../../src/types/WgpuSampler.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AAErC,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,QAAQ,CAAC;AAE3E,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,OAAO,GACP,SAAS,GACT,eAAe,GACf,MAAM,GACN,YAAY,GACZ,OAAO,GACP,WAAW,CAAC;AAEhB,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuSampler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuSampler.js","sourceRoot":"","sources":["../../src/types/WgpuSampler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { Camera3D } from '@flighthq/camera/contract';
2
+ import type { Scene3DLightsLike } from '@flighthq/lighting/contract';
3
+ import type { Node3D } from '@flighthq/scene3d/contract';
4
+ import type { WgpuRenderState } from './WgpuRenderState.ts';
5
+ export type WgpuScene3DPass = (state: WgpuRenderState, scene: Readonly<Node3D>, camera: Readonly<Camera3D>, lights: Readonly<Scene3DLightsLike>) => void;
6
+ //# sourceMappingURL=WgpuScene3DRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuScene3DRuntime.d.ts","sourceRoot":"","sources":["../../src/types/WgpuScene3DRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAQ5D,MAAM,MAAM,eAAe,GAAG,CAC5B,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EACvB,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAC1B,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,KAChC,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuScene3DRuntime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuScene3DRuntime.js","sourceRoot":"","sources":["../../src/types/WgpuScene3DRuntime.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export type WgpuShaderModule = GPUShaderModule;
2
+ export interface WgpuShaderModuleDescriptor {
3
+ code: string;
4
+ label?: string;
5
+ }
6
+ //# sourceMappingURL=WgpuShaderModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuShaderModule.d.ts","sourceRoot":"","sources":["../../src/types/WgpuShaderModule.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuShaderModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuShaderModule.js","sourceRoot":"","sources":["../../src/types/WgpuShaderModule.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface WgpuShapeMesh {
2
+ vertices: Float32Array;
3
+ indices: Uint16Array;
4
+ color: number;
5
+ alpha: number;
6
+ }
7
+ //# sourceMappingURL=WgpuShapeMesh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuShapeMesh.d.ts","sourceRoot":"","sources":["../../src/types/WgpuShapeMesh.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;IAErB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuShapeMesh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuShapeMesh.js","sourceRoot":"","sources":["../../src/types/WgpuShapeMesh.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import type { Mesh, MeshGeometry } from '@flighthq/meshgeometry/contract';
2
+ import type { WgpuBindGroup } from './WgpuBindGroup.ts';
3
+ import type { WgpuBindGroupLayout } from './WgpuBindGroupLayout.ts';
4
+ import type { WgpuVertexBufferLayout } from './WgpuRenderPipeline.ts';
5
+ import type { WgpuRenderState } from './WgpuRenderState.ts';
6
+ export interface WgpuSkinningAdapter {
7
+ extendMeshPrelude(rigidPrelude: string): string;
8
+ extendShadowDepthPrelude(rigidPrelude: string): string;
9
+ getDrawBindGroup(state: WgpuRenderState, jointMatrices: Readonly<Float32Array>): WgpuBindGroup;
10
+ getDrawLayout(state: WgpuRenderState): WgpuBindGroupLayout;
11
+ getMeshDrawBindGroup(state: WgpuRenderState, jointMatrices: Readonly<Float32Array>, normalMatrices: Readonly<Float32Array>): WgpuBindGroup;
12
+ getMeshDrawLayout(state: WgpuRenderState): WgpuBindGroupLayout;
13
+ getUploadVertices(geometry: Readonly<MeshGeometry>): Float32Array | null;
14
+ hasBindPose(geometry: Readonly<MeshGeometry>): boolean;
15
+ isGpuSkinned(mesh: Readonly<Mesh>): boolean;
16
+ vertexBufferLayouts: readonly WgpuVertexBufferLayout[];
17
+ }
18
+ //# sourceMappingURL=WgpuSkinningAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuSkinningAdapter.d.ts","sourceRoot":"","sources":["../../src/types/WgpuSkinningAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAChD,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IACvD,gBAAgB,CAAC,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,aAAa,CAAC;IAC/F,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,mBAAmB,CAAC;IAG3D,oBAAoB,CAClB,KAAK,EAAE,eAAe,EACtB,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,EACrC,cAAc,EAAE,QAAQ,CAAC,YAAY,CAAC,GACrC,aAAa,CAAC;IACjB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,mBAAmB,CAAC;IAC/D,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,YAAY,GAAG,IAAI,CAAC;IACzE,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC;IACvD,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAC5C,mBAAmB,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACxD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuSkinningAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuSkinningAdapter.js","sourceRoot":"","sources":["../../src/types/WgpuSkinningAdapter.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { SurfaceWithAcquisition } from '@flighthq/surface/contract';
2
+ import type { WgpuHostAcquisition } from './WgpuHost.ts';
3
+ /** A WGPU rendering surface with its host-acquired device and presentation context. */
4
+ export type WgpuSurface = SurfaceWithAcquisition<WgpuHostAcquisition, 'WgpuSurface'>;
5
+ //# sourceMappingURL=WgpuSurface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuSurface.d.ts","sourceRoot":"","sources":["../../src/types/WgpuSurface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,uFAAuF;AACvF,MAAM,MAAM,WAAW,GAAG,sBAAsB,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuSurface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuSurface.js","sourceRoot":"","sources":["../../src/types/WgpuSurface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ import type { WgpuBuffer } from './WgpuBuffer.ts';
2
+ import type { WgpuTextureFormat } from './WgpuTextureFormat.ts';
3
+ import type { WgpuTextureView, WgpuTextureViewDescriptor, WgpuTextureViewDimension } from './WgpuTextureView.ts';
4
+ export type WgpuExtent3D = readonly number[] | Readonly<WgpuExtent3DDict>;
5
+ export interface WgpuExtent3DDict {
6
+ depthOrArrayLayers?: number;
7
+ height?: number;
8
+ width: number;
9
+ }
10
+ export type WgpuOrigin3D = readonly number[] | Readonly<WgpuOrigin3DDict>;
11
+ export interface WgpuOrigin3DDict {
12
+ x?: number;
13
+ y?: number;
14
+ z?: number;
15
+ }
16
+ export interface WgpuTexelCopyBufferInfo extends WgpuTexelCopyBufferLayout {
17
+ buffer: WgpuBuffer;
18
+ }
19
+ export interface WgpuTexelCopyBufferLayout {
20
+ bytesPerRow?: number;
21
+ offset?: number;
22
+ rowsPerImage?: number;
23
+ }
24
+ export interface WgpuTexelCopyTextureInfo {
25
+ aspect?: WgpuTextureAspect;
26
+ mipLevel?: number;
27
+ origin?: WgpuOrigin3D;
28
+ texture: WgpuTexture;
29
+ }
30
+ export interface WgpuTexture {
31
+ readonly dimension: WgpuTextureDimension;
32
+ readonly format: WgpuTextureFormat;
33
+ readonly height: number;
34
+ readonly width: number;
35
+ createView(descriptor?: Readonly<WgpuTextureViewDescriptor>): WgpuTextureView;
36
+ destroy(): void;
37
+ }
38
+ export type WgpuTextureAspect = 'all' | 'depth-only' | 'stencil-only';
39
+ export interface WgpuTextureDescriptor {
40
+ dimension?: WgpuTextureDimension;
41
+ format: WgpuTextureFormat;
42
+ label?: string;
43
+ mipLevelCount?: number;
44
+ sampleCount?: number;
45
+ size: WgpuExtent3D;
46
+ textureBindingViewDimension?: WgpuTextureViewDimension;
47
+ usage: number;
48
+ viewFormats?: readonly WgpuTextureFormat[];
49
+ }
50
+ export type WgpuTextureDimension = '1d' | '2d' | '3d';
51
+ export declare const WgpuTextureUsage: {
52
+ readonly COPY_DST: 2;
53
+ readonly COPY_SRC: 1;
54
+ readonly RENDER_ATTACHMENT: 16;
55
+ readonly STORAGE_BINDING: 8;
56
+ readonly TEXTURE_BINDING: 4;
57
+ };
58
+ //# sourceMappingURL=WgpuTexture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTexture.d.ts","sourceRoot":"","sources":["../../src/types/WgpuTexture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEjH,MAAM,MAAM,YAAY,GAAG,SAAS,MAAM,EAAE,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,MAAM,EAAE,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC/B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,uBAAwB,SA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CAAI;aACd,QAAQ,EAAE,CAAI;aACd,iBAAiB,EAAE,EAAI;aACvB,eAAe,EAAE,CAAI;aACrB,eAAe,EAAE,CAAI;CACb,CAAC"}
@@ -0,0 +1,9 @@
1
+ // Usage flags a texture is created with, combined with `|`. The numeric values are WGPU's own.
2
+ export const WgpuTextureUsage = {
3
+ COPY_DST: 0x02,
4
+ COPY_SRC: 0x01,
5
+ RENDER_ATTACHMENT: 0x10,
6
+ STORAGE_BINDING: 0x08,
7
+ TEXTURE_BINDING: 0x04,
8
+ };
9
+ //# sourceMappingURL=WgpuTexture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTexture.js","sourceRoot":"","sources":["../../src/types/WgpuTexture.ts"],"names":[],"mappings":"AA8DA,+FAA+F;AAC/F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,IAAI;IACrB,eAAe,EAAE,IAAI;CACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type WgpuTextureFormat = 'astc-10x10-unorm' | 'astc-10x10-unorm-srgb' | 'astc-10x5-unorm' | 'astc-10x5-unorm-srgb' | 'astc-10x6-unorm' | 'astc-10x6-unorm-srgb' | 'astc-10x8-unorm' | 'astc-10x8-unorm-srgb' | 'astc-12x10-unorm' | 'astc-12x10-unorm-srgb' | 'astc-12x12-unorm' | 'astc-12x12-unorm-srgb' | 'astc-4x4-unorm' | 'astc-4x4-unorm-srgb' | 'astc-5x4-unorm' | 'astc-5x4-unorm-srgb' | 'astc-5x5-unorm' | 'astc-5x5-unorm-srgb' | 'astc-6x5-unorm' | 'astc-6x5-unorm-srgb' | 'astc-6x6-unorm' | 'astc-6x6-unorm-srgb' | 'astc-8x5-unorm' | 'astc-8x5-unorm-srgb' | 'astc-8x6-unorm' | 'astc-8x6-unorm-srgb' | 'astc-8x8-unorm' | 'astc-8x8-unorm-srgb' | 'bc1-rgba-unorm' | 'bc1-rgba-unorm-srgb' | 'bc2-rgba-unorm' | 'bc2-rgba-unorm-srgb' | 'bc3-rgba-unorm' | 'bc3-rgba-unorm-srgb' | 'bc4-r-snorm' | 'bc4-r-unorm' | 'bc5-rg-snorm' | 'bc5-rg-unorm' | 'bc6h-rgb-float' | 'bc6h-rgb-ufloat' | 'bc7-rgba-unorm' | 'bc7-rgba-unorm-srgb' | 'bgra8unorm' | 'bgra8unorm-srgb' | 'depth16unorm' | 'depth24plus' | 'depth24plus-stencil8' | 'depth32float' | 'depth32float-stencil8' | 'eac-r11snorm' | 'eac-r11unorm' | 'eac-rg11snorm' | 'eac-rg11unorm' | 'etc2-rgb8a1unorm' | 'etc2-rgb8a1unorm-srgb' | 'etc2-rgb8unorm' | 'etc2-rgb8unorm-srgb' | 'etc2-rgba8unorm' | 'etc2-rgba8unorm-srgb' | 'r16float' | 'r16sint' | 'r16snorm' | 'r16uint' | 'r16unorm' | 'r32float' | 'r32sint' | 'r32uint' | 'r8sint' | 'r8snorm' | 'r8uint' | 'r8unorm' | 'rg11b10ufloat' | 'rg16float' | 'rg16sint' | 'rg16snorm' | 'rg16uint' | 'rg16unorm' | 'rg32float' | 'rg32sint' | 'rg32uint' | 'rg8sint' | 'rg8snorm' | 'rg8uint' | 'rg8unorm' | 'rgb10a2uint' | 'rgb10a2unorm' | 'rgb9e5ufloat' | 'rgba16float' | 'rgba16sint' | 'rgba16snorm' | 'rgba16uint' | 'rgba16unorm' | 'rgba32float' | 'rgba32sint' | 'rgba32uint' | 'rgba8sint' | 'rgba8snorm' | 'rgba8uint' | 'rgba8unorm' | 'rgba8unorm-srgb' | 'stencil8';
2
+ //# sourceMappingURL=WgpuTextureFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTextureFormat.d.ts","sourceRoot":"","sources":["../../src/types/WgpuTextureFormat.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GACzB,kBAAkB,GAClB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,GACZ,iBAAiB,GACjB,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuTextureFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTextureFormat.js","sourceRoot":"","sources":["../../src/types/WgpuTextureFormat.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { TextureColorSpace, TextureLike } from '@flighthq/texture/contract';
2
+ import type { WgpuRenderState, WgpuTextureEntry } from './WgpuRenderState.ts';
3
+ export type WgpuTextureResolver = (state: WgpuRenderState, texture: Readonly<TextureLike>, premultiply: boolean, colorSpace: TextureColorSpace) => WgpuTextureEntry | null;
4
+ //# sourceMappingURL=WgpuTextureResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTextureResolver.d.ts","sourceRoot":"","sources":["../../src/types/WgpuTextureResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAI9E,MAAM,MAAM,mBAAmB,GAAG,CAChC,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC,EAC9B,WAAW,EAAE,OAAO,EACpB,UAAU,EAAE,iBAAiB,KAC1B,gBAAgB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuTextureResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTextureResolver.js","sourceRoot":"","sources":["../../src/types/WgpuTextureResolver.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import type { WgpuTextureAspect } from './WgpuTexture.ts';
2
+ import type { WgpuTextureFormat } from './WgpuTextureFormat.ts';
3
+ export type WgpuTextureView = GPUTextureView;
4
+ export interface WgpuTextureViewDescriptor {
5
+ arrayLayerCount?: number;
6
+ aspect?: WgpuTextureAspect;
7
+ baseArrayLayer?: number;
8
+ baseMipLevel?: number;
9
+ dimension?: WgpuTextureViewDimension;
10
+ format?: WgpuTextureFormat;
11
+ label?: string;
12
+ mipLevelCount?: number;
13
+ usage?: number;
14
+ }
15
+ export type WgpuTextureViewDimension = '1d' | '2d' | '2d-array' | '3d' | 'cube' | 'cube-array';
16
+ //# sourceMappingURL=WgpuTextureView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTextureView.d.ts","sourceRoot":"","sources":["../../src/types/WgpuTextureView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC;AAE7C,MAAM,WAAW,yBAAyB;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,wBAAwB,GAAG,IAAI,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuTextureView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuTextureView.js","sourceRoot":"","sources":["../../src/types/WgpuTextureView.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { PlatformEndianness } from '@flighthq/platform/contract';
2
+ export type WgpuUniformEndiannessStatus = 'unvalidated' | 'validated';
3
+ export interface WgpuUniformEndiannessExplanation {
4
+ endianness: PlatformEndianness;
5
+ status: WgpuUniformEndiannessStatus;
6
+ }
7
+ //# sourceMappingURL=WgpuUniformEndianness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuUniformEndianness.d.ts","sourceRoot":"","sources":["../../src/types/WgpuUniformEndianness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,MAAM,2BAA2B,GAAG,aAAa,GAAG,WAAW,CAAC;AAEtE,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,MAAM,EAAE,2BAA2B,CAAC;CACrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuUniformEndianness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuUniformEndianness.js","sourceRoot":"","sources":["../../src/types/WgpuUniformEndianness.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { VelocityField } from '@flighthq/velocity/contract';
2
+ import type { WgpuRenderState } from './WgpuRenderState.ts';
3
+ export interface WgpuVelocityContext {
4
+ state: WgpuRenderState;
5
+ field: VelocityField;
6
+ width: number;
7
+ height: number;
8
+ pixelRatio: number;
9
+ }
10
+ export type WgpuVelocityWriter = (ctx: Readonly<WgpuVelocityContext>, node: object) => void;
11
+ //# sourceMappingURL=WgpuVelocityWriter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuVelocityWriter.d.ts","sourceRoot":"","sources":["../../src/types/WgpuVelocityWriter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAS5D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WgpuVelocityWriter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WgpuVelocityWriter.js","sourceRoot":"","sources":["../../src/types/WgpuVelocityWriter.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
- import type { WgpuAdapterCapabilities } from '@flighthq/types/contract';
2
- export declare function getWgpuAdapterCapabilities(adapter: GPUAdapter): WgpuAdapterCapabilities;
1
+ import type { WgpuAdapter, WgpuAdapterCapabilities } from './contract.render-wgpu-types.ts';
2
+ export declare function getWgpuAdapterCapabilities(adapter: WgpuAdapter): WgpuAdapterCapabilities;
3
3
  //# sourceMappingURL=wgpuAdapterCapabilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wgpuAdapterCapabilities.d.ts","sourceRoot":"","sources":["../src/wgpuAdapterCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AASxE,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,UAAU,GAAG,uBAAuB,CAwBvF"}
1
+ {"version":3,"file":"wgpuAdapterCapabilities.d.ts","sourceRoot":"","sources":["../src/wgpuAdapterCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAS5F,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,WAAW,GAAG,uBAAuB,CAwBxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"wgpuAdapterCapabilities.js","sourceRoot":"","sources":["../src/wgpuAdapterCapabilities.ts"],"names":[],"mappings":"AAEA,+FAA+F;AAC/F,8FAA8F;AAC9F,6FAA6F;AAC7F,EAAE;AACF,8FAA8F;AAC9F,gGAAgG;AAChG,wCAAwC;AACxC,MAAM,UAAU,0BAA0B,CAAC,OAAmB;IAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE9B,qFAAqF;IACrF,MAAM,yBAAyB,GAAG,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAErE,8EAA8E;IAC9E,MAAM,sBAAsB,GAAG,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAE/D,wFAAwF;IACxF,MAAM,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,IAAI,IAAI,CAAC;IAEnE,2FAA2F;IAC3F,0FAA0F;IAC1F,4EAA4E;IAC5E,MAAM,cAAc,GAAG,CAAC,CAAC;IAEzB,OAAO;QACL,cAAc;QACd,qBAAqB;QACrB,yBAAyB;QACzB,sBAAsB;KACvB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"wgpuAdapterCapabilities.js","sourceRoot":"","sources":["../src/wgpuAdapterCapabilities.ts"],"names":[],"mappings":"AAEA,+FAA+F;AAC/F,8FAA8F;AAC9F,6FAA6F;AAC7F,EAAE;AACF,8FAA8F;AAC9F,gGAAgG;AAChG,wCAAwC;AACxC,MAAM,UAAU,0BAA0B,CAAC,OAAoB;IAC7D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE9B,qFAAqF;IACrF,MAAM,yBAAyB,GAAG,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAErE,8EAA8E;IAC9E,MAAM,sBAAsB,GAAG,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAE/D,wFAAwF;IACxF,MAAM,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,IAAI,IAAI,CAAC;IAEnE,2FAA2F;IAC3F,0FAA0F;IAC1F,4EAA4E;IAC5E,MAAM,cAAc,GAAG,CAAC,CAAC;IAEzB,OAAO;QACL,cAAc;QACd,qBAAqB;QACrB,yBAAyB;QACzB,sBAAsB;KACvB,CAAC;AACJ,CAAC"}
@@ -1,8 +1,10 @@
1
- import type { TextureColorSpace, TextureContainer, TextureContainerFormat, WgpuCompressedTextureDecoder, WgpuCompressedTextureSupport, WgpuRenderState } from '@flighthq/types/contract';
2
- export declare function detectWgpuCompressedTextureSupport(device: GPUDevice): WgpuCompressedTextureSupport;
3
- export declare function getWgpuCompressedTextureFormat(device: GPUDevice, format: TextureContainerFormat): GPUTextureFormat | null;
1
+ import type { TextureContainer, TextureContainerFormat } from '@flighthq/texture-formats/contract';
2
+ import type { TextureColorSpace } from '@flighthq/texture/contract';
3
+ import type { WgpuCompressedTextureDecoder, WgpuCompressedTextureSupport, WgpuDevice, WgpuRenderState, WgpuTexture, WgpuTextureFormat } from './contract.render-wgpu-types.ts';
4
+ export declare function detectWgpuCompressedTextureSupport(device: WgpuDevice): WgpuCompressedTextureSupport;
5
+ export declare function getWgpuCompressedTextureFormat(device: WgpuDevice, format: TextureContainerFormat): WgpuTextureFormat | null;
4
6
  export declare function hasWgpuCompressedTextureFormat(support: Readonly<WgpuCompressedTextureSupport>, format: TextureContainerFormat): boolean;
5
7
  export declare function registerWgpuCompressedTextureDecoder(state: WgpuRenderState, decode: WgpuCompressedTextureDecoder | null): void;
6
- export declare function registerWgpuCompressedTextureUpload(state: WgpuRenderState, uploader?: null): void;
7
- export declare function uploadWgpuCompressedTextureContainer(state: WgpuRenderState, container: Readonly<TextureContainer>, payload: Readonly<Uint8Array>, decode?: WgpuCompressedTextureDecoder, colorSpace?: TextureColorSpace): GPUTexture | null;
8
+ export declare function registerWgpuCompressedTextureUpload(state: WgpuRenderState, enabled: boolean): void;
9
+ export declare function uploadWgpuCompressedTextureContainer(state: WgpuRenderState, container: Readonly<TextureContainer>, payload: Readonly<Uint8Array>, decode?: WgpuCompressedTextureDecoder, colorSpace?: TextureColorSpace): WgpuTexture | null;
8
10
  //# sourceMappingURL=wgpuCompressedTexture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wgpuCompressedTexture.d.ts","sourceRoot":"","sources":["../src/wgpuCompressedTexture.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,EAC5B,4BAA4B,EAC5B,eAAe,EAEhB,MAAM,0BAA0B,CAAC;AAYlC,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,SAAS,GAAG,4BAA4B,CAMlG;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,sBAAsB,GAC7B,gBAAgB,GAAG,IAAI,CAOzB;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,QAAQ,CAAC,4BAA4B,CAAC,EAC/C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAKT;AAmBD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,4BAA4B,GAAG,IAAI,GAC1C,IAAI,CAON;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAOjG;AAMD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,eAAe,EACtB,SAAS,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACrC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC7B,MAAM,CAAC,EAAE,4BAA4B,EACrC,UAAU,CAAC,EAAE,iBAAiB,GAC7B,UAAU,GAAG,IAAI,CAoEnB"}
1
+ {"version":3,"file":"wgpuCompressedTexture.d.ts","sourceRoot":"","sources":["../src/wgpuCompressedTexture.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,OAAO,KAAK,EACV,4BAA4B,EAC5B,4BAA4B,EAC5B,UAAU,EACV,eAAe,EACf,WAAW,EAEX,iBAAiB,EAClB,MAAM,iCAAiC,CAAC;AAWzC,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,UAAU,GAAG,4BAA4B,CAMnG;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,sBAAsB,GAC7B,iBAAiB,GAAG,IAAI,CAO1B;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,QAAQ,CAAC,4BAA4B,CAAC,EAC/C,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAKT;AAmBD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,4BAA4B,GAAG,IAAI,GAC1C,IAAI,CAGN;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAGlG;AAMD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,eAAe,EACtB,SAAS,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EACrC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC7B,MAAM,CAAC,EAAE,4BAA4B,EACrC,UAAU,CAAC,EAAE,iBAAiB,GAC7B,WAAW,GAAG,IAAI,CAoEpB"}
@@ -1,6 +1,6 @@
1
- import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
2
- import { RegistryEntryState } from '@flighthq/types/contract';
3
- import { getWgpuRenderStateDeviceResources, getWgpuRenderStateRuntime } from './wgpuRenderState';
1
+ import { allocateEntity } from '@flighthq/entity/contract';
2
+ import { WgpuTextureUsage } from './contract.render-wgpu-types.js';
3
+ import { getWgpuRenderStateDeviceResources, getWgpuRenderStateRuntime } from './wgpuRenderState.js';
4
4
  export function detectWgpuCompressedTextureSupport(device) {
5
5
  return {
6
6
  astc: device.features.has('texture-compression-astc'),
@@ -38,19 +38,11 @@ function initializeWgpuTextureEntry(out, bindings, mipLevelCount, sampler, strai
38
38
  }
39
39
  export function registerWgpuCompressedTextureDecoder(state, decode) {
40
40
  const runtime = getWgpuRenderStateRuntime(state);
41
- const table = runtime.registries.compressedTextureDecoder;
42
- runtime.registries.compressedTextureDecoder = {
43
- ...table,
44
- entry: decode === null ? null : { state: RegistryEntryState.Bound, value: decode },
45
- };
41
+ runtime.registries.compressedTextureDecoder = decode;
46
42
  }
47
- export function registerWgpuCompressedTextureUpload(state, uploader) {
43
+ export function registerWgpuCompressedTextureUpload(state, enabled) {
48
44
  const runtime = getWgpuRenderStateRuntime(state);
49
- const table = runtime.registries.compressedTextureUpload;
50
- runtime.registries.compressedTextureUpload = {
51
- ...table,
52
- entry: uploader === null ? null : { state: RegistryEntryState.Bound, value: uploadWgpuCompressedImage },
53
- };
45
+ runtime.registries.compressedTextureUpload = enabled ? uploadWgpuCompressedImage : null;
54
46
  }
55
47
  // Creates and fills a WebGPU texture from a parsed block-compressed container. Native uploads cover
56
48
  // 2D, cubemap, and 2D-array shapes; the RGBA fallback intentionally covers plain 2D only, matching GL.
@@ -72,7 +64,7 @@ export function uploadWgpuCompressedTextureContainer(state, container, payload,
72
64
  size: [container.width, container.height, container.layers * container.faces],
73
65
  format: native,
74
66
  mipLevelCount: container.mipLevels,
75
- usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING,
67
+ usage: WgpuTextureUsage.COPY_DST | WgpuTextureUsage.TEXTURE_BINDING,
76
68
  });
77
69
  for (let flat = 0; flat < container.levels.length; flat++) {
78
70
  const level = container.levels[flat];
@@ -105,7 +97,7 @@ export function uploadWgpuCompressedTextureContainer(state, container, payload,
105
97
  size: [container.width, container.height, 1],
106
98
  format: colorSpace === 'srgb' ? 'rgba8unorm-srgb' : 'rgba8unorm',
107
99
  mipLevelCount: container.mipLevels,
108
- usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING,
100
+ usage: WgpuTextureUsage.COPY_DST | WgpuTextureUsage.TEXTURE_BINDING,
109
101
  });
110
102
  for (let mipLevel = 0; mipLevel < container.levels.length; mipLevel++) {
111
103
  const level = container.levels[mipLevel];
@@ -133,10 +125,10 @@ function uploadWgpuCompressedImage(state, image, decode, colorSpace = 'linear')
133
125
  const sampler = state.allowSmoothing ? resources.linearSampler : resources.nearestSampler;
134
126
  const out = allocateEntity();
135
127
  initializeWgpuTextureEntry(out, new Map(), container.mipLevels, sampler, native, texture, view);
136
- return finishEntity(out);
128
+ return out;
137
129
  }
138
130
  function premultiplyRgba8(data) {
139
- const out = new Uint8ClampedArray(data.length);
131
+ const out = new Uint8Array(data.length);
140
132
  for (let i = 0; i < data.length; i += 4) {
141
133
  const alpha = data[i + 3];
142
134
  out[i] = (data[i] * alpha) / 255;