melonjs 20.11.0 → 20.12.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 (129) hide show
  1. package/README.md +1 -0
  2. package/build/application/application.d.ts.map +1 -1
  3. package/build/application/settings.d.ts +6 -2
  4. package/build/application/settings.d.ts.map +1 -1
  5. package/build/audio/backend/sound.d.ts.map +1 -1
  6. package/build/audio/playback.d.ts.map +1 -1
  7. package/build/audio/spatial.d.ts +13 -2
  8. package/build/audio/spatial.d.ts.map +1 -1
  9. package/build/audio/types.d.ts +25 -3
  10. package/build/audio/types.d.ts.map +1 -1
  11. package/build/camera/camera2d.d.ts.map +1 -1
  12. package/build/camera/camera3d.d.ts.map +1 -1
  13. package/build/camera/effects/pixelate_transition_effect.d.ts +67 -0
  14. package/build/camera/effects/pixelate_transition_effect.d.ts.map +1 -0
  15. package/build/geometries/ellipse.d.ts +8 -4
  16. package/build/geometries/ellipse.d.ts.map +1 -1
  17. package/build/geometries/line.d.ts +2 -2
  18. package/build/geometries/line.d.ts.map +1 -1
  19. package/build/geometries/polygon.d.ts +3 -3
  20. package/build/geometries/polygon.d.ts.map +1 -1
  21. package/build/geometries/rectangle.d.ts +2 -2
  22. package/build/geometries/rectangle.d.ts.map +1 -1
  23. package/build/geometries/roundrect.d.ts +2 -2
  24. package/build/geometries/roundrect.d.ts.map +1 -1
  25. package/build/index.d.ts +2 -1
  26. package/build/index.d.ts.map +1 -1
  27. package/build/index.js +7237 -5663
  28. package/build/index.js.map +4 -4
  29. package/build/input/gamepad.d.ts.map +1 -1
  30. package/build/input/pointerevent.d.ts.map +1 -1
  31. package/build/lang/console.d.ts +16 -1
  32. package/build/lang/console.d.ts.map +1 -1
  33. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  34. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  35. package/build/loader/loadingscreen.d.ts.map +1 -1
  36. package/build/math/matrix2d.d.ts +3 -2
  37. package/build/math/matrix2d.d.ts.map +1 -1
  38. package/build/math/matrix3d.d.ts +4 -1
  39. package/build/math/matrix3d.d.ts.map +1 -1
  40. package/build/physics/bounds.d.ts +5 -5
  41. package/build/physics/bounds.d.ts.map +1 -1
  42. package/build/physics/builtin/body.d.ts +1 -0
  43. package/build/physics/builtin/body.d.ts.map +1 -1
  44. package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
  45. package/build/physics/builtin/detector.d.ts.map +1 -1
  46. package/build/renderable/animation.d.ts +6 -1
  47. package/build/renderable/animation.d.ts.map +1 -1
  48. package/build/renderable/entity/entity.d.ts.map +1 -1
  49. package/build/renderable/frameAnimation.d.ts.map +1 -1
  50. package/build/renderable/imagelayer.d.ts.map +1 -1
  51. package/build/renderable/instanced_mesh.d.ts.map +1 -1
  52. package/build/renderable/mesh.d.ts.map +1 -1
  53. package/build/renderable/renderable.d.ts.map +1 -1
  54. package/build/renderable/sprite.d.ts +4 -0
  55. package/build/renderable/sprite.d.ts.map +1 -1
  56. package/build/renderable/text/text.d.ts.map +1 -1
  57. package/build/renderable/trail3d.d.ts.map +1 -1
  58. package/build/renderable/ui/uipanel.d.ts +3 -3
  59. package/build/renderable/ui/uipanel.d.ts.map +1 -1
  60. package/build/state/stage.d.ts +3 -2
  61. package/build/state/stage.d.ts.map +1 -1
  62. package/build/state/state.d.ts +31 -6
  63. package/build/state/state.d.ts.map +1 -1
  64. package/build/system/legacy_pool.d.ts.map +1 -1
  65. package/build/video/canvas/canvas_renderer.d.ts +1 -0
  66. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  67. package/build/video/effects/bloom.d.ts +3 -2
  68. package/build/video/effects/bloom.d.ts.map +1 -1
  69. package/build/video/effects/blur.d.ts +1 -1
  70. package/build/video/effects/chromaticAberration.d.ts +1 -1
  71. package/build/video/effects/dissolve.d.ts.map +1 -1
  72. package/build/video/effects/dropShadow.d.ts +1 -1
  73. package/build/video/effects/glow.d.ts +1 -1
  74. package/build/video/effects/glsl_realization.d.ts.map +1 -1
  75. package/build/video/effects/hologram.d.ts.map +1 -1
  76. package/build/video/effects/local_space.d.ts +19 -0
  77. package/build/video/effects/local_space.d.ts.map +1 -0
  78. package/build/video/effects/mesh_splice.d.ts.map +1 -1
  79. package/build/video/effects/outline.d.ts +1 -1
  80. package/build/video/effects/pixelate.d.ts +1 -1
  81. package/build/video/effects/radialGradient.d.ts +4 -12
  82. package/build/video/effects/radialGradient.d.ts.map +1 -1
  83. package/build/video/effects/scanline.d.ts.map +1 -1
  84. package/build/video/effects/shadereffect.d.ts.map +1 -1
  85. package/build/video/effects/shine.d.ts +5 -0
  86. package/build/video/effects/shine.d.ts.map +1 -1
  87. package/build/video/effects/sway.d.ts +9 -4
  88. package/build/video/effects/sway.d.ts.map +1 -1
  89. package/build/video/effects/vignette.d.ts.map +1 -1
  90. package/build/video/effects/wave.d.ts +9 -7
  91. package/build/video/effects/wave.d.ts.map +1 -1
  92. package/build/video/effects/wgsl/parse.d.ts.map +1 -1
  93. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
  94. package/build/video/effects/wgsl_realization.d.ts.map +1 -1
  95. package/build/video/renderer.d.ts +2 -1
  96. package/build/video/renderer.d.ts.map +1 -1
  97. package/build/video/rendertarget/webgpurendertarget.d.ts +1 -0
  98. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
  99. package/build/video/texture/atlas.d.ts +31 -31
  100. package/build/video/texture/atlas.d.ts.map +1 -1
  101. package/build/video/utils/pixel_snap.d.ts +44 -0
  102. package/build/video/utils/pixel_snap.d.ts.map +1 -0
  103. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  104. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  105. package/build/video/webgl/batchers/quad_batcher.d.ts +2 -1
  106. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  107. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  108. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  109. package/build/video/webgpu/batchers/mesh_batcher.d.ts +0 -1
  110. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
  111. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
  112. package/build/video/webgpu/effect_binding.d.ts.map +1 -1
  113. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  114. package/build/video/webgpu/webgpu_renderer.d.ts +3 -4
  115. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  116. package/package.json +1 -1
  117. package/skills/AGENTS.md +2 -1
  118. package/skills/melonjs/SKILL.md +1 -0
  119. package/skills/melonjs-audio/SKILL.md +25 -4
  120. package/skills/melonjs-display-and-scaling/SKILL.md +19 -5
  121. package/skills/melonjs-effects-and-shaders/SKILL.md +52 -17
  122. package/skills/melonjs-input/SKILL.md +24 -2
  123. package/skills/melonjs-lighting/SKILL.md +4 -3
  124. package/skills/melonjs-loading-assets/SKILL.md +4 -3
  125. package/skills/melonjs-performance/SKILL.md +3 -0
  126. package/skills/melonjs-plugins/SKILL.md +20 -1
  127. package/skills/melonjs-renderables/SKILL.md +4 -3
  128. package/skills/melonjs-renderer-backends/SKILL.md +2 -2
  129. package/skills/melonjs-scenes-and-state/SKILL.md +17 -2
@@ -1 +1 @@
1
- {"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"AA+HA;;;GAGG;AACH;IAQE;;;;;OAKG;IACH,oBAJU,MAAM,CAIU;IAU1B;;;OAGG;IACH,IAFU,qBAAqB,CAEI;IAEnC;;;;;OAKG;IAMH;;;;;;;OAOG;IACH,2BAA4B;IAQ5B;;;;;;;;;OASG;IACH,cAJU,MAAM,CAIiB;IAQjC;;;OAGG;IACH,oCAeE;IAEF;;;;;OAKG;IAIH;;;OAGG;IACH,8BAAgC;IAChC;;;OAGG;IACH,yBAAyB;IAEzB;;;;;;;;;;;;;OAaG;IACH,8CAAqC;IACrC;;;OAGG;IACH,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C,QAAQ,GAAC,MAAM,MACxB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAKhB;IAED;;;;;;;;;OASG;IACH,aAPW,QAAQ,GAAC,QAAQ,GAAC,MAAM,MACxB,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAmChB;IAsIE;;;OAGG;IACH,sCAA4B;;CAoD/B;qBAjzIoB,kBAAkB;6BACV,uCAAuC;wBAJ5C,2BAA2B;8BAKrB,sCAAsC;+BAqBrC,yBAAyB;uBA7CjC,yBAAyB;yBADvB,wBAAwB;6BAkCpB,uBAAuB;yBAP3B,uBAAuB;iCANf,8BAA8B;+BAFhC,4BAA4B;6BAOjB,uBAAuB;0CAgBvB,oCAAoC;0BAiBrD,eAAe;0CAFD,yBAAyB;6BA7BnC,8BAA8B;sBA7B1B,uBAAuB;qCA2DtB,8DAA8D;6BANtE,6BAA6B;8BAG5B,wBAAwB"}
1
+ {"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"AAkIA;;;GAGG;AACH;IAQE;;;;;OAKG;IACH,oBAJU,MAAM,CAIU;IAU1B;;;OAGG;IACH,IAFU,qBAAqB,CAEI;IAEnC;;;;;OAKG;IAMH;;;;;;;OAOG;IACH,2BAA4B;IAQ5B;;;;;;;;;OASG;IACH,cAJU,MAAM,CAIiB;IAQjC;;;OAGG;IACH,oCAeE;IAEF;;;;;OAKG;IAIH;;;OAGG;IACH,8BAAgC;IAEhC;;;;;;;OAOG;IACH,mBAJU,MAAM,EAAE,CAIS;IAC3B;;;OAGG;IACH,yBAAyB;IAEzB;;;;;;;;;;;;;OAaG;IACH,8CAAqC;IACrC;;;OAGG;IACH,2BAAsC;IACtC;;;OAGG;IACH,oDAAqC;IACrC;;;OAGG;IACH,4BAA+B;IAC/B;;;OAGG;IACH,2BAA2B;IAC3B;;;OAGG;IACH,2FAAgC;IAChC;;;OAGG;IACH,+B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AM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QA6BhB;;CAqLD;qBAl8IoB,kBAAkB;6BACV,uCAAuC;wBAJ5C,2BAA2B;8BAKrB,sCAAsC;+BAsBrC,yBAAyB;uBA9CjC,yBAAyB;yBADvB,wBAAwB;6BAmCpB,uBAAuB;yBAR3B,uBAAuB;oBA9B5B,2BAA2B;iCAwBd,8BAA8B;+BAFhC,4BAA4B;6BAOjB,uBAAuB;0CAiBvB,oCAAoC;0BAiBrD,eAAe;0CAFD,yBAAyB;6BA9BnC,8BAA8B;sBA7B1B,uBAAuB;qCA4DtB,8DAA8D;6BANtE,6BAA6B;8BAG5B,wBAAwB"}
@@ -50,7 +50,6 @@ export default class WebGPUMeshBatcher extends WebGPUBatcher {
50
50
  instanced: Map<any, any> | undefined;
51
51
  instancedKeys: Map<any, any> | undefined;
52
52
  shadowFamilyKeys: Map<any, any> | undefined;
53
- instancedShaderWarned: boolean | undefined;
54
53
  /**
55
54
  * Add a textured mesh to the batch (the accumulated path: vertices
56
55
  * already CPU-projected, identity model matrix). Chunks triangles
@@ -1 +1 @@
1
- {"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/mesh_batcher.js"],"names":[],"mappings":"AA+BA;;;;;;;;;GASG;AACH,gCAAiC,GAAG,CAAC;AAWrC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAyFjD;IA/EA,2CAUE;IAuBF,oCAAsC;IAItC,kBAAwB;IACxB,kBAAwB;IAIxB,gDAA+D;IAC/D,gBAAmB;IAGnB,qBAA2B;IAE3B;mBA+dwB,YAAY;iBAAW,MAAM,EAAE;;;;yBA/d7B;IAE1B,6CAAkC;IAKlC,4CAAiC;IAGjC;;;kBAAuD;IAQvD,oCAAyB;IAQzB,qCAA0B;IAC1B,yCAA8B;IAG9B,4CAAiC;IAGlC;;;;;OAKG;IACH;;;;;MAEC;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;IACH,uBAyEC;IAED;;;;;OAKG;IACH,4BAEC;IAED;;;;;;;;;OASG;IACH,8BANW,MAAM,OACN,YAAY,GACV,MAAM,CAMlB;IAED;;;;;;;OAOG;IACH,0BALW,MAAM,GACJ,sBAAsB,CAiBlC;IAED;;;;;;;;;;;;;;OAcG;IACH,uBANW,MAAM,eACN,QAAQ,QACR,MAAM,QAkFhB;IAED;;;;;OAKG;IACH,sBAJW,MAAM,QAWhB;IAED;;;;OAIG;IACH,2BAMC;CAwBD;0BA7yCyB,qBAAqB;iCARd,8BAA8B;yBAVtC,2BAA2B;mCAWjB,gCAAgC"}
1
+ {"version":3,"file":"mesh_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/mesh_batcher.js"],"names":[],"mappings":"AAgCA;;;;;;;;;GASG;AACH,gCAAiC,GAAG,CAAC;AAWrC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAyFjD;IA/EA,2CAUE;IAuBF,oCAAsC;IAItC,kBAAwB;IACxB,kBAAwB;IAIxB,gDAA+D;IAC/D,gBAAmB;IAGnB,qBAA2B;IAE3B;mBA8dwB,YAAY;iBAAW,MAAM,EAAE;;;;yBA9d7B;IAE1B,6CAAkC;IAKlC,4CAAiC;IAGjC;;;kBAAuD;IAQvD,oCAAyB;IAQzB,qCAA0B;IAC1B,yCAA8B;IAG9B,4CAAiC;IAGlC;;;;;OAKG;IACH;;;;;MAEC;IAED;;;;;;;;;;;;;OAaG;IACH,2BALW,MAAM,GACJ,MAAM,CAoClB;IAED;;;;;;;OAOG;IACH,wBALW,aAAa,GACX,oBAAoB,CAwBhC;IAED;;;;;;;OAOG;IACH,wBANW,aAAa,eACb,QAAQ,QACR,MAAM,QAwFhB;IAED;;;;;;;;;;;OAWG;IACH,8BALW,MAAM,GACJ,MAAM,CA6ClB;IAED;;;;;;;;;OASG;IACH,0BAPW,aAAa,gBACb,QAAQ,Q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BA5yCyB,qBAAqB;iCARd,8BAA8B;yBAVtC,2BAA2B;mCAWjB,gCAAgC"}
@@ -1 +1 @@
1
- {"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/quad_batcher.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAmJjD;IAnGA,qBAA2B;IAM3B,yCAAyB;IAEzB;;;;;OAKG;IACH,gDAIC;IASD;;;OAGG;IACH,wCAcE;IAHC,eAAqB;IAIxB,4EAA4E;IAC5E;cADkB,cAAc;iBAAW,UAAU;oBAC7B;IAOxB;;;OAGG;IACH,iBAAuB;IACvB;;;OAGG;IACH,eAAqB;IACrB;;;OAGG;IACH,kBAAyB;IACzB;;;OAGG;IACH,8BAAkB;IAElB,8CAAwB;IAIxB,wCAAwC;IACxC,sDAA+B;IAE/B,8CAAgC;IAChC,mCAAuB;IAQvB,0CAKE;IAKH;;;;;;;;;;;;;;;OAeG;IACH,iBAZW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,QAyGjB;IAED;;;;;;;;OAQG;IACH,oBAJW,MAAM,GAAC,IAAI,QAcrB;IAED;;;;;;;OAOG;IACH,sBALW,MAAM,GACJ,OAAO,CAcnB;IAED;;;;;;;;;;;OAWG;IACH,wBANW,MAAM,YACN,OAAO,GACL,MAAM,CAkElB;IAED;;;;OAIG;IACH,+BAOC;IAED;;;;;;;;OAQG;IACH,uBAJa,YAAY,CAgCxB;IAED;;;;OAIG;IACH,qBAQC;IAED;;;;;OAKG;IACH,2BAGC;IAED;;;;;;;;;;;OAWG;IACH,4IAoCC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,oBAVW,OAAO,0CAA0C,EAAE,OAAO,KAC1D,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,WACN,YAAY,cACZ,OAAO,QAgEjB;IAqBD;;OAEG;IACH,oCA6BC;IAED;;;;;;OAMG;IACH,8BAEC;IAED;;;;;;;OAOG;IACH,yBAJW,MAAM,QAwChB;CAwBD;0BA5uByB,qBAAqB;iCAHd,2BAA2B"}
1
+ {"version":3,"file":"quad_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/quad_batcher.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBAmJjD;IAnGA,qBAA2B;IAM3B,yCAAyB;IAEzB;;;;;OAKG;IACH,gDAIC;IASD;;;OAGG;IACH,wCAcE;IAHC,eAAqB;IAIxB,4EAA4E;IAC5E;cADkB,cAAc;iBAAW,UAAU;oBAC7B;IAOxB;;;OAGG;IACH,iBAAuB;IACvB;;;OAGG;IACH,eAAqB;IACrB;;;OAGG;IACH,kBAAyB;IACzB;;;OAGG;IACH,8BAAkB;IAElB,8CAAwB;IAIxB,wCAAwC;IACxC,sDAA+B;IAE/B,8CAAgC;IAChC,mCAAuB;IAQvB,0CAKE;IAKH;;;;;;;;;;;;;;;OAeG;IACH,iBAZW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,OAAO,QAyGjB;IAED;;;;;;;;OAQG;IACH,oBAJW,MAAM,GAAC,IAAI,QAcrB;IAED;;;;;;;OAOG;IACH,sBALW,MAAM,GACJ,OAAO,CAcnB;IAED;;;;;;;;;;;OAWG;IACH,wBANW,MAAM,YACN,OAAO,GACL,MAAM,CAkElB;IAED;;;;OAIG;IACH,+BAOC;IAED;;;;;;;;OAQG;IACH,uBAJa,YAAY,CAgCxB;IAED;;;;OAIG;IACH,qBAQC;IAED;;;;;OAKG;IACH,2BAGC;IAED;;;;;;;;;;;OAWG;IACH,4IAoCC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,oBAXW,OAAO,0CAA0C,EAAE,OAAO,KAC1D,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,WACN,YAAY,cACZ,OAAO,UACP,MAAM,QA0EhB;IAqBD;;OAEG;IACH,oCA6BC;IAED;;;;;;OAMG;IACH,8BAEC;IAED;;;;;;;OAOG;IACH,yBAJW,MAAM,QAwChB;CAwBD;0BA7vByB,qBAAqB;iCAHd,2BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"file":"effect_binding.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/effect_binding.js"],"names":[],"mappings":"AAiCA;;;;;;;;GAQG;AACH;;;;;;;;;;;;;;GAcG;AACH,yCANW,MAAM,UACN,MAAM,eACN,MAAM,QAuKhB;AAqCD;;;;;;;;;;GAUG;AACH,+CAPW,OAAO,sBAAsB,EAAE,OAAO,UACtC,OAAO,4BAA4B,EAAE,OAAO,GAC1C;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,YAAY,GAAC,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,IAAI,CAgJ/G"}
1
+ {"version":3,"file":"effect_binding.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/effect_binding.js"],"names":[],"mappings":"AAoCA;;;;;;;;GAQG;AACH;;;;;;;;;;;;;;GAcG;AACH,yCANW,MAAM,UACN,MAAM,eACN,MAAM,QA0KhB;AAqCD;;;;;;;;;;GAUG;AACH,+CAPW,OAAO,sBAAsB,EAAE,OAAO,UACtC,OAAO,4BAA4B,EAAE,OAAO,GAC1C;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,YAAY,GAAC,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,IAAI,CAgJ/G"}
@@ -1 +1 @@
1
- {"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgpu/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACC;;OAEG;IACH,sBAFW,cAAc,EA0DxB;IAvDA,yBAAwB;IAIxB,8BAYE;IACF,YASE;IAGF,cAAwB;IAExB;;;OAGG;IACH,WAFU,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAEL;IAC1B;;;OAGG;IACH,aAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAED;IAC5B;;;;OAIG;IACH,YAFU,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC,CAEzE;IAI3B,0CAA4D;IAC5D;;OAEG;IACH,eAFU,iBAAiB,GAAC,SAAS,CAEP;IAG/B;;;;;OAKG;IACH,cAUC;IAED;;;;;;;OAOG;IACH,mBALW,QAAQ,GACN;QAAC,OAAO,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CA6BxE;IAED;;;;;;;;;OASG;IACH,+BANW,MAAM,aACN,MAAM,GACJ,MAAM,GAAC,SAAS,CA4D5B;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QAsOhB;CACD;+CAlc6C,0BAA0B;yCADhC,qCAAqC;8BAN/C,2BAA2B"}
1
+ {"version":3,"file":"orthogonal.d.ts","sourceRoot":"","sources":["../../../../../src/video/webgpu/renderers/tmxlayer/orthogonal.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACC;;OAEG;IACH,sBAFW,cAAc,EA0DxB;IAvDA,yBAAwB;IAIxB,8BAYE;IACF,YASE;IAGF,cAAwB;IAExB;;;OAGG;IACH,WAFU,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAEL;IAC1B;;;OAGG;IACH,aAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAED;IAC5B;;;;OAIG;IACH,YAFU,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC,CAEzE;IAI3B,0CAA4D;IAC5D;;OAEG;IACH,eAFU,iBAAiB,GAAC,SAAS,CAEP;IAG/B;;;;;OAKG;IACH,cAUC;IAED;;;;;;;OAOG;IACH,mBALW,QAAQ,GACN;QAAC,OAAO,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CA6BxE;IAED;;;;;;;;;OASG;IACH,+BANW,MAAM,aACN,MAAM,GACJ,MAAM,GAAC,SAAS,CA4D5B;IAED;;;;OAIG;IACH,YAHW,QAAQ,QACR,MAAM,QA0OhB;CACD;+CAtc6C,0BAA0B;yCADhC,qCAAqC;8BAN/C,2BAA2B"}
@@ -79,9 +79,10 @@ export default class WebGPURenderer extends Renderer {
79
79
  * @param {number} height - destination height
80
80
  * @param {ShaderEffect} effect - the effect to composite with
81
81
  * @param {boolean} [keepBlend=false] - keep the current blend mode
82
+ * @param {number} [alpha=1] - the opacity to composite the blit at (0.0 to 1.0)
82
83
  * @override
83
84
  */
84
- override blitEffect(source: import("../rendertarget/webgpurendertarget.js").default, x: number, y: number, width: number, height: number, effect: ShaderEffect, keepBlend?: boolean): void;
85
+ override blitEffect(source: import("../rendertarget/webgpurendertarget.js").default, x: number, y: number, width: number, height: number, effect: ShaderEffect, keepBlend?: boolean, alpha?: number): void;
85
86
  /**
86
87
  * Clear the current clip region with the given color — a full-viewport
87
88
  * triangle clipped by the active scissor, drawn with blending replaced
@@ -132,7 +133,6 @@ export default class WebGPURenderer extends Renderer {
132
133
  */
133
134
  setBatcher(name?: string): WebGPUBatcher;
134
135
  drawMesh(mesh: any, modelMatrix: any): void;
135
- instancedEffectWarned: boolean | undefined;
136
136
  /**
137
137
  * Release any retained geometry held for the given mesh (called from
138
138
  * `Mesh.onDeactivateEvent` / `Mesh.destroy`).
@@ -321,7 +321,6 @@ export default class WebGPURenderer extends Renderer {
321
321
  */
322
322
  createPattern(image: HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | VideoFrame, repeat?: string): TextureAtlas;
323
323
  savedBlendMode: string | undefined;
324
- maskDepthWarned: boolean | undefined;
325
324
  /**
326
325
  * Stroke an arc at the specified coordinates with given radius, start and end points
327
326
  * @param {number} x - arc center point x-axis
@@ -466,10 +465,10 @@ export default class WebGPURenderer extends Renderer {
466
465
  import Renderer from "../renderer.js";
467
466
  import { Matrix3d } from "../../math/matrix3d.ts";
468
467
  import type ShaderEffect from "../effects/shadereffect.js";
468
+ import Light2d from "../../lighting/light2d.ts";
469
469
  import { Color } from "../../math/color.ts";
470
470
  import WebGPUBatcher from "./batchers/webgpu_batcher.js";
471
471
  import type { Matrix2d } from "../../math/matrix2d.ts";
472
- import type Light2d from "../../lighting/light2d.ts";
473
472
  import RadialGradientEffect from "../effects/radialGradient.js";
474
473
  import { TextureAtlas } from "../texture/atlas.js";
475
474
  import type { Polygon } from "../../geometries/polygon.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"webgpu_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/webgpu_renderer.js"],"names":[],"mappings":"AA6EA;;;;;;;;;;;;;;;GAeG;AACH,iDANW,OAAO,qBACP,OAAO,GACL;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,CAYvD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH;IACC;;OAEG;IACH,qBAFW,mBAAmB,EA8W7B;IAtW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AAwB;yBAF3B,2BAA2B;iCAtClB,8BAA8B;+BAHhC,4BAA4B;6BASjB,qBAAqB;6BAmCrC,6BAA6B;yCALjB,+BAA+B"}
1
+ {"version":3,"file":"webgpu_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/webgpu_renderer.js"],"names":[],"mappings":"AA+EA;;;;;;;;;;;;;;;GAeG;AACH,iDANW,OAAO,qBACP,OAAO,GACL;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,CAYvD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH;IACC;;OAEG;IACH,qBAFW,mBAAmB,EA8W7B;IAtWA;;;;OAIG;IACH,kBAHU,UAAU,GAAC,SAAS,CAGN;IAExB;;;;OAIG;IACH,iBAHU,SAAS,GAAC,SAAS,CAGN;IAEvB;;;OAGG;IACH,SAFU,gBAAgB,CAEc;IAExC;;;;;OAKG;IACH,0BAHU,MAAM,GAAC,SAAS,CAGM;IAEhC;;;;;;;;;;;;;OAaG;IACH,cAJU,MAAM,GAAC,SAAS,CAIG;IAyC7B;mBACe;IACf,iEAAsC;IAGtC;;;OAGG;IACH,oBAAmC;IAInC,2BAAyD;IAKzD;mBACe;IACf,qBAA2B;IAG3B;mBACe;IACf;;;QAEE;IACF;mBACe;IACf,iBAAmB;IAEnB;mBACe;IACf,iBAA4B;IAE5B;mBACe;IACf,uBAAuB;IAEvB;;;;;OAKG;IACH,UAJU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAIJ;IAEzB;;;;OAIG;IACH,oBAA0B;IAG1B;mBACe;IACf,0CAAyB;IACzB;mBACe;IACf,sCAAuB;IAEvB;mBACe;IACf,qCAAsB;IACtB;mBACe;IACf,sCAAuB;IACvB;mBACe;IACf,wCAAwB;IAGxB;mBACe;IACf,yCAA0B;IAC1B;mBACe;IACf,wCAAsB;IAGtB;mBACe;IACf,+CAA+B;IAE/B;;;;;;;;;;;;;;;;;;OAkBG;IACH,8CAAq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,SACN,MAAM,QAIhB;IAED;;OAEG;IACH,kBAEC;IA6FD;;;;;;;;;;;;;;;;OAgBG;IACH,yBA8BC;IAED;;;;;;;;;;OAUG;IACH,4BAuCC;IApBA;;;;;OAKG;IACH,iCAAkE;IA4CnE;;;;;OAKG;IACH,+BA6CC;IAED;;;OAGG;IACH,cAFa,gBAAgB,CAI5B;CAoGD;qBArtJoB,gBAAgB;0CA2BK,oCAAoC;yBAvBrD,qBAAqB;yBA5BrB,wBAAwB;uBAC1B,yBAAyB;gCAiDU,qBAAqB;8BAHjD,mBAAmB;8BACnB,yBAAyB;+BAMxB,oBAAoB;+BA5BpB,uCAAuC;wBAP9C,2BAA2B;6BAMtB,uCAAuC;8BAwCvC,4BAA4B;oBApErC,2BAA2B;sBAEd,qBAAqB;0BA+C5B,8BAA8B;8BAe7B,wBAAwB;iCAxClB,8BAA8B;+BAHhC,4BAA4B;6BASjB,qBAAqB;6BAmCrC,6BAA6B;yCAJjB,+BAA+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "melonjs",
3
- "version": "20.11.0",
3
+ "version": "20.12.0",
4
4
  "description": "A modern & fully featured HTML5 game engine (2D & 3D) for JavaScript/TypeScript, with WebGL/WebGPU rendering, built-in physics, Tiled map & glTF support and WebAudio.",
5
5
  "homepage": "https://www.melonjs.org/",
6
6
  "type": "module",
package/skills/AGENTS.md CHANGED
@@ -64,4 +64,5 @@ Before hand-rolling: `ParticleEmitter`, `Trail`, `Tween`, the built-in
64
64
  Companion packages cover the rest: `@melonjs/planck-adapter` and
65
65
  `@melonjs/matter-adapter` (physics), `@melonjs/spine-plugin` (skeletal
66
66
  animation), `@melonjs/tiled-inflate-plugin` (**required** for compressed Tiled
67
- maps), `@melonjs/debug-plugin`, `@melonjs/capacitor-plugin`.
67
+ maps), `@melonjs/debug-plugin`, `@melonjs/gamepad-plugin` (touch controls
68
+ reported as a gamepad), `@melonjs/capacitor-plugin`.
@@ -112,6 +112,7 @@ Tiled inflate plugin are *required* for their use cases, not merely convenient.
112
112
  | [`@melonjs/tiled-inflate-plugin`](https://www.npmjs.com/package/@melonjs/tiled-inflate-plugin) | **Required** to load gzip-, zlib- or zstd-compressed Tiled maps. Without it, parsing such a map throws `No inflate function set`. |
113
113
  | [`@melonjs/spine-plugin`](https://www.npmjs.com/package/@melonjs/spine-plugin) | Skeletal animation authored in Spine, as a melonJS renderable. |
114
114
  | [`@melonjs/debug-plugin`](https://www.npmjs.com/package/@melonjs/debug-plugin) | An in-game debug panel — FPS, draw counts, collision-shape and bounds overlays. Register it after `app.init()`. |
115
+ | [`@melonjs/gamepad-plugin`](https://www.npmjs.com/package/@melonjs/gamepad-plugin) | On-screen touch controls for phones and tablets: sticks and buttons reported as a gamepad, so the game's `bindGamepad` bindings drive it. Use it rather than writing virtual controls. |
115
116
  | [`@melonjs/capacitor-plugin`](https://www.npmjs.com/package/@melonjs/capacitor-plugin) | Wrapping a game as a native iOS/Android app: it bridges Capacitor's lifecycle — pause/resume, the hardware back button, orientation lock, splash screen. |
116
117
  | [`create-melonjs`](https://www.npmjs.com/package/create-melonjs) | Scaffolding a new project — start here rather than assembling a build by hand. |
117
118
 
@@ -285,7 +285,7 @@ alone; reach for `position()` (or `follow` / `at`) when distance falloff
285
285
  matters.
286
286
 
287
287
  **Spatial audio is WebAudio-only.** On a clip loaded with `stream: true` (or
288
- `html5: true`) `stereo` / `position` / `orientation` return early and do
288
+ `html5: true`, or `preload: false`) `stereo` / `position` / `orientation` return early and do
289
289
  nothing — which is exactly the case for the long music tracks people reach for
290
290
  first. `follow` and `at` are equally inert on a streamed clip.
291
291
 
@@ -419,7 +419,7 @@ very next line.
419
419
  mute: false,
420
420
  loop: false,
421
421
  autoplay: false,
422
- preload: true, // or "metadata"
422
+ preload: true, // false: fetched on first play, then streamed; or "metadata"
423
423
  format: "mp3", // explicit hint when the URL has no usable extension
424
424
  stream: true, // long music: stream rather than decode into memory
425
425
  on: { play() {}, end() {}, stop() {}, unlock() {} },
@@ -437,6 +437,25 @@ same switch under its backend name.) `on` accepts the full lifecycle set:
437
437
  `play`, `pause`, `stop`, `end`, `fade`, `seek`, `rate`, `volume`, `mute`,
438
438
  `unlock`.
439
439
 
440
+ **`preload: false` keeps a clip out of the preload.** Nothing is downloaded for
441
+ it until it is first played (`audio.play`, `audio.playTrack`, or `autoplay`).
442
+ That play fetches it and streams it, as `stream: true` does, so the sound starts
443
+ as soon as enough of the file has arrived, not once all of it has; a clip never
444
+ played is never downloaded. Use it for music a player may never reach (a boss
445
+ theme, the ending) to shorten the wait before the game starts.
446
+
447
+ - The loader reports such a clip done at once: `audio.state(name)` is
448
+ `"unloaded"` until its first play, then `"loading"`, then `"loaded"`.
449
+ - It starts with the short delay of a stream on its first play. Keep a sound
450
+ effect that must sound the instant it is triggered preloaded.
451
+ - Being streamed, it has the limits of `stream: true`: positional sound does
452
+ not apply to it, and it ignores `withCredentials` (see below).
453
+ - Before 20.12.0 such a clip was never fetched at all, and stayed silent.
454
+
455
+ `stream: true` alone still fetches the clip during the preload; combine it with
456
+ `preload: false` to defer that too. `preload: "metadata"` only matters for a
457
+ streamed clip: the preload fetches just enough to know its duration.
458
+
440
459
  Outside a preload, `audio.load(asset, onload?, onerror?)` takes the same
441
460
  descriptor and loads one clip at runtime — for a level's sounds fetched when
442
461
  the level starts. The loader calls the same function, so the same rules apply.
@@ -447,7 +466,8 @@ Re-preloading a manifest that already contains a loaded clip is a no-op —
447
466
  **Credentials use the same global switch as every other asset type** —
448
467
  `loader.setOptions({ withCredentials: true })`, not an audio-specific option.
449
468
  Buffered audio fetches through the shared loader path, so it honours it exactly
450
- as an image or a JSON file does. A `stream: true` clip does not: it plays
469
+ as an image or a JSON file does. A streamed clip (`stream: true`, or
470
+ `preload: false`) does not: it plays
451
471
  through an `<audio>` element, which needs a `crossorigin` attribute rather than
452
472
  fetch credentials. Preload a clip buffered if it sits behind a login.
453
473
 
@@ -475,7 +495,8 @@ either way — blank screen, empty console.
475
495
  | music keeps playing after leaving a scene | used `play` instead of `playTrack`, or no `stopTrack` in teardown |
476
496
  | two music tracks playing at once, and `stopTrack()` only silences one | melonJS before 20.9.0: `playTrack` did not stop the previous track, so the scene that started it had to `stopTrack()` on the way out |
477
497
  | the music restarts when returning to a screen | `playTrack` with the track already playing restarts it; don't call it again if the bed should carry on |
478
- | `stereo` / `position` do nothing | the clip was loaded with `stream: true` — spatial is WebAudio-only |
498
+ | `stereo` / `position` do nothing | the clip was loaded with `stream: true` or `preload: false` — spatial is WebAudio-only |
499
+ | a `preload: false` clip never plays, and `audio.state()` stays `"unloaded"` | melonJS before 20.12.0 never fetched such a clip; preload it, or update |
479
500
  | one format works, another does not | that codec is not in the `audio.init()` list |
480
501
  | audio behind a login fails, or the preload hangs | `loader.setOptions({ withCredentials: true })` — the same switch every asset type uses |
481
502
  | a streamed clip ignores `withCredentials` | `stream: true` plays through an `<audio>` element; preload it buffered instead |
@@ -195,11 +195,25 @@ A repeating pattern is left to wrap.
195
195
 
196
196
  ## `subPixel` is about position, not scale
197
197
 
198
- `subPixel: false` (the default) truncates a renderable's translation to whole
199
- pixels inside the frame. It is `|0`, so it truncates **toward zero** rather
200
- than rounding, which is worth knowing when something travels a short distance:
201
- an offset that should swing between -3 and +3 lands on -2 and +2, and parks at
202
- the extremes for longer than it should.
198
+ `subPixel: false` (the default) draws everything on whole pixels. The snap
199
+ happens **once, where a draw lands**, the same on every renderer: each edge of
200
+ a sprite, a shape or a clip is rounded to the nearest pixel after every
201
+ translation and scale it is drawn under. So:
202
+
203
+ - nested containers add their positions up exactly first (10.6 then -6.5
204
+ lands on 4, the pixel 4.1 is in);
205
+ - a flipped sprite covers the pixels it covers unflipped;
206
+ - a sprite and a `fillRect` at the same position cover the same pixels, and a
207
+ shape has no half-grey edge on the Canvas renderer;
208
+ - a position floating point error leaves a hair short of a pixel, such as a
209
+ body resting on the floor at `223.99999999999997` after a collision
210
+ push-out, draws on that pixel (224), so it does not shake every other frame.
211
+
212
+ The camera's view starts on a whole pixel too, in world units (zoomed 2x, it
213
+ moves in 2 px steps), and culling and the pointer use that same position:
214
+ things standing still stay still against each other while the view scrolls,
215
+ and a click lands on what is drawn under it. A rotated draw, and anything a
216
+ `Camera3d` draws, is left where it is.
203
217
 
204
218
  It does nothing about how the frame reaches the screen. A game that carefully
205
219
  snaps positions and is then scaled by 2.667 has thrown that work away at the
@@ -138,18 +138,44 @@ as transparent, as if the sprite were drawn on its own, so they never show
138
138
  along its edges and the atlas needs no padding for them. Past the texture's own
139
139
  edge (a standalone image, or the outside of an atlas) nothing changes.
140
140
 
141
+ **The effects that place a pattern place it on the renderable they draw.**
142
+ `SwayEffect`'s planted row, `WaveEffect`'s `anchor`, the centre of
143
+ `VignetteEffect`, `RadialGradientEffect` and `ScanlineEffect`'s curvature all
144
+ land on the sprite itself: cut from an atlas, flipped, rotated, or with other
145
+ effects after it, the pattern sits where it sits on a sprite with a texture of
146
+ its own and that one effect. What is measured in the texture stays measured in
147
+ it: `ShineEffect`'s sweep, bands and width, `WaveEffect`'s amplitude and
148
+ frequency, `DissolveEffect`'s grain, the lines of `HologramEffect` and
149
+ `ScanlineEffect` (on an atlas sprite, fractions of the atlas, so a single shine
150
+ crosses an atlas sprite only part of the time). With other effects after them
151
+ they all stay on the sprite. `SwayEffect` measures everything across the
152
+ sprite.
153
+
141
154
  **Their widths, offsets and sizes are in pixels of the texture they draw, with
142
155
  nothing to pass.** Each of those effects takes the size of what it draws: the
143
156
  sprite's whole texture (the atlas image, not the frame), the screen for a
144
- camera's effect, a mesh's texture. Do not pass `textureSize` to get this: a
157
+ camera's effect, a mesh's texture. With other effects after it, it still
158
+ measures in the sprite's own pixels, at any scale and under a camera's zoom
159
+ (on a container, in the container's own), so adding a second effect never
160
+ changes how wide the first comes out. Do not pass `textureSize` to get this: a
145
161
  `textureSize` (or `setTextureSize()`) fixes the size instead, for a width
146
162
  meant in some other texture's pixels.
147
163
 
148
164
  ```js
149
- // 2 pixels of the sprite's art, whatever the size of its atlas
165
+ // 2 pixels of the sprite's art, whatever the size of its atlas, its scale,
166
+ // the camera's zoom, or the effects after it
150
167
  sprite.addPostEffect(new OutlineEffect(app.renderer, { width: 2 }));
168
+ sprite.addPostEffect(new GlowEffect(app.renderer, { width: 6 }));
151
169
  ```
152
170
 
171
+ With two or more effects, the sprite is drawn into a capture and each effect
172
+ reads that, at the game's texture filter, as a sprite reads its own texture:
173
+ under `"nearest"` (or `antiAlias` off) a width that lands between two screen
174
+ pixels, such as 2 pixels of a sprite drawn at 0.3, stays crisp, and under
175
+ `"linear"` it blends, on WebGL and WebGPU alike. The result lands inside the
176
+ clip the sprite is drawn under, a minimap camera's view or a clipping
177
+ container, as with one effect.
178
+
153
179
  `SwayEffect` leans a sprite or a layer from side to side, as if in a breeze: the
154
180
  top sways most and everything from its `anchor` row down stays put, so a tree's
155
181
  trunk or a reed's root stays planted. It suits anything planted at its bottom;
@@ -166,17 +192,18 @@ tree.addPostEffect(sway);
166
192
  sway.setTime(timer.getTime() / 1000);
167
193
  ```
168
194
 
169
- Rows are measured across the texture the effect samples, so on a sprite cut from
170
- an atlas the anchor is a row of the atlas: it suits a standalone image or a
171
- layer best.
195
+ Its strength (a fraction of the sprite's width), its `anchor` and how it bends
196
+ are all measured across the sprite, so a sprite cut from an atlas sways exactly
197
+ like the same art with a texture of its own. `WaveEffect`'s `anchor` is a row of
198
+ the sprite too, but its amplitude and frequency are measured across the texture,
199
+ so on an atlas sprite they are fractions of the atlas.
172
200
 
173
- `RadialGradientEffect` is a procedural soft spot: solid at the centre of its
174
- host quad, fading linearly to transparent at the edge, and elliptical for free
175
- on a non-square quad. It is the one to reach for instead of baking a disc into
176
- a canvas, for a pickup highlight, a trigger marker or a damage flash. Its
177
- falloff assumes the quad samples a FULL texture rect, so pair it with a
178
- standalone image or `Renderer.getWhitePixel()` rather than a sprite that draws
179
- a sub-region of an atlas, where the centre would land off-quad.
201
+ `RadialGradientEffect` is a procedural soft spot: solid at the centre of the
202
+ renderable it draws, fading linearly to transparent at the edge, and elliptical
203
+ for free on a non-square one. It is the one to reach for instead of baking a
204
+ disc into a canvas, for a pickup highlight, a trigger marker or a damage flash,
205
+ on a standalone image, `Renderer.getWhitePixel()` or a sprite cut from an atlas
206
+ alike.
180
207
 
181
208
  `SquishEffect` bulges a sprite's middle out (`setBulge(0.3)`) or pinches it in
182
209
  (`setBulge(-0.3)`), its top and bottom rows staying put. Bulging out widens the
@@ -524,6 +551,10 @@ has changes nothing). What splits the batch:
524
551
  - a different effect instance, or a sprite without the effect in between;
525
552
  - a `noise_uv` effect on sprites of different frames or sizes (its rect is
526
553
  per sprite);
554
+ - one of the effects that place a pattern on the sprite (`SwayEffect`,
555
+ `WaveEffect`, `ShineEffect`, `VignetteEffect`, `RadialGradientEffect`,
556
+ `ScanlineEffect`, `DissolveEffect`, `HologramEffect`): each sprite is told
557
+ where it is, so each draws on its own;
527
558
  - a `screen_texture` effect, which draws each sprite on its own, as each one
528
559
  samples a capture of everything drawn before it.
529
560
 
@@ -603,7 +634,9 @@ For refraction, distortion and anything that samples what is already drawn:
603
634
  - **`screen_texture`** — a sampler kept filled with everything drawn so far
604
635
  (GLSL: annotate the sampler `uniform sampler2D tex : screen_texture;`)
605
636
  - **`screen_uv`** — this fragment's 0..1 position in that capture
606
- - **`noise_uv`** — 0..1 across the sprite regardless of its atlas frame
637
+ - **`noise_uv`** — 0..1 across the sprite regardless of its atlas frame, and
638
+ across the renderable when it has several effects (it does not slide with
639
+ the camera)
607
640
 
608
641
  In WGSL the capture is sampled through `screen_sampler` (clamped) or
609
642
  `screen_sampler_repeat` (wrapping) instead of GLSL's `: screen_texture`
@@ -698,11 +731,13 @@ that against your request detects the fallback.
698
731
 
699
732
  ## The Canvas fallback
700
733
 
701
- `ShaderEffect` on a Canvas renderer logs a warning, leaves `enabled = false`, and
702
- turns every method into a no-op. Nothing throws. The same happens on a GPU
703
- backend when no body matches its language — a GLSL-only effect under WebGPU.
734
+ `ShaderEffect` on a Canvas renderer leaves `enabled = false` and turns every
735
+ method into a no-op. Nothing throws, and the console gets one warning, from the
736
+ first such effect; the rest stay quiet. The same happens on a GPU backend when
737
+ no body matches its language — a GLSL-only effect under WebGPU.
704
738
 
705
- That is fine for decoration. It is **not** fine when the shader draws your
739
+ That is fine for decoration, which needs no guard: create and add the effect as
740
+ on any renderer. It is **not** fine when the shader draws your
706
741
  content — the carrier renderable then shows through raw. A 1×1 white texture
707
742
  stretched to 280×156 renders as a white box where the effect should be.
708
743
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: melonjs-input
3
- description: "Use this skill for keyboard, pointer, mouse, touch and gamepad input in melonJS. Covers the bindKey action indirection, registerPointerEvent on regions, the isKinematic requirement that silently blocks pointer events, which of several overlapping objects receives an event and how to consume it, world vs screen pointer coordinates, and gamepad mapping onto the same actions. Triggers on: input, bindKey, isKeyPressed, KEY, registerPointerEvent, releasePointerEvent, pointerdown, pointerup, pointermove, POINTERMOVE, gamepad, bindGamepad, triggerKeyEvent, KEYDOWN, KEYUP, press any key, splash screen, click, touch, drag, hit test, event propagation, stop propagating, overlapping, which object gets the click."
3
+ description: "Use this skill for keyboard, pointer, mouse, touch and gamepad input in melonJS. Covers the bindKey action indirection, registerPointerEvent on regions, the isKinematic requirement that silently blocks pointer events, which of several overlapping objects receives an event and how to consume it, world vs screen pointer coordinates, and gamepad mapping onto the same actions. Triggers on: input, bindKey, isKeyPressed, KEY, registerPointerEvent, releasePointerEvent, pointerdown, pointerup, pointermove, POINTERMOVE, gamepad, bindGamepad, triggerKeyEvent, virtual gamepad, touch controls, joystick, gamepad-plugin, KEYDOWN, KEYUP, press any key, splash screen, click, touch, drag, hit test, event propagation, stop propagating, overlapping, which object gets the click."
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -273,7 +273,27 @@ device, so a pad unplugged and plugged back into the same slot keeps working.
273
273
 
274
274
  ## Virtual controls
275
275
 
276
- On-screen buttons synthesise key events, again reaching the same actions:
276
+ For on-screen touch controls, use `@melonjs/gamepad-plugin` rather than
277
+ writing them: sticks and buttons drawn over the game and reported as a pad in
278
+ a gamepad slot, so the `bindGamepad` bindings above answer to them unchanged.
279
+
280
+ ```js
281
+ import { GamepadPlugin } from "@melonjs/gamepad-plugin";
282
+
283
+ // once the application is created: a stick and two buttons, on touch screens
284
+ plugin.register(GamepadPlugin, "gamepad", {
285
+ buttons: [{ label: "A" }, { label: "B" }],
286
+ });
287
+ ```
288
+
289
+ The left stick presses the D-pad buttons (`GAMEPAD.BUTTONS.UP` ...) in 8
290
+ directions and reports `AXES.LX`/`LY`; the buttons press `FACE_1`, `FACE_2`...
291
+ in turn, or a key with `{ key: input.KEY.SPACE }`. Each finger is followed on
292
+ its own, a touch starting on the controls does not reach the game, and they
293
+ hide while a real pad is in use. `plugin.cache.gamepad.visible` says whether
294
+ they show, to word a prompt ("tap" or a key name).
295
+
296
+ A single key can also be pressed directly, reaching the same actions:
277
297
 
278
298
  ```js
279
299
  input.triggerKeyEvent(input.KEY.LEFT, true); // press
@@ -299,6 +319,8 @@ input.triggerKeyEvent(input.KEY.LEFT, false); // release
299
319
  | a widget stays highlighted after the pointer moves onto a panel over it | the panel consumes no `pointermove`, so nothing takes the pointer off the widget |
300
320
  | a child's big `z` does not put it in front of another container | `pos.z` is container-local — use `ancestor.moveToTop()` on the container |
301
321
  | every click in the game stops working | a handler on `app.viewport` returning `false`, which is asked first |
322
+ | touch controls do nothing | nothing bound to their slot — `bindGamepad` on the plugin's `index` (0 by default), or give the buttons a `key` |
323
+ | touch controls never show on a desktop | the gamepad plugin's `enabled` defaults to `device.touch` — pass `enabled: true` to try them there |
302
324
 
303
325
  ## Related skills
304
326
 
@@ -174,9 +174,10 @@ the soft one is one shader pass on the GPU backends and an offscreen canvas on
174
174
  Canvas. So the lit-spot look, soft or hard, works everywhere, Canvas included.
175
175
 
176
176
  What Canvas cannot do is **per-pixel normal-map lighting**:
177
- `renderer.setLightUniforms()` is a no-op there, and the first frame that passes a
178
- non-empty light list logs a one-shot warning. Normal-mapped sprites simply render
179
- unlit — no error.
177
+ `renderer.setLightUniforms()` is a no-op there, and the first normal-mapped
178
+ sprite drawn while lights are on logs a one-shot warning (a scene with lights
179
+ and no normal maps stays quiet). Normal-mapped sprites simply render unlit — no
180
+ error.
180
181
 
181
182
  ```js
182
183
  if (app.renderer.shaderLanguage === null) {
@@ -183,7 +183,8 @@ the hard way:
183
183
  ### `DefaultLoadingScreen` lives in the WORLD, not on the screen
184
184
 
185
185
  The built-in loading screen is written for a `Camera2d`. Its progress bar and
186
- logo are added with `app.world.addChild(bar, 1)` / `addChild(logo, 2)` and are
186
+ logo are added together, once the logo is decoded (a frame or so after the
187
+ screen comes up), with `app.world.addChild(bar, 1)` / `addChild(logo, 2)`, and are
187
188
  **`floating === false`** — ordinary world-space renderables. They read as an
188
189
  overlay only because that stage's world is otherwise empty.
189
190
 
@@ -195,7 +196,7 @@ in front of a bar sitting at z = 1. What does NOT rescue it, all tried:
195
196
  depth, so the scene's own z values are geometry, not layering, and the bar
196
197
  still loses to the depth test.
197
198
  - **`moveToTop()`** — it early-returns for a child already at index 0, which the
198
- loading screen's children always are, having been added before anything else.
199
+ loading screen's children usually are, having been added before anything else.
199
200
  It silently does nothing.
200
201
  - **Flipping them to `floating = true`** for the duration — the scene still
201
202
  covers them.
@@ -397,7 +398,7 @@ throws, the same trap as the removed `loader.onload` / `onProgress`.
397
398
 
398
399
  | | |
399
400
  | --- | --- |
400
- | one streamed clip (`stream: true` / `html5: true`) ignores `withCredentials` | it plays through an `<audio>` element, which needs a `crossorigin` attribute rather than fetch credentials. Preload it buffered if it is behind auth |
401
+ | one streamed clip (`stream: true` / `html5: true` / `preload: false`) ignores `withCredentials` | it plays through an `<audio>` element, which needs a `crossorigin` attribute rather than fetch credentials. Preload it buffered if it is behind auth |
401
402
  | credentials silently dropped for audio before 20.4 | the loader forwarded them under a pre-20.3 name the backend never read — a hung preload rather than an error |
402
403
 
403
404
  ## Symptom → cause
@@ -222,6 +222,9 @@ queries one at a time, usually not. See `melonjs-3d` for the decision table.
222
222
 
223
223
  - `stream: true` on long music tracks plays through a streaming element instead
224
224
  of decoding the whole file into memory.
225
+ - `preload: false` on music a player may never reach (a boss theme, the
226
+ ending) keeps it out of the initial download: it is fetched and streamed
227
+ when first played.
225
228
  - `pool` on an audio clip sizes the reuse pool for finished instances — it is
226
229
  **not** a concurrency cap.
227
230
  - `loader.unloadAll()` between large levels drops every loaded asset and
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: melonjs-plugins
3
- description: "Use this skill when adding a melonJS plugin or adapter — the debug panel, Spine skeletal animation, compressed Tiled map support, Capacitor packaging — or when writing your own plugin. Covers plugin.register and its version gate, plugin.cache, plugin.patch, and why physics adapters are not plugins. Triggers on: plugin, plugin.register, plugin.cache, plugin.get, plugin.patch, BasePlugin, debug-plugin, DebugPanelPlugin, SpinePlugin, TiledInflatePlugin, CapacitorPlugin, adapter, custom plugin, plugin version mismatch, already registered."
3
+ description: "Use this skill when adding a melonJS plugin or adapter — the debug panel, Spine skeletal animation, compressed Tiled map support, on-screen touch controls, Capacitor packaging — or when writing your own plugin. Covers plugin.register and its version gate, plugin.cache, plugin.patch, and why physics adapters are not plugins. Triggers on: plugin, plugin.register, plugin.cache, plugin.get, plugin.patch, BasePlugin, debug-plugin, DebugPanelPlugin, SpinePlugin, TiledInflatePlugin, GamepadPlugin, gamepad-plugin, touch controls, virtual joystick, CapacitorPlugin, adapter, custom plugin, plugin version mismatch, already registered."
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -88,6 +88,25 @@ This is the answer for deforming animated characters — glTF import does not re
88
88
  vertex skinning. It also registers a Tiled object class, so Spine skeletons can
89
89
  be placed from a map.
90
90
 
91
+ ### `@melonjs/gamepad-plugin`
92
+
93
+ On-screen touch controls, reported as a gamepad: one or two sticks and any
94
+ number of buttons, drawn over the game and read by the engine as a pad in a
95
+ gamepad slot. The game's `bindGamepad` bindings drive it unchanged, so one set
96
+ of bindings covers a real pad and a touch screen.
97
+
98
+ ```js
99
+ import { GamepadPlugin } from "@melonjs/gamepad-plugin";
100
+ plugin.register(GamepadPlugin, "gamepad", {
101
+ buttons: [{ label: "A" }, { label: "B" }],
102
+ });
103
+ // plugin.cache.gamepad.visible — showing, to word prompts ("tap" or a key)
104
+ ```
105
+
106
+ Shown on touch screens by default (`enabled`), hidden while a real pad is in
107
+ use. The left stick also presses the D-pad; a button can press a key instead
108
+ of a pad button. See `melonjs-input` for the bindings.
109
+
91
110
  ### `@melonjs/capacitor-plugin`
92
111
 
93
112
  Bridges Capacitor's native lifecycle and hardware-back events into the engine:
@@ -174,9 +174,10 @@ Use `addPostEffect()` / `getPostEffect()` / `removePostEffect()`. Assigning
174
174
  `renderable.shader = …` is deprecated since 19.2.0.
175
175
 
176
176
  Post effects need a programmable pipeline. A `ShaderEffect` constructed against
177
- the Canvas renderer (`renderer.shaderLanguage === null`) logs a warning, stays
178
- at `enabled === false` and no-ops every method rather than throwing — and
179
- `beginPostEffect` filters disabled effects out. Since `video.AUTO` picks the
177
+ the Canvas renderer (`renderer.shaderLanguage === null`) stays at
178
+ `enabled === false` and no-ops every method rather than throwing — and
179
+ `beginPostEffect` filters disabled effects out. The first one logs a warning,
180
+ the rest stay quiet, so a decorative effect needs no renderer check. Since `video.AUTO` picks the
180
181
  backend at runtime, an effect that works on your machine may do nothing on
181
182
  another.
182
183
 
@@ -47,8 +47,8 @@ once and then degrades or no-ops, so the game runs and looks wrong.
47
47
  Two Canvas rows are worth spelling out because they are easy to misread as total
48
48
  failures. A `Light2d` still *draws* — the Canvas renderer bakes a radial gradient
49
49
  per light and blits it — what disappears is per-pixel normal-map shading, which
50
- warns once (`Light2d normal-map lighting requires the WebGL renderer`) and then
51
- renders sprites unlit. A `Mesh` still draws too, sorted with the painter's
50
+ warns once (`Light2d normal-map lighting requires a GPU backend`), the first time
51
+ a normal-mapped sprite is drawn under a light, and then renders sprites unlit. A `Mesh` still draws too, sorted with the painter's
52
52
  algorithm and no depth buffer, so convex models look right and anything
53
53
  self-overlapping does not. `"none"` (replace, alpha included) is the one blend
54
54
  mode Canvas cannot express — there is no `globalCompositeOperation` that
@@ -50,7 +50,10 @@ a transition's reveal follow once the shaders the stage queued are ready, which
50
50
  is a few milliseconds once the browser has compiled them before, and at most
51
51
  1.5s on a first visit. So build the stage in `onResetEvent`: an object a
52
52
  `STATE_CHANGE` listener adds is not waited for, and its first draw may still
53
- compile what it needs.
53
+ compile what it needs. That first frame steps the world once before drawing it,
54
+ however short it is, so everything `onResetEvent` added is in it (the same goes
55
+ for the frame after a `level.load` made while the game runs). Before 20.12 it
56
+ was drawn unstepped, and showed the stage's background alone for one frame.
54
57
 
55
58
  `state.change` **throws** `Undefined Stage for state '<id>'` if nothing was
56
59
  registered for that id, and `state.set` throws if the second argument is not a
@@ -109,6 +112,7 @@ app.world.addChild(this.HUD, 100); // explicit z — see melonjs-renderable
109
112
  ```js
110
113
  state.transition("fade", "#FFFFFF", 250);
111
114
  state.transition("mask", "#000", 500, new Ellipse(0, 0, 1, 1)); // shape required
115
+ state.transition("pixelate", "#000", 300); // blocks up to 32px; a 4th argument sets the size
112
116
  state.pause(); // freeze update, keep drawing
113
117
  state.resume();
114
118
  app.freeze(150); // brief hit-stop (proxies state.freeze)
@@ -116,7 +120,18 @@ app.freeze(150); // brief hit-stop (proxies state.fr
116
120
 
117
121
  `state.transition` is global and sticky — once set it applies to every later
118
122
  `state.change`. The `"mask"` form needs its fourth argument, an `Ellipse` or
119
- `Polygon`; without one it warns and falls back to a direct switch.
123
+ `Polygon`; without one it warns and falls back to a direct switch. The
124
+ `"pixelate"` form breaks the screen up into blocks (its fourth argument is the
125
+ largest block size in pixels). It is a shader effect, so on Canvas it does
126
+ nothing and the state changes directly.
127
+
128
+ A `state.change` asked for while a transition covers the screen (Enter pressed
129
+ twice on a menu, a timer firing as the player skips a screen) needs no guard:
130
+ the transition already under way makes it, switching to the last state asked
131
+ for with the last arguments, and a second cover never goes up. A change to a
132
+ state with no transition of its own (`state.setTransition(id, false)`) is made
133
+ at once, and the cover comes down with it. Before 20.12 the second change left
134
+ the first cover on the camera for good, the screen black over a running game.
120
135
 
121
136
  ### A Stage's own `update()` is NOT paused
122
137