melonjs 20.3.0 → 20.5.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 (454) hide show
  1. package/README.md +19 -19
  2. package/build/application/application.d.ts +0 -17
  3. package/build/application/application.d.ts.map +1 -1
  4. package/build/application/settings.d.ts +3 -0
  5. package/build/application/settings.d.ts.map +1 -1
  6. package/build/audio/audio.d.ts.map +1 -1
  7. package/build/audio/backend/engine.d.ts +0 -19
  8. package/build/audio/backend/engine.d.ts.map +1 -1
  9. package/build/audio/backend/sound.d.ts +1 -51
  10. package/build/audio/backend/sound.d.ts.map +1 -1
  11. package/build/audio/backend/spatial.d.ts.map +1 -1
  12. package/build/audio/backend/types.d.ts +11 -1
  13. package/build/audio/backend/types.d.ts.map +1 -1
  14. package/build/audio/backend/voice.d.ts +0 -25
  15. package/build/audio/backend/voice.d.ts.map +1 -1
  16. package/build/audio/playback.d.ts.map +1 -1
  17. package/build/audio/procedural.d.ts +7 -2
  18. package/build/audio/procedural.d.ts.map +1 -1
  19. package/build/audio/state.d.ts +6 -79
  20. package/build/audio/state.d.ts.map +1 -1
  21. package/build/audio/types.d.ts +22 -0
  22. package/build/audio/types.d.ts.map +1 -1
  23. package/build/camera/camera2d.d.ts +28 -68
  24. package/build/camera/camera2d.d.ts.map +1 -1
  25. package/build/camera/camera3d.d.ts +110 -82
  26. package/build/camera/camera3d.d.ts.map +1 -1
  27. package/build/camera/effects/fade_effect.d.ts +0 -5
  28. package/build/camera/effects/fade_effect.d.ts.map +1 -1
  29. package/build/camera/effects/mask_effect.d.ts +0 -5
  30. package/build/camera/effects/mask_effect.d.ts.map +1 -1
  31. package/build/camera/fog.d.ts +118 -0
  32. package/build/camera/fog.d.ts.map +1 -0
  33. package/build/geometries/box3d.d.ts +0 -28
  34. package/build/geometries/box3d.d.ts.map +1 -1
  35. package/build/geometries/ellipse.d.ts +0 -20
  36. package/build/geometries/ellipse.d.ts.map +1 -1
  37. package/build/geometries/observablePoint.d.ts +0 -3
  38. package/build/geometries/observablePoint.d.ts.map +1 -1
  39. package/build/geometries/path2d.d.ts +0 -19
  40. package/build/geometries/path2d.d.ts.map +1 -1
  41. package/build/geometries/polygon.d.ts +7 -13
  42. package/build/geometries/polygon.d.ts.map +1 -1
  43. package/build/geometries/roundrect.d.ts +0 -18
  44. package/build/geometries/roundrect.d.ts.map +1 -1
  45. package/build/geometries/sphere.d.ts +0 -9
  46. package/build/geometries/sphere.d.ts.map +1 -1
  47. package/build/geometries/toarccanvas.d.ts.map +1 -1
  48. package/build/index.d.ts +5 -0
  49. package/build/index.d.ts.map +1 -1
  50. package/build/index.js +3697 -563
  51. package/build/index.js.map +4 -4
  52. package/build/input/gamepad.d.ts.map +1 -1
  53. package/build/input/pointer.d.ts +0 -4
  54. package/build/input/pointer.d.ts.map +1 -1
  55. package/build/input/pointerevent.d.ts +0 -6
  56. package/build/input/pointerevent.d.ts.map +1 -1
  57. package/build/lang/deprecated.d.ts.map +1 -1
  58. package/build/level/gltf/GLTFModel.d.ts +44 -82
  59. package/build/level/gltf/GLTFModel.d.ts.map +1 -1
  60. package/build/level/gltf/GLTFScene.d.ts +1 -44
  61. package/build/level/gltf/GLTFScene.d.ts.map +1 -1
  62. package/build/level/gltf/gltf_sampler.d.ts +1 -48
  63. package/build/level/gltf/gltf_sampler.d.ts.map +1 -1
  64. package/build/level/level.d.ts +195 -113
  65. package/build/level/level.d.ts.map +1 -1
  66. package/build/level/tiled/TMXGroup.d.ts +1 -65
  67. package/build/level/tiled/TMXGroup.d.ts.map +1 -1
  68. package/build/level/tiled/TMXLayer.d.ts +0 -44
  69. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  70. package/build/level/tiled/TMXObject.d.ts +1 -136
  71. package/build/level/tiled/TMXObject.d.ts.map +1 -1
  72. package/build/level/tiled/TMXObjectFactory.d.ts +1 -40
  73. package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
  74. package/build/level/tiled/TMXTile.d.ts +1 -30
  75. package/build/level/tiled/TMXTile.d.ts.map +1 -1
  76. package/build/level/tiled/TMXTileMap.d.ts +0 -10
  77. package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
  78. package/build/level/tiled/TMXTileset.d.ts +0 -113
  79. package/build/level/tiled/TMXTileset.d.ts.map +1 -1
  80. package/build/level/tiled/TMXTilesetGroup.d.ts +0 -1
  81. package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
  82. package/build/level/tiled/TMXUtils.d.ts +1 -43
  83. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  84. package/build/level/tiled/factories/shape.d.ts +1 -7
  85. package/build/level/tiled/factories/shape.d.ts.map +1 -1
  86. package/build/level/tiled/factories/text.d.ts +1 -7
  87. package/build/level/tiled/factories/text.d.ts.map +1 -1
  88. package/build/level/tiled/factories/tile.d.ts +1 -7
  89. package/build/level/tiled/factories/tile.d.ts.map +1 -1
  90. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +0 -60
  91. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
  92. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +0 -42
  93. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
  94. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +0 -5
  95. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
  96. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +0 -31
  97. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
  98. package/build/level/tiled/renderer/TMXRenderer.d.ts +2 -2
  99. package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
  100. package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
  101. package/build/level/tiled/renderer/autodetect.d.ts +1 -6
  102. package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
  103. package/build/lighting/light2d.d.ts +0 -25
  104. package/build/lighting/light2d.d.ts.map +1 -1
  105. package/build/lighting/light3d.d.ts +20 -63
  106. package/build/lighting/light3d.d.ts.map +1 -1
  107. package/build/loader/loader.d.ts +146 -37
  108. package/build/loader/loader.d.ts.map +1 -1
  109. package/build/loader/loadingscreen.d.ts +0 -33
  110. package/build/loader/loadingscreen.d.ts.map +1 -1
  111. package/build/loader/parsers/aseprite.d.ts +0 -13
  112. package/build/loader/parsers/aseprite.d.ts.map +1 -1
  113. package/build/loader/parsers/audio.d.ts +1 -30
  114. package/build/loader/parsers/audio.d.ts.map +1 -1
  115. package/build/loader/parsers/binary.d.ts +1 -10
  116. package/build/loader/parsers/binary.d.ts.map +1 -1
  117. package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
  118. package/build/loader/parsers/compressed_textures/parseDDS.d.ts +1 -7
  119. package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
  120. package/build/loader/parsers/compressed_textures/parseKTX.d.ts +1 -7
  121. package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
  122. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +1 -7
  123. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
  124. package/build/loader/parsers/compressed_textures/parsePKM.d.ts +1 -7
  125. package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
  126. package/build/loader/parsers/compressed_textures/parsePVR.d.ts +1 -7
  127. package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
  128. package/build/loader/parsers/fontface.d.ts +1 -13
  129. package/build/loader/parsers/fontface.d.ts.map +1 -1
  130. package/build/loader/parsers/gltf.d.ts +1 -70
  131. package/build/loader/parsers/gltf.d.ts.map +1 -1
  132. package/build/loader/parsers/image.d.ts +1 -22
  133. package/build/loader/parsers/image.d.ts.map +1 -1
  134. package/build/loader/parsers/json.d.ts +1 -10
  135. package/build/loader/parsers/json.d.ts.map +1 -1
  136. package/build/loader/parsers/mtl.d.ts +1 -28
  137. package/build/loader/parsers/mtl.d.ts.map +1 -1
  138. package/build/loader/parsers/obj.d.ts +1 -59
  139. package/build/loader/parsers/obj.d.ts.map +1 -1
  140. package/build/loader/parsers/pbr.d.ts +1 -62
  141. package/build/loader/parsers/pbr.d.ts.map +1 -1
  142. package/build/loader/parsers/script.d.ts +1 -10
  143. package/build/loader/parsers/script.d.ts.map +1 -1
  144. package/build/loader/parsers/shader.d.ts +1 -52
  145. package/build/loader/parsers/shader.d.ts.map +1 -1
  146. package/build/loader/parsers/tmx.d.ts +1 -10
  147. package/build/loader/parsers/tmx.d.ts.map +1 -1
  148. package/build/loader/parsers/video.d.ts +1 -10
  149. package/build/loader/parsers/video.d.ts.map +1 -1
  150. package/build/math/color.d.ts.map +1 -1
  151. package/build/math/noise.d.ts +0 -40
  152. package/build/math/noise.d.ts.map +1 -1
  153. package/build/math/observableVector2d.d.ts +0 -3
  154. package/build/math/observableVector2d.d.ts.map +1 -1
  155. package/build/math/observableVector3d.d.ts +0 -3
  156. package/build/math/observableVector3d.d.ts.map +1 -1
  157. package/build/math/vector2d.d.ts +0 -6
  158. package/build/math/vector2d.d.ts.map +1 -1
  159. package/build/math/vertex.d.ts +25 -0
  160. package/build/math/vertex.d.ts.map +1 -1
  161. package/build/particles/emitter.d.ts +0 -65
  162. package/build/particles/emitter.d.ts.map +1 -1
  163. package/build/particles/particle.d.ts +0 -81
  164. package/build/particles/particle.d.ts.map +1 -1
  165. package/build/physics/bounds.d.ts +0 -1
  166. package/build/physics/bounds.d.ts.map +1 -1
  167. package/build/physics/broadphase/broadphase.d.ts +0 -7
  168. package/build/physics/broadphase/broadphase.d.ts.map +1 -1
  169. package/build/physics/broadphase/octree.d.ts +0 -91
  170. package/build/physics/broadphase/octree.d.ts.map +1 -1
  171. package/build/physics/broadphase/quadtree.d.ts +0 -47
  172. package/build/physics/broadphase/quadtree.d.ts.map +1 -1
  173. package/build/physics/builtin/body.d.ts +2 -65
  174. package/build/physics/builtin/body.d.ts.map +1 -1
  175. package/build/physics/builtin/detector.d.ts +0 -312
  176. package/build/physics/builtin/detector.d.ts.map +1 -1
  177. package/build/physics/builtin/sat.d.ts +1 -48
  178. package/build/physics/builtin/sat.d.ts.map +1 -1
  179. package/build/physics/builtin/sat3d.d.ts +1 -56
  180. package/build/physics/builtin/sat3d.d.ts.map +1 -1
  181. package/build/physics/collision.d.ts +0 -2
  182. package/build/physics/collision.d.ts.map +1 -1
  183. package/build/physics/response.d.ts +0 -1
  184. package/build/physics/response.d.ts.map +1 -1
  185. package/build/physics/world.d.ts.map +1 -1
  186. package/build/renderable/anchorPoint.d.ts +1 -73
  187. package/build/renderable/anchorPoint.d.ts.map +1 -1
  188. package/build/renderable/animation.d.ts +21 -13
  189. package/build/renderable/animation.d.ts.map +1 -1
  190. package/build/renderable/colorlayer.d.ts +0 -5
  191. package/build/renderable/colorlayer.d.ts.map +1 -1
  192. package/build/renderable/container.d.ts +27 -60
  193. package/build/renderable/container.d.ts.map +1 -1
  194. package/build/renderable/draggable.d.ts +0 -5
  195. package/build/renderable/draggable.d.ts.map +1 -1
  196. package/build/renderable/dragndrop.d.ts +1 -12
  197. package/build/renderable/dragndrop.d.ts.map +1 -1
  198. package/build/renderable/entity/entity.d.ts +0 -8
  199. package/build/renderable/entity/entity.d.ts.map +1 -1
  200. package/build/renderable/frameAnimation.d.ts +0 -41
  201. package/build/renderable/frameAnimation.d.ts.map +1 -1
  202. package/build/renderable/groundshadow.d.ts +1 -91
  203. package/build/renderable/groundshadow.d.ts.map +1 -1
  204. package/build/renderable/imagelayer.d.ts +0 -29
  205. package/build/renderable/imagelayer.d.ts.map +1 -1
  206. package/build/renderable/instanced_mesh.d.ts +55 -108
  207. package/build/renderable/instanced_mesh.d.ts.map +1 -1
  208. package/build/renderable/mesh.d.ts +257 -231
  209. package/build/renderable/mesh.d.ts.map +1 -1
  210. package/build/renderable/nineslicesprite.d.ts +0 -4
  211. package/build/renderable/nineslicesprite.d.ts.map +1 -1
  212. package/build/renderable/renderable.d.ts +18 -44
  213. package/build/renderable/renderable.d.ts.map +1 -1
  214. package/build/renderable/sprite.d.ts +0 -45
  215. package/build/renderable/sprite.d.ts.map +1 -1
  216. package/build/renderable/sprite3d.d.ts +12 -97
  217. package/build/renderable/sprite3d.d.ts.map +1 -1
  218. package/build/renderable/text/bitmaptext.d.ts +32 -21
  219. package/build/renderable/text/bitmaptext.d.ts.map +1 -1
  220. package/build/renderable/text/bitmaptextdata.d.ts +0 -22
  221. package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
  222. package/build/renderable/text/glyph.d.ts +1 -39
  223. package/build/renderable/text/glyph.d.ts.map +1 -1
  224. package/build/renderable/text/text.d.ts +75 -20
  225. package/build/renderable/text/text.d.ts.map +1 -1
  226. package/build/renderable/text/textmetrics.d.ts +2 -0
  227. package/build/renderable/text/textmetrics.d.ts.map +1 -1
  228. package/build/renderable/text/textstyle.d.ts +1 -5
  229. package/build/renderable/text/textstyle.d.ts.map +1 -1
  230. package/build/renderable/trail.d.ts +0 -29
  231. package/build/renderable/trail.d.ts.map +1 -1
  232. package/build/renderable/trigger.d.ts +0 -6
  233. package/build/renderable/trigger.d.ts.map +1 -1
  234. package/build/renderable/ui/uibaseelement.d.ts +0 -40
  235. package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
  236. package/build/renderable/ui/uispriteelement.d.ts +0 -35
  237. package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
  238. package/build/state/stage.d.ts +5 -50
  239. package/build/state/stage.d.ts.map +1 -1
  240. package/build/state/state.d.ts.map +1 -1
  241. package/build/system/device.d.ts +1 -13
  242. package/build/system/device.d.ts.map +1 -1
  243. package/build/system/dom.d.ts +1 -8
  244. package/build/system/dom.d.ts.map +1 -1
  245. package/build/system/legacy_pool.d.ts +1 -6
  246. package/build/system/legacy_pool.d.ts.map +1 -1
  247. package/build/system/platform.d.ts +0 -1
  248. package/build/system/platform.d.ts.map +1 -1
  249. package/build/system/pool.d.ts +0 -9
  250. package/build/system/pool.d.ts.map +1 -1
  251. package/build/system/save.d.ts +44 -1
  252. package/build/system/save.d.ts.map +1 -1
  253. package/build/system/timer.d.ts +0 -20
  254. package/build/system/timer.d.ts.map +1 -1
  255. package/build/tweens/tween.d.ts +0 -62
  256. package/build/tweens/tween.d.ts.map +1 -1
  257. package/build/utils/array-multimap.d.ts +1 -13
  258. package/build/utils/array-multimap.d.ts.map +1 -1
  259. package/build/utils/decode.d.ts.map +1 -1
  260. package/build/utils/fetchdata.d.ts +1 -31
  261. package/build/utils/fetchdata.d.ts.map +1 -1
  262. package/build/utils/utils.d.ts +0 -13
  263. package/build/utils/utils.d.ts.map +1 -1
  264. package/build/video/blendmodes.d.ts +1 -106
  265. package/build/video/blendmodes.d.ts.map +1 -1
  266. package/build/video/buffer/index.d.ts +1 -39
  267. package/build/video/buffer/index.d.ts.map +1 -1
  268. package/build/video/buffer/vertex.d.ts +1 -82
  269. package/build/video/buffer/vertex.d.ts.map +1 -1
  270. package/build/video/canvas/canvas_renderer.d.ts +2 -23
  271. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  272. package/build/video/canvas_factory.d.ts +1 -24
  273. package/build/video/canvas_factory.d.ts.map +1 -1
  274. package/build/video/effects/blendEffect.d.ts +0 -54
  275. package/build/video/effects/blendEffect.d.ts.map +1 -1
  276. package/build/video/effects/colorMatrix.d.ts +0 -10
  277. package/build/video/effects/colorMatrix.d.ts.map +1 -1
  278. package/build/video/effects/glsl_realization.d.ts +1 -17
  279. package/build/video/effects/glsl_realization.d.ts.map +1 -1
  280. package/build/video/effects/mesh_splice.d.ts +2 -0
  281. package/build/video/effects/mesh_splice.d.ts.map +1 -0
  282. package/build/video/effects/radialGradient.d.ts +0 -1
  283. package/build/video/effects/radialGradient.d.ts.map +1 -1
  284. package/build/video/effects/shadereffect.d.ts +12 -241
  285. package/build/video/effects/shadereffect.d.ts.map +1 -1
  286. package/build/video/effects/wgsl/layout.d.ts +1 -27
  287. package/build/video/effects/wgsl/layout.d.ts.map +1 -1
  288. package/build/video/effects/wgsl/parse.d.ts +1 -8
  289. package/build/video/effects/wgsl/parse.d.ts.map +1 -1
  290. package/build/video/effects/wgsl/scaffold.d.ts +1 -42
  291. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
  292. package/build/video/effects/wgsl_realization.d.ts +1 -82
  293. package/build/video/effects/wgsl_realization.d.ts.map +1 -1
  294. package/build/video/gpu/batcher.d.ts +1 -13
  295. package/build/video/gpu/batcher.d.ts.map +1 -1
  296. package/build/video/gpu/instancerecord.d.ts +1 -163
  297. package/build/video/gpu/instancerecord.d.ts.map +1 -1
  298. package/build/video/gpu/meshchunk.d.ts +1 -48
  299. package/build/video/gpu/meshchunk.d.ts.map +1 -1
  300. package/build/video/gpu/meshvertex.d.ts +1 -53
  301. package/build/video/gpu/meshvertex.d.ts.map +1 -1
  302. package/build/video/gpu/primitives.d.ts +1 -59
  303. package/build/video/gpu/primitives.d.ts.map +1 -1
  304. package/build/video/gpu/quadcorners.d.ts +1 -10
  305. package/build/video/gpu/quadcorners.d.ts.map +1 -1
  306. package/build/video/gpu/textureslots.d.ts +1 -121
  307. package/build/video/gpu/textureslots.d.ts.map +1 -1
  308. package/build/video/gpu/texturestore.d.ts +1 -138
  309. package/build/video/gpu/texturestore.d.ts.map +1 -1
  310. package/build/video/gpu/topology.d.ts.map +1 -1
  311. package/build/video/gpu/vertexformat.d.ts +0 -28
  312. package/build/video/gpu/vertexformat.d.ts.map +1 -1
  313. package/build/video/gradient.d.ts +15 -77
  314. package/build/video/gradient.d.ts.map +1 -1
  315. package/build/video/renderer.d.ts +21 -102
  316. package/build/video/renderer.d.ts.map +1 -1
  317. package/build/video/renderstate.d.ts +0 -51
  318. package/build/video/renderstate.d.ts.map +1 -1
  319. package/build/video/rendertarget/canvasrendertarget.d.ts +0 -10
  320. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  321. package/build/video/rendertarget/render_target_pool.d.ts +1 -82
  322. package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
  323. package/build/video/rendertarget/webglrendertarget.d.ts +1 -64
  324. package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
  325. package/build/video/rendertarget/webgpurendertarget.d.ts +0 -8
  326. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
  327. package/build/video/texture/atlas.d.ts +1 -75
  328. package/build/video/texture/atlas.d.ts.map +1 -1
  329. package/build/video/texture/cache.d.ts +0 -136
  330. package/build/video/texture/cache.d.ts.map +1 -1
  331. package/build/video/texture/frametexture.d.ts +1 -71
  332. package/build/video/texture/frametexture.d.ts.map +1 -1
  333. package/build/video/texture/noise_texture2d.d.ts +101 -77
  334. package/build/video/texture/noise_texture2d.d.ts.map +1 -1
  335. package/build/video/texture/parser/aseprite.d.ts +1 -8
  336. package/build/video/texture/parser/aseprite.d.ts.map +1 -1
  337. package/build/video/texture/parser/spritesheet.d.ts +1 -8
  338. package/build/video/texture/parser/spritesheet.d.ts.map +1 -1
  339. package/build/video/texture/parser/texturepacker.d.ts +1 -8
  340. package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
  341. package/build/video/texture/resource.d.ts +0 -9
  342. package/build/video/texture/resource.d.ts.map +1 -1
  343. package/build/video/texture/texture2d.d.ts +0 -11
  344. package/build/video/texture/texture2d.d.ts.map +1 -1
  345. package/build/video/utils/autodetect.d.ts +1 -5
  346. package/build/video/utils/autodetect.d.ts.map +1 -1
  347. package/build/video/webgl/batchers/batcher.d.ts +0 -55
  348. package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
  349. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +0 -14
  350. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
  351. package/build/video/webgl/batchers/lit_quad_batcher.d.ts +0 -72
  352. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  353. package/build/video/webgl/batchers/material_batcher.d.ts +0 -89
  354. package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
  355. package/build/video/webgl/batchers/mesh_batcher.d.ts +14 -343
  356. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  357. package/build/video/webgl/batchers/primitive_batcher.d.ts +0 -10
  358. package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
  359. package/build/video/webgl/batchers/quad_batcher.d.ts +0 -30
  360. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  361. package/build/video/webgl/buffer/index.d.ts +1 -36
  362. package/build/video/webgl/buffer/index.d.ts.map +1 -1
  363. package/build/video/webgl/buffer/instance_buffer.d.ts +1 -53
  364. package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -1
  365. package/build/video/webgl/buffer/retained_geometry.d.ts +1 -81
  366. package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -1
  367. package/build/video/webgl/buffer/uniformblock.d.ts +1 -80
  368. package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -1
  369. package/build/video/webgl/buffer/vertexstate.d.ts +1 -100
  370. package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -1
  371. package/build/video/webgl/glshader.d.ts +7 -51
  372. package/build/video/webgl/glshader.d.ts.map +1 -1
  373. package/build/video/webgl/lighting/pack3d.d.ts +1 -47
  374. package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
  375. package/build/video/webgl/lighting/std140.d.ts +1 -109
  376. package/build/video/webgl/lighting/std140.d.ts.map +1 -1
  377. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +1 -103
  378. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  379. package/build/video/webgl/shaders/multitexture-lit.d.ts +1 -26
  380. package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
  381. package/build/video/webgl/shaders/multitexture.d.ts +1 -9
  382. package/build/video/webgl/shaders/multitexture.d.ts.map +1 -1
  383. package/build/video/webgl/texture/store.d.ts +1 -50
  384. package/build/video/webgl/texture/store.d.ts.map +1 -1
  385. package/build/video/webgl/utils/attributes.d.ts +1 -11
  386. package/build/video/webgl/utils/attributes.d.ts.map +1 -1
  387. package/build/video/webgl/utils/maxtextures.d.ts +1 -36
  388. package/build/video/webgl/utils/maxtextures.d.ts.map +1 -1
  389. package/build/video/webgl/utils/precision.d.ts +1 -14
  390. package/build/video/webgl/utils/precision.d.ts.map +1 -1
  391. package/build/video/webgl/utils/program.d.ts +1 -5
  392. package/build/video/webgl/utils/program.d.ts.map +1 -1
  393. package/build/video/webgl/utils/samplercache.d.ts +1 -68
  394. package/build/video/webgl/utils/samplercache.d.ts.map +1 -1
  395. package/build/video/webgl/utils/string.d.ts +1 -21
  396. package/build/video/webgl/utils/string.d.ts.map +1 -1
  397. package/build/video/webgl/utils/topology.d.ts +1 -23
  398. package/build/video/webgl/utils/topology.d.ts.map +1 -1
  399. package/build/video/webgl/utils/uniforms.d.ts +1 -25
  400. package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
  401. package/build/video/webgl/utils/vertexformat.d.ts +1 -26
  402. package/build/video/webgl/utils/vertexformat.d.ts.map +1 -1
  403. package/build/video/webgl/webgl_renderer.d.ts +22 -285
  404. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  405. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +0 -6
  406. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -1
  407. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +0 -8
  408. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
  409. package/build/video/webgpu/batchers/mesh_batcher.d.ts +7 -231
  410. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
  411. package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
  412. package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -82
  413. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
  414. package/build/video/webgpu/buffer/arena.d.ts +1 -63
  415. package/build/video/webgpu/buffer/arena.d.ts.map +1 -1
  416. package/build/video/webgpu/buffer/instance_buffer.d.ts +1 -64
  417. package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -1
  418. package/build/video/webgpu/buffer/retained_geometry.d.ts +1 -54
  419. package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -1
  420. package/build/video/webgpu/buffer/uniformring.d.ts +1 -67
  421. package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -1
  422. package/build/video/webgpu/effect_binding.d.ts +1 -16
  423. package/build/video/webgpu/effect_binding.d.ts.map +1 -1
  424. package/build/video/webgpu/pipeline/bindgroups.d.ts +1 -32
  425. package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -1
  426. package/build/video/webgpu/pipeline/cache.d.ts +1 -163
  427. package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
  428. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +1 -87
  429. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  430. package/build/video/webgpu/shaders/mesh-instanced.d.ts +1 -43
  431. package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -1
  432. package/build/video/webgpu/texture/compressed.d.ts +1 -32
  433. package/build/video/webgpu/texture/compressed.d.ts.map +1 -1
  434. package/build/video/webgpu/texture/frametexture.d.ts +1 -62
  435. package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
  436. package/build/video/webgpu/texture/store.d.ts +1 -147
  437. package/build/video/webgpu/texture/store.d.ts.map +1 -1
  438. package/build/video/webgpu/webgpu_renderer.d.ts +1 -88
  439. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  440. package/package.json +5 -4
  441. package/skills/melonjs/SKILL.md +1 -1
  442. package/skills/melonjs-3d/SKILL.md +453 -5
  443. package/skills/melonjs-3d-assets/SKILL.md +164 -6
  444. package/skills/melonjs-audio/SKILL.md +38 -0
  445. package/skills/melonjs-camera-and-drawing/SKILL.md +49 -0
  446. package/skills/melonjs-effects-and-shaders/SKILL.md +95 -2
  447. package/skills/melonjs-loading-assets/SKILL.md +127 -2
  448. package/skills/melonjs-performance/SKILL.md +60 -1
  449. package/skills/melonjs-physics/SKILL.md +78 -0
  450. package/skills/melonjs-renderables/SKILL.md +63 -1
  451. package/skills/melonjs-renderer-backends/SKILL.md +19 -0
  452. package/skills/melonjs-scenes-and-state/SKILL.md +56 -0
  453. package/skills/melonjs-tilemaps/SKILL.md +31 -11
  454. package/skills/melonjs-ui-and-text/SKILL.md +131 -117
@@ -1,68 +1,2 @@
1
- /**
2
- * Per-frame uniform ring — slot-granular bump allocation over persistent
3
- * uniform-buffer pages, with one cached dynamic-offset bind group per page
4
- * and per layout.
5
- *
6
- * This is the WebGPU realization of the "frame globals in one uniform
7
- * buffer, bound once" shape (#1555): projection and line width live in
8
- * group 0, and a *new slot* is pushed whenever either changes mid-frame
9
- * (floating containers swap the projection around their children), so every
10
- * recorded draw keeps the dynamic offset that was current when its vertices
11
- * were queued. The mid-frame `clearColor` pipeline shares the same pages
12
- * through its own layout/bind-group pair.
13
- * @ignore
14
- */
15
- export default class WebGPUUniformRing {
16
- /**
17
- * @param {GPUDevice} device - the device to allocate on
18
- * @param {GPUBindGroupLayout} frameLayout - group-0 layout of the draw pipelines
19
- * @param {GPUBindGroupLayout} clearLayout - group-0 layout of the clear pipeline
20
- */
21
- constructor(device: GPUDevice, frameLayout: GPUBindGroupLayout, clearLayout: GPUBindGroupLayout);
22
- device: GPUDevice;
23
- frameLayout: GPUBindGroupLayout;
24
- clearLayout: GPUBindGroupLayout;
25
- slotSize: number;
26
- slotsPerPage: number;
27
- pageSize: number;
28
- /** @type {{buffer: GPUBuffer, frameGroup: GPUBindGroup, clearGroup: GPUBindGroup}[]} */
29
- pages: {
30
- buffer: GPUBuffer;
31
- frameGroup: GPUBindGroup;
32
- clearGroup: GPUBindGroup;
33
- }[];
34
- slot: number;
35
- scratch: Float32Array<ArrayBuffer>;
36
- /**
37
- * rewind the ring — called once per frame
38
- */
39
- reset(): void;
40
- /**
41
- * Write a frame-globals slot (projection matrix + line width).
42
- * @param {import("../../math/matrix3d.ts").Matrix3d} projection - the projection matrix
43
- * @param {number} lineWidth - current stroke line width
44
- * @returns {{bindGroup: GPUBindGroup, dynamicOffset: number}} the binding for subsequent draws
45
- */
46
- pushFrameGlobals(projection: any, lineWidth: number): {
47
- bindGroup: GPUBindGroup;
48
- dynamicOffset: number;
49
- };
50
- /**
51
- * Write a clear-color slot.
52
- * @param {number} r - red (0..1)
53
- * @param {number} g - green (0..1)
54
- * @param {number} b - blue (0..1)
55
- * @param {number} a - alpha (0..1)
56
- * @returns {{bindGroup: GPUBindGroup, dynamicOffset: number}} the binding for the clear draw
57
- */
58
- pushClearColor(r: number, g: number, b: number, a: number): {
59
- bindGroup: GPUBindGroup;
60
- dynamicOffset: number;
61
- };
62
- /**
63
- * release every page (device loss / renderer destroy)
64
- */
65
- destroy(): void;
66
- #private;
67
- }
1
+
68
2
  //# sourceMappingURL=uniformring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uniformring.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/buffer/uniformring.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH;IACC;;;;OAIG;IACH,oBAJW,SAAS,eACT,kBAAkB,eAClB,kBAAkB,EAiB5B;IAdA,kBAAoB;IACpB,gCAA8B;IAC9B,gCAA8B;IAC9B,iBAGC;IACD,qBAAsB;IACtB,iBAAiD;IACjD,wFAAwF;IACxF,OADW;QAAC,MAAM,EAAE,SAAS,CAAC;QAAC,UAAU,EAAE,YAAY,CAAC;QAAC,UAAU,EAAE,YAAY,CAAA;KAAC,EAAE,CACrE;IACf,aAAa;IAEb,mCAAuD;IAGxD;;OAEG;IACH,cAEC;IAyCD;;;;;OAKG;IACH,6CAHW,MAAM,GACJ;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,CAe5D;IAED;;;;;;;OAOG;IACH,kBANW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,CAiB5D;IAED;;OAEG;IACH,gBAMC;;CACD"}
1
+ {"version":3,"file":"uniformring.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/buffer/uniformring.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;OAIG;IACH,oBAJW,SAAS,eACT,kBAAkB,eAClB,kBAAkB,EAiB5B;IAdA,kBAAoB;IACpB,gCAA8B;IAC9B,gCAA8B;IAC9B,iBAGC;IACD,qBAAsB;IACtB,iBAAiD;IACjD,wFAAwF;IACxF,OADW;QAAC,MAAM,EAAE,SAAS,CAAC;QAAC,UAAU,EAAE,YAAY,CAAC;QAAC,UAAU,EAAE,YAAY,CAAA;KAAC,EAAE,CACrE;IACf,aAAa;IAEb,mCAAuD;IAGxD;;OAEG;IACH,cAEC;IA4CD;;;;;OAKG;IACH,6CAHW,MAAM,GACJ;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,CAe5D;IAED;;;;;;;OAOG;IACH,kBANW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,CAiB5D;IAED;;OAEG;IACH,gBAMC;;CACD"}
@@ -1,17 +1,2 @@
1
- /**
2
- * Prepare an effect for a draw: ensure device state, snapshot the uniform
3
- * mirror(s) into the effect uniform arena, and return the pipeline family
4
- * key plus the group-3 binding for the pass.
5
- * @param {import("./webgpu_renderer.js").default} renderer - the renderer
6
- * @param {import("../effects/shadereffect.js").default} effect - the effect to bind
7
- * @returns {{key: string, hasEffectGroup: boolean, bindGroup: GPUBindGroup|null, dynamicOffsets: number[]}|null}
8
- * the binding, or null when the effect has no WGSL realization
9
- * @ignore
10
- */
11
- export function prepareEffectBinding(renderer: import("./webgpu_renderer.js").default, effect: import("../effects/shadereffect.js").default): {
12
- key: string;
13
- hasEffectGroup: boolean;
14
- bindGroup: GPUBindGroup | null;
15
- dynamicOffsets: number[];
16
- } | null;
1
+
17
2
  //# sourceMappingURL=effect_binding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"effect_binding.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/effect_binding.js"],"names":[],"mappings":"AA6OA;;;;;;;;;GASG;AACH,+CANW,OAAO,sBAAsB,EAAE,OAAO,UACtC,OAAO,4BAA4B,EAAE,OAAO,GAC1C;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,YAAY,GAAC,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,IAAI,CA+I/G"}
1
+ {"version":3,"file":"effect_binding.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/effect_binding.js"],"names":[],"mappings":"AAkPA;;;;;;;;;;GAUG;AACH,+CAPW,OAAO,sBAAsB,EAAE,OAAO,UACtC,OAAO,4BAA4B,EAAE,OAAO,GAC1C;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,YAAY,GAAC,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,IAAI,CAgJ/G"}
@@ -1,36 +1,5 @@
1
- /**
2
- * Frozen bind-group conventions for the WebGPU backend.
3
- *
4
- * WebGPU bind-group indices are a per-pipeline-layout namespace with a hard
5
- * cap of four groups, so — unlike WebGL's context-wide uniform-buffer
6
- * binding points, which the renderer hands out from a monotonic counter
7
- * (`reserveUniformBindingPoint`) — the collision-proofing here is a frozen
8
- * convention: every pipeline in the backend agrees on what each group index
9
- * means, and additions claim the reserved slots below instead of inventing
10
- * their own.
11
- *
12
- * - group 0 — frame globals: one dynamic-offset uniform binding shared by
13
- * every draw (projection matrix + line width), served by the uniform
14
- * ring. The clear pipeline substitutes its own group-0 layout (a bare
15
- * color) over the same ring.
16
- * - group 1 — material: texture view + sampler (quad pipeline).
17
- * - group 2 — reserved: lights (the std140 light block ports here).
18
- * - group 3 — reserved: per-effect extras (ShaderEffect-WGSL, post FX).
19
- * @ignore
20
- */
21
- export const GROUP_FRAME: 0;
1
+
22
2
  export const GROUP_MATERIAL: 1;
23
3
  export const GROUP_LIGHTS: 2;
24
4
  export const GROUP_EFFECT: 3;
25
- /**
26
- * Byte size of the frame-globals uniform block:
27
- * mat4x4<f32> projection (64) + f32 lineWidth (4) + pad to 16 → 80.
28
- * @ignore
29
- */
30
- export const FRAME_UNIFORM_SIZE: 80;
31
- /**
32
- * Byte size of the clear-color uniform block: vec4<f32> → 16.
33
- * @ignore
34
- */
35
- export const CLEAR_UNIFORM_SIZE: 16;
36
5
  //# sourceMappingURL=bindgroups.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bindgroups.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/pipeline/bindgroups.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,0BAA2B,CAAC,CAAC;AAC7B,6BAA8B,CAAC,CAAC;AAChC,2BAA4B,CAAC,CAAC;AAC9B,2BAA4B,CAAC,CAAC;AAE9B;;;;GAIG;AACH,iCAAkC,EAAE,CAAC;AAErC;;;GAGG;AACH,iCAAkC,EAAE,CAAC"}
1
+ {"version":3,"file":"bindgroups.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/pipeline/bindgroups.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,0BAA2B,CAAC,CAAC;AAC7B,6BAA8B,CAAC,CAAC;AAChC,2BAA4B,CAAC,CAAC;AAC9B,2BAA4B,CAAC,CAAC;AAE9B;;;;;GAKG;AACH,iCAAkC,EAAE,CAAC;AAErC;;;;GAIG;AACH,iCAAkC,EAAE,CAAC"}
@@ -1,164 +1,2 @@
1
- /**
2
- * Texture slots per quad draw segment — the quad family batches quads
3
- * across up to this many distinct textures before a flush is forced (the
4
- * GL sampler-ladder equivalent). 8 texture + 8 sampler bindings stays
5
- * comfortably inside WebGPU's base limits (16 sampled textures / 16
6
- * samplers per stage) with headroom for the effect families' samplers.
7
- * @ignore
8
- */
9
- export const MAX_QUAD_TEXTURES: 8;
10
- /**
11
- * The depth-stencil attachment format every pass and every pipeline of this
12
- * backend declares. Attached from day one — masks use the stencil half now,
13
- * meshes will use the depth half — because a pipeline's depthStencil state
14
- * must match the pass attachment, and adding it later would invalidate
15
- * every cached pipeline.
16
- * @ignore
17
- */
18
- export const DEPTH_STENCIL_FORMAT: "depth24plus-stencil8";
19
- /**
20
- * Lazily-built cache of `GPURenderPipeline`s for the WebGPU backend, keyed
21
- * by everything that is pipeline state under WebGPU but dynamic state under
22
- * GL: shader family, topology, blend mode, premultiplied-alpha flag,
23
- * stencil mode (and, held constant today, the canvas format and sample
24
- * count — both stay in the key so render targets and MSAA slot in later
25
- * without a reshape).
26
- *
27
- * Also owns the shader modules, bind-group layouts and pipeline layouts —
28
- * the objects every pipeline shares and the uniform ring / texture store
29
- * build their bind groups against.
30
- * @ignore
31
- */
32
- export default class WebGPUPipelineCache {
33
- /**
34
- * monotonic construction counter backing {@link WebGPUPipelineCache#epoch}
35
- * @ignore
36
- */
37
- static epochCounter: number;
38
- /**
39
- * @param {GPUDevice} device - the device to build pipelines on
40
- * @param {string} format - the canvas color format (preferredFormat)
41
- */
42
- constructor(device: GPUDevice, format: string);
43
- device: GPUDevice;
44
- format: string;
45
- sampleCount: number;
46
- /** @type {Map<string, GPURenderPipeline>} */
47
- pipelines: Map<string, GPURenderPipeline>;
48
- /** @type {Map<string, {stride: number, attributes: object[]}>} */
49
- vertexLayouts: Map<string, {
50
- stride: number;
51
- attributes: object[];
52
- }>;
53
- frameLayout: GPUBindGroupLayout;
54
- clearFrameLayout: GPUBindGroupLayout;
55
- materialLayout: GPUBindGroupLayout;
56
- meshMaterialLayout: GPUBindGroupLayout;
57
- multiMaterialLayout: GPUBindGroupLayout;
58
- modules: {
59
- quad: GPUShaderModule;
60
- blit: GPUShaderModule;
61
- primitive: GPUShaderModule;
62
- clear: GPUShaderModule;
63
- };
64
- pipelineLayouts: {
65
- quad: GPUPipelineLayout;
66
- blit: GPUPipelineLayout;
67
- primitive: GPUPipelineLayout;
68
- clear: GPUPipelineLayout;
69
- };
70
- /** @type {Map<string, string>} moduleText → family key */
71
- registeredModules: Map<string, string>;
72
- modulesBySource: Map<any, any>;
73
- /** @type {Map<string, {stride: number, attributes: object[]}>} family key → vertex-layout alias */
74
- vertexLayoutAliases: Map<string, {
75
- stride: number;
76
- attributes: object[];
77
- }>;
78
- /** @type {Map<string, GPUBindGroupLayout>} shape signature → group-3 layout */
79
- effectLayouts: Map<string, GPUBindGroupLayout>;
80
- emptyLayout: GPUBindGroupLayout;
81
- emptyBindGroup: GPUBindGroup;
82
- /**
83
- * Device generation this cache belongs to — bumped once per cache
84
- * construction. Consumers holding device-scoped objects built
85
- * against this cache (effect modules, bind groups) compare their
86
- * recorded epoch and lazily rebuild after a device loss.
87
- * @type {number}
88
- */
89
- epoch: number;
90
- /**
91
- * Register a shader family beyond the built-in three, routing it through
92
- * the same keyed {@link WebGPUPipelineCache#get} lookup. Identical module
93
- * text registers once — the returned key is stable per text, so clones
94
- * and same-body effects share the module and every pipeline built on it.
95
- * @param {string} code - the complete WGSL module text
96
- * @param {object} [options] - family options
97
- * @param {GPUBindGroupLayout[]} [options.bindGroupLayouts] - full positional
98
- * bind-group-layout list (defaults to `[frameLayout, materialLayout]`)
99
- * @param {string} [options.vertexLayoutKey="quad"] - reuse a registered
100
- * vertex layout under this family (the effect blit rides the quad layout)
101
- * @param {string} [options.label] - debug label for the shader module
102
- * @returns {string} the family key to pass to {@link WebGPUPipelineCache#get}
103
- */
104
- registerShader(code: string, options?: {
105
- bindGroupLayouts?: GPUBindGroupLayout[] | undefined;
106
- vertexLayoutKey?: string | undefined;
107
- label?: string | undefined;
108
- }): string;
109
- /**
110
- * Fetch (building on first use) the group-3 bind-group layout for an
111
- * effect shape. Effects with the same shape — same uniform block size,
112
- * same texture/sampler bindings, same builtins — share one layout, so
113
- * their pipeline layouts (and pipelines) are shareable too.
114
- * @param {string} signature - the shape signature (caller-composed)
115
- * @param {GPUBindGroupLayoutEntry[]} entries - the layout entries
116
- * @returns {GPUBindGroupLayout} the cached layout
117
- */
118
- getEffectLayout(signature: string, entries: GPUBindGroupLayoutEntry[]): GPUBindGroupLayout;
119
- /**
120
- * Register a shader family's vertex buffer layout from a batcher's
121
- * frozen attribute records — the declarative consumption of the
122
- * backend-neutral vertex formats (#1492): the records already carry
123
- * `format` and `offset` in WebGPU vocabulary, shader locations are
124
- * declaration order.
125
- * Accepts either the single-buffer form `(key, stride, attributes)` or a
126
- * list of buffer groups `(key, [{stride, stepMode, attributes}, …])` —
127
- * the latter is what an instanced family registers, with the geometry
128
- * group at index 0 and a `stepMode: "instance"` group after it. Shader
129
- * locations are assigned in declaration order and continue **across**
130
- * groups, since WGSL locations are a single namespace.
131
- * @param {string} shaderKey - "quad" | "primitive"
132
- * @param {number|object[]} stride - vertex byte stride, or the buffer-group list
133
- * @param {{format: string, offset: number}[]} [attributes] - frozen records (single-buffer form)
134
- */
135
- registerVertexLayout(shaderKey: string, stride: number | object[], attributes?: {
136
- format: string;
137
- offset: number;
138
- }[]): void;
139
- /**
140
- * Fetch (building on first use) the pipeline for the given state tuple.
141
- * @param {string} shaderKey - "quad" | "primitive" | "clear"
142
- * @param {string} topology - portable topology name ("triangle-list", …)
143
- * @param {string} blendMode - blend mode (normalized internally)
144
- * @param {boolean} premultipliedAlpha - source premultiplication flag
145
- * @param {string} [stencilMode="none"] - "none" | "write" | "test" | "tag" | "mark"
146
- * @param {{cullMode: string, frontFace: string}} [meshState] - mesh pass
147
- * state: its presence switches the depth half of the attachment on —
148
- * depth writes enabled, "less-equal" testing (the GL mesh mode's
149
- * LEQUAL, keeping coplanar geometry stable) — and sets the per-mesh
150
- * face-culling axes. Omitted by the whole 2D tier, whose keys and
151
- * descriptors stay byte-identical to a build without a mesh path.
152
- * @returns {GPURenderPipeline} the pipeline
153
- */
154
- get(shaderKey: string, topology: string, blendMode: string, premultipliedAlpha: boolean, stencilMode?: string, meshState?: {
155
- cullMode: string;
156
- frontFace: string;
157
- }): GPURenderPipeline;
158
- /**
159
- * drop every cached pipeline (device loss — the whole cache object is
160
- * rebuilt by the renderer's restore path, this exists for symmetry)
161
- */
162
- clear(): void;
163
- }
1
+
164
2
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/pipeline/cache.js"],"names":[],"mappings":"AA6BA;;;;;;;GAOG;AACH,gCAAiC,CAAC,CAAC;AAEnC;;;;;;;GAOG;AACH,mCAAoC,sBAAsB,CAAC;AA6E3D;;;;;;;;;;;;GAYG;AACH;IAwKC;;;OAGG;IACH,4BAAwB;IA3KxB;;;OAGG;IACH,oBAHW,SAAS,UACT,MAAM,EAmKhB;IAhKA,kBAAoB;IACpB,eAAoB;IACpB,oBAAoB;IACpB,6CAA6C;IAC7C,WADW,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CACf;IAC1B,kEAAkE;IAClE,eADW,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC,CAChC;IAG9B,gCAaE;IACF,qCAaE;IACF,mCAME;IAYF,uCAQE;IAiBF,wCAGE;IAGF;;;;;MAmBC;IAGD;;;;;MAaC;IAKD,0DAA0D;IAC1D,mBADW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CACI;IAGlC,+BAAgC;IAChC,mGAAmG;IACnG,qBADW,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC,CAC1B;IAGpC,+EAA+E;IAC/E,eADW,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CACZ;IAM9B,gCAGE;IACF,6BAIE;IAEF;;;;;;OAMG;IACH,OAFU,MAAM,CAE+B;IAShD;;;;;;;;;;;;;OAaG;IACH,qBATW,MAAM,YAEd;QAAuC,gBAAgB;QAE9B,eAAe;QAEf,KAAK;KAC9B,GAAU,MAAM,CAsClB;IAED;;;;;;;;OAQG;IACH,2BAJW,MAAM,WACN,uBAAuB,EAAE,GACvB,kBAAkB,CAY9B;IAED;;;;;;;;;;;;;;;OAeG;IACH,gCAJW,MAAM,UACN,MAAM,GAAC,MAAM,EAAE,eACf;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,QAqC5C;IAED;;;;;;;;;;;;;;OAcG;IACH,eAbW,MAAM,YACN,MAAM,aACN,MAAM,sBACN,OAAO,gBACP,MAAM,cACN;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,GAMnC,iBAAiB,CA4E7B;IAED;;;OAGG;IACH,cAEC;CACD"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/pipeline/cache.js"],"names":[],"mappings":"AA8BA;;;;;;;;GAQG;AACH,gCAAiC,CAAC,CAAC;AAEnC;;;;;;;;GAQG;AACH,mCAAoC,sBAAsB,CAAC;AA8E3D;;;;;;;;;;;;;GAaG;AACH;IAwKC;;;;OAIG;IACH,4BAAwB;IA5KxB;;;OAGG;IACH,oBAHW,SAAS,UACT,MAAM,EAmKhB;IAhKA,kBAAoB;IACpB,eAAoB;IACpB,oBAAoB;IACpB,6CAA6C;IAC7C,WADW,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CACf;IAC1B,kEAAkE;IAClE,eADW,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC,CAChC;IAG9B,gCAaE;IACF,qCAaE;IACF,mCAME;IAYF,uCAQE;IAiBF,wCAGE;IAGF;;;;;MAmBC;IAGD;;;;;MAaC;IAKD,0DAA0D;IAC1D,mBADW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CACI;IAGlC,+BAAgC;IAChC,mGAAmG;IACnG,qBADW,GAAG,CAAC,MAAM,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC,CAC1B;IAGpC,+EAA+E;IAC/E,eADW,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CACZ;IAM9B,gCAGE;IACF,6BAIE;IAEF;;;;;;OAMG;IACH,OAFU,MAAM,CAE+B;IAUhD;;;;;;;;;;;;;OAaG;IACH,qBATW,MAAM,YAEd;QAAuC,gBAAgB;QAE9B,eAAe;QAEf,KAAK;KAC9B,GAAU,MAAM,CAsClB;IAED;;;;;;;;OAQG;IACH,2BAJW,MAAM,WACN,uBAAuB,EAAE,GACvB,kBAAkB,CAY9B;IAED;;;;;;;;;;;;;;;OAeG;IACH,gCAJW,MAAM,UACN,MAAM,GAAC,MAAM,EAAE,eACf;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,QAqC5C;IAED;;;;;;;;;;;;;;OAcG;IACH,eAbW,MAAM,YACN,MAAM,aACN,MAAM,sBACN,OAAO,gBACP,MAAM,cACN;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAC,GAMxE,iBAAiB,CAyF7B;IAED;;;OAGG;IACH,cAEC;CACD"}
@@ -1,90 +1,4 @@
1
- /**
2
- * GPU-accelerated renderer for orthogonal TMX tile layers on the WebGPU
3
- * backend — the WGSL realization of the WebGL shader tile path: the
4
- * visible region draws as ONE quad per tileset, with the fragment shader
5
- * sampling a per-layer GID index texture and the tileset atlas.
6
- *
7
- * Structure mirrors the WebGL twin; the mechanisms are the backend's:
8
- * - the GID index / animation lookup are renderer-owned `rgba8unorm`
9
- * textures written with `queue.writeTexture` (byte-exact `textureLoad`
10
- * reads, no sampler needed) — re-uploaded only when `layer.dataVersion`
11
- * moves or an animation frame advances
12
- * - the per-draw uniforms snapshot into the effect uniform arena with a
13
- * dynamic offset (each tileset pass gets its own region, per the
14
- * queue-write-before-draws ordering)
15
- * - the tileset atlas rides the standard texture-store material path
16
- * - pipelines flow through the registered `tmxlayer.wgsl` family, keyed
17
- * on the frame's blend/stencil state like every other draw
18
- * @ignore
19
- */
20
- export default class OrthogonalTMXLayerGPURenderer {
21
- /**
22
- * @param {WebGPURenderer} renderer - the WebGPU renderer instance
23
- */
24
- constructor(renderer: WebGPURenderer);
25
- renderer: WebGPURenderer;
26
- tmxLayout: GPUBindGroupLayout;
27
- key: string;
28
- epoch: number;
29
- /**
30
- * per-layer GID index texture: layer → {texture, view, version}
31
- * @type {Map<TMXLayer, object>}
32
- */
33
- resources: Map<TMXLayer, object>;
34
- /**
35
- * per-tileset animation lookup: tileset → {texture, view, data, tileCount}
36
- * @type {Map<object, object>}
37
- */
38
- animLookups: Map<object, object>;
39
- /**
40
- * per-(layer, tileset) cached group-3 bind group, keyed on the
41
- * uniform arena page it binds
42
- * @type {Map<TMXLayer, Map<object, {bindGroup: GPUBindGroup, pageLabel: string, animView: object}>>}
43
- */
44
- bindGroups: Map<TMXLayer, Map<object, {
45
- bindGroup: GPUBindGroup;
46
- pageLabel: string;
47
- animView: object;
48
- }>>;
49
- uniformScratch: Float32Array<ArrayBuffer>;
50
- vertexScratch: ArrayBuffer;
51
- vertexF32: Float32Array<ArrayBuffer>;
52
- vertexU32: Uint32Array<ArrayBuffer>;
53
- /**
54
- * Retire every lookup texture and empty the local maps — called from
55
- * `WebGPURenderer.reset()` (GAME_RESET) so each level starts clean.
56
- * @ignore
57
- */
58
- reset(): void;
59
- /**
60
- * Get-or-create the per-layer GID index texture, re-uploading when the
61
- * layer's data version moved (`setTile`/`clearTile` mutations).
62
- * @param {TMXLayer} layer - the layer
63
- * @returns {{texture: GPUTexture, view: GPUTextureView, version: number}}
64
- * @ignore
65
- */
66
- getResource(layer: TMXLayer): {
67
- texture: GPUTexture;
68
- view: GPUTextureView;
69
- version: number;
70
- };
71
- /**
72
- * Get-or-update the per-tileset animation lookup (undefined for
73
- * tilesets without animated tiles). Texel `localId` encodes the
74
- * CURRENT frame's local id as (R = lo byte, G = hi byte).
75
- * @param {object} tileset - the tileset
76
- * @param {number} tileCount - atlas grid tile count
77
- * @returns {object|undefined} the lookup entry
78
- * @ignore
79
- */
80
- getOrUpdateAnimLookup(tileset: object, tileCount: number): object | undefined;
81
- /**
82
- * Draw an orthogonal TMX layer through the shader path.
83
- * @param {TMXLayer} layer - the layer to draw
84
- * @param {object} rect - the visible viewport rect (world coords)
85
- */
86
- draw(layer: TMXLayer, rect: object): void;
87
- }
1
+
88
2
  import type { default as WebGPURenderer } from "../../webgpu_renderer.js";
89
3
  import type { default as TMXLayer } from "../../../../level/tiled/TMXLayer.js";
90
4
  //# sourceMappingURL=orthogonal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgpu/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACC;;OAEG;IACH,sBAFW,cAAc,EAwDxB;IArDA,yBAAwB;IAIxB,8BAYE;IACF,YASE;IAGF,cAAwB;IAExB;;;OAGG;IACH,WAFU,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAEL;IAC1B;;;OAGG;IACH,aAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAED;IAC5B;;;;OAIG;IACH,YAFU,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC,CAEzE;IAG3B,0CAA4D;IAC5D,2BAA4C;IAC5C,qCAAqD;IACrD,oCAAoD;IAGrD;;;;OAIG;IACH,cAUC;IAED;;;;;;OAMG;IACH,mBAJW,QAAQ,GACN;QAAC,OAAO,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CA4BxE;IAED;;;;;;;;OAQG;IACH,+BALW,MAAM,aACN,MAAM,GACJ,MAAM,GAAC,SAAS,CA2D5B;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QA2MhB;CACD;+CA/Z6C,0BAA0B;yCADhC,qCAAqC"}
1
+ {"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgpu/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACC;;OAEG;IACH,sBAFW,cAAc,EAwDxB;IArDA,yBAAwB;IAIxB,8BAYE;IACF,YASE;IAGF,cAAwB;IAExB;;;OAGG;IACH,WAFU,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAEL;IAC1B;;;OAGG;IACH,aAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAED;IAC5B;;;;OAIG;IACH,YAFU,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC,CAEzE;IAG3B,0CAA4D;IAC5D,2BAA4C;IAC5C,qCAAqD;IACrD,oCAAoD;IAGrD;;;;;OAKG;IACH,cAUC;IAED;;;;;;;OAOG;IACH,mBALW,QAAQ,GACN;QAAC,OAAO,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CA6BxE;IAED;;;;;;;;;OASG;IACH,+BANW,MAAM,aACN,MAAM,GACJ,MAAM,GAAC,SAAS,CA4D5B;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QA2MhB;CACD;+CApa6C,0BAA0B;yCADhC,qCAAqC"}
@@ -1,46 +1,4 @@
1
- /**
2
- * Derive an instanced mesh WGSL module from the ordinary one (#1508).
3
- *
4
- * WGSL has no preprocessor, and a module carries **both** entry points in
5
- * one file — so an instanced variant cannot be a second vertex file the way
6
- * it is on the WebGL side. Rather than copy the module (which for the lit
7
- * tier would duplicate the whole lighting loop, and the `Light3dBlock`
8
- * layout that must agree byte-for-byte with the uniform packer), this
9
- * rewrites the shared source:
10
- *
11
- * - everything before `@vertex` is kept — structs, bindings, `VSOut` —
12
- * with one extra inter-stage field when the custom slot is in play;
13
- * - the vertex stage is replaced with one that reads the per-instance
14
- * attributes and applies them;
15
- * - the fragment stage is kept **verbatim**, apart from one substitution
16
- * that folds the per-instance slot into the emissive term.
17
- *
18
- * So the lighting loop, the light block and the alpha-cutout rule exist in
19
- * exactly one place, and an instanced mesh shades identically to its
20
- * uninstanced twin by construction rather than by review.
21
- *
22
- * Shader locations for the instance slots are **pinned**
23
- * (`INSTANCE_SLOT_OFFSETS`), so a variant that omits the colour slot does
24
- * not renumber the data slot.
25
- * @param {string} source - the ordinary module (`mesh.wgsl` / `mesh-lit.wgsl`)
26
- * @param {object} options - variant options
27
- * @param {number} options.baseLocation - first vertex location after the tier's geometry attributes
28
- * @param {number} options.varyingLocation - first free inter-stage location in `VSOut`
29
- * @param {boolean} options.hasColor - whether the per-instance colour slot is present
30
- * @param {boolean} options.hasData - whether the per-instance custom slot is present
31
- * @param {string} options.geometryInputs - the tier's geometry attribute declarations
32
- * @param {string} options.body - the tier's placement body, which reads the `instance` matrix the generated preamble declares and must leave a `clip` value for the shared tail
33
- * @returns {string} the instanced module text
34
- * @ignore
35
- */
36
- export function buildInstancedMeshWGSL(source: string, options: {
37
- baseLocation: number;
38
- varyingLocation: number;
39
- hasColor: boolean;
40
- hasData: boolean;
41
- geometryInputs: string;
42
- body: string;
43
- }): string;
1
+
44
2
  export namespace UNLIT_INSTANCED {
45
3
  let baseLocation: number;
46
4
  let varyingLocation: number;
@@ -1 +1 @@
1
- {"version":3,"file":"mesh-instanced.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/shaders/mesh-instanced.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,+CAXW,MAAM,WAEd;IAAwB,YAAY,EAA5B,MAAM;IACU,eAAe,EAA/B,MAAM;IACW,QAAQ,EAAzB,OAAO;IACU,OAAO,EAAxB,OAAO;IACS,cAAc,EAA9B,MAAM;IACU,IAAI,EAApB,MAAM;CACd,GAAU,MAAM,CAkIlB"}
1
+ {"version":3,"file":"mesh-instanced.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/shaders/mesh-instanced.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,+CAZW,MAAM,WAEd;IAAwB,YAAY,EAA5B,MAAM;IACU,eAAe,EAA/B,MAAM;IACW,QAAQ,EAAzB,OAAO;IACU,OAAO,EAAxB,OAAO;IACS,cAAc,EAA9B,MAAM;IACU,IAAI,EAApB,MAAM;CACd,GAAU,MAAM,CAmIlB"}
@@ -1,33 +1,2 @@
1
- /**
2
- * Upload every mip level of a parsed CompressedImage into a GPUTexture
3
- * via queue.writeTexture (block-aligned rows, largest mip first — the
4
- * parser contract).
5
- * @param {GPUDevice} device - the device
6
- * @param {GPUTexture} texture - destination created with the mapped format
7
- * @param {object} image - the parsed CompressedImage ({mipmaps, format})
8
- * @param {object} metrics - the COMPRESSED_FORMATS entry for image.format
9
- * @ignore
10
- */
11
- export function uploadCompressedTexture(device: GPUDevice, texture: GPUTexture, image: object, metrics: object): void;
12
- /**
13
- * WebGL compressed-format constant → WebGPU texture format + block
14
- * metrics. The loader parsers (dds/pvr/pkm/ktx/ktx2) are backend-neutral
15
- * and emit WebGL enum constants; this table is the WebGPU side of that
16
- * contract. Families gate on the device features requested at init:
17
- * "texture-compression-bc", "texture-compression-etc2",
18
- * "texture-compression-astc" (PVRTC has no WebGPU equivalent).
19
- * @ignore
20
- */
21
- export const COMPRESSED_FORMATS: Map<number, {
22
- format: string;
23
- blockW: number;
24
- blockH: number;
25
- bytes: number;
26
- }>;
27
- /**
28
- * the optional device features the renderer requests when the adapter
29
- * offers them
30
- * @ignore
31
- */
32
- export const COMPRESSION_FEATURES: string[];
1
+
33
2
  //# sourceMappingURL=compressed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compressed.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/texture/compressed.js"],"names":[],"mappings":"AA+DA;;;;;;;;;GASG;AACH,gDANW,SAAS,WACT,UAAU,SACV,MAAM,WACN,MAAM,QAoBhB;AA1FD;;;;;;;;GAQG;AACH;;;;;GAyCG;AAEH;;;;GAIG;AACH,4CAIE"}
1
+ {"version":3,"file":"compressed.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/texture/compressed.js"],"names":[],"mappings":"AAiEA;;;;;;;;;;GAUG;AACH,gDAPW,SAAS,WACT,UAAU,SACV,MAAM,WACN,MAAM,QAqBhB;AA7FD;;;;;;;;;GASG;AACH;;;;;GAyCG;AAEH;;;;;GAKG;AACH,4CAIE"}
@@ -1,65 +1,4 @@
1
- /**
2
- * The WebGPU counterpart of the WebGL `FrameTexture`: a GPU-resident
3
- * capture of the frame rendered so far, refreshed IN PLACE by
4
- * {@link WebGPURenderer#captureFrame} via `copyTextureToTexture` — an
5
- * encoder-ordered command, so the copy sees exactly the draws recorded
6
- * before the capture point and none after (no queue-write retroactivity).
7
- *
8
- * Effects sample it through the `screen_texture` builtin: the effect's
9
- * group-3 bind group binds `view`, keyed by `generation` so a size-change
10
- * reallocation rebuilds stale bind groups. `isGPUResident` keeps the
11
- * `setTexture` discriminant contract of the WebGL twin.
12
- * @augments Texture2d
13
- * @ignore
14
- */
15
- export class WebGPUFrameTexture extends Texture2d {
16
- /**
17
- * monotonic generation source shared by every capture instance
18
- * @ignore
19
- */
20
- static generationCounter: number;
21
- /**
22
- * @param {import("../webgpu_renderer.js").default} renderer - the owning renderer
23
- * @param {number} width - capture width in pixels
24
- * @param {number} height - capture height in pixels
25
- */
26
- constructor(renderer: import("../webgpu_renderer.js").default, width: number, height: number);
27
- renderer: import("../webgpu_renderer.js").default;
28
- /**
29
- * marks this as a live GPU-resident source — see {@link ShaderEffect#setTexture}
30
- * @type {boolean}
31
- */
32
- isGPUResident: boolean;
33
- /** @type {GPUTexture} */
34
- gpuTexture: GPUTexture;
35
- /**
36
- * (Re)allocate the backing texture at the given size, keeping this
37
- * object's identity — the caller-owned-refresh contract of
38
- * `toFrameTexture({target})`. The old texture is retired (draws
39
- * already recorded against it stay valid) and `generation` advances,
40
- * so bind groups referencing the old view re-key instead of pointing
41
- * at a destroyed texture and failing every subsequent submit.
42
- * @param {number} width - capture width in pixels
43
- * @param {number} height - capture height in pixels
44
- */
45
- realloc(width: number, height: number): void;
46
- /** @type {number} */
47
- width: number | undefined;
48
- /** @type {number} */
49
- height: number | undefined;
50
- /**
51
- * unique per allocation (module-wide counter) — the bind-group key
52
- * @type {number}
53
- */
54
- generation: number | undefined;
55
- /** @type {GPUTextureView} */
56
- view: GPUTextureView | undefined;
57
- /**
58
- * The opaque GPU-resident backing — itself.
59
- * @returns {WebGPUFrameTexture}
60
- */
61
- getTexture(): WebGPUFrameTexture;
62
- }
1
+
63
2
  export default WebGPUFrameTexture;
64
3
  import Texture2d from "../../texture/texture2d.ts";
65
4
  //# sourceMappingURL=frametexture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH;IACC;;;OAGG;IACH,iCAA6B;IAE7B;;;;OAIG;IACH,sBAJW,OAAO,uBAAuB,EAAE,OAAO,SACvC,MAAM,UACN,MAAM,EAahB;IATA,kDAAwB;IACxB;;;OAGG;IACH,eAFU,OAAO,CAEQ;IACzB,yBAAyB;IACzB,YADW,UAAU,CACC;IAIvB;;;;;;;;;OASG;IACH,eAHW,MAAM,UACN,MAAM,QAuBhB;IAjBA,qBAAqB;IACrB,0BAAkB;IAClB,qBAAqB;IACrB,2BAAoB;IACpB;;;OAGG;IACH,+BAAwD;IAOxD,6BAA6B;IAC7B,iCAAwC;IAGzC;;;OAGG;IACH,cAFa,kBAAkB,CAI9B;CAaD;;sBA7FqB,4BAA4B"}
1
+ {"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;OAIG;IACH,iCAA6B;IAE7B;;;;OAIG;IACH,sBAJW,OAAO,uBAAuB,EAAE,OAAO,SACvC,MAAM,UACN,MAAM,EAahB;IATA,kDAAwB;IACxB;;;OAGG;IACH,eAFU,OAAO,CAEQ;IACzB,yBAAyB;IACzB,YADW,UAAU,CACC;IAIvB;;;;;;;;;OASG;IACH,eAHW,MAAM,UACN,MAAM,QAuBhB;IAjBA,qBAAqB;IACrB,0BAAkB;IAClB,qBAAqB;IACrB,2BAAoB;IACpB;;;OAGG;IACH,+BAAwD;IAOxD,6BAA6B;IAC7B,iCAAwC;IAGzC;;;OAGG;IACH,cAFa,kBAAkB,CAI9B;CAaD;;sBA/FqB,4BAA4B"}