melonjs 20.12.0 → 20.13.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.
- package/README.md +2 -1
- package/build/camera/camera2d.d.ts +2 -0
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/camera/effects/fade_effect.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +3 -0
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/line.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +2 -1
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/index.d.ts +13 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5409 -1500
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +48 -14
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +1 -1
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXUtils.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
- package/build/loader/loader.d.ts +55 -11
- package/build/loader/loader.d.ts.map +1 -1
- package/build/math/color.d.ts.map +1 -1
- package/build/math/math.d.ts +6 -1
- package/build/math/math.d.ts.map +1 -1
- package/build/math/observableVector2d.d.ts +6 -6
- package/build/math/observableVector2d.d.ts.map +1 -1
- package/build/math/observableVector3d.d.ts +8 -8
- package/build/math/observableVector3d.d.ts.map +1 -1
- package/build/particles/emitter.d.ts +15 -3
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +6 -0
- package/build/particles/particle.d.ts.map +1 -1
- package/build/particles/settings.d.ts +22 -5
- package/build/particles/settings.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +14 -4
- package/build/physics/builtin/body.d.ts.map +1 -1
- package/build/physics/builtin/raycast.d.ts.map +1 -1
- package/build/physics/world.d.ts.map +1 -1
- package/build/renderable/container.d.ts +40 -6
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/frameAnimation.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +4 -2
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +12 -3
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +147 -4
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textmetrics.d.ts +10 -2
- package/build/renderable/text/textmetrics.d.ts.map +1 -1
- package/build/renderable/text/textstyle.d.ts.map +1 -1
- package/build/renderable/ui/panelpaint.d.ts +5 -1
- package/build/renderable/ui/panelpaint.d.ts.map +1 -1
- package/build/renderable/ui/progressbar.d.ts +267 -95
- package/build/renderable/ui/progressbar.d.ts.map +1 -1
- package/build/renderable/ui/uibaseelement.d.ts +436 -50
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uicheckbox.d.ts +383 -0
- package/build/renderable/ui/uicheckbox.d.ts.map +1 -0
- package/build/renderable/ui/uifocus.d.ts +6 -0
- package/build/renderable/ui/uifocus.d.ts.map +1 -0
- package/build/renderable/ui/uilabel.d.ts +31 -0
- package/build/renderable/ui/uilabel.d.ts.map +1 -0
- package/build/renderable/ui/uipanel.d.ts +589 -116
- package/build/renderable/ui/uipanel.d.ts.map +1 -1
- package/build/renderable/ui/uiskin.d.ts +25 -0
- package/build/renderable/ui/uiskin.d.ts.map +1 -0
- package/build/renderable/ui/uislider.d.ts +518 -0
- package/build/renderable/ui/uislider.d.ts.map +1 -0
- package/build/renderable/ui/uispriteelement.d.ts +161 -85
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/renderable/ui/uitextbutton.d.ts +369 -63
- package/build/renderable/ui/uitextbutton.d.ts.map +1 -1
- package/build/state/stage.d.ts.map +1 -1
- package/build/system/pool.d.ts.map +1 -1
- package/build/system/save.d.ts +2 -1
- package/build/system/save.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +5 -2
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/utils/fetchdata.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +0 -5
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/renderer.d.ts +20 -4
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +26 -3
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/utils/tessellation.d.ts +11 -0
- package/build/video/utils/tessellation.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +3 -6
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
- package/build/video/webgpu/webgpu_renderer.d.ts +3 -6
- package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/melonjs/SKILL.md +3 -3
- package/skills/melonjs-audio/SKILL.md +7 -5
- package/skills/melonjs-camera-and-drawing/SKILL.md +41 -1
- package/skills/melonjs-effects-and-shaders/SKILL.md +1 -0
- package/skills/melonjs-events/SKILL.md +3 -1
- package/skills/melonjs-getting-started/SKILL.md +1 -2
- package/skills/melonjs-input/SKILL.md +38 -2
- package/skills/melonjs-loading-assets/SKILL.md +53 -12
- package/skills/melonjs-math/SKILL.md +14 -3
- package/skills/melonjs-particles-and-trails/SKILL.md +72 -8
- package/skills/melonjs-physics/SKILL.md +53 -4
- package/skills/melonjs-plugins/SKILL.md +7 -2
- package/skills/melonjs-renderables/SKILL.md +7 -0
- package/skills/melonjs-scenes-and-state/SKILL.md +15 -0
- package/skills/melonjs-sprites-and-animation/SKILL.md +14 -0
- package/skills/melonjs-tilemaps/SKILL.md +96 -2
- package/skills/melonjs-ui-and-text/SKILL.md +560 -23
|
@@ -203,7 +203,9 @@ declare class Renderer {
|
|
|
203
203
|
* and {@link Renderer#strokeLine}. Subclasses override the
|
|
204
204
|
* storage — `CanvasRenderer` proxies it to the underlying 2D
|
|
205
205
|
* context via a getter/setter, while `WebGLRenderer` treats it
|
|
206
|
-
* as a regular field consumed by its shape-stroke routines.
|
|
206
|
+
* as a regular field consumed by its shape-stroke routines. On
|
|
207
|
+
* every renderer it is part of the state {@link Renderer#save}
|
|
208
|
+
* and {@link Renderer#restore} keep.
|
|
207
209
|
* @type {number}
|
|
208
210
|
* @default 1
|
|
209
211
|
*/
|
|
@@ -545,6 +547,9 @@ declare class Renderer {
|
|
|
545
547
|
/**
|
|
546
548
|
* Set the current fill & stroke style color.
|
|
547
549
|
* By default, or upon reset, the value is set to #000000.
|
|
550
|
+
* The colour's own alpha applies to fills and strokes, times the global
|
|
551
|
+
* alpha; it does not change {@link Renderer#getGlobalAlpha}, nor how an
|
|
552
|
+
* image is drawn.
|
|
548
553
|
* @param {Color|string|Gradient} color - css color value or a Gradient object
|
|
549
554
|
*/
|
|
550
555
|
setColor(color: Color | string | Gradient): void;
|
|
@@ -590,7 +595,9 @@ declare class Renderer {
|
|
|
590
595
|
*/
|
|
591
596
|
getLineDash(): number[];
|
|
592
597
|
/**
|
|
593
|
-
* return the current global alpha
|
|
598
|
+
* return the current global alpha, the same as {@link Renderer#getGlobalAlpha}.
|
|
599
|
+
* It is not the alpha of the current colour: as on a 2D context, a
|
|
600
|
+
* translucent {@link Renderer#setColor} leaves it alone.
|
|
594
601
|
* @returns {number}
|
|
595
602
|
*/
|
|
596
603
|
globalAlpha(): number;
|
|
@@ -765,11 +772,20 @@ declare class Renderer {
|
|
|
765
772
|
*/
|
|
766
773
|
scale(x: number, y: number): void;
|
|
767
774
|
/**
|
|
768
|
-
* Set the renderer global alpha (0..1) for subsequent draw calls.
|
|
769
|
-
*
|
|
775
|
+
* Set the renderer global alpha (0..1) for subsequent draw calls. It
|
|
776
|
+
* multiplies everything drawn, and is part of the state that
|
|
777
|
+
* {@link Renderer#save} and {@link Renderer#restore} keep. It is
|
|
778
|
+
* separate from the alpha of the colour given to {@link Renderer#setColor}:
|
|
779
|
+
* a fill or a stroke is drawn at both multiplied together, and an image
|
|
780
|
+
* at the global alpha (times the tint) alone.
|
|
770
781
|
* @param {number} alpha - opacity value in the [0..1] range
|
|
771
782
|
*/
|
|
772
783
|
setGlobalAlpha(alpha: number): void;
|
|
784
|
+
/**
|
|
785
|
+
* Return the renderer global alpha, as set by {@link Renderer#setGlobalAlpha}.
|
|
786
|
+
* @returns {number} global alpha value, in the [0..1] range
|
|
787
|
+
*/
|
|
788
|
+
getGlobalAlpha(): number;
|
|
773
789
|
/**
|
|
774
790
|
* Fill an axis-aligned rectangle with the current color.
|
|
775
791
|
* Implemented by subclasses.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"AAiDA;;;GAGG;AACH;
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/video/renderer.js"],"names":[],"mappings":"AAiDA;;;GAGG;AACH;IAkhCC;;;;;;;;;;;;OAYG;IACH,2BANW,MAAM,UACN,MAAM,0BACN,OAAO,GAEL,iBAAiB,GAAC,eAAe,CAI7C;IAED;;;;;;;;;;;;OAYG;IACH,wBAFa,iBAAiB,GAAC,eAAe,CAgB7C;IA7jCD;;OAEG;IACH,sBAFW,mBAAmB,EAkW7B;IA/VA;;;OAGG;IACH,cAFU,kBAAkB,CAS3B;IAED;;;;OAIG;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
|
6
6
|
* Renderer-agnostic state container with a pre-allocated save/restore stack.
|
|
7
7
|
*
|
|
8
|
-
* Owns the mutable rendering state (color, tint, transform,
|
|
8
|
+
* Owns the mutable rendering state (color, global alpha, tint, transform,
|
|
9
|
+
* scissor, blend mode, line width and join)
|
|
9
10
|
* and provides zero-allocation save()/restore() via index-based stacks.
|
|
10
11
|
* Both CanvasRenderer and WebGLRenderer (and future WebGPU) delegate state
|
|
11
12
|
* management here, keeping rendering-context-specific code in the renderers.
|
|
12
13
|
*/
|
|
13
14
|
export default class RenderState {
|
|
14
15
|
/**
|
|
15
|
-
* current fill & stroke style color
|
|
16
|
+
* current fill & stroke style color, with its own alpha. A fill or a
|
|
17
|
+
* stroke is drawn at this alpha times {@link RenderState#globalAlpha},
|
|
18
|
+
* as a 2D context draws its `fillStyle` under its `globalAlpha`.
|
|
16
19
|
* @type {Color}
|
|
17
20
|
*/
|
|
18
21
|
currentColor: Color;
|
|
22
|
+
/**
|
|
23
|
+
* current global alpha, applied to everything drawn: fills and
|
|
24
|
+
* strokes (times the colour's own alpha) and images (times the tint).
|
|
25
|
+
* Kept apart from {@link RenderState#currentColor}, so a translucent
|
|
26
|
+
* colour does not fade the images drawn after it.
|
|
27
|
+
* @type {number}
|
|
28
|
+
*/
|
|
29
|
+
globalAlpha: number;
|
|
19
30
|
/**
|
|
20
31
|
* current tint applied to sprites
|
|
21
32
|
* @type {Color}
|
|
@@ -41,6 +52,18 @@ export default class RenderState {
|
|
|
41
52
|
* @type {number[]}
|
|
42
53
|
*/
|
|
43
54
|
lineDash: number[];
|
|
55
|
+
/**
|
|
56
|
+
* current line width. The GPU renderers keep theirs here so that
|
|
57
|
+
* save()/restore() covers it, the way a 2D context's state does;
|
|
58
|
+
* the Canvas renderer leaves it to the context itself.
|
|
59
|
+
* @type {number}
|
|
60
|
+
*/
|
|
61
|
+
lineWidth: number;
|
|
62
|
+
/**
|
|
63
|
+
* current line join, saved and restored like {@link RenderState#lineWidth}
|
|
64
|
+
* @type {string}
|
|
65
|
+
*/
|
|
66
|
+
lineJoin: string;
|
|
44
67
|
/**
|
|
45
68
|
* current blend mode
|
|
46
69
|
* @type {string}
|
|
@@ -68,7 +91,7 @@ export default class RenderState {
|
|
|
68
91
|
save(scissorTestActive?: boolean): void;
|
|
69
92
|
/**
|
|
70
93
|
* Restore state from the stack.
|
|
71
|
-
* Color, tint, transform, and scissor are restored in place.
|
|
94
|
+
* Color, global alpha, tint, transform, and scissor are restored in place.
|
|
72
95
|
* Blend mode is NOT applied to `currentBlendMode` — it is returned so the
|
|
73
96
|
* renderer can call its own `setBlendMode()` (which has context-specific side effects).
|
|
74
97
|
* @param {number} canvasWidth - current canvas width (used when scissor was inactive)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderstate.d.ts","sourceRoot":"","sources":["../../src/video/renderstate.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"renderstate.d.ts","sourceRoot":"","sources":["../../src/video/renderstate.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH;;;;;;;;GAQG;AACH;IAEE;;;;;OAKG;IACH,cAFU,KAAK,CAE4B;IAE3C;;;;;;OAMG;IACH,aAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,aAFU,KAAK,CAEiC;IAEhD;;;OAGG;IACH,kBAFU,QAAQ,CAEoB;IAEtC;;;OAGG;IACH,gBAFU,UAAU,CAEmB;IAEvC;;;OAGG;IACH,iBAFU,QAAQ,GAAC,IAAI,CAEI;IAE3B;;;OAGG;IACH,UAFU,MAAM,EAAE,CAEA;IAElB;;;;;OAKG;IACH,WAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,UAFU,MAAM,CAEO;IAEvB;;;OAGG;IACH,kBAFU,MAAM,CAEc;IAE9B;;;OAGG;IACH,eAFU,YAAY,GAAC,SAAS,CAEF;IAE9B;;;;;;;;OAQG;IACH,cAFU,MAAM,CAEK;IAIrB;;;OAGG;IACH,uBAAwB;IAExB;;;;OAIG;IACH,oBAAoB;IAEpB;;;OAGG;IACH,qBAEE;IAEF;;;OAGG;IACH,oBAEE;IAEF;;;OAGG;IACH,yBAEE;IAEF;;;OAGG;IACH,yCAEE;IAEF;;;OAGG;IACH,sBAAoD;IAEpD;;;OAGG;IACH,2CAA4D;IAE5D;;;OAGG;IACH,6CAA8D;IAE9D;;;OAGG;IACH,sBAAoD;IAEpD;;;OAGG;IACH,wCAAyD;IAEzD;;;OAGG;IACH,sBAAoD;IAEpD;;;OAGG;IACH,mBAAiD;IAEjD;;;OAGG;IACH,oBAAkD;IAElD;;;OAGG;IACH,uCAAwD;IAGzD;;;OAGG;IACH,yBAFW,OAAO,QA6BjB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAFa,UAAU,GAAG,IAAI,CAQ7B;IAED;;;;;;;;OAQG;IACH,qBAJW,MAAM,gBACN,MAAM,GACJ;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CA6BhE;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAYhB;IAED;;;;OAIG;IACH,oBA2BC;CACD;sBAlWqB,oBAAoB;yBACjB,qBAAqB;8BAGnB,eAAe;8BACb,2BAA2B"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The angle an arc from `start` to `end` turns through, read the way
|
|
3
|
+
* `CanvasRenderingContext2D.arc` reads its angles: an end before the start
|
|
4
|
+
* wraps round (`end + 2π`), and a span of 2π or more in the arc's own direction
|
|
5
|
+
* is the whole circle, never more.
|
|
6
|
+
* @param {number} start - start angle in radians
|
|
7
|
+
* @param {number} end - end angle in radians
|
|
8
|
+
* @param {boolean} [antiClockwise=false] - the arc runs anticlockwise
|
|
9
|
+
* @returns {number} the angle covered, in `[0, 2π]` (0 when nothing is drawn)
|
|
10
|
+
*/
|
|
11
|
+
export function arcSweep(start: number, end: number, antiClockwise?: boolean): number;
|
|
1
12
|
/**
|
|
2
13
|
* Generate triangle fan vertices for arcs, ellipses, and rounded rect corners.
|
|
3
14
|
* @param {number} cx - center x
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tessellation.d.ts","sourceRoot":"","sources":["../../../src/video/utils/tessellation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tessellation.d.ts","sourceRoot":"","sources":["../../../src/video/utils/tessellation.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,gCALW,MAAM,OACN,MAAM,kBACN,OAAO,GACL,MAAM,CAalB;AAED;;;;;;;;;;GAUG;AACH,wCATW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,cACN,MAAM,YACN,MAAM,YACN,MAAM,GACJ,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CA0BzC;AAED;;;;;GAKG;AACH,6CAJW,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,UAC7B,MAAM,GACJ,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAsBzC"}
|
|
@@ -360,11 +360,6 @@ export default class WebGLRenderer extends Renderer {
|
|
|
360
360
|
*/
|
|
361
361
|
setBlendMode(mode?: string, premultipliedAlpha?: boolean): string;
|
|
362
362
|
currentPremultipliedAlpha: any;
|
|
363
|
-
/**
|
|
364
|
-
* Return the global alpha
|
|
365
|
-
* @returns {number} global alpha value
|
|
366
|
-
*/
|
|
367
|
-
getGlobalAlpha(): number;
|
|
368
363
|
/**
|
|
369
364
|
* Stroke an arc at the specified coordinates with given radius, start and end points
|
|
370
365
|
* @param {number} x - arc center point x-axis
|
|
@@ -377,7 +372,9 @@ export default class WebGLRenderer extends Renderer {
|
|
|
377
372
|
*/
|
|
378
373
|
strokeArc(x: number, y: number, radius: number, start: number, end: number, antiClockwise?: boolean, fill?: boolean): void;
|
|
379
374
|
/**
|
|
380
|
-
* Fill an arc at the specified coordinates with given radius, start and end points
|
|
375
|
+
* Fill an arc at the specified coordinates with given radius, start and end points.
|
|
376
|
+
* The angles are read like `CanvasRenderingContext2D.arc`: an end before
|
|
377
|
+
* the start wraps round, and a span of 2π or more is the whole circle.
|
|
381
378
|
* @param {number} x - arc center point x-axis
|
|
382
379
|
* @param {number} y - arc center point y-axis
|
|
383
380
|
* @param {number} radius - arc radius
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webgl_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgl/webgl_renderer.js"],"names":[],"mappings":"AAmIA;;;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,+BAAkC;IASlC;;;;;OAKG;IACH,UAHU,MAAM,CAGO;IAEvB;;;OAGG;IACH,cAFU,WAAW,CAEqB;IAE1C;;;;;;;;OAQG;IACH,cAJU,cAAc,CAIuB;IAE/C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oCpB,uBAAuB;yBAT3B,uBAAuB;oBA9B5B,2BAA2B;iCAwBd,8BAA8B;+BAFhC,4BAA4B;6BAOjB,uBAAuB;0CAkBvB,oCAAoC;0BAiBrD,eAAe;0CAFD,yBAAyB;6BA/BnC,8BAA8B;sBA7B1B,uBAAuB;qCA6DtB,8DAA8D;6BANtE,6BAA6B;8BAG5B,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitive_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/primitive_batcher.js"],"names":[],"mappings":"AAMA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBA8BjD;IAED;;;;;OAKG;IACH,uBAJW,MAAM,SACN,KAAK,EAAE,gBACP,MAAM,QAyEhB;;
|
|
1
|
+
{"version":3,"file":"primitive_batcher.d.ts","sourceRoot":"","sources":["../../../../src/video/webgpu/batchers/primitive_batcher.js"],"names":[],"mappings":"AAMA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IACC;;;OAGG;IACH,wBAHW,OAAO,uBAAuB,EAAE,OAAO,uBA8BjD;IAED;;;;;OAKG;IACH,uBAJW,MAAM,SACN,KAAK,EAAE,gBACP,MAAM,QAyEhB;;CAwID;0BA/QyB,qBAAqB;2BAIvB,gCAAgC"}
|
|
@@ -160,11 +160,6 @@ export default class WebGPURenderer extends Renderer {
|
|
|
160
160
|
* @param {number} [f] - the f component
|
|
161
161
|
*/
|
|
162
162
|
setTransform(a: Matrix2d | Matrix3d | number, b?: number, c?: number, d?: number, e?: number, f?: number): void;
|
|
163
|
-
/**
|
|
164
|
-
* Return the global alpha
|
|
165
|
-
* @returns {number} global alpha value
|
|
166
|
-
*/
|
|
167
|
-
getGlobalAlpha(): number;
|
|
168
163
|
/**
|
|
169
164
|
* set the current blend mode for this renderer. <br>
|
|
170
165
|
* Both GPU renderers support the full set — the Canvas fallback supports
|
|
@@ -333,7 +328,9 @@ export default class WebGPURenderer extends Renderer {
|
|
|
333
328
|
*/
|
|
334
329
|
strokeArc(x: number, y: number, radius: number, start: number, end: number, antiClockwise?: boolean, fill?: boolean): void;
|
|
335
330
|
/**
|
|
336
|
-
* Fill an arc at the specified coordinates with given radius, start and end points
|
|
331
|
+
* Fill an arc at the specified coordinates with given radius, start and end points.
|
|
332
|
+
* The angles are read like `CanvasRenderingContext2D.arc`: an end before
|
|
333
|
+
* the start wraps round, and a span of 2π or more is the whole circle.
|
|
337
334
|
* @param {number} x - arc center point x-axis
|
|
338
335
|
* @param {number} y - arc center point y-axis
|
|
339
336
|
* @param {number} radius - arc radius
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/webgpu_renderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webgpu_renderer.d.ts","sourceRoot":"","sources":["../../../src/video/webgpu/webgpu_renderer.js"],"names":[],"mappings":"AAgFA;;;;;;;;;;;;;;;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;IAG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AAM,KACN,MAAM,QAIhB;IAED;;;;;;OAMG;IACH,sBALW,MAAM,OACN,MAAM,KACN,MAAM,KACN,MAAM,QAIhB;IAED;;;;;;;;OAQG;IACH,oBAPW,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,KACN,MAAM,KACN,MAAM,QAIhB;IAED;;;;;;;OAOG;IACH,UANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,QAIhB;IAED;;;;;;OAMG;IACH,QALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAIhB;IAED;;;;;;;OAOG;IACH,aANW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,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;qBAnvJoB,gBAAgB;0CA4BK,oCAAoC;yBAxBrD,qBAAqB;yBA5BrB,wBAAwB;uBAC1B,yBAAyB;gCAkDU,qBAAqB;8BAHjD,mBAAmB;8BACnB,yBAAyB;+BAMxB,oBAAoB;+BA7BpB,uCAAuC;wBAP9C,2BAA2B;6BAMtB,uCAAuC;8BAyCvC,4BAA4B;oBArErC,2BAA2B;sBAEd,qBAAqB;0BAgD5B,8BAA8B;8BAe7B,wBAAwB;iCAzClB,8BAA8B;+BAHhC,4BAA4B;6BASjB,qBAAqB;6BAoCrC,6BAA6B;yCAJjB,+BAA+B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "melonjs",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.13.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/melonjs/SKILL.md
CHANGED
|
@@ -34,10 +34,10 @@ dependencies.
|
|
|
34
34
|
| [melonjs-scenes-and-state](../melonjs-scenes-and-state/SKILL.md) | `Stage` subclasses, the state manager, transitions, pausing, the update loop, timers, tweens, saved data. |
|
|
35
35
|
| [melonjs-renderables](../melonjs-renderables/SKILL.md) | Subclassing `Renderable`, custom `draw()`, draw order, anchors, `floating`, post effects on an object. |
|
|
36
36
|
| [melonjs-sprites-and-animation](../melonjs-sprites-and-animation/SKILL.md) | `Sprite`, frame animation, texture atlases (TexturePacker / Aseprite / ShoeBox), tint, flip, pooling. |
|
|
37
|
-
| [melonjs-input](../melonjs-input/SKILL.md) | Keyboard actions, pointer and touch handling, drag, gamepad, virtual controls. |
|
|
37
|
+
| [melonjs-input](../melonjs-input/SKILL.md) | Keyboard actions, pointer and touch handling, drag, gamepad, virtual controls (fixed or floating sticks and buttons, tap to act). |
|
|
38
38
|
| [melonjs-physics](../melonjs-physics/SKILL.md) | Collision, bodies, movement, spatial queries, and the planck / matter adapters. |
|
|
39
39
|
| [melonjs-math](../melonjs-math/SKILL.md) | Vectors and matrices: what mutates, what allocates, and interpolating with lerp, slerp, damp or moveTowards. |
|
|
40
|
-
| [melonjs-tilemaps](../melonjs-tilemaps/SKILL.md) | Tiled maps — TMX/TSX loading, spawning entities from objects, collision layers, isometric maps. |
|
|
40
|
+
| [melonjs-tilemaps](../melonjs-tilemaps/SKILL.md) | Tiled maps — TMX/TSX loading, spawning entities from objects, collision layers, isometric maps, reading and changing tiles at run time (a tile layer as the game board). |
|
|
41
41
|
| [melonjs-audio](../melonjs-audio/SKILL.md) | Sound effects, music, audio sprites, spatial audio, procedural tone and noise. |
|
|
42
42
|
| [melonjs-effects-and-shaders](../melonjs-effects-and-shaders/SKILL.md) | Post effects, custom GLSL/WGSL shaders, blend modes, colour grading, screen capture. |
|
|
43
43
|
| [melonjs-3d](../melonjs-3d/SKILL.md) | Anything 3D or 2.5D — `Camera3d`, meshes, instancing, `Sprite3d` billboards, `Light3d`, distance fog, glTF scenes. |
|
|
@@ -112,7 +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
|
+
| [`@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; fixed or floating under the thumb, hidden until touched, tap to act. Use it rather than writing virtual controls. |
|
|
116
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. |
|
|
117
117
|
| [`create-melonjs`](https://www.npmjs.com/package/create-melonjs) | Scaffolding a new project — start here rather than assembling a build by hand. |
|
|
118
118
|
|
|
@@ -463,10 +463,12 @@ the level starts. The loader calls the same function, so the same rules apply.
|
|
|
463
463
|
Re-preloading a manifest that already contains a loaded clip is a no-op —
|
|
464
464
|
`audio.unload(name)` first if you genuinely want to reload it.
|
|
465
465
|
|
|
466
|
-
**Credentials
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
466
|
+
**Credentials work as for every other asset type.** Buffered audio on the
|
|
467
|
+
game's own origin carries its cookies and HTTP auth with no option; a clip on
|
|
468
|
+
another origin behind a login needs `loader.setOptions({ withCredentials: true })`,
|
|
469
|
+
not an audio-specific option, and that server must allow credentials. Buffered
|
|
470
|
+
audio fetches through the shared loader path, so it behaves exactly as an image
|
|
471
|
+
or a JSON file does. A streamed clip (`stream: true`, or
|
|
470
472
|
`preload: false`) does not: it plays
|
|
471
473
|
through an `<audio>` element, which needs a `crossorigin` attribute rather than
|
|
472
474
|
fetch credentials. Preload a clip buffered if it sits behind a login.
|
|
@@ -498,7 +500,7 @@ either way — blank screen, empty console.
|
|
|
498
500
|
| `stereo` / `position` do nothing | the clip was loaded with `stream: true` or `preload: false` — spatial is WebAudio-only |
|
|
499
501
|
| 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 |
|
|
500
502
|
| one format works, another does not | that codec is not in the `audio.init()` list |
|
|
501
|
-
| audio behind a login fails, or the preload hangs | `loader.setOptions({ withCredentials: true })` — the same switch every asset type uses |
|
|
503
|
+
| audio on another origin behind a login fails, or the preload hangs | `loader.setOptions({ withCredentials: true })` — the same switch every asset type uses. Audio on the game's own origin needs nothing (before 20.13 it needed it too) |
|
|
502
504
|
| a streamed clip ignores `withCredentials` | `stream: true` plays through an `<audio>` element; preload it buffered instead |
|
|
503
505
|
| `audio.tone(440, {...})` does nothing / errors | `tone` takes a single options object with a required `duration` |
|
|
504
506
|
| `tone` / `noise` are silent with no error | no WebAudio context — `getAudioContext()` returned `null` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: melonjs-camera-and-drawing
|
|
3
|
-
description: "Use this skill for camera control and immediate-mode drawing in melonJS — following a target, viewport bounds, shake and fade, secondary cameras and what each one draws, and drawing shapes, lines and gradients inside a custom draw(). Covers world versus screen coordinate conversion, clipping and masking, baking with CanvasRenderTarget, and reading pixels back. Triggers on: Camera2d, viewport, follow, offset, look ahead, setBounds, minimap, second camera, split screen, cullMask, visibilityLayer, hide from a camera, shake, fadeIn, fadeOut, worldToLocal, localToWorld, colorMatrix, renderer.fill, renderer.stroke, Rect, Ellipse, Polygon, Line, Gradient, clipRect, mask, CanvasRenderTarget, NoiseTexture2d, lookAt, setBasis, toImageData, getImageData, toBlob, toDataURL, screenshot, read pixels."
|
|
3
|
+
description: "Use this skill for camera control and immediate-mode drawing in melonJS — following a target, viewport bounds, shake and fade, secondary cameras and what each one draws, and drawing shapes, lines and gradients inside a custom draw(). Covers world versus screen coordinate conversion, clipping and masking, baking with CanvasRenderTarget, and reading pixels back. Triggers on: Camera2d, viewport, follow, offset, look ahead, setBounds, minimap, second camera, split screen, cullMask, visibilityLayer, hide from a camera, shake, fadeIn, fadeOut, worldToLocal, localToWorld, colorMatrix, renderer.fill, renderer.stroke, setGlobalAlpha, fillArc, Rect, Ellipse, Polygon, Line, Gradient, clipRect, mask, CanvasRenderTarget, NoiseTexture2d, lookAt, setBasis, toImageData, getImageData, toBlob, toDataURL, screenshot, read pixels."
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -143,6 +143,12 @@ app.viewport.worldToLocal(x, y); // world → screen
|
|
|
143
143
|
app.viewport.localToWorld(x, y); // screen → world
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
+
They agree with where the camera draws: a level smaller than the view is
|
|
147
|
+
centred by offsetting the world container (`world.pos`), which the default
|
|
148
|
+
camera draws and a minimap, corner or zoomed camera leaves out, and each
|
|
149
|
+
camera's conversions follow suit (20.13 and later; before, a minimap's were off
|
|
150
|
+
by `world.pos`).
|
|
151
|
+
|
|
146
152
|
Both return a `Vector2d`; with no third argument that vector comes from the
|
|
147
153
|
shared pool, so in a per-frame path pass your own `v` as the third argument, or
|
|
148
154
|
release it with `getPool("vector2d").release(v)`.
|
|
@@ -205,6 +211,14 @@ and an overridden `postDraw`:
|
|
|
205
211
|
this.cameras.set("minimap", new MinimapCamera());
|
|
206
212
|
```
|
|
207
213
|
|
|
214
|
+
A stage's cameras draw in the order they were added, each over the ones before
|
|
215
|
+
it, so a full-screen second camera is a layer: a `Camera3d` drawing a 3D
|
|
216
|
+
background first, the game's own camera over it, each kept to its part of the
|
|
217
|
+
world with `visibilityLayer` / `cullMask` (below). A camera's post effects
|
|
218
|
+
apply to what that camera draws: the first camera's pass starts the frame, and
|
|
219
|
+
a later camera's is blended over what is already there (20.13 and later;
|
|
220
|
+
before, it wiped out the cameras before it).
|
|
221
|
+
|
|
208
222
|
View state is per camera, not per scene: a `Camera3d` carries its own distance
|
|
209
223
|
fog (`setFog`), so a minimap or split-screen view fogs independently of the main
|
|
210
224
|
one — and a `Camera2d` never fogs. See `melonjs-3d`.
|
|
@@ -228,6 +242,9 @@ minimap.cullMask = ~PARTICLES; // the minimap draws every layer but 2
|
|
|
228
242
|
set it on an emitter and none of its particles are drawn. The world itself
|
|
229
243
|
obeys it too, and so does what it contains: a child is drawn only if it and
|
|
230
244
|
every container above it share a bit with the camera.
|
|
245
|
+
- Particles are on their emitter's layers, and follow a change to them on the
|
|
246
|
+
emitter's next update, so a camera that draws only the emitter's layer draws
|
|
247
|
+
its particles too.
|
|
231
248
|
- A renderable on layer `0` is drawn by no camera; a `cullMask` of `0` draws
|
|
232
249
|
nothing.
|
|
233
250
|
- It decides drawing only: what a camera leaves out still updates, collides and
|
|
@@ -256,6 +273,23 @@ draw(renderer) {
|
|
|
256
273
|
}
|
|
257
274
|
```
|
|
258
275
|
|
|
276
|
+
**The colour's alpha and the global alpha are two things**, as on a 2D
|
|
277
|
+
context. A fill or a stroke is drawn at the alpha of `setColor` times
|
|
278
|
+
`setGlobalAlpha` (which is where the renderable's opacity comes in), an image at
|
|
279
|
+
the global alpha (times the tint) alone, and `getGlobalAlpha()` never moves with
|
|
280
|
+
`setColor`. So to fade a translucent shape, lower the global alpha and keep the
|
|
281
|
+
colour; folding the colour's alpha into `setGlobalAlpha` as well counts it twice.
|
|
282
|
+
|
|
283
|
+
`lineWidth`, `lineJoin`, the colour and the global alpha are all part of what
|
|
284
|
+
`save()` / `restore()` keep, and every renderable's `draw()` runs between the
|
|
285
|
+
two, so set them freely there: the next renderable gets them back.
|
|
286
|
+
|
|
287
|
+
`fillArc` / `strokeArc` read their angles like `CanvasRenderingContext2D.arc`:
|
|
288
|
+
an end before the start wraps round (`end + 2π`), and a span of 2π or more in
|
|
289
|
+
the arc's own direction is the whole circle. A filled part-circle differs by
|
|
290
|
+
backend, though: Canvas closes it with a straight chord, the GPU renderers fill
|
|
291
|
+
a pie slice from the centre.
|
|
292
|
+
|
|
259
293
|
Geometry available: `Rect`, `RoundRect`, `Ellipse`, `Polygon`, `Line`, `Point`
|
|
260
294
|
(and a `Bounds`). `renderer.fill(shape)` and `renderer.stroke(shape)` take any
|
|
261
295
|
of them and throw `Invalid geometry for fill/stroke` for anything else.
|
|
@@ -383,6 +417,7 @@ const data = await rt.toImageData(0, 0, w, h);
|
|
|
383
417
|
|
|
384
418
|
| symptom | cause |
|
|
385
419
|
|---|---|
|
|
420
|
+
| a second camera's post effect wipes out what the first camera drew | before 20.13 a later camera's post-effect pass replaced the whole frame; update, or put the effects on a container instead of the camera |
|
|
386
421
|
| `follow()` set but the view never moves | viewport bounds still at renderer size |
|
|
387
422
|
| `invalid target for me.Camera2d.follow` | passed `player.pos` — pass the renderable, a `Vector2d` or a `Vector3d` |
|
|
388
423
|
| camera drag jumps around | using world (`gameWorldX`) instead of screen (`gameScreenX`) coordinates |
|
|
@@ -390,6 +425,11 @@ const data = await rt.toImageData(0, 0, w, h);
|
|
|
390
425
|
| custom drawing appears at the origin | `draw()` not reading `this.pos` |
|
|
391
426
|
| custom drawing offset by half its size | centred `anchorPoint` not zeroed |
|
|
392
427
|
| `setLineWidth` is not a function | it is the `lineWidth` property |
|
|
428
|
+
| after a translucent `setColor`, images, later colours and the next renderables come out faded (WebGL / WebGPU) | before 20.13 the colour's alpha leaked into the global alpha; update |
|
|
429
|
+
| a translucent colour comes out fainter than asked | its alpha folded into `setGlobalAlpha` as well, so it counts twice |
|
|
430
|
+
| a `lineWidth` set in one `draw()` thickens everything drawn after it (WebGL / WebGPU) | before 20.13 `restore()` did not put `lineWidth` back; update, or put it back yourself |
|
|
431
|
+
| `fillArc` with the end angle before the start fills the wrong part of the circle (WebGL / WebGPU) | before 20.13 the GPU renderers did not wrap the angles like Canvas; update |
|
|
432
|
+
| a minimap's `worldToLocal` / `localToWorld` are off by the level's centring offset | before 20.13 they applied `world.pos`, which a non-default camera does not draw; update |
|
|
393
433
|
| clipping in the wrong place inside a container | container clips in local coordinates, after its own translate |
|
|
394
434
|
| `container.clipping = true` does nothing | container has no explicit size, so `width`/`height` are `Infinity` |
|
|
395
435
|
| baked target draws nothing / throws | passed the `CanvasRenderTarget`, not its `.canvas` |
|
|
@@ -758,6 +758,7 @@ same question after construction.
|
|
|
758
758
|
|
|
759
759
|
| symptom | cause |
|
|
760
760
|
|---|---|
|
|
761
|
+
| a camera's post effect hides another camera drawn before it | before 20.13 a later camera's pass replaced the whole frame; update. Since then each camera's effects apply to what it draws, over the cameras before it |
|
|
761
762
|
| effect does nothing, warning in console | Canvas fallback — no programmable pipeline |
|
|
762
763
|
| effect does nothing on some machines only | GLSL-only shader, `video.AUTO` chose WebGPU |
|
|
763
764
|
| a white or solid box where the effect should be | carrier renderable drawn while the effect is disabled |
|
|
@@ -87,7 +87,7 @@ right times and there is nothing to unsubscribe:
|
|
|
87
87
|
| callback | when |
|
|
88
88
|
|---|---|
|
|
89
89
|
| `onActivateEvent()` | `addChild`-ed into a container that is already attached to the world root (a `Container` forwards it to its children) |
|
|
90
|
-
| `onDeactivateEvent()` | removed from its container — including the automatic world clear on a state change |
|
|
90
|
+
| `onDeactivateEvent()` | removed from its container — including the automatic world clear on a state change. Once per `onActivateEvent`: the children of a removed container, at any depth, are told once |
|
|
91
91
|
| `onDestroyEvent()` | `destroy()` ran; called with no arguments from the container-removal path |
|
|
92
92
|
| `onCollisionStart` / `onCollisionActive` / `onCollisionEnd` | contacts |
|
|
93
93
|
|
|
@@ -154,6 +154,8 @@ Use `removeChild()`, or flag the work and drain it from `Stage.update`.
|
|
|
154
154
|
| crash after a collision | `removeChildNow()` inside a contact callback — use `removeChild()` |
|
|
155
155
|
| progress callbacks never fire | assigned `loader.onProgress` (removed in 20.3) instead of subscribing to `LOADER_PROGRESS` |
|
|
156
156
|
| `onActivateEvent` never runs | the child was added to a container not yet attached to the world |
|
|
157
|
+
| `onDeactivateEvent` runs twice when a group is removed (a count goes negative, a light or listener is released twice) | the group's `onDeactivateEvent` and its `destroy()` both reached the children, before 20.13.0 — now once per `onActivateEvent` |
|
|
158
|
+
| `onDeactivateEvent` never runs on a child of a group built off-world and destroyed | it never had `onActivateEvent` either: the pair is only sent to children that entered the world |
|
|
157
159
|
|
|
158
160
|
## Related skills
|
|
159
161
|
|
|
@@ -137,7 +137,6 @@ with the formats you ship before any audio asset is preloaded.
|
|
|
137
137
|
```js
|
|
138
138
|
import { audio, loader } from "melonjs";
|
|
139
139
|
|
|
140
|
-
loader.setOptions({ crossOrigin: "anonymous" }); // needed for remote assets
|
|
141
140
|
audio.init("mp3,ogg"); // BEFORE preloading audio
|
|
142
141
|
await loader.preload([
|
|
143
142
|
{ name: "tileset", type: "image", src: "data/img/tileset.png" },
|
|
@@ -173,7 +172,7 @@ placement.
|
|
|
173
172
|
| scene content appears once and never resets | scene built in the constructor instead of `onResetEvent` |
|
|
174
173
|
| everything offset by half a sprite | top-left math against the centred `anchorPoint` default |
|
|
175
174
|
| a `Tween` or `ParticleEmitter` does nothing | `.start()` / `streamParticles()` never called |
|
|
176
|
-
|
|
|
175
|
+
| an asset on another origin fails to load, the error naming it | that server sends no `Access-Control-Allow-Origin` header (see melonjs-loading-assets) |
|
|
177
176
|
|
|
178
177
|
## Related skills
|
|
179
178
|
|
|
@@ -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, 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."
|
|
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, floating stick, floating button, floating joystick, two thumbs, tap to fire, hideAtRest, mobile controls, 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
|
|
|
@@ -293,6 +293,39 @@ its own, a touch starting on the controls does not reach the game, and they
|
|
|
293
293
|
hide while a real pad is in use. `plugin.cache.gamepad.visible` says whether
|
|
294
294
|
they show, to word a prompt ("tap" or a key name).
|
|
295
295
|
|
|
296
|
+
Sticks and buttons are fixed in a corner by default. **`floating: true`**
|
|
297
|
+
puts one under the finger wherever it lands inside its `area` (`"half"`, its
|
|
298
|
+
own half of the screen, by default; `"screen"`; or `{ x, y, width, height }`),
|
|
299
|
+
and **`hideAtRest: true`** draws it only while held. The usual mobile
|
|
300
|
+
two-thumb layout, nothing on screen until touched (1.1):
|
|
301
|
+
|
|
302
|
+
```js
|
|
303
|
+
plugin.register(GamepadPlugin, "gamepad", {
|
|
304
|
+
sticks: [{ floating: true, hideAtRest: true }], // left half
|
|
305
|
+
buttons: [{ floating: true, hideAtRest: true, label: "A" }], // right half
|
|
306
|
+
});
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Or one thumb for both: a stick over the whole screen whose quick tap (lifted
|
|
310
|
+
within `tap.time`, 250 ms, without leaning to `dpadThreshold`) presses a key
|
|
311
|
+
or button for one frame, and no button at all:
|
|
312
|
+
|
|
313
|
+
```js
|
|
314
|
+
plugin.register(GamepadPlugin, "gamepad", {
|
|
315
|
+
sticks: [{ floating: true, area: "screen", hideAtRest: true,
|
|
316
|
+
tap: { key: input.KEY.SPACE } }],
|
|
317
|
+
buttons: 0,
|
|
318
|
+
});
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Where areas overlap, a finger takes the first free control there: fixed
|
|
322
|
+
buttons, fixed sticks, floating buttons, floating sticks. So a floating button
|
|
323
|
+
on its `"half"` carves the right half out of a `"screen"` stick, and several
|
|
324
|
+
floating buttons sharing an area split it by distance to where each rests.
|
|
325
|
+
Every press lasts at least one frame, so a 15 ms thumb tap still reaches
|
|
326
|
+
`isKeyPressed`, and Safari's pinch gesture is cancelled while the controls
|
|
327
|
+
show, so a second thumb works on iOS.
|
|
328
|
+
|
|
296
329
|
A single key can also be pressed directly, reaching the same actions:
|
|
297
330
|
|
|
298
331
|
```js
|
|
@@ -313,9 +346,12 @@ input.triggerKeyEvent(input.KEY.LEFT, false); // release
|
|
|
313
346
|
| jump fires every frame while held | `bindKey` without its third `lock` argument |
|
|
314
347
|
| `invalid event type` thrown at registration | non-pointer name (`"click"`, `"mousedown"`, …) passed to `registerPointerEvent` |
|
|
315
348
|
| `no action defined for keycode N` | `bindGamepad` called before `bindKey` for that keycode |
|
|
349
|
+
| floating stick ignores the right half of the screen | its `area` defaults to `"half"`, its own side — use `area: "screen"` |
|
|
350
|
+
| `area: "screen"` stick still ignores part of the screen | a floating button's area comes first there — the overlap order is fixed buttons, fixed sticks, floating buttons, floating sticks |
|
|
351
|
+
| a quick tap on a stick moves instead of acting | it leaned past `dpadThreshold` or outlasted `tap.time` before lifting |
|
|
316
352
|
| stick has to be pushed well past its `threshold` before it registers | `threshold` is ADDED to the deadzone, not used instead of it |
|
|
317
353
|
| one half of a stick does nothing | each half is a separate `bindGamepad`, chosen by the sign of `threshold` |
|
|
318
|
-
| a widget under an overlapping panel still
|
|
354
|
+
| a widget under an overlapping panel still lights up | the panel consumes no hover: return `false` from its `onOver` (presses already stop at UI elements; `UIPanel` with `blocking` does both) |
|
|
319
355
|
| 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 |
|
|
320
356
|
| 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 |
|
|
321
357
|
| every click in the game stops working | a handler on `app.viewport` returning `false`, which is asked first |
|