melonjs 20.2.0 → 20.4.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 (515) hide show
  1. package/README.md +86 -8
  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 +6 -2
  5. package/build/application/settings.d.ts.map +1 -1
  6. package/build/audio/audio.d.ts +2 -2
  7. package/build/audio/audio.d.ts.map +1 -1
  8. package/build/audio/backend/buffer.d.ts +26 -0
  9. package/build/audio/backend/buffer.d.ts.map +1 -0
  10. package/build/audio/backend/cache.d.ts +2 -0
  11. package/build/audio/backend/cache.d.ts.map +1 -0
  12. package/build/audio/backend/core.d.ts +24 -0
  13. package/build/audio/backend/core.d.ts.map +1 -0
  14. package/build/audio/backend/engine.d.ts +35 -0
  15. package/build/audio/backend/engine.d.ts.map +1 -0
  16. package/build/audio/backend/sound.d.ts +29 -0
  17. package/build/audio/backend/sound.d.ts.map +1 -0
  18. package/build/audio/backend/spatial.d.ts +191 -0
  19. package/build/audio/backend/spatial.d.ts.map +1 -0
  20. package/build/audio/backend/types.d.ts +107 -0
  21. package/build/audio/backend/types.d.ts.map +1 -0
  22. package/build/audio/backend/voice.d.ts +8 -0
  23. package/build/audio/backend/voice.d.ts.map +1 -0
  24. package/build/audio/playback.d.ts +49 -4
  25. package/build/audio/playback.d.ts.map +1 -1
  26. package/build/audio/procedural.d.ts.map +1 -1
  27. package/build/audio/state.d.ts +69 -0
  28. package/build/audio/state.d.ts.map +1 -0
  29. package/build/audio/types.d.ts +93 -1
  30. package/build/audio/types.d.ts.map +1 -1
  31. package/build/camera/camera2d.d.ts +0 -68
  32. package/build/camera/camera2d.d.ts.map +1 -1
  33. package/build/camera/camera3d.d.ts +91 -84
  34. package/build/camera/camera3d.d.ts.map +1 -1
  35. package/build/camera/effects/fade_effect.d.ts +0 -5
  36. package/build/camera/effects/fade_effect.d.ts.map +1 -1
  37. package/build/camera/effects/mask_effect.d.ts +0 -5
  38. package/build/camera/effects/mask_effect.d.ts.map +1 -1
  39. package/build/camera/fog.d.ts +118 -0
  40. package/build/camera/fog.d.ts.map +1 -0
  41. package/build/const.d.ts +2 -2
  42. package/build/geometries/box3d.d.ts +0 -28
  43. package/build/geometries/box3d.d.ts.map +1 -1
  44. package/build/geometries/ellipse.d.ts +0 -20
  45. package/build/geometries/ellipse.d.ts.map +1 -1
  46. package/build/geometries/observablePoint.d.ts +0 -3
  47. package/build/geometries/observablePoint.d.ts.map +1 -1
  48. package/build/geometries/path2d.d.ts +0 -19
  49. package/build/geometries/path2d.d.ts.map +1 -1
  50. package/build/geometries/polygon.d.ts +0 -12
  51. package/build/geometries/polygon.d.ts.map +1 -1
  52. package/build/geometries/roundrect.d.ts +0 -18
  53. package/build/geometries/roundrect.d.ts.map +1 -1
  54. package/build/geometries/sphere.d.ts +0 -9
  55. package/build/geometries/sphere.d.ts.map +1 -1
  56. package/build/geometries/toarccanvas.d.ts.map +1 -1
  57. package/build/index.d.ts +1 -0
  58. package/build/index.d.ts.map +1 -1
  59. package/build/index.js +12150 -11289
  60. package/build/index.js.map +4 -4
  61. package/build/input/gamepad.d.ts.map +1 -1
  62. package/build/input/input.d.ts +19 -0
  63. package/build/input/input.d.ts.map +1 -1
  64. package/build/input/pointer.d.ts +0 -4
  65. package/build/input/pointer.d.ts.map +1 -1
  66. package/build/input/pointerevent.d.ts +0 -6
  67. package/build/input/pointerevent.d.ts.map +1 -1
  68. package/build/lang/deprecated.d.ts +4 -2
  69. package/build/lang/deprecated.d.ts.map +1 -1
  70. package/build/level/gltf/GLTFModel.d.ts +0 -81
  71. package/build/level/gltf/GLTFModel.d.ts.map +1 -1
  72. package/build/level/gltf/GLTFScene.d.ts +13 -44
  73. package/build/level/gltf/GLTFScene.d.ts.map +1 -1
  74. package/build/level/gltf/gltf_sampler.d.ts +1 -48
  75. package/build/level/gltf/gltf_sampler.d.ts.map +1 -1
  76. package/build/level/level.d.ts +195 -113
  77. package/build/level/level.d.ts.map +1 -1
  78. package/build/level/tiled/TMXGroup.d.ts +1 -65
  79. package/build/level/tiled/TMXGroup.d.ts.map +1 -1
  80. package/build/level/tiled/TMXLayer.d.ts +0 -44
  81. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  82. package/build/level/tiled/TMXObject.d.ts +1 -136
  83. package/build/level/tiled/TMXObject.d.ts.map +1 -1
  84. package/build/level/tiled/TMXObjectFactory.d.ts +1 -40
  85. package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
  86. package/build/level/tiled/TMXTile.d.ts +1 -30
  87. package/build/level/tiled/TMXTile.d.ts.map +1 -1
  88. package/build/level/tiled/TMXTileMap.d.ts +0 -10
  89. package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
  90. package/build/level/tiled/TMXTileset.d.ts +0 -113
  91. package/build/level/tiled/TMXTileset.d.ts.map +1 -1
  92. package/build/level/tiled/TMXTilesetGroup.d.ts +0 -1
  93. package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
  94. package/build/level/tiled/TMXUtils.d.ts +1 -43
  95. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  96. package/build/level/tiled/factories/shape.d.ts +1 -7
  97. package/build/level/tiled/factories/shape.d.ts.map +1 -1
  98. package/build/level/tiled/factories/text.d.ts +1 -7
  99. package/build/level/tiled/factories/text.d.ts.map +1 -1
  100. package/build/level/tiled/factories/tile.d.ts +1 -7
  101. package/build/level/tiled/factories/tile.d.ts.map +1 -1
  102. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +0 -60
  103. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
  104. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +0 -42
  105. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
  106. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +0 -5
  107. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
  108. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +0 -31
  109. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
  110. package/build/level/tiled/renderer/TMXRenderer.d.ts +2 -2
  111. package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
  112. package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
  113. package/build/level/tiled/renderer/autodetect.d.ts +1 -6
  114. package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
  115. package/build/lighting/light2d.d.ts +0 -25
  116. package/build/lighting/light2d.d.ts.map +1 -1
  117. package/build/lighting/light3d.d.ts +0 -16
  118. package/build/lighting/light3d.d.ts.map +1 -1
  119. package/build/loader/loader.d.ts +46 -73
  120. package/build/loader/loader.d.ts.map +1 -1
  121. package/build/loader/loadingscreen.d.ts +0 -33
  122. package/build/loader/loadingscreen.d.ts.map +1 -1
  123. package/build/loader/parsers/aseprite.d.ts +0 -13
  124. package/build/loader/parsers/aseprite.d.ts.map +1 -1
  125. package/build/loader/parsers/audio.d.ts +2 -0
  126. package/build/loader/parsers/audio.d.ts.map +1 -0
  127. package/build/loader/parsers/binary.d.ts +1 -10
  128. package/build/loader/parsers/binary.d.ts.map +1 -1
  129. package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
  130. package/build/loader/parsers/compressed_textures/parseDDS.d.ts +1 -7
  131. package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
  132. package/build/loader/parsers/compressed_textures/parseKTX.d.ts +1 -7
  133. package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
  134. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +1 -7
  135. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
  136. package/build/loader/parsers/compressed_textures/parsePKM.d.ts +1 -7
  137. package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
  138. package/build/loader/parsers/compressed_textures/parsePVR.d.ts +1 -7
  139. package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
  140. package/build/loader/parsers/fontface.d.ts +1 -13
  141. package/build/loader/parsers/fontface.d.ts.map +1 -1
  142. package/build/loader/parsers/gltf.d.ts +1 -70
  143. package/build/loader/parsers/gltf.d.ts.map +1 -1
  144. package/build/loader/parsers/image.d.ts +1 -22
  145. package/build/loader/parsers/image.d.ts.map +1 -1
  146. package/build/loader/parsers/json.d.ts +1 -10
  147. package/build/loader/parsers/json.d.ts.map +1 -1
  148. package/build/loader/parsers/mtl.d.ts +1 -28
  149. package/build/loader/parsers/mtl.d.ts.map +1 -1
  150. package/build/loader/parsers/obj.d.ts +1 -59
  151. package/build/loader/parsers/obj.d.ts.map +1 -1
  152. package/build/loader/parsers/pbr.d.ts +1 -62
  153. package/build/loader/parsers/pbr.d.ts.map +1 -1
  154. package/build/loader/parsers/script.d.ts +1 -10
  155. package/build/loader/parsers/script.d.ts.map +1 -1
  156. package/build/loader/parsers/shader.d.ts +1 -52
  157. package/build/loader/parsers/shader.d.ts.map +1 -1
  158. package/build/loader/parsers/tmx.d.ts +1 -10
  159. package/build/loader/parsers/tmx.d.ts.map +1 -1
  160. package/build/loader/parsers/video.d.ts +1 -10
  161. package/build/loader/parsers/video.d.ts.map +1 -1
  162. package/build/math/color.d.ts.map +1 -1
  163. package/build/math/noise.d.ts +0 -40
  164. package/build/math/noise.d.ts.map +1 -1
  165. package/build/math/observableVector2d.d.ts +0 -3
  166. package/build/math/observableVector2d.d.ts.map +1 -1
  167. package/build/math/observableVector3d.d.ts +0 -3
  168. package/build/math/observableVector3d.d.ts.map +1 -1
  169. package/build/math/vector2d.d.ts +0 -6
  170. package/build/math/vector2d.d.ts.map +1 -1
  171. package/build/math/vertex.d.ts +25 -0
  172. package/build/math/vertex.d.ts.map +1 -1
  173. package/build/particles/emitter.d.ts +0 -65
  174. package/build/particles/emitter.d.ts.map +1 -1
  175. package/build/particles/particle.d.ts +0 -81
  176. package/build/particles/particle.d.ts.map +1 -1
  177. package/build/physics/adapter.d.ts +3 -3
  178. package/build/physics/bounds.d.ts +0 -1
  179. package/build/physics/bounds.d.ts.map +1 -1
  180. package/build/physics/broadphase/broadphase.d.ts +0 -7
  181. package/build/physics/broadphase/broadphase.d.ts.map +1 -1
  182. package/build/physics/broadphase/octree.d.ts +0 -91
  183. package/build/physics/broadphase/octree.d.ts.map +1 -1
  184. package/build/physics/broadphase/quadtree.d.ts +0 -47
  185. package/build/physics/broadphase/quadtree.d.ts.map +1 -1
  186. package/build/physics/builtin/body.d.ts +5 -69
  187. package/build/physics/builtin/body.d.ts.map +1 -1
  188. package/build/physics/builtin/detector.d.ts +0 -312
  189. package/build/physics/builtin/detector.d.ts.map +1 -1
  190. package/build/physics/builtin/sat.d.ts +1 -48
  191. package/build/physics/builtin/sat.d.ts.map +1 -1
  192. package/build/physics/builtin/sat3d.d.ts +1 -56
  193. package/build/physics/builtin/sat3d.d.ts.map +1 -1
  194. package/build/physics/collision.d.ts +0 -2
  195. package/build/physics/collision.d.ts.map +1 -1
  196. package/build/physics/response.d.ts +0 -1
  197. package/build/physics/response.d.ts.map +1 -1
  198. package/build/physics/world.d.ts.map +1 -1
  199. package/build/plugin/plugin.d.ts +9 -1
  200. package/build/plugin/plugin.d.ts.map +1 -1
  201. package/build/polyfill/index.d.ts +1 -4
  202. package/build/polyfill/index.d.ts.map +1 -1
  203. package/build/renderable/anchorPoint.d.ts +1 -73
  204. package/build/renderable/anchorPoint.d.ts.map +1 -1
  205. package/build/renderable/animation.d.ts +0 -7
  206. package/build/renderable/animation.d.ts.map +1 -1
  207. package/build/renderable/colorlayer.d.ts +0 -5
  208. package/build/renderable/colorlayer.d.ts.map +1 -1
  209. package/build/renderable/container.d.ts +0 -55
  210. package/build/renderable/container.d.ts.map +1 -1
  211. package/build/renderable/draggable.d.ts +0 -5
  212. package/build/renderable/draggable.d.ts.map +1 -1
  213. package/build/renderable/dragndrop.d.ts +1 -12
  214. package/build/renderable/dragndrop.d.ts.map +1 -1
  215. package/build/renderable/entity/entity.d.ts +0 -8
  216. package/build/renderable/entity/entity.d.ts.map +1 -1
  217. package/build/renderable/frameAnimation.d.ts +0 -41
  218. package/build/renderable/frameAnimation.d.ts.map +1 -1
  219. package/build/renderable/groundshadow.d.ts +1 -91
  220. package/build/renderable/groundshadow.d.ts.map +1 -1
  221. package/build/renderable/imagelayer.d.ts +0 -29
  222. package/build/renderable/imagelayer.d.ts.map +1 -1
  223. package/build/renderable/instanced_mesh.d.ts +26 -104
  224. package/build/renderable/instanced_mesh.d.ts.map +1 -1
  225. package/build/renderable/mesh.d.ts +145 -140
  226. package/build/renderable/mesh.d.ts.map +1 -1
  227. package/build/renderable/nineslicesprite.d.ts +0 -4
  228. package/build/renderable/nineslicesprite.d.ts.map +1 -1
  229. package/build/renderable/renderable.d.ts +17 -54
  230. package/build/renderable/renderable.d.ts.map +1 -1
  231. package/build/renderable/sprite.d.ts +7 -52
  232. package/build/renderable/sprite.d.ts.map +1 -1
  233. package/build/renderable/sprite3d.d.ts +0 -95
  234. package/build/renderable/sprite3d.d.ts.map +1 -1
  235. package/build/renderable/text/bitmaptext.d.ts +0 -14
  236. package/build/renderable/text/bitmaptext.d.ts.map +1 -1
  237. package/build/renderable/text/bitmaptextdata.d.ts +0 -22
  238. package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
  239. package/build/renderable/text/glyph.d.ts +1 -39
  240. package/build/renderable/text/glyph.d.ts.map +1 -1
  241. package/build/renderable/text/text.d.ts +0 -20
  242. package/build/renderable/text/text.d.ts.map +1 -1
  243. package/build/renderable/text/textstyle.d.ts +1 -5
  244. package/build/renderable/text/textstyle.d.ts.map +1 -1
  245. package/build/renderable/trail.d.ts +0 -29
  246. package/build/renderable/trail.d.ts.map +1 -1
  247. package/build/renderable/trigger.d.ts +0 -6
  248. package/build/renderable/trigger.d.ts.map +1 -1
  249. package/build/renderable/ui/uibaseelement.d.ts +0 -40
  250. package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
  251. package/build/renderable/ui/uispriteelement.d.ts +0 -35
  252. package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
  253. package/build/state/stage.d.ts +4 -68
  254. package/build/state/stage.d.ts.map +1 -1
  255. package/build/state/state.d.ts.map +1 -1
  256. package/build/system/device.d.ts +0 -12
  257. package/build/system/device.d.ts.map +1 -1
  258. package/build/system/dom.d.ts +1 -8
  259. package/build/system/dom.d.ts.map +1 -1
  260. package/build/system/event.d.ts +1 -1
  261. package/build/system/legacy_pool.d.ts +1 -6
  262. package/build/system/legacy_pool.d.ts.map +1 -1
  263. package/build/system/platform.d.ts +21 -2
  264. package/build/system/platform.d.ts.map +1 -1
  265. package/build/system/pool.d.ts +0 -9
  266. package/build/system/pool.d.ts.map +1 -1
  267. package/build/system/save.d.ts.map +1 -1
  268. package/build/system/timer.d.ts +0 -20
  269. package/build/system/timer.d.ts.map +1 -1
  270. package/build/tweens/tween.d.ts +0 -62
  271. package/build/tweens/tween.d.ts.map +1 -1
  272. package/build/utils/array-multimap.d.ts +1 -13
  273. package/build/utils/array-multimap.d.ts.map +1 -1
  274. package/build/utils/decode.d.ts.map +1 -1
  275. package/build/utils/fetchdata.d.ts +2 -0
  276. package/build/utils/fetchdata.d.ts.map +1 -0
  277. package/build/utils/utils.d.ts +0 -13
  278. package/build/utils/utils.d.ts.map +1 -1
  279. package/build/video/blendmodes.d.ts +1 -106
  280. package/build/video/blendmodes.d.ts.map +1 -1
  281. package/build/video/buffer/index.d.ts +1 -39
  282. package/build/video/buffer/index.d.ts.map +1 -1
  283. package/build/video/buffer/vertex.d.ts +1 -82
  284. package/build/video/buffer/vertex.d.ts.map +1 -1
  285. package/build/video/canvas/canvas_renderer.d.ts +7 -25
  286. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  287. package/build/video/canvas_factory.d.ts +1 -24
  288. package/build/video/canvas_factory.d.ts.map +1 -1
  289. package/build/video/effects/blendEffect.d.ts +0 -54
  290. package/build/video/effects/blendEffect.d.ts.map +1 -1
  291. package/build/video/effects/blur.d.ts +4 -4
  292. package/build/video/effects/blur.d.ts.map +1 -1
  293. package/build/video/effects/chromaticAberration.d.ts +5 -5
  294. package/build/video/effects/chromaticAberration.d.ts.map +1 -1
  295. package/build/video/effects/colorMatrix.d.ts +5 -15
  296. package/build/video/effects/colorMatrix.d.ts.map +1 -1
  297. package/build/video/effects/desaturate.d.ts +5 -5
  298. package/build/video/effects/desaturate.d.ts.map +1 -1
  299. package/build/video/effects/dissolve.d.ts +4 -4
  300. package/build/video/effects/dissolve.d.ts.map +1 -1
  301. package/build/video/effects/dropShadow.d.ts +5 -5
  302. package/build/video/effects/dropShadow.d.ts.map +1 -1
  303. package/build/video/effects/flash.d.ts +4 -4
  304. package/build/video/effects/flash.d.ts.map +1 -1
  305. package/build/video/effects/glow.d.ts +5 -5
  306. package/build/video/effects/glow.d.ts.map +1 -1
  307. package/build/video/effects/glsl_realization.d.ts +1 -17
  308. package/build/video/effects/glsl_realization.d.ts.map +1 -1
  309. package/build/video/effects/hologram.d.ts +4 -4
  310. package/build/video/effects/hologram.d.ts.map +1 -1
  311. package/build/video/effects/invert.d.ts +5 -5
  312. package/build/video/effects/invert.d.ts.map +1 -1
  313. package/build/video/effects/outline.d.ts +6 -6
  314. package/build/video/effects/outline.d.ts.map +1 -1
  315. package/build/video/effects/pixelate.d.ts +4 -4
  316. package/build/video/effects/pixelate.d.ts.map +1 -1
  317. package/build/video/effects/radialGradient.d.ts +2 -3
  318. package/build/video/effects/radialGradient.d.ts.map +1 -1
  319. package/build/video/effects/scanline.d.ts +6 -6
  320. package/build/video/effects/scanline.d.ts.map +1 -1
  321. package/build/video/effects/sepia.d.ts +5 -5
  322. package/build/video/effects/sepia.d.ts.map +1 -1
  323. package/build/video/effects/shadereffect.d.ts +12 -123
  324. package/build/video/effects/shadereffect.d.ts.map +1 -1
  325. package/build/video/effects/shine.d.ts +3 -3
  326. package/build/video/effects/shine.d.ts.map +1 -1
  327. package/build/video/effects/tintPulse.d.ts +4 -4
  328. package/build/video/effects/tintPulse.d.ts.map +1 -1
  329. package/build/video/effects/vignette.d.ts +6 -6
  330. package/build/video/effects/vignette.d.ts.map +1 -1
  331. package/build/video/effects/wave.d.ts +4 -4
  332. package/build/video/effects/wave.d.ts.map +1 -1
  333. package/build/video/effects/wgsl/layout.d.ts +1 -27
  334. package/build/video/effects/wgsl/layout.d.ts.map +1 -1
  335. package/build/video/effects/wgsl/parse.d.ts +1 -8
  336. package/build/video/effects/wgsl/parse.d.ts.map +1 -1
  337. package/build/video/effects/wgsl/scaffold.d.ts +1 -42
  338. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
  339. package/build/video/effects/wgsl_realization.d.ts +1 -82
  340. package/build/video/effects/wgsl_realization.d.ts.map +1 -1
  341. package/build/video/gpu/batcher.d.ts +1 -13
  342. package/build/video/gpu/batcher.d.ts.map +1 -1
  343. package/build/video/gpu/instancerecord.d.ts +1 -163
  344. package/build/video/gpu/instancerecord.d.ts.map +1 -1
  345. package/build/video/gpu/meshchunk.d.ts +1 -48
  346. package/build/video/gpu/meshchunk.d.ts.map +1 -1
  347. package/build/video/gpu/meshvertex.d.ts +1 -53
  348. package/build/video/gpu/meshvertex.d.ts.map +1 -1
  349. package/build/video/gpu/primitives.d.ts +1 -59
  350. package/build/video/gpu/primitives.d.ts.map +1 -1
  351. package/build/video/gpu/quadcorners.d.ts +1 -10
  352. package/build/video/gpu/quadcorners.d.ts.map +1 -1
  353. package/build/video/gpu/textureslots.d.ts +1 -121
  354. package/build/video/gpu/textureslots.d.ts.map +1 -1
  355. package/build/video/gpu/texturestore.d.ts +1 -138
  356. package/build/video/gpu/texturestore.d.ts.map +1 -1
  357. package/build/video/gpu/topology.d.ts.map +1 -1
  358. package/build/video/gpu/vertexformat.d.ts +0 -28
  359. package/build/video/gpu/vertexformat.d.ts.map +1 -1
  360. package/build/video/gradient.d.ts +0 -81
  361. package/build/video/gradient.d.ts.map +1 -1
  362. package/build/video/renderer.d.ts +21 -102
  363. package/build/video/renderer.d.ts.map +1 -1
  364. package/build/video/renderstate.d.ts +0 -51
  365. package/build/video/renderstate.d.ts.map +1 -1
  366. package/build/video/rendertarget/canvasrendertarget.d.ts +0 -10
  367. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  368. package/build/video/rendertarget/render_target_pool.d.ts +1 -82
  369. package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
  370. package/build/video/rendertarget/webglrendertarget.d.ts +1 -64
  371. package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
  372. package/build/video/rendertarget/webgpurendertarget.d.ts +0 -8
  373. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
  374. package/build/video/texture/atlas.d.ts +2 -76
  375. package/build/video/texture/atlas.d.ts.map +1 -1
  376. package/build/video/texture/cache.d.ts +0 -136
  377. package/build/video/texture/cache.d.ts.map +1 -1
  378. package/build/video/texture/frametexture.d.ts +1 -71
  379. package/build/video/texture/frametexture.d.ts.map +1 -1
  380. package/build/video/texture/noise_texture2d.d.ts +0 -43
  381. package/build/video/texture/noise_texture2d.d.ts.map +1 -1
  382. package/build/video/texture/parser/aseprite.d.ts +1 -8
  383. package/build/video/texture/parser/aseprite.d.ts.map +1 -1
  384. package/build/video/texture/parser/spritesheet.d.ts +1 -8
  385. package/build/video/texture/parser/spritesheet.d.ts.map +1 -1
  386. package/build/video/texture/parser/texturepacker.d.ts +1 -8
  387. package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
  388. package/build/video/texture/resource.d.ts +0 -9
  389. package/build/video/texture/resource.d.ts.map +1 -1
  390. package/build/video/texture/texture2d.d.ts +0 -11
  391. package/build/video/texture/texture2d.d.ts.map +1 -1
  392. package/build/video/utils/autodetect.d.ts +1 -5
  393. package/build/video/utils/autodetect.d.ts.map +1 -1
  394. package/build/video/webgl/batchers/batcher.d.ts +0 -55
  395. package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
  396. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +0 -14
  397. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
  398. package/build/video/webgl/batchers/lit_quad_batcher.d.ts +0 -72
  399. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  400. package/build/video/webgl/batchers/material_batcher.d.ts +0 -89
  401. package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
  402. package/build/video/webgl/batchers/mesh_batcher.d.ts +14 -343
  403. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  404. package/build/video/webgl/batchers/primitive_batcher.d.ts +0 -10
  405. package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
  406. package/build/video/webgl/batchers/quad_batcher.d.ts +0 -30
  407. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  408. package/build/video/webgl/buffer/index.d.ts +1 -36
  409. package/build/video/webgl/buffer/index.d.ts.map +1 -1
  410. package/build/video/webgl/buffer/instance_buffer.d.ts +1 -53
  411. package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -1
  412. package/build/video/webgl/buffer/retained_geometry.d.ts +1 -81
  413. package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -1
  414. package/build/video/webgl/buffer/uniformblock.d.ts +1 -80
  415. package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -1
  416. package/build/video/webgl/buffer/vertexstate.d.ts +1 -100
  417. package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -1
  418. package/build/video/webgl/glshader.d.ts +2 -51
  419. package/build/video/webgl/glshader.d.ts.map +1 -1
  420. package/build/video/webgl/lighting/pack3d.d.ts +1 -47
  421. package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
  422. package/build/video/webgl/lighting/std140.d.ts +1 -109
  423. package/build/video/webgl/lighting/std140.d.ts.map +1 -1
  424. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +1 -103
  425. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  426. package/build/video/webgl/shaders/multitexture-lit.d.ts +1 -26
  427. package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
  428. package/build/video/webgl/shaders/multitexture.d.ts +1 -9
  429. package/build/video/webgl/shaders/multitexture.d.ts.map +1 -1
  430. package/build/video/webgl/texture/store.d.ts +1 -50
  431. package/build/video/webgl/texture/store.d.ts.map +1 -1
  432. package/build/video/webgl/utils/attributes.d.ts +1 -11
  433. package/build/video/webgl/utils/attributes.d.ts.map +1 -1
  434. package/build/video/webgl/utils/maxtextures.d.ts +1 -36
  435. package/build/video/webgl/utils/maxtextures.d.ts.map +1 -1
  436. package/build/video/webgl/utils/precision.d.ts +1 -14
  437. package/build/video/webgl/utils/precision.d.ts.map +1 -1
  438. package/build/video/webgl/utils/program.d.ts +1 -5
  439. package/build/video/webgl/utils/program.d.ts.map +1 -1
  440. package/build/video/webgl/utils/samplercache.d.ts +1 -68
  441. package/build/video/webgl/utils/samplercache.d.ts.map +1 -1
  442. package/build/video/webgl/utils/string.d.ts +1 -21
  443. package/build/video/webgl/utils/string.d.ts.map +1 -1
  444. package/build/video/webgl/utils/topology.d.ts +1 -23
  445. package/build/video/webgl/utils/topology.d.ts.map +1 -1
  446. package/build/video/webgl/utils/uniforms.d.ts +1 -25
  447. package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
  448. package/build/video/webgl/utils/vertexformat.d.ts +1 -26
  449. package/build/video/webgl/utils/vertexformat.d.ts.map +1 -1
  450. package/build/video/webgl/webgl_renderer.d.ts +24 -286
  451. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  452. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +0 -6
  453. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -1
  454. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +0 -8
  455. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
  456. package/build/video/webgpu/batchers/mesh_batcher.d.ts +1 -230
  457. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
  458. package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
  459. package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -82
  460. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
  461. package/build/video/webgpu/buffer/arena.d.ts +1 -63
  462. package/build/video/webgpu/buffer/arena.d.ts.map +1 -1
  463. package/build/video/webgpu/buffer/instance_buffer.d.ts +1 -64
  464. package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -1
  465. package/build/video/webgpu/buffer/retained_geometry.d.ts +1 -54
  466. package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -1
  467. package/build/video/webgpu/buffer/uniformring.d.ts +1 -67
  468. package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -1
  469. package/build/video/webgpu/effect_binding.d.ts +1 -16
  470. package/build/video/webgpu/effect_binding.d.ts.map +1 -1
  471. package/build/video/webgpu/pipeline/bindgroups.d.ts +1 -32
  472. package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -1
  473. package/build/video/webgpu/pipeline/cache.d.ts +1 -163
  474. package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
  475. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +1 -87
  476. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  477. package/build/video/webgpu/shaders/mesh-instanced.d.ts +1 -43
  478. package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -1
  479. package/build/video/webgpu/texture/compressed.d.ts +1 -32
  480. package/build/video/webgpu/texture/compressed.d.ts.map +1 -1
  481. package/build/video/webgpu/texture/frametexture.d.ts +1 -62
  482. package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
  483. package/build/video/webgpu/texture/store.d.ts +1 -147
  484. package/build/video/webgpu/texture/store.d.ts.map +1 -1
  485. package/build/video/webgpu/webgpu_renderer.d.ts +2 -89
  486. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  487. package/package.json +8 -11
  488. package/skills/AGENTS.md +67 -0
  489. package/skills/melonjs/SKILL.md +156 -0
  490. package/skills/melonjs-20-migration/SKILL.md +160 -0
  491. package/skills/melonjs-3d/SKILL.md +525 -0
  492. package/skills/melonjs-3d-assets/SKILL.md +258 -0
  493. package/skills/melonjs-audio/SKILL.md +236 -0
  494. package/skills/melonjs-camera-and-drawing/SKILL.md +175 -0
  495. package/skills/melonjs-deployment/SKILL.md +113 -0
  496. package/skills/melonjs-effects-and-shaders/SKILL.md +178 -0
  497. package/skills/melonjs-events/SKILL.md +159 -0
  498. package/skills/melonjs-getting-started/SKILL.md +183 -0
  499. package/skills/melonjs-input/SKILL.md +166 -0
  500. package/skills/melonjs-lighting/SKILL.md +139 -0
  501. package/skills/melonjs-loading-assets/SKILL.md +186 -0
  502. package/skills/melonjs-particles-and-trails/SKILL.md +136 -0
  503. package/skills/melonjs-performance/SKILL.md +183 -0
  504. package/skills/melonjs-physics/SKILL.md +321 -0
  505. package/skills/melonjs-plugins/SKILL.md +191 -0
  506. package/skills/melonjs-renderables/SKILL.md +214 -0
  507. package/skills/melonjs-renderer-backends/SKILL.md +173 -0
  508. package/skills/melonjs-scenes-and-state/SKILL.md +180 -0
  509. package/skills/melonjs-sprites-and-animation/SKILL.md +173 -0
  510. package/skills/melonjs-tilemaps/SKILL.md +213 -0
  511. package/skills/melonjs-ui-and-text/SKILL.md +65 -0
  512. package/build/audio/backend.d.ts +0 -140
  513. package/build/audio/backend.d.ts.map +0 -1
  514. package/build/loader/parsers/fetchdata.d.ts +0 -32
  515. package/build/loader/parsers/fetchdata.d.ts.map +0 -1
@@ -1,106 +1,4 @@
1
- /**
2
- * GPU-accelerated renderer for orthogonal TMX tile layers (WebGL2). Draws
3
- * the visible region of a layer as one screen-aligned quad per tileset
4
- * referenced by the layer — the fragment shader samples a per-layer GID
5
- * index texture and the tileset atlas, eliminating the per-tile draw
6
- * loop. The visible rect, GID range, tile size, opacity, and tint are
7
- * pushed as uniforms; the index texture is uploaded once at activation
8
- * and re-uploaded only when `layer.dataVersion` changes (mutations from
9
- * `setTile`/`clearTile`).
10
- *
11
- * The per-layer index texture is a `BufferTextureResource` flowing
12
- * through the standard `TextureCache` / batcher path — same lane as
13
- * every other texture in the engine. Dynamic unit allocation, correct
14
- * `boundTextures` bookkeeping, and per-resource premultiplied-alpha /
15
- * filter all come for free; nothing here pokes `gl.bindTexture` or
16
- * `gl.activeTexture` directly.
17
- *
18
- * Cache lifecycle: one `BufferTextureResource` per `TMXLayer`. Tile
19
- * layers don't come and go individually — they only churn on game reset
20
- * — so the cache is freed in bulk via `reset()`, called from
21
- * `WebGLRenderer.reset()` (which the `GAME_RESET` event already
22
- * triggers).
23
- *
24
- * @ignore
25
- */
26
- export default class OrthogonalTMXLayerGPURenderer {
27
- /**
28
- * @param {WebGLRenderer} renderer - the WebGL renderer instance
29
- */
30
- constructor(renderer: WebGLRenderer);
31
- renderer: WebGLRenderer;
32
- gl: WebGLRenderingContext;
33
- shader: GLShader;
34
- resources: Map<any, any>;
35
- animLookups: Map<any, any>;
36
- _v2: Float32Array<ArrayBuffer>;
37
- _v4: Float32Array<ArrayBuffer>;
38
- /**
39
- * Free every cached per-layer index texture and empty the local
40
- * resource map. Called from `WebGLRenderer.reset()` (which
41
- * `GAME_RESET` triggers) so each level transition starts clean.
42
- * @ignore
43
- */
44
- reset(): void;
45
- /**
46
- * Write a `vec2` uniform without allocating a fresh Float32Array per
47
- * call. Both components flow into the shared `_v2` scratch buffer,
48
- * which `setUniform` reads synchronously and forwards to
49
- * `gl.uniform2fv` — so reusing the buffer across calls is safe.
50
- * @param {string} name
51
- * @param {number} x
52
- * @param {number} y
53
- * @private
54
- */
55
- private _setV2;
56
- /**
57
- * `vec4` counterpart to {@link _setV2}.
58
- * @param {string} name
59
- * @param {number} x
60
- * @param {number} y
61
- * @param {number} z
62
- * @param {number} w
63
- * @private
64
- */
65
- private _setV4;
66
- /**
67
- * Get-or-create the per-tileset animation-lookup entry. Returns
68
- * `undefined` for tilesets that have no animated tiles (the shader's
69
- * `uAnimEnabled` uniform is then set to 0 and the lookup texture is
70
- * not bound).
71
- *
72
- * The entry holds a `tileCount × 1` RGBA8 `BufferTextureResource`
73
- * where texel `localId` encodes the CURRENT frame's local id as
74
- * `R = lo byte, G = hi byte` (same encoding as the GID index
75
- * texture). Each call walks `tileset.animations` and rewrites
76
- * dirty texels — `tileset.update(dt)` (driven by the layer) advances
77
- * `anim.cur.tileid` independently of this renderer.
78
- *
79
- * @param {object} tileset
80
- * @param {number} tileCount - tiles in the tileset's atlas grid
81
- * (`atlasCols * atlasRows`)
82
- * @returns {{resource: BufferTextureResource, data: Uint8Array,
83
- * tileCount: number, dirty: boolean}|undefined}
84
- */
85
- _getOrUpdateAnimLookup(tileset: object, tileCount: number): {
86
- resource: BufferTextureResource;
87
- data: Uint8Array;
88
- tileCount: number;
89
- dirty: boolean;
90
- } | undefined;
91
- /**
92
- * Get-or-create the per-layer index `BufferTextureResource`.
93
- * @param {TMXLayer} layer
94
- * @returns {BufferTextureResource}
95
- */
96
- _getResource(layer: TMXLayer): BufferTextureResource;
97
- /**
98
- * Draw an orthogonal TMX layer through the shader path.
99
- * @param {TMXLayer} layer
100
- * @param {object} rect - the visible viewport rect (world coords)
101
- */
102
- draw(layer: TMXLayer, rect: object): void;
103
- }
1
+
104
2
  import type { default as WebGLRenderer } from "../../webgl_renderer.js";
105
3
  import GLShader from "../../glshader.js";
106
4
  import { BufferTextureResource } from "../../../texture/resource.js";
@@ -1 +1 @@
1
- {"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgl/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACC;;OAEG;IACH,sBAFW,aAAa,EAkCvB;IA/BA,wBAAwB;IACxB,0BAAqB;IAUrB,iBAKC;IAMD,yBAA0B;IAI1B,2BAA4B;IAG5B,+BAA8B;IAC9B,+BAA8B;IAG/B;;;;;OAKG;IACH,cAiCC;IAED;;;;;;;;;OASG;IACH,eAIC;IAED;;;;;;;;OAQG;IACH,eAMC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,gCANW,MAAM,aACN,MAAM,GAEJ;QAAC,QAAQ,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,UAAU,CAAC;QAC3D,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,GAAC,SAAS,CA+ChD;IAED;;;;OAIG;IACH,oBAHW,QAAQ,GACN,qBAAqB,CA6BjC;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QA0JhB;CACD;8CAlZ4C,yBAAyB;qBAPjD,mBAAmB;sCADF,8BAA8B;yCAO5B,qCAAqC"}
1
+ {"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgl/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IACC;;OAEG;IACH,sBAFW,aAAa,EA0CvB;IAvCA,wBAAwB;IACxB,0BAAqB;IAUrB,iBAKC;IAMD,yBAA0B;IAI1B,2BAA4B;IAG5B;;;OAGG;IACH,+BAA8B;IAC9B;;;OAGG;IACH,+BAA8B;IAG/B;;;;;;OAMG;IACH,cAiCC;IAED;;;;;;;;;;;OAWG;IACH,eAIC;IAED;;;;;;;;;;OAUG;IACH,eAMC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gCARW,MAAM,aACN,MAAM,GAEJ;QAAC,QAAQ,EAAE,qBAAqB,CAAC;QAAC,IAAI,EAAE,UAAU,CAAC;QAC3D,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,GAAC,SAAS,CAiDhD;IAED;;;;;;OAMG;IACH,oBALW,QAAQ,GACN,qBAAqB,CA+BjC;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QA0JhB;CACD;8CApa4C,yBAAyB;qBAPjD,mBAAmB;sCADF,8BAA8B;yCAO5B,qCAAqC"}
@@ -1,27 +1,2 @@
1
- /**
2
- * Generate the fragment shader for `LitQuadBatcher` — the SpriteIlluminator
3
- * path that supports per-pixel normal-map lighting from up to `MAX_LIGHTS`
4
- * point lights.
5
- *
6
- * Sprites without a `normalMap` push `aNormalTextureId = -1` and take the
7
- * unlit fast path inside this same shader (sample color, multiply by
8
- * vertex color, return) so lit and unlit sprites can share the lit batch
9
- * when they coexist with active lights. The cost vs the truly-unlit
10
- * `QuadBatcher` shader is one interpolated read + one comparison per
11
- * fragment.
12
- *
13
- * The light's "height above the sprite plane" is encoded as a small
14
- * fraction of the light's radius (default `0.075`) so that lights
15
- * exactly at a fragment's screen position don't produce degenerate
16
- * flat shading.
17
- *
18
- * GLSL ES 3.00, because the light data arrives in a uniform block and
19
- * blocks do not exist in ES 1.00 (see #1552). The paired vertex shader
20
- * `quad-multi-lit.vert` is on the same version — both stages of a program
21
- * must agree.
22
- * @param {number} maxTextures - the number of color/normal texture units to support
23
- * @returns {string} GLSL fragment shader source
24
- * @ignore
25
- */
26
- export function buildLitMultiTextureFragment(maxTextures: number): string;
1
+
27
2
  //# sourceMappingURL=multitexture-lit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multitexture-lit.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture-lit.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,0DAJW,MAAM,GACJ,MAAM,CAsGlB"}
1
+ {"version":3,"file":"multitexture-lit.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture-lit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,0DALW,MAAM,GACJ,MAAM,CAuGlB"}
@@ -1,10 +1,2 @@
1
- /**
2
- * Generates a multi-texture fragment shader source string.
3
- * Declares individual sampler uniforms (uSampler0..uSamplerN) and uses
4
- * an if/else chain with 0.5-offset thresholds to select the correct texture unit.
5
- * @param {number} maxTextures - the number of texture units to support
6
- * @returns {string} GLSL fragment shader source
7
- * @ignore
8
- */
9
- export function buildMultiTextureFragment(maxTextures: number): string;
1
+
10
2
  //# sourceMappingURL=multitexture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multitexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,uDAJW,MAAM,GACJ,MAAM,CAqClB"}
1
+ {"version":3,"file":"multitexture.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/shaders/multitexture.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,uDALW,MAAM,GACJ,MAAM,CAsClB"}
@@ -1,52 +1,3 @@
1
- /**
2
- * The WebGL realization of {@link TextureStore}.
3
- *
4
- * The shared base owns the policy — source → record, the reuse-or-upload
5
- * decision, generation and lifetime bookkeeping. This subclass owns the GL
6
- * calls, and nothing else. Mirrors the `Batcher` / `WebGLBatcher` /
7
- * `WebGPUBatcher` arrangement: one neutral base, one realization per backend.
8
- *
9
- * Two instances exist per renderer: the colour store, which every batcher
10
- * shares through `WebGLRenderer.textureStore`, and the lit batcher's
11
- * normal-map store — normal maps live outside the colour `TextureCache`, so
12
- * their handles are that batcher's to own, but the policy is identical.
13
- * @augments TextureStore
14
- * @ignore
15
- */
16
- export class WebGLTextureStore extends TextureStore {
17
- /**
18
- * @param {WebGL2RenderingContext} gl - the owning context
19
- * @ignore
20
- */
21
- constructor(gl: WebGL2RenderingContext);
22
- gl: WebGL2RenderingContext;
23
- /**
24
- * @returns {WebGLTexture} a fresh texture object
25
- * @ignore
26
- */
27
- onCreate(): WebGLTexture;
28
- /**
29
- * Push the source's pixels.
30
- *
31
- * Delegated to a per-call closure rather than implemented here, because a
32
- * GL upload needs the *batcher's* `createTexture2D`: it binds the target
33
- * unit, tracks immutable-storage shape, and swaps the texture object when
34
- * the shape changes. None of that is residency, and moving it into the
35
- * store would drag the batcher's unit bookkeeping along with it.
36
- * @param {WebGLTexture} handle - the existing texture object
37
- * @param {object} source - the image/canvas being uploaded
38
- * @param {object} record - the resident record
39
- * @param {object} options - carries `upload(handle)`
40
- * @returns {WebGLTexture} the handle actually used, which may be a
41
- * replacement when immutable storage had to be respecified
42
- * @ignore
43
- */
44
- onUpload(handle: WebGLTexture, source: object, record: object, options: object): WebGLTexture;
45
- /**
46
- * @param {WebGLTexture} handle - the texture object to release
47
- * @ignore
48
- */
49
- onDestroy(handle: WebGLTexture): void;
50
- }
1
+
51
2
  import { TextureStore } from "./../../gpu/texturestore.js";
52
3
  //# sourceMappingURL=store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/texture/store.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;OAGG;IACH,gBAHW,sBAAsB,EAMhC;IADA,2BAAY;IAGb;;;OAGG;IACH,YAHa,YAAY,CAKxB;IAED;;;;;;;;;;;;;;;OAeG;IACH,iBARW,YAAY,UACZ,MAAM,UACN,MAAM,WACN,MAAM,GACJ,YAAY,CAMxB;IAED;;;OAGG;IACH,kBAHW,YAAY,QAKtB;CACD;6BA9D4B,6BAA6B"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/texture/store.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;OAIG;IACH,gBAJW,sBAAsB,EAOhC;IADA,2BAAY;IAGb;;;;OAIG;IACH,YAJa,YAAY,CAMxB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,iBATW,YAAY,UACZ,MAAM,UACN,MAAM,WACN,MAAM,GACJ,YAAY,CAOxB;IAED;;;;OAIG;IACH,kBAJW,YAAY,QAMtB;CACD;6BAnE4B,6BAA6B"}
@@ -1,12 +1,2 @@
1
- /**
2
- * Pick out every vertex attribute name from a shader source, regardless of
3
- * GLSL version. GLSL 1.00 marks attributes with the `attribute` storage
4
- * qualifier; GLSL ES 3.00 reuses `in` at file scope for the same purpose
5
- * (and `in` inside function parameter lists, which we exclude by requiring
6
- * the qualifier to start at the beginning of a line). Skipping the 3.00
7
- * form leaves the shader with no bound vertex data and the rasterizer
8
- * silently degenerates every triangle.
9
- * @ignore
10
- */
11
- export function extractAttributes(gl: any, shader: any): {};
1
+
12
2
  //# sourceMappingURL=attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/attributes.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,4DAmBC"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/attributes.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,4DAmBC"}
@@ -1,37 +1,2 @@
1
- /**
2
- * Resolve the texture-unit pool this renderer will use.
3
- *
4
- * Clamping happens ONCE, at renderer construction, before the batchers and the
5
- * `TextureCache` are built — every consumer derives from the result, so the
6
- * batchers' sampler counts and the cache's capacity cannot disagree. A setting
7
- * above what the device reports is clamped down rather than honoured: declaring
8
- * more `sampler2D` uniforms than the device has units fails to link, and a link
9
- * failure at startup is not a useful way to learn about a typo.
10
- * @param {number} deviceMax - the device's `MAX_TEXTURE_IMAGE_UNITS`
11
- * @param {"auto"|number} [setting="auto"] - the `maxTextures` application setting
12
- * @returns {number} the pool size, at least 1 and never above `deviceMax`
13
- * @ignore
14
- */
15
- export function resolveMaxTextures(deviceMax: number, setting?: "auto" | number): number;
16
- /**
17
- * Default ceiling applied when `maxTextures` is `"auto"`.
18
- *
19
- * There is no spec maximum to defer to — WebGL 2 / GLES 3.0 only set a
20
- * *minimum* of 16 for `MAX_TEXTURE_IMAGE_UNITS`, and an implementation may
21
- * report any value at or above it. What actually limits us is that the
22
- * multi-texture fragment shader unrolls one sampler and one branch per unit
23
- * (see `buildMultiTextureFragment`), so a very wide pool costs compile time
24
- * and register pressure, and historically some drivers mis-compile the widest
25
- * ladders. 32 covers current desktop and mobile hardware while staying a
26
- * conservative default; raise or lower it with the `maxTextures` setting.
27
- * @ignore
28
- */
29
- export const AUTO_MAX_TEXTURES: 32;
30
- /**
31
- * Smallest pool the engine will resolve to. A lit quad occupies a colour slot
32
- * and a normal-map slot simultaneously, so anything narrower makes the two ids
33
- * collide and the sprite samples its own albedo as a normal map.
34
- * @ignore
35
- */
36
- export const MIN_MAX_TEXTURES: 2;
1
+
37
2
  //# sourceMappingURL=maxtextures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"maxtextures.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/maxtextures.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;GAaG;AACH,8CALW,MAAM,YACN,MAAM,GAAC,MAAM,GACX,MAAM,CAgBlB;AAlDD;;;;;;;;;;;;GAYG;AACH,gCAAiC,EAAE,CAAC;AAEpC;;;;;GAKG;AACH,+BAAgC,CAAC,CAAC"}
1
+ {"version":3,"file":"maxtextures.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/maxtextures.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;GAcG;AACH,8CANW,MAAM,YACN,MAAM,GAAC,MAAM,GACX,MAAM,CAiBlB;AArDD;;;;;;;;;;;;;GAaG;AACH,gCAAiC,EAAE,CAAC;AAEpC;;;;;;GAMG;AACH,+BAAgC,CAAC,CAAC"}
@@ -1,15 +1,2 @@
1
- /**
2
- * set precision for the given shader source
3
- * won't do anything if the precision is already specified
4
- * @ignore
5
- */
6
- export function setPrecision(src: any, precision: any): any;
7
- /**
8
- * return the best shader precision for this device, up to the requested cap.
9
- * @ignore
10
- * @param {WebGLRenderingContext} gl - the current WebGL context
11
- * @param {boolean} [highPrecision=true] - if false, cap at "mediump" even when "highp" is available
12
- * @returns {string} "lowp", "mediump", or "highp"
13
- */
14
- export function getMaxShaderPrecision(gl: WebGLRenderingContext, highPrecision?: boolean): string;
1
+
15
2
  //# sourceMappingURL=precision.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"precision.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/precision.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,4DA+BC;AAED;;;;;;GAMG;AACH,0CAJW,qBAAqB,kBACrB,OAAO,GACL,MAAM,CAoBlB"}
1
+ {"version":3,"file":"precision.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/precision.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,4DA+BC;AAED;;;;;;;GAOG;AACH,0CAJW,qBAAqB,kBACrB,OAAO,GACL,MAAM,CAoBlB"}
@@ -1,6 +1,2 @@
1
- /**
2
- * Compile GLSL into a shader object
3
- * @ignore
4
- */
5
- export function compileProgram(gl: any, vertex: any, fragment: any, attributes: any): any;
1
+
6
2
  //# sourceMappingURL=program.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/program.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,0FA8CC"}
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/program.js"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,0FA8CC"}
@@ -1,69 +1,2 @@
1
- /**
2
- * WebGL 2 sampler objects, deduplicated by their state.
3
- *
4
- * GL bakes wrap and filter into the texture *object*, which is why the same
5
- * image drawn at two repeat modes historically needed two texture units AND
6
- * two uploads (#1448). Sampler objects — core in GLES 3.0, and unconditionally
7
- * available since 20.0 dropped WebGL 1 — move that state out of the texture and
8
- * onto the unit, exactly as the WebGPU backend already separates `GPUTexture`
9
- * from `GPUSampler`.
10
- *
11
- * That separation is what lets texture residency be keyed by **source alone**:
12
- * one upload serves every variant, and the variant rides the sampler. Slot
13
- * assignment stays per `(source, variant)`, because a bound sampler applies to
14
- * a unit and a unit carries one at a time.
15
- *
16
- * Deliberately mirrors `WebGPUTextureStore.getSampler(filter, repeat, mipmaps)`
17
- * — same key, same dedup, so the two backends stay legible side by side.
18
- * @ignore
19
- */
20
- export class GLSamplerCache {
21
- /**
22
- * @param {WebGL2RenderingContext} gl - the owning context
23
- * @ignore
24
- */
25
- constructor(gl: WebGL2RenderingContext);
26
- gl: WebGL2RenderingContext;
27
- /** @type {Map<string, WebGLSampler>} */
28
- samplers: Map<string, WebGLSampler>;
29
- lastFilter: number;
30
- lastRepeat: any;
31
- lastMipmap: any;
32
- lastSampler: WebGLSampler | null;
33
- /** @type {Array<WebGLSampler|null>} */
34
- bound: Array<WebGLSampler | null>;
35
- /**
36
- * The sampler for a filter/wrap/mip combination, created once and reused.
37
- *
38
- * There are only a handful of live combinations in any scene — two filters
39
- * times four repeat modes — so this Map stays tiny however many textures a
40
- * game loads.
41
- * @param {number} filter - `gl.NEAREST` or `gl.LINEAR`
42
- * @param {string} [repeat="no-repeat"] - canvas-style repeat mode
43
- * @param {boolean} [mipmap=false] - sample the mip chain (trilinear)
44
- * @returns {WebGLSampler} the shared sampler
45
- * @ignore
46
- */
47
- get(filter: number, repeat?: string, mipmap?: boolean): WebGLSampler;
48
- /**
49
- * Bind a sampler to a texture unit, or unbind with `null`.
50
- *
51
- * A bound sampler overrides the texture object's own parameters entirely,
52
- * which is what makes one texture usable at several variants at once.
53
- * @param {number} unit - the texture unit
54
- * @param {WebGLSampler|null} sampler - the sampler, or `null` to fall back
55
- * to the texture's own state
56
- * @ignore
57
- */
58
- bind(unit: number, sampler: WebGLSampler | null): void;
59
- /**
60
- * Delete every sampler. Called on context loss — the GL objects died with
61
- * the context, so this only drops our side of the bookkeeping and lets the
62
- * next `get` mint fresh ones.
63
- * @param {boolean} [destroy=false] - whether to `deleteSampler` first
64
- * (orderly teardown; skip it for a lost context)
65
- * @ignore
66
- */
67
- releaseAll(destroy?: boolean): void;
68
- }
1
+
69
2
  //# sourceMappingURL=samplercache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"samplercache.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/samplercache.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IACC;;;OAGG;IACH,gBAHW,sBAAsB,EAmBhC;IAfA,2BAAY;IACZ,wCAAwC;IACxC,UADW,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CACX;IAKzB,mBAAoB;IACpB,gBAAsB;IACtB,gBAAsB;IACtB,iCAAuB;IAGvB,uCAAuC;IACvC,OADW,KAAK,CAAC,YAAY,GAAC,IAAI,CAAC,CACpB;IAGhB;;;;;;;;;;;OAWG;IACH,YANW,MAAM,WACN,MAAM,WACN,OAAO,GACL,YAAY,CAsCxB;IAED;;;;;;;;;OASG;IACH,WALW,MAAM,WACN,YAAY,GAAC,IAAI,QAU3B;IAED;;;;;;;OAOG;IACH,qBAJW,OAAO,QAiBjB;CACD"}
1
+ {"version":3,"file":"samplercache.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/samplercache.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACC;;;;OAIG;IACH,gBAJW,sBAAsB,EAoBhC;IAfA,2BAAY;IACZ,wCAAwC;IACxC,UADW,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CACX;IAKzB,mBAAoB;IACpB,gBAAsB;IACtB,gBAAsB;IACtB,iCAAuB;IAGvB,uCAAuC;IACvC,OADW,KAAK,CAAC,YAAY,GAAC,IAAI,CAAC,CACpB;IAGhB;;;;;;;;;;;;OAYG;IACH,YAPW,MAAM,WACN,MAAM,WACN,OAAO,GACL,YAAY,CAuCxB;IAED;;;;;;;;;;OAUG;IACH,WANW,MAAM,WACN,YAAY,GAAC,IAAI,QAW3B;IAED;;;;;;;;OAQG;IACH,qBALW,OAAO,QAkBjB;CACD"}
@@ -1,22 +1,2 @@
1
- /**
2
- * clean the given source from space, comments, etc...
3
- * @ignore
4
- */
5
- export function minify(src: any): any;
6
- /**
7
- * Prepend preprocessor defines to a GLSL source, respecting `#version`.
8
- *
9
- * `#version` must be the very first statement of a GLSL ES 3.00 shader —
10
- * anything before it, including a `#define`, is a compile error. So defines
11
- * go immediately *after* that line when one is present, and at the top when
12
- * it is not (GLSL ES 1.00 sources declare no version).
13
- *
14
- * Used to compile shader variants from one source: the optional parts are
15
- * `#ifdef`-guarded, and the variant is what defines are injected here.
16
- * @param {string} source - the shader source
17
- * @param {string} defines - `#define` lines, each newline-terminated
18
- * @returns {string} the source with the defines injected
19
- * @ignore
20
- */
21
- export function injectDefines(source: string, defines: string): string;
1
+
22
2
  //# sourceMappingURL=string.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/string.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sCAWC;AAED;;;;;;;;;;;;;;GAcG;AACH,sCALW,MAAM,WACN,MAAM,GACJ,MAAM,CAoBlB"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/string.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,sCAWC;AAED;;;;;;;;;;;;;;;GAeG;AACH,sCANW,MAAM,WACN,MAAM,GACJ,MAAM,CAqBlB"}
@@ -1,24 +1,2 @@
1
- /**
2
- * Normalize a draw mode to its GL enum.
3
- *
4
- * Accepts either vocabulary and always returns a number, so callers can keep
5
- * comparing modes numerically. This matters more than it looks: a topology
6
- * string that reaches a GL draw call is coerced to `NaN` and then to `0`,
7
- * which *is* `POINTS` — so a missed translation does not throw, it silently
8
- * renders the batch as points.
9
- * @param {WebGL2RenderingContext} gl - the rendering context
10
- * @param {string|GLenum} value - a topology name or a GL primitive enum
11
- * @returns {GLenum} the GL primitive mode
12
- * @throws {Error} when `value` is neither a known topology nor a number
13
- * @ignore
14
- */
15
- export function resolveTopology(gl: WebGL2RenderingContext, value: string | GLenum): GLenum;
16
- /**
17
- * Name a GL primitive mode in the neutral vocabulary.
18
- * @param {WebGL2RenderingContext} gl - the rendering context
19
- * @param {GLenum} mode - a GL primitive mode
20
- * @returns {string|undefined} the topology name, or `undefined` for an unknown mode
21
- * @ignore
22
- */
23
- export function topologyFromGL(gl: WebGL2RenderingContext, mode: GLenum): string | undefined;
1
+
24
2
  //# sourceMappingURL=topology.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/topology.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;GAaG;AACH,oCANW,sBAAsB,SACtB,MAAM,GAAC,MAAM,GACX,MAAM,CA0BlB;AAED;;;;;;GAMG;AACH,mCALW,sBAAsB,QACtB,MAAM,GACJ,MAAM,GAAC,SAAS,CAa5B"}
1
+ {"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/topology.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;GAcG;AACH,oCAPW,sBAAsB,SACtB,MAAM,GAAC,MAAM,GACX,MAAM,CA2BlB;AAED;;;;;;;GAOG;AACH,mCANW,sBAAsB,QACtB,MAAM,GACJ,MAAM,GAAC,SAAS,CAc5B"}
@@ -1,26 +1,2 @@
1
- /**
2
- * Capture the current value into the cache slot so future `setUniform`
3
- * calls can short-circuit. Reuses the existing slot (and its allocation)
4
- * when the length matches — only a length change or a first capture
5
- * allocates a fresh array.
6
- * @ignore
7
- */
8
- export function captureValue(prev: any, val: any): any;
9
- /**
10
- * Build the `uniforms` proxy object for a compiled shader program.
11
- *
12
- * Each detected uniform gets a defineProperty getter (returns its
13
- * `WebGLUniformLocation`) and a setter that pushes the value to GL. The
14
- * setter caches the last value it sent and skips the underlying
15
- * `gl.uniform*` call when the incoming value matches — uniform writes are
16
- * cheap individually, but a typical per-frame draw pass sets a dozen of
17
- * them per shader, and most are layer-lifetime constants (`uMapSize`,
18
- * `uCellSize`, `uOpacity`, projection matrix on idle frames, etc.).
19
- *
20
- * Cache scope is per-shader: each `GLShader` calls `extractUniforms` once
21
- * and gets its own closure-captured `cache` map, so caches don't leak
22
- * across programs.
23
- * @ignore
24
- */
25
- export function extractUniforms(gl: any, shader: any): {};
1
+
26
2
  //# sourceMappingURL=uniforms.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uniforms.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/uniforms.js"],"names":[],"mappings":"AA6DA;;;;;;GAMG;AACH,uDAoBC;AAED;;;;;;;;;;;;;;;GAeG;AACH,0DAmEC"}
1
+ {"version":3,"file":"uniforms.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/uniforms.js"],"names":[],"mappings":"AA+DA;;;;;;;GAOG;AACH,uDAoBC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,0DAmEC"}
@@ -1,27 +1,2 @@
1
- /**
2
- * The GL enum a vertex format's components are read as.
3
- * @param {WebGL2RenderingContext} gl - the rendering context
4
- * @param {string} format - a supported vertex format name
5
- * @returns {GLenum} the matching component type
6
- * @throws {Error} when `format` is not a supported format name
7
- * @ignore
8
- */
9
- export function glTypeForFormat(gl: WebGL2RenderingContext, format: string): GLenum;
10
- /**
11
- * Name a WebGL attribute description in the neutral vocabulary.
12
- *
13
- * Returns `undefined` when the combination has no name — three-component 8-
14
- * and 16-bit types, for instance, which the GPU vocabulary simply does not
15
- * define. That absence is deliberate and meaningful: a made-up name would
16
- * travel into a backend that cannot honour it and fail there, far from the
17
- * layout that produced it. An attribute with no portable format is still
18
- * perfectly valid on the WebGL path.
19
- * @param {WebGL2RenderingContext} gl - the rendering context
20
- * @param {number} size - component count (1-4)
21
- * @param {GLenum} type - component type
22
- * @param {boolean} normalized - whether integers are scaled into `[0, 1]` / `[-1, 1]`
23
- * @returns {string|undefined} the format name, or `undefined` when none exists
24
- * @ignore
25
- */
26
- export function formatFromGL(gl: WebGL2RenderingContext, size: number, type: GLenum, normalized: boolean): string | undefined;
1
+
27
2
  //# sourceMappingURL=vertexformat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vertexformat.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/vertexformat.js"],"names":[],"mappings":"AAgCA;;;;;;;GAOG;AACH,oCANW,sBAAsB,UACtB,MAAM,GACJ,MAAM,CAOlB;AAED;;;;;;;;;;;;;;;GAeG;AACH,iCAPW,sBAAsB,QACtB,MAAM,QACN,MAAM,cACN,OAAO,GACL,MAAM,GAAC,SAAS,CAwC5B"}
1
+ {"version":3,"file":"vertexformat.d.ts","sourceRoot":"","sources":["../../../../src/video/webgl/utils/vertexformat.js"],"names":[],"mappings":"AAkCA;;;;;;;;GAQG;AACH,oCAPW,sBAAsB,UACtB,MAAM,GACJ,MAAM,CAQlB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,iCARW,sBAAsB,QACtB,MAAM,QACN,MAAM,cACN,OAAO,GACL,MAAM,GAAC,SAAS,CAyC5B"}