melonjs 20.10.1 → 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 (214) hide show
  1. package/README.md +4 -5
  2. package/build/application/application.d.ts.map +1 -1
  3. package/build/application/defaultApplicationSettings.d.ts +1 -0
  4. package/build/application/defaultApplicationSettings.d.ts.map +1 -1
  5. package/build/application/settings.d.ts +54 -3
  6. package/build/application/settings.d.ts.map +1 -1
  7. package/build/audio/audio.d.ts +14 -4
  8. package/build/audio/audio.d.ts.map +1 -1
  9. package/build/audio/backend/sound.d.ts.map +1 -1
  10. package/build/audio/playback.d.ts.map +1 -1
  11. package/build/audio/spatial.d.ts +13 -2
  12. package/build/audio/spatial.d.ts.map +1 -1
  13. package/build/audio/types.d.ts +44 -4
  14. package/build/audio/types.d.ts.map +1 -1
  15. package/build/camera/camera2d.d.ts +48 -4
  16. package/build/camera/camera2d.d.ts.map +1 -1
  17. package/build/camera/camera3d.d.ts.map +1 -1
  18. package/build/camera/effects/pixelate_transition_effect.d.ts +67 -0
  19. package/build/camera/effects/pixelate_transition_effect.d.ts.map +1 -0
  20. package/build/camera/effects/shake_effect.d.ts +3 -1
  21. package/build/camera/effects/shake_effect.d.ts.map +1 -1
  22. package/build/geometries/ellipse.d.ts +8 -4
  23. package/build/geometries/ellipse.d.ts.map +1 -1
  24. package/build/geometries/line.d.ts +2 -2
  25. package/build/geometries/line.d.ts.map +1 -1
  26. package/build/geometries/polygon.d.ts +3 -3
  27. package/build/geometries/polygon.d.ts.map +1 -1
  28. package/build/geometries/rectangle.d.ts +2 -2
  29. package/build/geometries/rectangle.d.ts.map +1 -1
  30. package/build/geometries/roundrect.d.ts +2 -2
  31. package/build/geometries/roundrect.d.ts.map +1 -1
  32. package/build/index.d.ts +5 -2
  33. package/build/index.d.ts.map +1 -1
  34. package/build/index.js +9944 -6234
  35. package/build/index.js.map +4 -4
  36. package/build/input/gamepad.d.ts.map +1 -1
  37. package/build/input/pointerevent.d.ts.map +1 -1
  38. package/build/lang/console.d.ts +16 -1
  39. package/build/lang/console.d.ts.map +1 -1
  40. package/build/level/tiled/TMXLayer.d.ts +1 -1
  41. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  42. package/build/level/tiled/TMXObject.d.ts +196 -1
  43. package/build/level/tiled/TMXObject.d.ts.map +1 -1
  44. package/build/level/tiled/TMXObjectFactory.d.ts +18 -5
  45. package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
  46. package/build/level/tiled/TMXTile.d.ts.map +1 -1
  47. package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
  48. package/build/level/tiled/TMXTileset.d.ts +17 -1
  49. package/build/level/tiled/TMXTileset.d.ts.map +1 -1
  50. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  51. package/build/level/tiled/factories/shape.d.ts.map +1 -1
  52. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
  53. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
  54. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
  55. package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
  56. package/build/lighting/light2d.d.ts +30 -0
  57. package/build/lighting/light2d.d.ts.map +1 -1
  58. package/build/loader/loadingscreen.d.ts.map +1 -1
  59. package/build/math/matrix2d.d.ts +3 -2
  60. package/build/math/matrix2d.d.ts.map +1 -1
  61. package/build/math/matrix3d.d.ts +4 -1
  62. package/build/math/matrix3d.d.ts.map +1 -1
  63. package/build/particles/emitter.d.ts.map +1 -1
  64. package/build/particles/particle.d.ts.map +1 -1
  65. package/build/particles/settings.d.ts +25 -0
  66. package/build/particles/settings.d.ts.map +1 -1
  67. package/build/physics/bounds.d.ts +5 -5
  68. package/build/physics/bounds.d.ts.map +1 -1
  69. package/build/physics/builtin/body.d.ts +1 -0
  70. package/build/physics/builtin/body.d.ts.map +1 -1
  71. package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
  72. package/build/physics/builtin/detector.d.ts.map +1 -1
  73. package/build/physics/builtin/raycast.d.ts.map +1 -1
  74. package/build/physics/builtin/sat.d.ts +40 -1
  75. package/build/physics/builtin/sat.d.ts.map +1 -1
  76. package/build/renderable/animation.d.ts +16 -2
  77. package/build/renderable/animation.d.ts.map +1 -1
  78. package/build/renderable/colorlayer.d.ts.map +1 -1
  79. package/build/renderable/container.d.ts +22 -2
  80. package/build/renderable/container.d.ts.map +1 -1
  81. package/build/renderable/entity/entity.d.ts.map +1 -1
  82. package/build/renderable/frameAnimation.d.ts.map +1 -1
  83. package/build/renderable/imagelayer.d.ts.map +1 -1
  84. package/build/renderable/instanced_mesh.d.ts.map +1 -1
  85. package/build/renderable/mesh.d.ts.map +1 -1
  86. package/build/renderable/renderable.d.ts +69 -1
  87. package/build/renderable/renderable.d.ts.map +1 -1
  88. package/build/renderable/sprite.d.ts +23 -7
  89. package/build/renderable/sprite.d.ts.map +1 -1
  90. package/build/renderable/sprite3d.d.ts +5 -3
  91. package/build/renderable/sprite3d.d.ts.map +1 -1
  92. package/build/renderable/text/text.d.ts.map +1 -1
  93. package/build/renderable/trail3d.d.ts.map +1 -1
  94. package/build/renderable/ui/uipanel.d.ts +3 -3
  95. package/build/renderable/ui/uipanel.d.ts.map +1 -1
  96. package/build/state/stage.d.ts +12 -4
  97. package/build/state/stage.d.ts.map +1 -1
  98. package/build/state/state.d.ts +31 -6
  99. package/build/state/state.d.ts.map +1 -1
  100. package/build/system/legacy_pool.d.ts.map +1 -1
  101. package/build/system/timer.d.ts +1 -0
  102. package/build/system/timer.d.ts.map +1 -1
  103. package/build/utils/fetchdata.d.ts.map +1 -1
  104. package/build/video/buffer/vertex.d.ts.map +1 -1
  105. package/build/video/canvas/canvas_renderer.d.ts +8 -7
  106. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  107. package/build/video/effects/ambientlight.d.ts +2 -0
  108. package/build/video/effects/ambientlight.d.ts.map +1 -0
  109. package/build/video/effects/bloom.d.ts +8 -9
  110. package/build/video/effects/bloom.d.ts.map +1 -1
  111. package/build/video/effects/blur.d.ts +3 -2
  112. package/build/video/effects/blur.d.ts.map +1 -1
  113. package/build/video/effects/chromaticAberration.d.ts +3 -2
  114. package/build/video/effects/chromaticAberration.d.ts.map +1 -1
  115. package/build/video/effects/dissolve.d.ts +5 -2
  116. package/build/video/effects/dissolve.d.ts.map +1 -1
  117. package/build/video/effects/dropShadow.d.ts +15 -3
  118. package/build/video/effects/dropShadow.d.ts.map +1 -1
  119. package/build/video/effects/flash.d.ts +6 -2
  120. package/build/video/effects/flash.d.ts.map +1 -1
  121. package/build/video/effects/frame.d.ts +48 -0
  122. package/build/video/effects/frame.d.ts.map +1 -0
  123. package/build/video/effects/glow.d.ts +8 -4
  124. package/build/video/effects/glow.d.ts.map +1 -1
  125. package/build/video/effects/glsl_realization.d.ts.map +1 -1
  126. package/build/video/effects/hologram.d.ts +5 -2
  127. package/build/video/effects/hologram.d.ts.map +1 -1
  128. package/build/video/effects/local_space.d.ts +19 -0
  129. package/build/video/effects/local_space.d.ts.map +1 -0
  130. package/build/video/effects/mesh_splice.d.ts.map +1 -1
  131. package/build/video/effects/outline.d.ts +8 -4
  132. package/build/video/effects/outline.d.ts.map +1 -1
  133. package/build/video/effects/pixelate.d.ts +3 -2
  134. package/build/video/effects/pixelate.d.ts.map +1 -1
  135. package/build/video/effects/radialGradient.d.ts +13 -16
  136. package/build/video/effects/radialGradient.d.ts.map +1 -1
  137. package/build/video/effects/rgba.d.ts +2 -0
  138. package/build/video/effects/rgba.d.ts.map +1 -0
  139. package/build/video/effects/scanline.d.ts.map +1 -1
  140. package/build/video/effects/shadereffect.d.ts +13 -0
  141. package/build/video/effects/shadereffect.d.ts.map +1 -1
  142. package/build/video/effects/shine.d.ts +10 -2
  143. package/build/video/effects/shine.d.ts.map +1 -1
  144. package/build/video/effects/squish.d.ts.map +1 -1
  145. package/build/video/effects/sway.d.ts +69 -0
  146. package/build/video/effects/sway.d.ts.map +1 -0
  147. package/build/video/effects/tintPulse.d.ts +5 -2
  148. package/build/video/effects/tintPulse.d.ts.map +1 -1
  149. package/build/video/effects/vignette.d.ts.map +1 -1
  150. package/build/video/effects/wave.d.ts +21 -2
  151. package/build/video/effects/wave.d.ts.map +1 -1
  152. package/build/video/effects/wgsl/parse.d.ts.map +1 -1
  153. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
  154. package/build/video/effects/wgsl_realization.d.ts.map +1 -1
  155. package/build/video/gpu/frame.d.ts +2 -0
  156. package/build/video/gpu/frame.d.ts.map +1 -0
  157. package/build/video/renderer.d.ts +37 -12
  158. package/build/video/renderer.d.ts.map +1 -1
  159. package/build/video/rendertarget/canvasrendertarget.d.ts +14 -4
  160. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  161. package/build/video/rendertarget/rendertarget.d.ts +12 -16
  162. package/build/video/rendertarget/rendertarget.d.ts.map +1 -1
  163. package/build/video/rendertarget/webgpurendertarget.d.ts +1 -0
  164. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
  165. package/build/video/texture/atlas.d.ts +47 -28
  166. package/build/video/texture/atlas.d.ts.map +1 -1
  167. package/build/video/texture/cache.d.ts.map +1 -1
  168. package/build/video/utils/pixel_snap.d.ts +44 -0
  169. package/build/video/utils/pixel_snap.d.ts.map +1 -0
  170. package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
  171. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  172. package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
  173. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  174. package/build/video/webgl/batchers/quad_batcher.d.ts +2 -1
  175. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  176. package/build/video/webgl/glshader.d.ts.map +1 -1
  177. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  178. package/build/video/webgl/shaders/frameclamp.d.ts +2 -0
  179. package/build/video/webgl/shaders/frameclamp.d.ts.map +1 -0
  180. package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
  181. package/build/video/webgl/shaders/multitexture.d.ts.map +1 -1
  182. package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
  183. package/build/video/webgl/webgl_renderer.d.ts +0 -21
  184. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  185. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +2 -1
  186. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
  187. package/build/video/webgpu/batchers/mesh_batcher.d.ts +0 -1
  188. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
  189. package/build/video/webgpu/batchers/quad_batcher.d.ts +2 -2
  190. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
  191. package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -1
  192. package/build/video/webgpu/effect_binding.d.ts.map +1 -1
  193. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  194. package/build/video/webgpu/webgpu_renderer.d.ts +3 -4
  195. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  196. package/package.json +21 -19
  197. package/skills/AGENTS.md +2 -1
  198. package/skills/melonjs/SKILL.md +1 -0
  199. package/skills/melonjs-audio/SKILL.md +47 -5
  200. package/skills/melonjs-camera-and-drawing/SKILL.md +63 -1
  201. package/skills/melonjs-display-and-scaling/SKILL.md +117 -7
  202. package/skills/melonjs-effects-and-shaders/SKILL.md +136 -19
  203. package/skills/melonjs-input/SKILL.md +24 -2
  204. package/skills/melonjs-lighting/SKILL.md +43 -8
  205. package/skills/melonjs-loading-assets/SKILL.md +4 -3
  206. package/skills/melonjs-math/SKILL.md +21 -1
  207. package/skills/melonjs-particles-and-trails/SKILL.md +36 -2
  208. package/skills/melonjs-performance/SKILL.md +4 -0
  209. package/skills/melonjs-plugins/SKILL.md +20 -1
  210. package/skills/melonjs-renderables/SKILL.md +46 -6
  211. package/skills/melonjs-renderer-backends/SKILL.md +2 -2
  212. package/skills/melonjs-scenes-and-state/SKILL.md +17 -2
  213. package/skills/melonjs-sprites-and-animation/SKILL.md +19 -3
  214. package/skills/melonjs-tilemaps/SKILL.md +126 -4
@@ -1 +1 @@
1
- {"version":3,"file":"trail3d.d.ts","sourceRoot":"","sources":["../../src/renderable/trail3d.js"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,eAzBW,MAAM,KAEN,MAAM,aAEd;QAAuC,MAAM;QACnB,MAAM;QAIN,QAAQ;QACR,WAAW;QACX,KAAK;QACH,UAAU;QACN,KAAK;QACkC,QAAQ;iBAAnD,MAAM;mBAAS,KAAK,GAAC,MAAM;;QACrB,SAAS;QACN,YAAY;QACvB,OAAO;QACP,SAAS;QACR,SAAS;KACpC,EA+HF;IA1EA;;;OAGG;IACH,QAFU,UAAU,GAAC,QAAQ,GAAC,IAAI,CAEG;IACrC,qBAAqB;IACrB,UADW,MAAM,CACuB;IACxC,qBAAqB;IACrB,aADW,MAAM,CAC2B;IAG5C,uBAAuB;IACvB,YADW,MAAM,EAAE,CAIT;IAEV;;;OAGG;IACH,mBAAwB;IACxB;;;;;;;OAOG;IACH,eAAiB;IACjB,wBAAwB;IACxB,oBAA8C;IAC9C,wBAAwB;IACxB,qBAAoC;IACpC,6DAA6D;IAC7D,kCAA0C;IAC1C,wBAAwB;IACxB,wBAAqE;IACrE;;;;;;;;;;;OAWG;IACH,iBAAiB;IACjB,wBAAwB;IACxB,iBAAiB;IAEjB,4BAAkD;IAqDnD,wBAPU,QAAQ,EAiBjB;IAxBD;;;;;;;;;OASG;IACH,oBAHU,QAAQ,CAKjB;IAzCA,0BAA6B;IAuB9B,sBANU,MAAM,EAUf;IAhBD;;;;;;;OAOG;IACH,iBAFU,MAAM,CAIf;IAkCD;;;;;;;;;;OAUG;IACH,gBAHW,K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BAJa,MAAM,CAwBlB;CAmBD;iBAptBgB,WAAW;4BAMD,iBAAiB;yBATnB,qBAAqB;8BAQnB,sBAAsB;2BADzB,kBAAkB;0BAGjB,sBAAsB;qBAd1B,uBAAuB"}
@@ -112,9 +112,9 @@ export default class UIPanel extends UIBaseElement {
112
112
  * covers twice it over a cycle; 2 to 4 is the usual range, and it starts
113
113
  * by rising rather than sinking.
114
114
  *
115
- * Do not go much below 2. The renderer snaps a translation to whole
116
- * pixels, truncating, so an amplitude of 1 spends most of the cycle
117
- * reading as 0 and the panel twitches rather than drifts.
115
+ * Do not go much below 2. The offset is a whole number of pixels, so an
116
+ * amplitude of 1 has three positions to move between and the panel
117
+ * twitches rather than drifts.
118
118
  *
119
119
  * The panel is CLICKABLE where it is drawn: the offset goes into
120
120
  * {@link UIPanel#getAbsolutePosition}, which is what the bounds pipeline
@@ -1 +1 @@
1
- {"version":3,"file":"uipanel.d.ts","sourceRoot":"","sources":["../../../src/renderable/ui/uipanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACzB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC3B,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MA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C/B,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;OASG;IACH,SAAS,EAAE,MAAM,CAAC;IAmClB;;;;OAIG;gBACS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe;IA8D3D;;;;OAIG;IACM,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAmBpC;;;;OAIG;IACM,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,QAAQ;IA6CrD;;;;;;;;;;;;;;;;;;OAkBG;IACM,mBAAmB,IAAI,QAAQ;IAMxC;;;;;;;;OAQG;cACgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,GAAG,QAAQ;IAS7D;;;;;;;;;;;;;;;;;;OAkBG;IACM,YAAY,CAAC,QAAQ,UAAO;IAQrC;;;;;;;;OAQG;IACM,OAAO,IAAI,OAAO;IAI3B;;;;;;;;;OASG;IACM,SAAS,IAAI,OAAO;IAI7B;;;;;;OAMG;IACM,MAAM,IAAI,OAAO;IAI1B;;;OAGG;IACM,cAAc;CAIvB"}
@@ -58,6 +58,9 @@ export default class Stage {
58
58
  * an ambient light that will be added to the stage rendering. Its alpha
59
59
  * is what gates the lighting pass: at alpha 0 (the default) `drawLighting`
60
60
  * returns early and the lights still draw as additive glows.
61
+ *
62
+ * Every active {@link Light2d} cuts a hole in it, hard-edged unless the
63
+ * light has a {@link Light2d#softness}.
61
64
  * @default rgba(0,0,0,0)
62
65
  * @see Light2d
63
66
  * @see {@link Stage#ambientLightingColor} for the other, easily confused knob
@@ -132,15 +135,20 @@ export default class Stage {
132
135
  * Renderables); this pass only paints the dark fill that the lights cut
133
136
  * holes through.
134
137
  *
138
+ * A light with a {@link Light2d#softness} takes the whole pass to the
139
+ * renderer's soft path, which fades each hole along the light's falloff.
140
+ *
135
141
  * Subclasses can override this method to implement custom lighting (e.g.
136
- * per-pixel normal-mapped lighting via a custom shader). Called once per
137
- * camera per frame.
142
+ * per-pixel normal-mapped lighting via a custom shader), or to skip a
143
+ * camera (a minimap showing the level lit). Called once per camera per
144
+ * frame.
138
145
  * @param renderer - the active renderer
139
146
  * @param camera - the camera currently rendering this stage
140
147
  * @param translateX - the same world-to-screen X translate that
141
148
  * `Camera2d.draw()` applies to the world container (i.e.
142
- * `camera.pos.x + camera.offset.x` for the default camera, plus
143
- * the container's own offset for non-default cameras)
149
+ * `camera.pos.x + camera.offset.x` for the default camera, on a whole
150
+ * pixel unless `subPixel` is set, plus the container's own offset for
151
+ * non-default cameras)
144
152
  * @param translateY - the world-to-screen Y translate (see `translateX`)
145
153
  */
146
154
  drawLighting(renderer: Renderer, camera: Camera2d, translateX?: number, translateY?: number): void;
@@ -1 +1 @@
1
- {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/state/stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,iCAAiC,CAAC;AAC/D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,uBAAuB,CAAC;AAE/C,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AAEnD,UAAU,aAAa;IACtB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,KACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,KACR,QAAQ,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,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;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,YAAY,CACX,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,QAAQ,EAChB,UAAU,GAAE,MAA2D,EACvE,UAAU,GAAE,MAA2D,GACrE,IAAI;IAwGP;;;;;;;OAOG;IACH,YAAY,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAOxD;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;CAMtC"}
@@ -156,10 +156,18 @@ declare const state: {
156
156
  current(): Stage | undefined;
157
157
  /**
158
158
  * specify a global transition effect
159
- * @param effect - "fade" for a color fade, "mask" for a shape-based mask transition
160
- * @param color - a CSS color value
161
- * @param [duration=1000] - expressed in milliseconds
162
- * @param [shape] - an Ellipse or Polygon defining the mask shape (required when effect is "mask")
159
+ * @param effect - "fade" for a color fade, "mask" for a shape-based mask
160
+ * transition, "pixelate" for the screen breaking up into ever larger
161
+ * blocks, changing behind the largest, and coming back sharp (see
162
+ * {@link PixelateTransitionEffect}). A pixelate transition is a shader
163
+ * effect: on the Canvas renderer it does nothing, and the state changes
164
+ * directly.
165
+ * @param color - a CSS color value (not used by "pixelate")
166
+ * @param [duration=1000] - expressed in milliseconds, for each half: the
167
+ * cover, then the reveal
168
+ * @param [shape] - an Ellipse or Polygon defining the mask shape (required
169
+ * when effect is "mask"), or for "pixelate" the size of the largest
170
+ * blocks, in screen pixels (32 by default)
163
171
  * @example
164
172
  * // classic fade to black
165
173
  * state.transition("fade", "#000", 500);
@@ -172,8 +180,13 @@ declare const state: {
172
180
  * { x: 0, y: -1 }, { x: 1, y: 0 },
173
181
  * { x: 0, y: 1 }, { x: -1, y: 0 },
174
182
  * ]));
183
+ * @example
184
+ * // the screen breaks up into 32 pixel blocks, and comes back
185
+ * state.transition("pixelate", "#000", 300);
186
+ * // into 16 pixel blocks
187
+ * state.transition("pixelate", "#000", 300, 16);
175
188
  */
176
- transition(effect: "fade" | "mask", color: string, duration?: number, shape?: import("../geometries/ellipse.ts").Ellipse | import("../geometries/polygon.ts").Polygon): void;
189
+ transition(effect: "fade" | "mask" | "pixelate", color: string, duration?: number, shape?: import("../geometries/ellipse.ts").Ellipse | import("../geometries/polygon.ts").Polygon | number): void;
177
190
  /**
178
191
  * enable/disable the transition to a particular state (by default enabled for all)
179
192
  * @param stateId - State ID (see constants)
@@ -182,13 +195,25 @@ declare const state: {
182
195
  setTransition(stateId: number, enable: boolean): void;
183
196
  /**
184
197
  * change the game/app state
198
+ *
199
+ * With a transition (see {@link state.transition}), the state changes once
200
+ * the transition covers the screen. A change asked for until then is made
201
+ * by that same transition rather than a second one: it switches to the
202
+ * last state asked for, with the last arguments given. A change to a state
203
+ * whose transition is off (see {@link state.setTransition}) does not wait
204
+ * for it, and the cover comes down as the state changes.
185
205
  * @param stateId - State ID (see constants)
186
- * @param [forceChange=false] - if true the state will be changed immediately (without waiting for the next frame)
206
+ * @param [forceChange=false] - if true the state will be changed immediately (without waiting for the next frame); ignored when a transition makes the change
187
207
  * @param extraArgs - extra arguments to be passed to the reset functions
188
208
  * @example
189
209
  * // The onResetEvent method on the play screen will receive two args:
190
210
  * // "level_1" and the number 3
191
211
  * state.change(state.PLAY, false, "level_1", 3);
212
+ * @example
213
+ * // asked twice, by a key pressed twice on a menu: one transition, to PLAY
214
+ * state.transition("fade", "#000", 250);
215
+ * state.change(state.PLAY);
216
+ * state.change(state.PLAY);
192
217
  */
193
218
  change(stateId: number, forceChange?: boolean, ...extraArgs: unknown[]): void;
194
219
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state/state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAwWxC;;GAEG;AACH,QAAA,MAAM,KAAK;IACV;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG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ACH,mBARU,OAAO,CAQY;IAG9B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,oBAhBW,MAAM,YACN,MAAM,cACN,OAAO,QAuCjB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAnBW,MAAM,WACH,GAAC,EAAA,GACF,MAAM,CAuClB;IAED;;;;OAIG;IACH,cAOC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,UALW,MAAM,iBACN,OAAO,GAEL,OAAO,CAiBnB;IAED;;;;OAIG;IACH,aAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;;;;OAUG;IACH,cAPW,MAAM,GACJ,OAAO,CAcnB;IAED;;;OAGG;IACH,oBAFa,MAAM,CAIlB;CACD"}
1
+ {"version":3,"file":"legacy_pool.d.ts","sourceRoot":"","sources":["../../src/system/legacy_pool.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,kEAEC;;AA6PD;;;;;;;;;;;;;;GAcG;AACH,+BAA8B;AAvP9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAEE,gBAAqB;IACrB,yBAAyB;IAEzB;;;;;;;;;;;;;;OAcG;IACH,mBARU,OAAO,CAQY;IAG9B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,oBAhBW,MAAM,YACN,MAAM,cACN,OAAO,QAuCjB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAnBW,MAAM,WACH,GAAC,EAAA,GACF,MAAM,CAuClB;IAED;;;;OAIG;IACH,cAOC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,UALW,MAAM,iBACN,OAAO,GAEL,OAAO,CAiBnB;IAED;;;;OAIG;IACH,aAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;;;;OAUG;IACH,cAPW,MAAM,GACJ,OAAO,CAcnB;IAED;;;OAGG;IACH,oBAFa,MAAM,CAIlB;CACD"}
@@ -7,6 +7,7 @@ declare class Timer {
7
7
  fps: number;
8
8
  maxfps: number;
9
9
  interpolation: boolean;
10
+ syncToDisplay: boolean;
10
11
  framecount: number;
11
12
  framedelta: number;
12
13
  last: number;
@@ -1 +1 @@
1
- {"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../src/system/timer.ts"],"names":[],"mappings":"AAaA;;;GAGG;AACH,cAAM,KAAK;IACV,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QACP,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;QAC5B,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,IAAI,EAAE,GAAG,EAAE,CAAC;KACZ,EAAE,CAAC;IACJ,OAAO,EAAE,MAAM,CAAC;;IAsFhB;;;;;;;;;;;;OAYG;IACH,UAAU,CACT,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC3B,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,OAAO,EACnB,GAAG,IAAI,EAAE,GAAG,EAAE;IAcf;;;;;;;;;;;;OAYG;IACH,WAAW,CACV,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC3B,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,OAAO,EACnB,GAAG,IAAI,EAAE,GAAG,EAAE;IA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;;;;;;;;;;OAYG;IACH,WAAW,CACV,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC3B,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,OAAO,EACnB,GAAG,IAAI,EAAE,GAAG,EAAE;IAcf;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM;IAQ9B;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM;IAQhC;;;;OAIG;IACH,OAAO;IAIP;;;OAGG;IACH,QAAQ;CAkKR;AAED,QAAA,MAAM,KAAK,OAAc,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,eAAe,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchdata.d.ts","sourceRoot":"","sources":["../../src/utils/fetchdata.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,oCANW,MAAM,aACN,MAAM,GACJ,OAAO,CAMnB;AA4DD;;;;;;;;;;;;;;;;GAgBG;AACH,+BAfW,MAAM,gBACN,MAAM,aACN,MAAM,gBAmDhB"}
1
+ {"version":3,"file":"fetchdata.d.ts","sourceRoot":"","sources":["../../src/utils/fetchdata.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,oCANW,MAAM,aACN,MAAM,GACJ,OAAO,CAMnB;AA0FD;;;;;;;;;;GAUG;AACH,mCALW,MAAM,gBA4DhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,+BAfW,MAAM,gBACN,MAAM,aACN,MAAM,gBAwDhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"vertex.d.ts","sourceRoot":"","sources":["../../../src/video/buffer/vertex.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;IACC,6CAyBC;IAvBA,gBAA4B;IAE5B,eAA0B;IAE1B,oBAAoB;IAGpB,oBAEC;IAED,qCAA8C;IAC9C,oCAA6C;IAU7C,kCAA2C;IAG5C;;;;OAIG;IACH,cAEC;IAED;;;;OAIG;IACH,6BAEC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAjBW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QACN,MAAM,cACN,MAAM,oBACN,MAAM,cACN,MAAM,QA4ChB;IAED;;;;;;;OAOG;IACH,iBANW,SAAS,CAAC,MAAM,CAAC,aACjB,MAAM,SACN,MAAM,QAchB;IAED;;;;;;;;;OASG;IACH,kEAgBC;IAED;;;;;;OAMG;IACH,gGAoBC;IAED;;;;OAIG;IACH,2DAMC;IAED;;;;OAIG;IACH,yDAMC;IAED;;;;;;;OAOG;IACH,+DAMC;CACD"}
1
+ {"version":3,"file":"vertex.d.ts","sourceRoot":"","sources":["../../../src/video/buffer/vertex.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH;IACC,6CAyBC;IAvBA,gBAA4B;IAE5B,eAA0B;IAE1B,oBAAoB;IAGpB,oBAEC;IAED,qCAA8C;IAC9C,oCAA6C;IAU7C,kCAA2C;IAG5C;;;;OAIG;IACH,cAEC;IAED;;;;OAIG;IACH,6BAEC;IAED;;;;;;;;;;;;;OAaG;IACH,QAVW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QACN,MAAM,GACJ,iBAAiB,CAiB7B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,cAfW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QACN,MAAM,aACN,MAAM,UACN,MAAM,UACN,MAAM,WACN,MAAM,WACN,MAAM,GACJ,iBAAiB,CA4B7B;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,mBAjBW;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,MACjC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,MACjC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,MACjC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,MACjC,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QACN,MAAM,aACN,MAAM,UACN,OAAO,WACP,MAAM,WACN,MAAM,GACJ,iBAAiB,CA4E7B;IAED;;;;;;;OAOG;IACH,iBANW,SAAS,CAAC,MAAM,CAAC,aACjB,MAAM,SACN,MAAM,QAchB;IAED;;;;;;;;;OASG;IACH,kEAgBC;IAED;;;;;;OAMG;IACH,gGAoBC;IAED;;;;OAIG;IACH,2DAMC;IAED;;;;OAIG;IACH,yDAMC;IAED;;;;;;;OAOG;IACH,+DAMC;CACD"}
@@ -20,6 +20,13 @@
20
20
  */
21
21
  export default class CanvasRenderer extends Renderer {
22
22
  onGameReset: () => void;
23
+ /**
24
+ * sets or returns the shape used to join two line segments where they meet.
25
+ * There are three possible values for this property: "round", "bevel", and "miter"
26
+ * @type {string}
27
+ * @default "miter"
28
+ */
29
+ get lineJoin(): string;
23
30
  /**
24
31
  * Capture the current frame into a {@link Texture2d} — the Canvas-renderer
25
32
  * counterpart of {@link WebGLRenderer#toFrameTexture}, keeping the
@@ -299,13 +306,6 @@ export default class CanvasRenderer extends Renderer {
299
306
  * @returns {number} global alpha value
300
307
  */
301
308
  getGlobalAlpha(): number;
302
- /**
303
- * sets or returns the shape used to join two line segments where they meet.
304
- * There are three possible values for this property: "round", "bevel", and "miter"
305
- * @type {string}
306
- * @default "miter"
307
- */
308
- get lineJoin(): string;
309
309
  /**
310
310
  * Reset (overrides) the renderer transformation matrix to the
311
311
  * identity one, and then apply the given transformation matrix.
@@ -328,6 +328,7 @@ export default class CanvasRenderer extends Renderer {
328
328
  * @param {number} [f] - the f component to multiply the current matrix by; omitted when `a` is a matrix
329
329
  */
330
330
  transform(a: Matrix2d | Matrix3d | number, b?: number, c?: number, d?: number, e?: number, f?: number): void;
331
+ #private;
331
332
  }
332
333
  import Renderer from "./../renderer.js";
333
334
  import type { default as Texture2d } from "../texture/texture2d.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"canvas_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/canvas/canvas_renderer.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH;IAiBE;;;OAGG;IACH,oBAAmC;IAiCnC,wBAEC;IAyBD;;;OAGG;IACH,8CAA4B;IAG7B;;;;;;;;;;;;;;;;;OAiBG;IACH,yBATG;QAAiC,MAAM;QAIwC,MAAM;eAAlE,MAAM;eAAK,MAAM;mBAAS,MAAM;oBAAU,MAAM;;KAGnE,GAAU,SAAS,CA8ErB;IAxBE;;;OAGG;IACH,mBAA0B;IAiD7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,oBAHW,MAAM,GACJ,MAAM,CA2ClB;IAWD;;;;OAIG;IACH,mBAHW,KAAK,GAAC,MAAM,WACZ,OAAO,QAajB;IAED;;;;;;OAMG;IACH,aALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAIhB;IAED;;;;;;;;;;;OAWG;IACH,qBAVW,gBAAgB,GAAC,eAAe,GAAC,gBAAgB,GAAC,iBAAiB,GAAC,WAAW,GAAC,eAAe,GAAC,UAAU,WAC1G,MAAM,GACJ,aAAa,CAezB;IAiID;;;;;;;;OAQG;IACH,qBAPW,aAAa,KACb,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAiBhB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAFW,IAAI,QAwOd;IA1LE;;;OAGG;IACH,kEAAyD;IACzD;;;OAGG;IACH,uFAA2D;IAa5D;;;OAGG;IACH,oDAAkD;IAkKpD;;;;;;;;;;;;;;;OAeG;IACH,kBAE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IACH,oBAXU,MAAM,EAcf;IAjBD;;;;;OAKG;IACH,gBAHU,MAAM,CAKf;IAWD;;;;;;;;;OASG;IACH,gBAPW,QAAQ,GAAC,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,QA+BhB;IA8GC;;;OAGG;IACH,2CAAkC;CAgGpC;qBAnjDoB,kBAAkB;yBACd,uBAAuB;0CAYT,yBAAyB;4BADvC,yBAAyB;sBAtB5B,uBAAuB;sBAyBxB,0BAA0B;6BAPrB,6BAA6B;8BAG5B,wBAAwB;8BAGxB,wBAAwB"}
1
+ {"version":3,"file":"canvas_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/canvas/canvas_renderer.js"],"names":[],"mappings":"AA+CA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH;IAiBE;;;OAGG;IACH,oBAAmC;IA4BnC,wBAEC;IA+/CF;;;OAGG;IACH,oBAXU,MAAM,EAcf;IAjBD;;;;;OAKG;IACH,gBAHU,MAAM,CAKf;IAz8CA;;;OAGG;IACH,8CAA4B;IAG7B;;;;;;;;;;;;;;;;;OAiBG;IACH,yBATG;QAAiC,MAAM;QAIwC,MAAM;eAAlE,MAAM;eAAK,MAAM;mBAAS,MAAM;oBAAU,MAAM;;KAGnE,GAAU,SAAS,CA8ErB;IAxBE;;;OAGG;IACH,mBAA0B;IAkD3B,mDAAsC;IASxC;;;;;;;;OAQG;IACH,uEAuCC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,kBAVW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QACN,MAAM,GACJ,YAAY,GAAC,IAAI,CAsC7B;IAZC;;;OAGG;IACH,iDAAoC;IAUtC;;;OAGG;IACH,kCAOC;IAED;;;;;;;;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ts","sourceRoot":"","sources":["../../../src/video/effects/ambientlight.js"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;;;;;GAKG;AACH,iCAAkC,EAAE,CAAC;AAErC;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;OAEG;IACH,sBAFW,QAAQ,EA0ElB;IAjBA;;;;OAIG;IACH,mCAAuD;IACvD;;;;OAIG;IACH,mCAAuD;IACvD;;;OAGG;IACH,iCAAgC;IAGjC;;;;;;;;;OASG;IACH,kBARW,QAAQ,CAAC,OAAO,CAAC,KACjB,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QA0ChB;CACD;yBAhKwB,mBAAmB;yBAKpB,2BAA2B;0BAD1B,gBAAgB"}
@@ -10,10 +10,9 @@
10
10
  * Not to be confused with {@link GlowEffect}, which draws an outline OUTSIDE a
11
11
  * sprite's silhouette and does nothing at all on an opaque frame.
12
12
  *
13
- * `textureSize` must match what is being filtered, since the tap offsets are
14
- * in texels; it defaults to the renderer's own size, which is what a camera
15
- * effect wants. Call {@link BloomEffect#setTextureSize} from an
16
- * {@link event.ONRESIZE} handler, or after applying it to something smaller.
13
+ * Its reach is in texels of what it filters: the screen for a camera's
14
+ * effect, the sprite's texture on a sprite (alone or with other effects, at
15
+ * any scale or zoom), so it follows a resize by itself.
17
16
  * @category Effects
18
17
  * @see {@link Renderable#addPostEffect} for usage
19
18
  * @example
@@ -33,7 +32,7 @@ export default class BloomEffect extends ShaderEffect {
33
32
  * @param {number} [options.threshold=0.75] - luminance a pixel must pass before it blooms, `0` (everything blooms) to `1` (only white does)
34
33
  * @param {number} [options.intensity=1.0] - how much of the gathered light is added back
35
34
  * @param {number} [options.radius=2.0] - halo reach, in texels
36
- * @param {number[]} [options.textureSize] - dimensions of what is being filtered, `[width, height]`; defaults to the renderer's size
35
+ * @param {number[]} [options.textureSize] - the size, `[width, height]`, of the texture its reach is measured in; by default the texture it draws: a sprite's own, alone or with other effects and at any scale or zoom, the screen for a camera's effect
37
36
  */
38
37
  constructor(renderer: Renderer, options?: {
39
38
  threshold?: number | undefined;
@@ -60,10 +59,10 @@ export default class BloomEffect extends ShaderEffect {
60
59
  */
61
60
  setRadius(radius: number): void;
62
61
  /**
63
- * set the dimensions of what is being filtered. The tap offsets are in
64
- * texels, so a stale size makes the halo the wrong width after a resize.
65
- * @param {number} width - width in pixels
66
- * @param {number} height - height in pixels
62
+ * Measure the effect's reach in the texels of a texture of this size,
63
+ * rather than of the texture it draws (the default)
64
+ * @param {number} width - texture width in pixels
65
+ * @param {number} height - texture height in pixels
67
66
  */
68
67
  setTextureSize(width: number, height: number): void;
69
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bloom.d.ts","sourceRoot":"","sources":["../../../src/video/effects/bloom.js"],"names":[],"mappings":"AA8HA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACC;;;;;;;OAOG;IACH,sBAPW,QAAQ,YAEhB;QAAyB,SAAS;QACT,SAAS;QACT,MAAM;QACJ,WAAW;KACxC,EAmBA;IAfA,kBAA0C;IAC1C,kBAAyC;IACzC,eAAmC;IAepC;;;OAGG;IACH,wBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,wBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,kBAFW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBA3NwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"bloom.d.ts","sourceRoot":"","sources":["../../../src/video/effects/bloom.js"],"names":[],"mappings":"AA+HA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IACC;;;;;;;OAOG;IACH,sBAPW,QAAQ,YAEhB;QAAyB,SAAS;QACT,SAAS;QACT,MAAM;QACJ,WAAW;KACxC,EAgBA;IAZA,kBAA0C;IAC1C,kBAAyC;IACzC,eAAmC;IAYpC;;;OAGG;IACH,wBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,wBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,kBAFW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBAvNwB,mBAAmB;0BAOnB,gBAAgB"}
@@ -13,7 +13,7 @@ export default class BlurEffect extends ShaderEffect {
13
13
  * @param {Renderer} renderer - the current renderer instance
14
14
  * @param {object} [options] - effect options
15
15
  * @param {number} [options.strength=1.0] - blur strength in texels
16
- * @param {number[]} [options.textureSize=[256, 256]] - texture dimensions [width, height]
16
+ * @param {number[]} [options.textureSize] - the size, `[width, height]`, of the texture its strength is measured in; by default the texture it draws: a sprite's own, alone or with other effects and at any scale or zoom, the screen for a camera's effect
17
17
  */
18
18
  constructor(renderer: Renderer, options?: {
19
19
  strength?: number | undefined;
@@ -26,7 +26,8 @@ export default class BlurEffect extends ShaderEffect {
26
26
  */
27
27
  setStrength(strength: number): void;
28
28
  /**
29
- * set the texture size
29
+ * Measure the effect's strength in the texels of a texture of this size,
30
+ * rather than of the texture it draws (the default)
30
31
  * @param {number} width - texture width in pixels
31
32
  * @param {number} height - texture height in pixels
32
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../src/video/effects/blur.js"],"names":[],"mappings":"AAmCA;;;;;;;;;GASG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAAyB,QAAQ;QACN,WAAW;KACxC,EA8BA;IALA,iBAAuC;IAOxC;;;OAGG;IACH,sBAFW,MAAM,QAKhB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBApGwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../src/video/effects/blur.js"],"names":[],"mappings":"AAoCA;;;;;;;;;GASG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAAyB,QAAQ;QACN,WAAW;KACxC,EA+BA;IALA,iBAAuC;IAOxC;;;OAGG;IACH,sBAFW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBAtGwB,mBAAmB;0BAOnB,gBAAgB"}
@@ -16,7 +16,7 @@ export default class ChromaticAberrationEffect extends ShaderEffect {
16
16
  * @param {Renderer} renderer - the current renderer instance
17
17
  * @param {object} [options] - effect options
18
18
  * @param {number} [options.offset=3.0] - channel offset in texels
19
- * @param {number[]} [options.textureSize=[256, 256]] - texture dimensions [width, height]
19
+ * @param {number[]} [options.textureSize] - the size, `[width, height]`, of the texture its offset is measured in; by default the texture it draws: a sprite's own, alone or with other effects and at any scale or zoom, the screen for a camera's effect
20
20
  */
21
21
  constructor(renderer: Renderer, options?: {
22
22
  offset?: number | undefined;
@@ -29,7 +29,8 @@ export default class ChromaticAberrationEffect extends ShaderEffect {
29
29
  */
30
30
  setOffset(offset: number): void;
31
31
  /**
32
- * set the texture size
32
+ * Measure the effect's offset in the texels of a texture of this size,
33
+ * rather than of the texture it draws (the default)
33
34
  * @param {number} width - texture width in pixels
34
35
  * @param {number} height - texture height in pixels
35
36
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chromaticAberration.d.ts","sourceRoot":"","sources":["../../../src/video/effects/chromaticAberration.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;GAYG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAAyB,MAAM;QACJ,WAAW;KACxC,EAuBA;IALA,eAAmC;IAOpC;;;OAGG;IACH,kBAFW,MAAM,QAKhB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBAzFwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"chromaticAberration.d.ts","sourceRoot":"","sources":["../../../src/video/effects/chromaticAberration.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;GAYG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAAyB,MAAM;QACJ,WAAW;KACxC,EAwBA;IALA,eAAmC;IAOpC;;;OAGG;IACH,kBAFW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBA3FwB,mBAAmB;0BAOnB,gBAAgB"}
@@ -12,13 +12,16 @@
12
12
  *
13
13
  * // animate the dissolve (0 = fully visible, 1 = fully dissolved)
14
14
  * dissolve.setProgress(0.5);
15
+ * @example
16
+ * // a dissolve whose edge glows only faintly over the sprite
17
+ * mySprite.addPostEffect(new DissolveEffect(renderer, { edgeColor: [1.0, 0.5, 0.0, 0.4] }));
15
18
  */
16
19
  export default class DissolveEffect extends ShaderEffect {
17
20
  /**
18
21
  * @param {Renderer} renderer - the current renderer instance
19
22
  * @param {object} [options] - effect options
20
23
  * @param {number} [options.progress=0.0] - dissolve progress (0.0 = visible, 1.0 = dissolved)
21
- * @param {number[]} [options.edgeColor=[1.0, 0.5, 0.0]] - color of the dissolve edge
24
+ * @param {number[]} [options.edgeColor=[1.0, 0.5, 0.0]] - color of the dissolve edge as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha is the edge's opacity
22
25
  * @param {number} [options.edgeWidth=0.1] - width of the colored edge (0.0–1.0)
23
26
  */
24
27
  constructor(renderer: Renderer, options?: {
@@ -34,7 +37,7 @@ export default class DissolveEffect extends ShaderEffect {
34
37
  setProgress(value: number): void;
35
38
  /**
36
39
  * set the edge color
37
- * @param {number[]} color - edge color as [r, g, b] (0.0–1.0)
40
+ * @param {number[]} color - edge color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha is the edge's opacity
38
41
  */
39
42
  setEdgeColor(color: number[]): void;
40
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dissolve.d.ts","sourceRoot":"","sources":["../../../src/video/effects/dissolve.js"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;;;OAMG;IACH,sBANW,QAAQ,YAEhB;QAAyB,QAAQ;QACN,SAAS;QACX,SAAS;KACpC,EA0DA;IAPA,iBAAuC;IASxC;;;OAGG;IACH,mBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,oBAFW,MAAM,EAAE,QAIlB;CACD;yBAvKwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"dissolve.d.ts","sourceRoot":"","sources":["../../../src/video/effects/dissolve.js"],"names":[],"mappings":"AAwEA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACC;;;;;;OAMG;IACH,sBANW,QAAQ,YAEhB;QAAyB,QAAQ;QACN,SAAS;QACX,SAAS;KACpC,EAyDA;IAJA,iBAAuC;IAMxC;;;OAGG;IACH,mBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,oBAFW,MAAM,EAAE,QAIlB;CACD;yBA3KwB,mBAAmB;0BAOnB,gBAAgB"}
@@ -12,6 +12,12 @@
12
12
  * color: [0.0, 0.0, 0.0],
13
13
  * opacity: 0.5,
14
14
  * }));
15
+ * @example
16
+ * // a soft blue shadow: the color's alpha scales `opacity`
17
+ * mySprite.addPostEffect(new DropShadowEffect(renderer, {
18
+ * color: [0.1, 0.2, 0.6, 0.5],
19
+ * opacity: 0.8,
20
+ * }));
15
21
  */
16
22
  export default class DropShadowEffect extends ShaderEffect {
17
23
  /**
@@ -19,9 +25,9 @@ export default class DropShadowEffect extends ShaderEffect {
19
25
  * @param {object} [options] - effect options
20
26
  * @param {number} [options.offsetX=2.0] - shadow x offset in texels
21
27
  * @param {number} [options.offsetY=2.0] - shadow y offset in texels
22
- * @param {number[]} [options.color=[0.0, 0.0, 0.0]] - shadow color as [r, g, b] (0.0–1.0)
28
+ * @param {number[]} [options.color=[0.0, 0.0, 0.0]] - shadow color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha scales `opacity`
23
29
  * @param {number} [options.opacity=0.5] - shadow opacity (0.0–1.0)
24
- * @param {number[]} [options.textureSize=[256, 256]] - texture dimensions [width, height]
30
+ * @param {number[]} [options.textureSize] - the size, `[width, height]`, of the texture its offset is measured in; by default the texture it draws: a sprite's own, alone or with other effects and at any scale or zoom, the screen for a camera's effect
25
31
  */
26
32
  constructor(renderer: Renderer, options?: {
27
33
  offsetX?: number | undefined;
@@ -37,7 +43,13 @@ export default class DropShadowEffect extends ShaderEffect {
37
43
  */
38
44
  setOffset(x: number, y: number): void;
39
45
  /**
40
- * set the texture size
46
+ * set the shadow color
47
+ * @param {number[]} color - shadow color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha scales the opacity
48
+ */
49
+ setColor(color: number[]): void;
50
+ /**
51
+ * Measure the effect's offset in the texels of a texture of this size,
52
+ * rather than of the texture it draws (the default)
41
53
  * @param {number} width - texture width in pixels
42
54
  * @param {number} height - texture height in pixels
43
55
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dropShadow.d.ts","sourceRoot":"","sources":["../../../src/video/effects/dropShadow.js"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;;;;;OAQG;IACH,sBARW,QAAQ,YAEhB;QAAyB,OAAO;QACP,OAAO;QACL,KAAK;QACP,OAAO;QACL,WAAW;KACxC,EA0CA;IAED;;;;OAIG;IACH,aAHW,MAAM,KACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBA9HwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"dropShadow.d.ts","sourceRoot":"","sources":["../../../src/video/effects/dropShadow.js"],"names":[],"mappings":"AA6CA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;;;;;;OAQG;IACH,sBARW,QAAQ,YAEhB;QAAyB,OAAO;QACP,OAAO;QACL,KAAK;QACP,OAAO;QACL,WAAW;KACxC,EA0CA;IAED;;;;OAIG;IACH,aAHW,MAAM,KACN,MAAM,QAIhB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBA/IwB,mBAAmB;0BAOnB,gBAAgB"}
@@ -18,12 +18,16 @@
18
18
  * @example
19
19
  * // red flash
20
20
  * const flash = new FlashEffect(renderer, { color: [1.0, 0.0, 0.0] });
21
+ * @example
22
+ * // a hit flash that only half covers the sprite, even at full intensity
23
+ * const hit = new FlashEffect(renderer, { color: [1.0, 1.0, 1.0, 0.5] });
24
+ * hit.setIntensity(1.0);
21
25
  */
22
26
  export default class FlashEffect extends ShaderEffect {
23
27
  /**
24
28
  * @param {Renderer} renderer - the current renderer instance
25
29
  * @param {object} [options] - effect options
26
- * @param {number[]} [options.color=[1.0, 1.0, 1.0]] - flash color as [r, g, b] (0.0–1.0)
30
+ * @param {number[]} [options.color=[1.0, 1.0, 1.0]] - flash color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha scales the intensity
27
31
  * @param {number} [options.intensity=0.0] - initial flash intensity (0.0–1.0)
28
32
  */
29
33
  constructor(renderer: Renderer, options?: {
@@ -38,7 +42,7 @@ export default class FlashEffect extends ShaderEffect {
38
42
  setIntensity(value: number): void;
39
43
  /**
40
44
  * set the flash color
41
- * @param {number[]} color - flash color as [r, g, b] (0.0–1.0)
45
+ * @param {number[]} color - flash color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha scales the intensity
42
46
  */
43
47
  setColor(color: number[]): void;
44
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/video/effects/flash.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAA2B,KAAK;QACP,SAAS;KACpC,EAkBA;IAJA,kBAAyC;IAM1C;;;OAGG;IACH,oBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;CACD;yBAtFwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/video/effects/flash.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAA2B,KAAK;QACP,SAAS;KACpC,EAmBA;IAJA,kBAAyC;IAM1C;;;OAGG;IACH,oBAFW,MAAM,QAKhB;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;CACD;yBA5FwB,mBAAmB;0BAOnB,gBAAgB"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Keeping an effect's samples inside the sprite's own frame.
3
+ *
4
+ * A sprite drawn from an atlas or a tileset shows one frame of a bigger
5
+ * texture, and the texture goes on past that frame into the neighbouring
6
+ * ones. An effect that samples away from the fragment it shades (a glow, an
7
+ * outline, a blur, a shadow, a distortion) reads those neighbours along the
8
+ * frame's edge, and draws them. `frameTexel()` reads a texel of the frame
9
+ * the effect draws, `ME_frame` (its UV rect: left, top, right, bottom):
10
+ * transparent outside it, and kept half a texel (`ME_frame_half`, in UV)
11
+ * inside it, so filtering never reaches over the edge. Only where another
12
+ * frame could be: a side of the frame that is the texture's own edge is
13
+ * left unbounded, and so is a pass over a whole texture (a render target
14
+ * blit, a mesh). There, sampling is what it always was.
15
+ *
16
+ * On a sprite, `ME_frame` comes with the quad: every sprite vertex carries
17
+ * the UV of its quad's opposite corner (`aFrame`), and the effect's vertex
18
+ * stage turns it into the frame. Sprites drawn from different frames
19
+ * through the same effect so share one draw. Only `ME_frame_half`, which
20
+ * changes with the texture, is a uniform (`ShaderEffect#_setFrameTexel`).
21
+ * On a mesh, which carries no frame, `ME_frame` is a uniform, left
22
+ * unbounded.
23
+ * @ignore
24
+ */
25
+ /**
26
+ * the frame, the half texel and `frameTexel()`, for a GLSL effect body. The
27
+ * sprite program defines `ME_SPRITE_FRAME` and computes the varying in its
28
+ * vertex stage (see glsl_realization.js); a mesh hosting the body reads the
29
+ * uniform
30
+ * @ignore
31
+ */
32
+ export const FRAME_GLSL: "\n#ifdef ME_SPRITE_FRAME\nvarying vec4 ME_frame;\n#else\nuniform vec4 ME_frame;\n#endif\nuniform vec2 ME_frame_half;\nvec4 frameTexel(vec2 p) {\n\tvec2 inside = step(ME_frame.xy, p) * step(p, ME_frame.zw);\n\tvec2 q = clamp(p, ME_frame.xy + ME_frame_half, ME_frame.zw - ME_frame_half);\n\treturn texture2D(uSampler, q) * (inside.x * inside.y);\n}\n";
33
+ /**
34
+ * the members to add to a WGSL effect's uniform struct, which `frameTexel()`
35
+ * reads through the effect's `fx` binding. On a sprite the scaffold reads
36
+ * the frame from the quad instead of `fx.ME_frame` (see wgsl/scaffold.js),
37
+ * which a mesh hosting the body still reads
38
+ * @ignore
39
+ */
40
+ export const FRAME_WGSL_MEMBERS: "\n\tME_frame : vec4f,\n\tME_frame_half : vec2f,";
41
+ /**
42
+ * `frameTexel()` for a WGSL effect body, sampling with implicit derivatives
43
+ * (uniform control flow only), and `frameTexelLevel()`, sampling level 0,
44
+ * which works anywhere
45
+ * @ignore
46
+ */
47
+ export const FRAME_WGSL: "\nfn frameUV(p : vec2f) -> vec2f {\n\treturn clamp(p, fx.ME_frame.xy + fx.ME_frame_half, fx.ME_frame.zw - fx.ME_frame_half);\n}\nfn frameInside(p : vec2f) -> f32 {\n\tlet inside = step(fx.ME_frame.xy, p) * step(p, fx.ME_frame.zw);\n\treturn inside.x * inside.y;\n}\nfn frameTexel(p : vec2f) -> vec4f {\n\treturn textureSample(uTexture, uSampler, frameUV(p)) * frameInside(p);\n}\nfn frameTexelLevel(p : vec2f) -> vec4f {\n\treturn textureSampleLevel(uTexture, uSampler, frameUV(p), 0.0) * frameInside(p);\n}\n";
48
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../src/video/effects/frame.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;GAMG;AACH,wXAYE;AAEF;;;;;;GAMG;AACH,mFAEyB;AAEzB;;;;;GAKG;AACH,yhBAcE"}
@@ -10,15 +10,18 @@
10
10
  * color: [0.2, 0.5, 1.0],
11
11
  * intensity: 1.5,
12
12
  * }));
13
+ * @example
14
+ * // a faint white halo: the color's alpha is the halo's opacity
15
+ * mySprite.addPostEffect(new GlowEffect(renderer, { color: [1.0, 1.0, 1.0, 0.5] }));
13
16
  */
14
17
  export default class GlowEffect extends ShaderEffect {
15
18
  /**
16
19
  * @param {Renderer} renderer - the current renderer instance
17
20
  * @param {object} [options] - effect options
18
- * @param {number[]} [options.color=[1.0, 1.0, 1.0]] - glow color as [r, g, b] (0.0–1.0)
21
+ * @param {number[]} [options.color=[1.0, 1.0, 1.0]] - glow color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha is the halo's opacity
19
22
  * @param {number} [options.width=3.0] - glow spread in pixels
20
23
  * @param {number} [options.intensity=1.0] - glow brightness multiplier
21
- * @param {number[]} [options.textureSize=[256, 256]] - texture dimensions [width, height]
24
+ * @param {number[]} [options.textureSize] - the size, `[width, height]`, of the texture its spread is measured in; by default the texture it draws: a sprite's own, alone or with other effects and at any scale or zoom, the screen for a camera's effect
22
25
  */
23
26
  constructor(renderer: Renderer, options?: {
24
27
  color?: number[] | undefined;
@@ -29,7 +32,7 @@ export default class GlowEffect extends ShaderEffect {
29
32
  intensity: number;
30
33
  /**
31
34
  * set the glow color
32
- * @param {number[]} color - glow color as [r, g, b] (0.0–1.0)
35
+ * @param {number[]} color - glow color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha is the halo's opacity
33
36
  */
34
37
  setColor(color: number[]): void;
35
38
  /**
@@ -38,7 +41,8 @@ export default class GlowEffect extends ShaderEffect {
38
41
  */
39
42
  setIntensity(value: number): void;
40
43
  /**
41
- * set the texture size
44
+ * Measure the effect's spread in the texels of a texture of this size,
45
+ * rather than of the texture it draws (the default)
42
46
  * @param {number} width - texture width in pixels
43
47
  * @param {number} height - texture height in pixels
44
48
  */
@@ -1 +1 @@
1
- {"version":3,"file":"glow.d.ts","sourceRoot":"","sources":["../../../src/video/effects/glow.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;GAYG;AACH;IACC;;;;;;;OAOG;IACH,sBAPW,QAAQ,YAEhB;QAA2B,KAAK;QACP,KAAK;QACL,SAAS;QACP,WAAW;KACxC,EAsCA;IANA,kBAAyC;IAQ1C;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;IAED;;;OAGG;IACH,oBAFW,MAAM,QAKhB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBA7HwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"glow.d.ts","sourceRoot":"","sources":["../../../src/video/effects/glow.js"],"names":[],"mappings":"AA2CA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;;;;OAOG;IACH,sBAPW,QAAQ,YAEhB;QAA2B,KAAK;QACP,KAAK;QACL,SAAS;QACP,WAAW;KACxC,EAyCA;IAPA,kBAAyC;IAS1C;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;IAED;;;OAGG;IACH,oBAFW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;CACD;yBAtIwB,mBAAmB;0BAOnB,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"glsl_realization.d.ts","sourceRoot":"","sources":["../../../src/video/effects/glsl_realization.js"],"names":[],"mappings":"AAoHA;;;;;;;;GAQG;AACH,+CALW,MAAM,GACJ;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAoCvH"}
1
+ {"version":3,"file":"glsl_realization.d.ts","sourceRoot":"","sources":["../../../src/video/effects/glsl_realization.js"],"names":[],"mappings":"AAqKA;;;;;;;;GAQG;AACH,+CALW,MAAM,GACJ;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAuCvH"}
@@ -10,12 +10,15 @@
10
10
  * mySprite.addPostEffect(holo);
11
11
  * // update each frame
12
12
  * holo.setTime(performance.now() / 1000);
13
+ * @example
14
+ * // a faint cyan tint, the scan lines and flicker unchanged
15
+ * mySprite.addPostEffect(new HologramEffect(renderer, { color: [0.1, 0.7, 1.0, 0.4] }));
13
16
  */
14
17
  export default class HologramEffect extends ShaderEffect {
15
18
  /**
16
19
  * @param {Renderer} renderer - the current renderer instance
17
20
  * @param {object} [options] - effect options
18
- * @param {number[]} [options.color=[0.1, 0.7, 1.0]] - hologram tint color [r, g, b]
21
+ * @param {number[]} [options.color=[0.1, 0.7, 1.0]] - hologram tint color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha scales the intensity
19
22
  * @param {number} [options.intensity=0.5] - effect intensity (0.0–1.0)
20
23
  */
21
24
  constructor(renderer: Renderer, options?: {
@@ -24,7 +27,7 @@ export default class HologramEffect extends ShaderEffect {
24
27
  });
25
28
  /**
26
29
  * set the hologram tint color
27
- * @param {number[]} color - color as [r, g, b] (0.0–1.0)
30
+ * @param {number[]} color - color as [r, g, b] or [r, g, b, a] (0.0–1.0); the alpha scales the intensity
28
31
  */
29
32
  setColor(color: number[]): void;
30
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hologram.d.ts","sourceRoot":"","sources":["../../../src/video/effects/hologram.js"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;GAYG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAA2B,KAAK;QACP,SAAS;KACpC,EAyBA;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;CACD;yBApFwB,mBAAmB;0BAOnB,gBAAgB"}
1
+ {"version":3,"file":"hologram.d.ts","sourceRoot":"","sources":["../../../src/video/effects/hologram.js"],"names":[],"mappings":"AAkCA;;;;;;;;;;;;;;;GAeG;AACH;IACC;;;;;OAKG;IACH,sBALW,QAAQ,YAEhB;QAA2B,KAAK;QACP,SAAS;KACpC,EA2BA;IAED;;;OAGG;IACH,gBAFW,MAAM,EAAE,QAIlB;CACD;yBA3FwB,mBAAmB;0BAOnB,gBAAgB"}