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,84 +1,3 @@
1
- /**
2
- * @import RenderTarget from "./rendertarget.ts";
3
- */
4
- /**
5
- * Manages a pool of {@link RenderTarget} instances for post-effect processing.
6
- * Renderer-agnostic — the actual RenderTarget creation is delegated to a
7
- * factory function provided by the renderer (WebGL, WebGPU, etc.).
8
- *
9
- * Camera effects use pool indices 0 and 1 (capture + ping-pong); sprite
10
- * effects use indices 2 and 3, and each NESTED sprite pass (a multi-effect
11
- * renderable drawn inside another multi-effect renderable) gets its own pair
12
- * above that (4/5, 6/7, …), tracked by a stack of active bases so begin/end
13
- * pairs compose like save/restore.
14
- * Render targets are lazily created and resized to match the required dimensions.
15
- * @ignore
16
- */
17
- export default class RenderTargetPool {
18
- /**
19
- * @param {function(number, number, boolean=): RenderTarget} factory - creates a RenderTarget with the given width and height; the third argument is `true` for CAPTURE slots (scene rasterization — may be multisampled) and `false` for ping-pong intermediates
20
- */
21
- constructor(factory: (arg0: number, arg1: number, arg2: boolean | undefined) => RenderTarget);
22
- /** @type {function(number, number): RenderTarget} */
23
- _factory: (arg0: number, arg1: number) => RenderTarget;
24
- /** @type {RenderTarget[]} */
25
- _pool: RenderTarget[];
26
- /**
27
- * active pass bases, innermost last — a STACK, so nested begin/end
28
- * pairs unwind correctly (two scalars silently corrupted the pool on
29
- * nested passes: the inner end() popped the outer pass's slot)
30
- * @type {number[]}
31
- */
32
- _baseStack: number[];
33
- /**
34
- * The base index of the innermost active pass, or -1 when none.
35
- * @returns {number}
36
- */
37
- get activeBase(): number;
38
- /**
39
- * Get or create a render target at the given pool index, resized to the given dimensions.
40
- * @param {number} index - pool index
41
- * @param {number} width - desired width in pixels
42
- * @param {number} height - desired height in pixels
43
- * @returns {RenderTarget} the render target
44
- */
45
- get(index: number, width: number, height: number): RenderTarget;
46
- /**
47
- * Prepare render targets for a post-effect pass.
48
- * Allocates/resizes the capture target and optionally the ping-pong target.
49
- * @param {boolean} isCamera - true for camera effects (indices 0+1), false for sprite (indices 2+3)
50
- * @param {number} effectCount - number of enabled effects
51
- * @param {number} width - target width in pixels
52
- * @param {number} height - target height in pixels
53
- * @returns {RenderTarget} the capture target (ready to bind)
54
- */
55
- begin(isCamera: boolean, effectCount: number, width: number, height: number): RenderTarget;
56
- /**
57
- * Get the capture render target for the current active pass.
58
- * @returns {RenderTarget|undefined} the capture target, or undefined if no active pass
59
- */
60
- getCaptureTarget(): RenderTarget | undefined;
61
- /**
62
- * Get the ping-pong render target for the current active pass.
63
- * @returns {RenderTarget|undefined} the ping-pong target, or undefined if no active pass
64
- */
65
- getPingPongTarget(): RenderTarget | undefined;
66
- /**
67
- * End the current pass and restore the previous active base.
68
- * Returns the parent render target to rebind (or null for screen).
69
- * @returns {RenderTarget|null} the parent target, or null if returning to screen
70
- */
71
- end(): RenderTarget | null;
72
- /**
73
- * Resize all existing render targets in the pool to the given dimensions.
74
- * @param {number} width - new width in pixels
75
- * @param {number} height - new height in pixels
76
- */
77
- resizeAll(width: number, height: number): void;
78
- /**
79
- * Destroy all render targets and clear the pool.
80
- */
81
- destroy(): void;
82
- }
1
+
83
2
  import type RenderTarget from "./rendertarget.ts";
84
3
  //# sourceMappingURL=render_target_pool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render_target_pool.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/render_target_pool.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;GAYG;AACH;IACC;;OAEG;IACH,qBAFW,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAQ,EAAR,OAAO,YAAC,KAAG,YAAY,EAc1D;IAXA,qDAAqD;IACrD,UADW,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,KAAG,YAAY,CAC1B;IACvB,6BAA6B;IAC7B,OADW,YAAY,EAAE,CACV;IACf;;;;;OAKG;IACH,YAFU,MAAM,EAAE,CAEE;IAGrB;;;OAGG;IACH,kBAFa,MAAM,CAMlB;IAED;;;;;;OAMG;IACH,WALW,MAAM,SACN,MAAM,UACN,MAAM,GACJ,YAAY,CAaxB;IAED;;;;;;;;OAQG;IACH,gBANW,OAAO,eACP,MAAM,SACN,MAAM,UACN,MAAM,GACJ,YAAY,CAuBxB;IAED;;;OAGG;IACH,oBAFa,YAAY,GAAC,SAAS,CAQlC;IAED;;;OAGG;IACH,qBAFa,YAAY,GAAC,SAAS,CAQlC;IAED;;;;OAIG;IACH,OAFa,YAAY,GAAC,IAAI,CAS7B;IAED;;;;OAIG;IACH,iBAHW,MAAM,UACN,MAAM,QAQhB;IAED;;OAEG;IACH,gBAQC;CACD;8BA/J4B,mBAAmB"}
1
+ {"version":3,"file":"render_target_pool.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/render_target_pool.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;GAaG;AACH;IACC;;OAEG;IACH,qBAFW,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAQ,EAAR,OAAO,YAAC,KAAG,YAAY,EAwB1D;IArBA;;;;OAIG;IACH,UAJU,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,KAAG,YAAY,CAIzB;IACvB;;;;OAIG;IACH,OAJU,YAAY,EAAE,CAIT;IACf;;;;;;;OAOG;IACH,YAJU,MAAM,EAAE,CAIE;IAGrB;;;OAGG;IACH,kBAFa,MAAM,CAMlB;IAED;;;;;;OAMG;IACH,WALW,MAAM,SACN,MAAM,UACN,MAAM,GACJ,YAAY,CAaxB;IAED;;;;;;;;OAQG;IACH,gBANW,OAAO,eACP,MAAM,SACN,MAAM,UACN,MAAM,GACJ,YAAY,CAuBxB;IAED;;;OAGG;IACH,oBAFa,YAAY,GAAC,SAAS,CAQlC;IAED;;;OAGG;IACH,qBAFa,YAAY,GAAC,SAAS,CAQlC;IAED;;;;OAIG;IACH,OAFa,YAAY,GAAC,IAAI,CAS7B;IAED;;;;OAIG;IACH,iBAHW,MAAM,UACN,MAAM,QAQhB;IAED;;OAEG;IACH,gBAQC;CACD;8BA1K4B,mBAAmB"}
@@ -1,66 +1,3 @@
1
- /**
2
- * A WebGL Framebuffer Object (FBO) render target for offscreen rendering.
3
- * Used by the post-processing pipeline to render a camera's output to a texture,
4
- * which can then be drawn to the screen through a post-process shader.
5
- * @augments RenderTarget
6
- * @ignore
7
- */
8
- export default class WebGLRenderTarget extends RenderTarget {
9
- /**
10
- * @param {WebGLRenderingContext|WebGL2RenderingContext} gl - the WebGL context
11
- * @param {number} width - initial width in pixels
12
- * @param {number} height - initial height in pixels
13
- */
14
- /**
15
- * @param {WebGLRenderingContext|WebGL2RenderingContext} gl - the WebGL context
16
- * @param {number} width - initial width in pixels
17
- * @param {number} height - initial height in pixels
18
- * @param {object} [options] - target options
19
- * @param {number} [options.samples=0] - MSAA sample count for the scene
20
- * rasterization. When > 0 the target keeps a multisampled render FBO
21
- * (color + depth-stencil renderbuffers) that draws rasterize into, and
22
- * resolves it into the sampleable texture via `blitFramebuffer` on
23
- * {@link WebGLRenderTarget#resolve} (called automatically by `unbind`).
24
- */
25
- constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, width: number, height: number, options?: {
26
- samples?: number | undefined;
27
- });
28
- gl: WebGLRenderingContext | WebGL2RenderingContext;
29
- /**
30
- * MSAA sample count of the render half (0 = single-sampled)
31
- * @type {number}
32
- */
33
- samples: number;
34
- _needsResolve: boolean;
35
- framebuffer: WebGLFramebuffer;
36
- depthStencilBuffer: WebGLRenderbuffer;
37
- renderFramebuffer: WebGLFramebuffer | null;
38
- colorRenderbuffer: WebGLRenderbuffer | null;
39
- /**
40
- * (Re)create the sampleable color texture with immutable storage
41
- * (`texStorage2D` — the driver skips completeness validation and the
42
- * layout is explicit) and attach it to the resolve framebuffer.
43
- * Immutable storage can never be respecified, so a resize replaces the
44
- * texture object. Caller manages ACTIVE_TEXTURE save/restore.
45
- * @ignore
46
- */
47
- _allocateColorTexture(width: any, height: any): void;
48
- texture: WebGLTexture | null | undefined;
49
- /**
50
- * (Re)attach the depth/stencil renderbuffer at the given size and
51
- * update `_hasStencil` based on the resulting framebuffer status.
52
- * Falls back to depth-only when packed depth+stencil fails; warns
53
- * once if even depth-only is incomplete.
54
- * @ignore
55
- */
56
- _applyDepthStencil(width: any, height: any): void;
57
- _hasStencil: boolean | undefined;
58
- /**
59
- * Resolve the multisampled render half into the sampleable texture
60
- * (no-op when single-sampled or already resolved). Leaves no
61
- * framebuffer bound — callers rebind what they need.
62
- */
63
- resolve(): void;
64
- }
1
+
65
2
  import RenderTarget from "./rendertarget.ts";
66
3
  //# sourceMappingURL=webglrendertarget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webglrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webglrendertarget.js"],"names":[],"mappings":"AA2EA;;;;;;GAMG;AACH;IACC;;;;OAIG;IACH;;;;;;;;;;OAUG;IACH,gBAVW,qBAAqB,GAAC,sBAAsB,SAC5C,MAAM,UACN,MAAM,YAEd;QAAyB,OAAO;KAKlC,EAgEA;IA7DA,mDAAY;IAIZ;;;OAGG;IACH,SAFU,MAAM,CAEmB;IAGnC,uBAA0B;IAI1B,8BAAyC;IAWzC,sCAAiD;IAKhD,2CAA+C;IAC/C,4CAAgD;IA+BlD;;;;;;;OAOG;IACH,qDAqBC;IAhBA,yCAAiC;IAkBlC;;;;;;OAMG;IACH,kDAmBC;IAVA,iCAAoC;IA0BrC;;;;OAIG;IACH,gBAqBC;CAuID;yBA9YwB,mBAAmB"}
1
+ {"version":3,"file":"webglrendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webglrendertarget.js"],"names":[],"mappings":"AA4EA;;;;;;;GAOG;AACH;IACC;;;;OAIG;IACH;;;;;;;;;;OAUG;IACH,gBAVW,qBAAqB,GAAC,sBAAsB,SAC5C,MAAM,UACN,MAAM,YAEd;QAAyB,OAAO;KAKlC,EAoEA;IAjEA,mDAAY;IAIZ;;;OAGG;IACH,SAFU,MAAM,CAEmB;IAGnC;;;OAGG;IACH,uBAA0B;IAI1B,8BAAyC;IAWzC,sCAAiD;IAKhD,2CAA+C;IAC/C,4CAAgD;IA+BlD;;;;;;;;OAQG;IACH,qDAqBC;IAhBA,yCAAiC;IAkBlC;;;;;;;OAOG;IACH,kDAuBC;IAdA;;;OAGG;IACH,iCAAoC;IA0BrC;;;;OAIG;IACH,gBAqBC;CAuID;yBA1ZwB,mBAAmB"}
@@ -54,14 +54,6 @@ export default class WebGPURenderTarget extends RenderTarget {
54
54
  materialBindGroup: GPUBindGroup | null;
55
55
  materialBindGroupGeneration: number;
56
56
  pendingClear: boolean;
57
- /**
58
- * The group-1 (material) bind group sampling this target with a linear
59
- * clamp sampler — what the effect blit binds as its source. Rebuilt
60
- * lazily when the backing texture was reallocated.
61
- * @returns {GPUBindGroup} the bind group
62
- * @ignore
63
- */
64
- getMaterialBindGroup(): GPUBindGroup;
65
57
  /**
66
58
  * Synchronous readback is impossible under WebGPU — use
67
59
  * {@link WebGPURenderTarget#readPixels}.
@@ -1 +1 @@
1
- {"version":3,"file":"webgpurendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webgpurendertarget.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IACC;;;;OAIG;IACH,sBAJW,OAAO,8BAA8B,EAAE,OAAO,SAC9C,MAAM,UACN,MAAM,gBAsChB;IAlCA,yDAAwB;IAGxB;;;;;;;OAOG;IACH,aAFU,MAAM,CAE2B;IAC3C,8BAA8B;IAC9B,SADW,UAAU,GAAC,IAAI,CACP;IACnB,kCAAkC;IAClC,WADW,cAAc,GAAC,IAAI,CACT;IACrB,iFAAiF;IACjF,aAD8D,UAAU,GAAC,IAAI,CACtD;IACvB,kCAAkC;IAClC,UADW,cAAc,GAAC,IAAI,CACV;IACpB;;;;OAIG;IACH,YAFU,MAAM,CAEG;IAGnB,uCAA6B;IAC7B,oCAAqC;IAErC,sBAAyB;IA+E1B;;;;;;OAMG;IACH,wBAHa,YAAY,CAuBxB;IAED;;;;;OAKG;IACH,8BAIC;IAED;;;;;;;OAOG;IACH,eANW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,SAAS,CAAC,CAyD9B;CAqBD;yBA3QwB,mBAAmB"}
1
+ {"version":3,"file":"webgpurendertarget.d.ts","sourceRoot":"","sources":["../../../src/video/rendertarget/webgpurendertarget.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IACC;;;;OAIG;IACH,sBAJW,OAAO,8BAA8B,EAAE,OAAO,SAC9C,MAAM,UACN,MAAM,gBAsChB;IAlCA,yDAAwB;IAGxB;;;;;;;OAOG;IACH,aAFU,MAAM,CAE2B;IAC3C,8BAA8B;IAC9B,SADW,UAAU,GAAC,IAAI,CACP;IACnB,kCAAkC;IAClC,WADW,cAAc,GAAC,IAAI,CACT;IACrB,iFAAiF;IACjF,aAD8D,UAAU,GAAC,IAAI,CACtD;IACvB,kCAAkC;IAClC,UADW,cAAc,GAAC,IAAI,CACV;IACpB;;;;OAIG;IACH,YAFU,MAAM,CAEG;IAGnB,uCAA6B;IAC7B,oCAAqC;IAErC,sBAAyB;IA+E1B;;;;;;;OAOG;IACH,wBAJa,YAAY,CAwBxB;IAED;;;;;OAKG;IACH,8BAIC;IAED;;;;;;;OAOG;IACH,eANW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,SAAS,CAAC,CAyD9B;CAqBD;yBA5QwB,mBAAmB"}
@@ -1,36 +1,4 @@
1
- /**
2
- * additional import for TypeScript
3
- * @import NineSliceSprite from "./../../renderable/nineslicesprite.js";
4
- */
5
- /**
6
- * create a simple 1 frame texture atlas based on the given parameters
7
- * @ignore
8
- */
9
- export function createAtlas(width: any, height: any, name?: string, repeat?: string): {
10
- meta: {
11
- app: string;
12
- size: {
13
- w: any;
14
- h: any;
15
- };
16
- repeat: string;
17
- image: string;
18
- };
19
- frames: {
20
- filename: string;
21
- frame: {
22
- x: number;
23
- y: number;
24
- w: any;
25
- h: any;
26
- };
27
- }[];
28
- };
29
- /**
30
- * return a string that identifies the texture atlas type
31
- * @ignore
32
- */
33
- export function identifyFormat(app: any): "melonJS" | "texturepacker" | "shoebox" | "aseprite";
1
+
34
2
  /**
35
3
  * A Texture atlas class, currently supports : <br>
36
4
  * - [TexturePacker]{@link http://www.codeandweb.com/texturepacker/} : through JSON export (standard and multipack texture atlas) <br>
@@ -78,48 +46,6 @@ export class TextureAtlas extends Texture2d {
78
46
  * );
79
47
  */
80
48
  constructor(atlases: object | object[], src?: HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | CompressedImage | string | OffscreenCanvas[] | HTMLImageElement[] | HTMLCanvasElement[] | string[], options?: boolean | object);
81
- /**
82
- * to identify the atlas format (e.g. texture packer)
83
- * @ignore
84
- */
85
- format: string | null;
86
- /**
87
- * the texture source(s) itself
88
- * @type {Map}
89
- * @ignore
90
- */
91
- sources: Map<any, any>;
92
- /**
93
- * paired normal-map source(s), keyed identically to `sources`.
94
- * Populated from the constructor's `options.normalMap`. Used by
95
- * the WebGL renderer's lit pipeline for per-pixel lighting.
96
- * @type {Map}
97
- * @ignore
98
- */
99
- normalSources: Map<any, any>;
100
- /**
101
- * the atlas dictionnaries
102
- * @type {Map}
103
- * @ignore
104
- */
105
- atlases: Map<any, any>;
106
- /**
107
- * the default "active" atlas (used for multiAtlas)
108
- * @type {Map}
109
- * @ignore
110
- */
111
- activeAtlas: Map<any, any>;
112
- /**
113
- * UV lookup cache to avoid per-frame string allocation in drawImage
114
- * @ignore
115
- */
116
- _uvCache: {
117
- sx: number;
118
- sy: number;
119
- sw: number;
120
- sh: number;
121
- uvs: null;
122
- };
123
49
  repeat: any;
124
50
  /**
125
51
  * return the default or specified atlas dictionnary
@@ -1 +1 @@
1
- {"version":3,"file":"atlas.d.ts","sourceRoot":"","sources":["../../../src/video/texture/atlas.js"],"names":[],"mappings":"AAmBA;;;GAGG;AAEH;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;EAoBC;AAED;;;GAGG;AACH,+FAYC;AAED;;;;;;;;;;GAUG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,qBAjCW,MAAM,GAAC,MAAM,EAAE,QACf,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,eAAe,GAAC,MAAM,GAAC,eAAe,EAAE,GAAC,gBAAgB,EAAE,GAAC,iBAAiB,EAAE,GAAC,MAAM,EAAE,YAC3I,OAAO,GAAC,MAAM,EAuOxB;IAjMA;;;OAGG;IACH,sBAAkB;IAElB;;;;OAIG;IACH,uBAAwB;IAExB;;;;;;OAMG;IACH,6BAA8B;IAE9B;;;;OAIG;IACH,uBAAwB;IAExB;;;;OAIG;IACH,2BAA4B;IAE5B;;;OAGG;IACH;;;;;;MAA6D;IAW1D,YAA8C;IAgJlD;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CAQlB;IAED;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,CAQ9C;IAED;;;;;;OAMG;IACH,0BAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,GAAC,IAAI,CAU/E;IAED;;;;;;;;OAQG;IACH,gBAPW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;;OAKG;IACH,gBAJW,MAAM,UACN,MAAM,GACJ,MAAM,CAiBlB;IAED;;;;;;;OAOG;IACH,aANW,MAAM,GAAC,MAAM,OACb,MAAM,OACN,MAAM,OACN,MAAM,GACJ,YAAY,CAsCxB;IAED;;;;;;;OAOG;IACH,cANW,MAAM,QACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,YAAY,CA2BxB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,2BA1BW,MAAM,aACN,MAAM,cACN,OAAO,GACL,MAAM,GAAC,eAAe,CAqClC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,6BAnBW,MAAM,EAAE,GAAC,MAAM,EAAE,GAGf,MAAM,CAkFlB;IAED,2DAiDC;CACD;sBArsBqB,gBAAgB;mBANnB,8BAA8B;iCAmBjB,uCAAuC"}
1
+ {"version":3,"file":"atlas.d.ts","sourceRoot":"","sources":["../../../src/video/texture/atlas.js"],"names":[],"mappings":"AAuBA;;;GAGG;AAEH;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;EAoBC;AAED;;;;GAIG;AACH,+FAYC;AAED;;;;;;;;;;GAUG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,qBAjCW,MAAM,GAAC,MAAM,EAAE,QACf,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,eAAe,GAAC,MAAM,GAAC,eAAe,EAAE,GAAC,gBAAgB,EAAE,GAAC,iBAAiB,EAAE,GAAC,MAAM,EAAE,YAC3I,OAAO,GAAC,MAAM,EA6OxB;IAvMA;;;;OAIG;IACH,sBAAkB;IAElB;;;;;OAKG;IACH,uBAAwB;IAExB;;;;;;;OAOG;IACH,6BAA8B;IAE9B;;;;;OAKG;IACH,uBAAwB;IAExB;;;;;OAKG;IACH,2BAA4B;IAE5B;;;;OAIG;IACH;;;;;;MAA6D;IAW1D,YAA8C;IAgJlD;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CAQlB;IAED;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,CAQ9C;IAED;;;;;;OAMG;IACH,0BAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,GAAC,eAAe,GAAC,WAAW,GAAC,IAAI,CAU/E;IAED;;;;;;;;OAQG;IACH,gBAPW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;;OAKG;IACH,gBAJW,MAAM,UACN,MAAM,GACJ,MAAM,CAiBlB;IAED;;;;;;;OAOG;IACH,aANW,MAAM,GAAC,MAAM,OACb,MAAM,OACN,MAAM,OACN,MAAM,GACJ,YAAY,CAsCxB;IAED;;;;;;;OAOG;IACH,cANW,MAAM,QACN,MAAM,KACN,MAAM,KACN,MAAM,GACJ,YAAY,CA2BxB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,2BA1BW,MAAM,aACN,MAAM,cACN,OAAO,GACL,MAAM,GAAC,eAAe,CAqClC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,6BAnBW,MAAM,EAAE,GAAC,MAAM,EAAE,GAGf,MAAM,CAkFlB;IAED,2DAiDC;CACD;sBAjtBqB,gBAAgB;mBANnB,8BAA8B;iCAuBjB,uCAAuC"}
@@ -1,140 +1,4 @@
1
1
  export default TextureCache;
2
- /**
3
- * a basic texture cache object
4
- * @ignore
5
- */
6
- declare class TextureCache {
7
- /**
8
- * @ignore
9
- */
10
- constructor(renderer: any, max_size?: number);
11
- renderer: any;
12
- cache: ArrayMultimap;
13
- tinted: Map<any, any>;
14
- units: Map<any, any>;
15
- slotTable: TextureSlotTable;
16
- reservedUnits: Map<any, any>;
17
- /**
18
- * Which texture units are currently taken. This is the slot table's own
19
- * occupancy set, exposed under the name it has always had — seeding or
20
- * clearing it drives the allocator directly.
21
- * @returns {Set<number>} the occupied units
22
- * @ignore
23
- */
24
- get usedUnits(): Set<number>;
25
- set max_size(size: number);
26
- /**
27
- * How many texture units this cache may hand out. Backed by the slot
28
- * table's capacity, so assigning it (tests narrow it to force exhaustion,
29
- * and a context restore can resolve a different device limit) re-sizes the
30
- * allocator rather than leaving the two disagreeing.
31
- * @returns {number} the unit count
32
- * @ignore
33
- */
34
- get max_size(): number;
35
- /**
36
- * @ignore
37
- */
38
- clear(): void;
39
- /**
40
- * @ignore
41
- */
42
- allocateTextureUnit(): number;
43
- /**
44
- * Reserve a texture unit so {@link allocateTextureUnit} never hands it to a
45
- * color texture — used by `ShaderEffect.setTexture` to hold high units for
46
- * its extra samplers. Reference-counted, so a unit shared by several effects
47
- * stays reserved until the last one releases it.
48
- * @param {number} unit - the texture unit to reserve
49
- * @ignore
50
- */
51
- reserveUnit(unit: number): void;
52
- /**
53
- * Release a unit previously held by {@link reserveUnit}. The unit becomes
54
- * allocatable again once its last holder releases it.
55
- * @param {number} unit - the texture unit to release
56
- * @ignore
57
- */
58
- releaseUnit(unit: number): void;
59
- /**
60
- * Reset all texture unit assignments without clearing the texture cache.
61
- * Used by multi-texture batching when the shader's sampler range is exceeded.
62
- * @ignore
63
- */
64
- resetUnitAssignments(): void;
65
- /**
66
- * @ignore
67
- *
68
- * Frees the single `(source, repeat)` unit matching the texture's
69
- * current `repeat` field — deliberately granular, so freeing one live
70
- * consumer (e.g. one of two patterns with different repeats over the
71
- * same image) never evicts the other's unit. When a SOURCE goes away
72
- * entirely, use {@link freeAllUnits} instead — a source can hold units
73
- * under several repeat modes (per-mesh `textureRepeat` overrides,
74
- * #1503) that this granular free would leave pinned.
75
- */
76
- freeTextureUnit(texture: any): void;
77
- /**
78
- * @ignore
79
- *
80
- * Free every texture unit allocated for the texture's source, across
81
- * ALL repeat modes. A single source can hold several `(source, repeat)`
82
- * units — patterns with different repeats over one image, or meshes
83
- * sampling one image with per-mesh `textureRepeat` overrides (#1503) —
84
- * and the source going away invalidates all of them at once.
85
- */
86
- freeAllUnits(texture: any): void;
87
- /**
88
- * @ignore
89
- * @param {string} [repeat] - overrides the texture's own `repeat` for the
90
- * unit lookup — sampler state per use (a mesh's `textureRepeat`), so one
91
- * source can be sampled with several wrap modes without mutating the
92
- * shared atlas (#1503). Omit to use `texture.repeat`.
93
- *
94
- * Hot-path note: `getUnit` / `peekUnit` are called per-texture per-draw,
95
- * so the `(source, repeat)` lookup is inlined here rather than going
96
- * through a helper that allocates a `{source, repeat}` object per call.
97
- */
98
- getUnit(texture: any, repeat?: string): any;
99
- /**
100
- * @ignore
101
- * return every texture unit allocated for the given texture's source,
102
- * across ALL repeat modes — the unload-time counterpart of the per-use
103
- * `getUnit(texture, repeat)` override (#1503): a single source can hold
104
- * one unit per wrap mode it was sampled with, and per-repeat `peekUnit`
105
- * lookups would only ever find the one matching the texture's current
106
- * `repeat` field. Not a hot path (allocates the result array).
107
- */
108
- peekAllUnits(texture: any): any[];
109
- /**
110
- * @ignore
111
- * return the texture unit for the given texture, or -1 if not allocated
112
- * @param {string} [repeat] - same per-use wrap override as {@link getUnit}
113
- */
114
- peekUnit(texture: any, repeat?: string): any;
115
- /**
116
- * @ignore
117
- * cache the textureAltas for the given image
118
- */
119
- set(image: any, textureAtlas: any): void;
120
- /**
121
- * @ignore
122
- */
123
- has(image: any): boolean;
124
- /**
125
- * @ignore
126
- * return the textureAltas for the given image
127
- */
128
- get(image: any, atlas: any): any;
129
- /**
130
- * @ignore
131
- */
132
- delete(image: any): void;
133
- /**
134
- * @ignore
135
- */
136
- tint(src: any, color: any): any;
137
- }
138
2
  import { ArrayMultimap } from "../../utils/array-multimap.js";
139
3
  import { TextureSlotTable } from "../gpu/textureslots.js";
140
4
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/video/texture/cache.js"],"names":[],"mappings":";AAgBA;;;GAGG;AACH;IACC;;OAEG;IACH,8CAgDC;IA9CA,cAAwB;IAExB,qBAAgC;IAChC,sBAAuB;IAavB,qBAAsB;IAOtB,4BAeE;IAMF,6BAA8B;IAI/B;;;;;;OAMG;IACH,iBAHa,GAAG,CAAC,MAAM,CAAC,CAKvB;IAcD,mBAPa,MAAM,EASlB;IAdD;;;;;;;OAOG;IACH,gBAHa,MAAM,CAKlB;IAMD;;OAEG;IACH,cAKC;IAED;;OAEG;IACH,8BAIC;IAED;;;;;;;OAOG;IACH,kBAHW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,kBAHW,MAAM,QAUhB;IAED;;;;OAIG;IACH,6BAIC;IAED;;;;;;;;;;OAUG;IACH,oCAaC;IAED;;;;;;;;OAQG;IACH,iCASC;IAED;;;;;;;;;;OAUG;IACH,+BATW,MAAM,OAuBhB;IAED;;;;;;;;OAQG;IACH,kCAIC;IAED;;;;OAIG;IACH,gCAFW,MAAM,OAShB;IAED;;;OAGG;IACH,yCAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;OAGG;IACH,iCAmCC;IAED;;OAEG;IACH,yBAkBC;IAED;;OAEG;IACH,gCAcC;CACD;8BApW6B,+BAA+B;iCAE5B,wBAAwB"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/video/texture/cache.js"],"names":[],"mappings":";AAgBA;;;;GAIG;AACH;IACC;;;OAGG;IACH,8CAgDC;IA9CA,cAAwB;IAExB,qBAAgC;IAChC,sBAAuB;IAavB,qBAAsB;IAOtB,4BAeE;IAMF,6BAA8B;IAI/B;;;;;;;OAOG;IACH,iBAJa,GAAG,CAAC,MAAM,CAAC,CAMvB;IAeD,mBARa,MAAM,EAUlB;IAfD;;;;;;;;OAQG;IACH,gBAJa,MAAM,CAMlB;IAMD;;;OAGG;IACH,cAKC;IAED;;;OAGG;IACH,8BAIC;IAED;;;;;;;;OAQG;IACH,kBAJW,MAAM,QAMhB;IAED;;;;;;OAMG;IACH,kBAJW,MAAM,QAWhB;IAED;;;;;OAKG;IACH,6BAIC;IAED;;;;;;;;;;;OAWG;IACH,oCAaC;IAED;;;;;;;;;OASG;IACH,iCASC;IAED;;;;;;;;;;;OAWG;IACH,+BATW,MAAM,OAuBhB;IAED;;;;;;;;;OASG;IACH,kCAIC;IAED;;;;;OAKG;IACH,gCAFW,MAAM,OAShB;IAED;;;;OAIG;IACH,yCAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;;OAIG;IACH,iCAmCC;IAED;;;OAGG;IACH,yBAkBC;IAED;;;OAGG;IACH,gCAcC;CACD;8BAvX6B,+BAA+B;iCAE5B,wBAAwB"}
@@ -1,73 +1,3 @@
1
- /**
2
- * A GPU-resident texture holding a captured frame — the value returned by
3
- * {@link WebGLRenderer#toFrameTexture}. Its backing is a live `WebGLTexture`
4
- * that the renderer refreshes **in place** on each capture, so a shader that
5
- * has bound it once (via {@link ShaderEffect#setTexture}) keeps sampling the
6
- * latest frame with no re-bind.
7
- *
8
- * Not part of the public class surface: obtain instances from
9
- * `renderer.toFrameTexture()` and treat them as opaque {@link Texture2d}
10
- * values. The `isGPUResident` flag is the discriminant `setTexture` uses to
11
- * take its live-bind path (bind the existing handle) instead of uploading a
12
- * static copy.
13
- * @augments Texture2d
14
- * @ignore
15
- */
16
- export class FrameTexture extends Texture2d {
17
- /**
18
- * @param {WebGLRenderer} renderer - the owning renderer (for the GL context)
19
- * @param {number} width - capture width in pixels
20
- * @param {number} height - capture height in pixels
21
- */
22
- constructor(renderer: WebGLRenderer, width: number, height: number);
23
- _renderer: WebGLRenderer;
24
- /** @type {number} */
25
- width: number;
26
- /** @type {number} */
27
- height: number;
28
- /**
29
- * the live backing texture, (re)filled by `renderer.toFrameTexture` and
30
- * bound (never re-uploaded) by consumers
31
- * @type {WebGLTexture|null}
32
- */
33
- glTexture: WebGLTexture | null;
34
- /**
35
- * marks this as a live GPU-resident source — see {@link ShaderEffect#setTexture}
36
- * @type {boolean}
37
- */
38
- isGPUResident: boolean;
39
- /**
40
- * The opaque GPU-resident backing — itself.
41
- * @returns {FrameTexture}
42
- */
43
- getTexture(): FrameTexture;
44
- }
45
- /**
46
- * The Canvas-renderer counterpart of {@link FrameTexture}: a captured frame
47
- * backed by an offscreen `<canvas>` copy of the drawing buffer, keeping the
48
- * `toFrameTexture` family renderer-complete. A drawable source (not
49
- * GPU-resident), so it flows through the normal image path; custom shaders
50
- * don't run under the Canvas renderer, so this exists for API parity and
51
- * CPU-side reuse (e.g. drawing the captured frame back onto the scene).
52
- * @augments Texture2d
53
- * @ignore
54
- */
55
- export class CanvasFrameTexture extends Texture2d {
56
- /**
57
- * @param {HTMLCanvasElement|OffscreenCanvas} canvas - the backing copy
58
- */
59
- constructor(canvas: HTMLCanvasElement | OffscreenCanvas);
60
- /** @type {HTMLCanvasElement|OffscreenCanvas} */
61
- canvas: HTMLCanvasElement | OffscreenCanvas;
62
- /** @type {number} */
63
- width: number;
64
- /** @type {number} */
65
- height: number;
66
- /**
67
- * The backing canvas copy.
68
- * @returns {HTMLCanvasElement|OffscreenCanvas}
69
- */
70
- getTexture(): HTMLCanvasElement | OffscreenCanvas;
71
- }
1
+
72
2
  import Texture2d from "./texture2d.ts";
73
3
  //# sourceMappingURL=frametexture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../src/video/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;OAIG;IACH,sBAJW,aAAa,SACb,MAAM,UACN,MAAM,EAoBhB;IAhBA,yBAAyB;IACzB,qBAAqB;IACrB,OADW,MAAM,CACC;IAClB,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB;;;;OAIG;IACH,WAFU,YAAY,GAAC,IAAI,CAEN;IACrB;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAG1B;;;OAGG;IACH,cAFa,YAAY,CAIxB;CAaD;AAED;;;;;;;;;GASG;AACH;IACC;;OAEG;IACH,oBAFW,iBAAiB,GAAC,eAAe,EAU3C;IANA,gDAAgD;IAChD,QADW,iBAAiB,GAAC,eAAe,CACxB;IACpB,qBAAqB;IACrB,OADW,MAAM,CACQ;IACzB,qBAAqB;IACrB,QADW,MAAM,CACU;IAG5B;;;OAGG;IACH,cAFa,iBAAiB,GAAC,eAAe,CAI7C;CACD;sBA/FqB,gBAAgB"}
1
+ {"version":3,"file":"frametexture.d.ts","sourceRoot":"","sources":["../../../src/video/texture/frametexture.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;OAIG;IACH,sBAJW,aAAa,SACb,MAAM,UACN,MAAM,EAwBhB;IApBA;;;OAGG;IACH,yBAAyB;IACzB,qBAAqB;IACrB,OADW,MAAM,CACC;IAClB,qBAAqB;IACrB,QADW,MAAM,CACG;IACpB;;;;OAIG;IACH,WAFU,YAAY,GAAC,IAAI,CAEN;IACrB;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAG1B;;;OAGG;IACH,cAFa,YAAY,CAIxB;CAaD;AAED;;;;;;;;;;GAUG;AACH;IACC;;OAEG;IACH,oBAFW,iBAAiB,GAAC,eAAe,EAU3C;IANA,gDAAgD;IAChD,QADW,iBAAiB,GAAC,eAAe,CACxB;IACpB,qBAAqB;IACrB,OADW,MAAM,CACQ;IACzB,qBAAqB;IACrB,QADW,MAAM,CACU;IAG5B;;;OAGG;IACH,cAFa,iBAAiB,GAAC,eAAe,CAI7C;CACD;sBArGqB,gBAAgB"}