melonjs 19.2.0 → 19.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -10
- package/build/application/application.d.ts.map +1 -1
- package/build/application/defaultApplicationSettings.d.ts +1 -0
- package/build/application/defaultApplicationSettings.d.ts.map +1 -1
- package/build/application/settings.d.ts +12 -0
- package/build/application/settings.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/index.js +2665 -629
- package/build/index.js.map +4 -4
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +72 -5
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXTile.d.ts +19 -1
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts +15 -0
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +7 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +7 -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 +7 -1
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/physics/bounds.d.ts +5 -2
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/sat.d.ts.map +1 -1
- package/build/physics/world.d.ts +16 -0
- package/build/physics/world.d.ts.map +1 -1
- package/build/renderable/container.d.ts +1 -1
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/light2d.d.ts +128 -18
- package/build/renderable/light2d.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +38 -6
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/state/stage.d.ts +65 -9
- package/build/state/stage.d.ts.map +1 -1
- package/build/utils/function.d.ts +1 -1
- package/build/utils/function.d.ts.map +1 -1
- package/build/video/buffer/vertex.d.ts +2 -1
- package/build/video/buffer/vertex.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +2 -0
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/renderer.d.ts +77 -1
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +20 -0
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +26 -2
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts.map +1 -1
- package/build/video/texture/resource.d.ts +113 -0
- package/build/video/texture/resource.d.ts.map +1 -0
- package/build/video/webgl/batchers/batcher.d.ts +6 -0
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts +109 -0
- package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -0
- package/build/video/webgl/batchers/material_batcher.d.ts +8 -1
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts +19 -1
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/effects/radialGradient.d.ts +105 -0
- package/build/video/webgl/effects/radialGradient.d.ts.map +1 -0
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/lighting/constants.d.ts +13 -0
- package/build/video/webgl/lighting/constants.d.ts.map +1 -0
- package/build/video/webgl/lighting/pack.d.ts +76 -0
- package/build/video/webgl/lighting/pack.d.ts.map +1 -0
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +108 -0
- package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -0
- package/build/video/webgl/shaders/multitexture-lit.d.ts +23 -0
- package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -0
- package/build/video/webgl/utils/attributes.d.ts +7 -0
- package/build/video/webgl/utils/attributes.d.ts.map +1 -1
- package/build/video/webgl/utils/precision.d.ts +1 -1
- package/build/video/webgl/utils/precision.d.ts.map +1 -1
- package/build/video/webgl/utils/uniforms.d.ts +13 -0
- package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +36 -0
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pointerevent.d.ts","sourceRoot":"","sources":["../../src/input/pointerevent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAepD,OAAO,OAAO,MAAM,cAAc,CAAC;AAoBnC;;;GAGG;AACH,eAAO,IAAI,IAAI,EAAE,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"pointerevent.d.ts","sourceRoot":"","sources":["../../src/input/pointerevent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAepD,OAAO,OAAO,MAAM,cAAc,CAAC;AAoBnC;;;GAGG;AACH,eAAO,IAAI,IAAI,EAAE,WAAW,CAAC;AAmgB7B;;GAEG;AACH,eAAO,IAAI,kBAAkB,EAAE,WAAW,GAAG,IAAW,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,OAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,IAAI,MAAM,EAAE,OAAe,CAAC;AAEnC;;;;GAIG;AACH,eAAO,IAAI,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;AAElD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAY1E;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,OAAO,EAAE,iBAAiB,EAC1B,KAAK,CAAC,EAAE,MAAM,GACZ,IAAI,CAEN;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAanD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAGnD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,GAAG,IAAI,GAC5C,IAAI,CAsCN;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAClC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,GAAG,IAAI,GAC7C,IAAI,CAiCN;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAMzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAO5C;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAMzC"}
|
|
@@ -64,10 +64,76 @@ export default class TMXLayer extends Renderable {
|
|
|
64
64
|
name: any;
|
|
65
65
|
cols: number;
|
|
66
66
|
rows: number;
|
|
67
|
-
|
|
67
|
+
/**
|
|
68
|
+
* The raw tile data for this layer. Each cell occupies two consecutive
|
|
69
|
+
* `Uint16` slots: the GID (with flip bits stripped) and a 3-bit flip
|
|
70
|
+
* mask. Cell `(x, y)` is at `layerData[(y * cols + x) * 2]` (row-major).
|
|
71
|
+
*
|
|
72
|
+
* The 16-bit GID slot caps per-tileset GIDs at 65 535. This matches the
|
|
73
|
+
* planned WebGL2 shader path (`RG16UI` index texture) — switching to
|
|
74
|
+
* `Uint32Array` would force a truncating copy at GPU upload time.
|
|
75
|
+
* @type {Uint16Array}
|
|
76
|
+
*/
|
|
77
|
+
layerData: Uint16Array;
|
|
78
|
+
/**
|
|
79
|
+
* Lazy view cache of Tile objects, indexed by `y * cols + x` (row-major).
|
|
80
|
+
* Allocated lazily on the first `cellAt` / `getTile` call — the renderer
|
|
81
|
+
* hot path reads `layerData` directly and never touches this cache, so
|
|
82
|
+
* for games that never call `getTile`/`cellAt` from user code, this
|
|
83
|
+
* stays `null` for the layer's lifetime. Invalidated entry-by-entry by
|
|
84
|
+
* `setTile` and `clearTile`. The raw bytes in `layerData` are the source
|
|
85
|
+
* of truth; this exists only to preserve stable Tile identity across
|
|
86
|
+
* repeated user-facing reads.
|
|
87
|
+
* @type {Array<Tile|null>|null}
|
|
88
|
+
* @ignore
|
|
89
|
+
*/
|
|
90
|
+
cachedTile: Array<Tile | null> | null;
|
|
91
|
+
/**
|
|
92
|
+
* Monotonically-increasing counter bumped by `setTile` and `clearTile`.
|
|
93
|
+
* Renderers can compare against a stashed value to detect mutations and
|
|
94
|
+
* decide whether to re-upload the layer data to the GPU.
|
|
95
|
+
* @type {number}
|
|
96
|
+
*/
|
|
97
|
+
dataVersion: number;
|
|
98
|
+
/**
|
|
99
|
+
* How this layer is rendered. Resolved by `onActivateEvent` to one of:
|
|
100
|
+
* - `"shader"` — WebGL2 procedural shader path (single quad per tileset, fragment GID lookup)
|
|
101
|
+
* - `"prerender"`— offscreen-canvas bake at activation, blitted as one drawImage per frame
|
|
102
|
+
* - `"perTile"` — per-frame loop, one drawImage per visible tile
|
|
103
|
+
*
|
|
104
|
+
* User code may set this to one of the above values (or the special
|
|
105
|
+
* `"auto"`) before the layer is activated to override the engine's
|
|
106
|
+
* default choice; Tiled custom properties named `renderMode` are
|
|
107
|
+
* applied automatically via `applyTMXProperties`. If a forced mode
|
|
108
|
+
* is ineligible (e.g. `"shader"` on Canvas), a one-shot warning is
|
|
109
|
+
* emitted at activation and the layer falls back to the legacy path.
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @default "auto"
|
|
112
|
+
*/
|
|
113
|
+
renderMode: string;
|
|
68
114
|
onActivateEvent(): void;
|
|
69
|
-
preRender: any;
|
|
70
115
|
canvasRenderer: CanvasRenderer | undefined;
|
|
116
|
+
preRender: boolean | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Resolve `this.renderMode` to one of "shader" / "prerender" / "perTile"
|
|
119
|
+
* based on eligibility checks and user/world hints. Emits a single
|
|
120
|
+
* `console.warn` at activation when a forced mode is ineligible, or
|
|
121
|
+
* when an auto-eligible mode falls back due to a layer feature the GPU
|
|
122
|
+
* path doesn't support (orientation, collection-of-image tileset, etc.).
|
|
123
|
+
* @ignore
|
|
124
|
+
*/
|
|
125
|
+
_resolveRenderMode(): void;
|
|
126
|
+
/**
|
|
127
|
+
* Check whether this layer is eligible for the WebGL2 shader path.
|
|
128
|
+
* @param {object} renderer
|
|
129
|
+
* @param {boolean} gpuAllowed - whether `gpuTilemap` is enabled at the world level
|
|
130
|
+
* @returns {{ok: boolean, reason?: string}}
|
|
131
|
+
* @ignore
|
|
132
|
+
*/
|
|
133
|
+
_checkShaderEligibility(renderer: object, gpuAllowed: boolean): {
|
|
134
|
+
ok: boolean;
|
|
135
|
+
reason?: string;
|
|
136
|
+
};
|
|
71
137
|
onDeactivateEvent(): void;
|
|
72
138
|
/**
|
|
73
139
|
* Set the TMX renderer for this layer object
|
|
@@ -106,11 +172,12 @@ export default class TMXLayer extends Renderable {
|
|
|
106
172
|
/**
|
|
107
173
|
* assign the given Tile object to the specified position
|
|
108
174
|
* @param {Tile} tile - the tile object to be assigned
|
|
109
|
-
* @param {number} x - x coordinate (in
|
|
110
|
-
* @param {number} y - y coordinate (in
|
|
175
|
+
* @param {number} x - x coordinate (in tile/column coordinates)
|
|
176
|
+
* @param {number} y - y coordinate (in tile/row coordinates)
|
|
111
177
|
* @returns {Tile} the tile object
|
|
112
178
|
*/
|
|
113
179
|
setTile(tile: Tile, x: number, y: number): Tile;
|
|
180
|
+
_truncationWarned: boolean | undefined;
|
|
114
181
|
/**
|
|
115
182
|
* return a new the Tile object corresponding to the given tile id
|
|
116
183
|
* @param {number} tileId - tileId
|
|
@@ -153,6 +220,6 @@ export default class TMXLayer extends Renderable {
|
|
|
153
220
|
draw(renderer: any, rect: any): void;
|
|
154
221
|
}
|
|
155
222
|
import Renderable from "../../renderable/renderable.js";
|
|
156
|
-
import CanvasRenderer from "../../video/canvas/canvas_renderer";
|
|
157
223
|
import Tile from "./TMXTile.js";
|
|
224
|
+
import CanvasRenderer from "../../video/canvas/canvas_renderer";
|
|
158
225
|
//# sourceMappingURL=TMXLayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXLayer.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXLayer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXLayer.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXLayer.js"],"names":[],"mappings":"AA2GA;;;;GAIG;AACH;IACC;;;;;;;;OAQG;IACH,iBARW,MAAM,QACN,MAAM,aACN,MAAM,cACN,MAAM,eACN,MAAM,YACN,eAAe,KACf,MAAM,EA4LhB;IArLA,eAA4C;IAC5C,gBAA+C;IAG/C,oBAA8B;IAE9B;;;;OAIG;IACH,GAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,GAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,UAFU,eAAe,CAED;IAGxB,aAAwE;IAGxE;;;MAGC;IAaD;;;OAGG;IACH,k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gC;iBAStC,cAAc;2BARJ,oCAAoC"}
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply a flip-mask transform to a Matrix2d in-place. Resets the matrix to
|
|
3
|
+
* identity first, then applies the H / V / AD operations to flip / rotate a
|
|
4
|
+
* tile of `width × height` pixels around its center.
|
|
5
|
+
*
|
|
6
|
+
* This is the typed-array equivalent of `Tile.setTileTransform()` — both share
|
|
7
|
+
* the same math, but this variant is driven by a packed 3-bit mask (H=1, V=2,
|
|
8
|
+
* AD=4) so callers that have raw layerData bytes can build a flip transform
|
|
9
|
+
* without constructing a Tile.
|
|
10
|
+
*
|
|
11
|
+
* @param {Matrix2d} transform - the matrix to fill (mutated in place)
|
|
12
|
+
* @param {number} flipMask - 3-bit packed flip mask
|
|
13
|
+
* @param {number} width - tile width in pixels
|
|
14
|
+
* @param {number} height - tile height in pixels
|
|
15
|
+
* @returns {Matrix2d} the same matrix, for chaining
|
|
16
|
+
* @ignore
|
|
17
|
+
*/
|
|
18
|
+
export function buildFlipTransform(transform: Matrix2d, flipMask: number, width: number, height: number): Matrix2d;
|
|
1
19
|
/**
|
|
2
20
|
* a basic tile object
|
|
3
21
|
* @category Tilemap
|
|
@@ -69,6 +87,6 @@ export default class Tile extends Bounds {
|
|
|
69
87
|
*/
|
|
70
88
|
getRenderable(settings?: object): Renderable;
|
|
71
89
|
}
|
|
72
|
-
import { Bounds } from "../../physics/bounds.ts";
|
|
73
90
|
import { Matrix2d } from "../../math/matrix2d.ts";
|
|
91
|
+
import { Bounds } from "../../physics/bounds.ts";
|
|
74
92
|
//# sourceMappingURL=TMXTile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXTile.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTile.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXTile.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTile.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;GAgBG;AACH,8CAPW,QAAQ,YACR,MAAM,SACN,MAAM,UACN,MAAM,GACJ,QAAQ,CAwBpB;AAED;;;GAGG;AACH;IACC;;;;;OAKG;IACH,eALW,MAAM,KACN,MAAM,OACN,MAAM,WACN,UAAU,EAkFpB;IA/DA;;;OAGG;IACH,SAFU,UAAU,CAEE;IAEtB;;;;OAIG;IACH,kBAHU,QAAQ,GAAC,IAAI,CAGK;IAE5B;;;OAGG;IACH,KAFU,MAAM,CAEJ;IAEZ;;;OAGG;IACH,KAFU,MAAM,CAEJ;IAEZ;;;OAGG;IACH,QAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,UAFU,OAAO,CAE+B;IAEhD;;;OAGG;IACH,UAFU,OAAO,CAE+B;IAEhD;;;OAGG;IACH,WAFU,OAAO,CAEiC;IAElD;;;OAGG;IACH,SAFU,OAAO,CAE8C;IAYhE;;;;OAIG;IACH,4BAHW,QAAQ,QAmBlB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,UAAU,CAmDtB;CACD;yBAlOwB,wBAAwB;uBAC1B,yBAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXTileMap.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTileMap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXTileMap.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTileMap.js"],"names":[],"mappings":"AAsIA;;;;GAIG;AACH;IACC;;;;;;;;OAQG;IACH,qBARW,MAAM,QACN,MAAM,EA0JhB;IAlJA;;;OAGG;IACH,aAAgB;IAEhB;;;OAGG;IACH,MAFU,MAAM,CAEG;IAEnB;;;OAGG;IACH,MAFU,MAAM,CAEO;IAEvB;;;OAGG;IACH,MAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,WAFU,MAAM,CAEgB;IAEhC;;;OAGG;IACH,YAFU,MAAM,CAEkB;IAElC;;;;OAIG;IACH,UAHU,MAAM,CAGmB;IAEnC;;;;OAIG;IACH,aAHU,MAAM,CAGmB;IAEnC;;;;OAIG;IACH,OAHU,MAAM,CAGe;IAE/B;;;;OAIG;IACH,OAHU,MAAM,CAGe;IAE/B;;;;;OAKG;IACH,aAHU,MAAM,CAGmC;IAEnD;;;OAGG;IACH,SAFU,MAAM,CAEgB;IAEhC;;;OAGG;IACH,cAFU,MAAM,CAE0B;IAE1C;;;OAGG;IACH,OAFU,MAAM,CAEO;IAGvB,6CAAoB;IAInB,cAAgB;IAIhB,oBAAsB;IAIvB,kBAA8C;IAG9C,iCAAmD;IAGnD,sBAAwC;IACxC,iBAAmC;IACnC,kBAAqC;IAGrC,YAAoD;IAGpD,WAA8B;IAC9B,YAAgC;IAGhC,qBAA2C;IAwB3C,qBAAwB;IAGzB;;;OAGG;IACH,eAFa,WAAW,CAUvB;IAHC,+OAAuC;IAKzC;;;OAGG;IACH,aAFa,MAAM,CAKlB;IAED;;;OAGG;IACH,gCA2DC;IAED;;;;;;;;;;;OAWG;IACH,iBATW,SAAS,YACT,OAAO,sBACP,OAAO,QA+EjB;IAED;;;;;;;;;OASG;IACH,qBAJW,OAAO,GAEL,UAAU,EAAE,CAkGxB;IAED;;;OAGG;IACH,aAFa,QAAQ,EAAE,CAMtB;IAED;;OAEG;IACH,gBAKC;CACD;4BA1kB2B,sBAAsB;sBAV5B,+BAA+B;qBAOhC,eAAe"}
|
|
@@ -197,6 +197,21 @@ export default class TMXTileset {
|
|
|
197
197
|
* @ignore
|
|
198
198
|
*/
|
|
199
199
|
drawTile(renderer: CanvasRenderer | WebGLRenderer, dx: number, dy: number, tmxTile: Tile): void;
|
|
200
|
+
/**
|
|
201
|
+
* draw a tile at the specified position from raw (gid, flipMask) data
|
|
202
|
+
*
|
|
203
|
+
* Like {@link drawTile} but bypasses the {@link Tile} object entirely:
|
|
204
|
+
* the renderer hot loop can pass the GID and flip mask straight from
|
|
205
|
+
* `layer.layerData` without ever allocating a Tile instance.
|
|
206
|
+
*
|
|
207
|
+
* @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
|
|
208
|
+
* @param {number} dx - destination x position
|
|
209
|
+
* @param {number} dy - destination y position
|
|
210
|
+
* @param {number} gid - the tile's global id (with flip bits already stripped)
|
|
211
|
+
* @param {number} flipMask - 3-bit packed flip mask (H=1, V=2, AD=4)
|
|
212
|
+
* @ignore
|
|
213
|
+
*/
|
|
214
|
+
drawTileRaw(renderer: CanvasRenderer | WebGLRenderer, dx: number, dy: number, gid: number, flipMask: number): void;
|
|
200
215
|
}
|
|
201
216
|
import { Vector2d } from "../../math/vector2d.ts";
|
|
202
217
|
//# sourceMappingURL=TMXTileset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXTileset.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTileset.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TMXTileset.d.ts","sourceRoot":"","sources":["../../../src/level/tiled/TMXTileset.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH;IACC;;;;OAIG;IACH,qBAJY,MAAM,iBACN,MAAM,kBACN,MAAM,EA8MjB;IA3MA;;;;OAIG;IACH,gBAHU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAGE;IAE/B;;;;OAIG;IACH,iBAHU,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAC,iBAAiB,CAAC,CAGzB;IAEhC;;;OAGG;IACH,UAFU,MAAM,CAEiB;IAEjC;;;OAGG;IACH,SAFU,MAAM,CAEY;IAe5B;;;OAGG;IACH,MAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,WAFU,MAAM,CAEmB;IAEnC;;;OAGG;IACH,YAFU,MAAM,CAEqB;IAErC;;;;OAIG;IACH,SAHU,MAAM,CAGsB;IAEtC;;;;OAIG;IACH,QAHU,MAAM,CAGoB;IAEpC;;;OAGG;IACH,YAFU,QAAQ,CAEc;IAEhC;;;OAGG;IACH,YAFU,OAAO,CAEM;IA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c,GAAC,aAAa,MAC5B,MAAM,MACN,MAAM,OACN,MAAM,YACN,MAAM,QA+FhB;CACD;yBA1pBwB,wBAAwB"}
|
|
@@ -62,10 +62,16 @@ export default class TMXHexagonalRenderer extends TMXRenderer {
|
|
|
62
62
|
*/
|
|
63
63
|
tileToPixelCoords(x: any, y: any, v: any): any;
|
|
64
64
|
/**
|
|
65
|
-
* draw the tile map
|
|
65
|
+
* draw the tile map (legacy entry point — accepts a fully-constructed Tile)
|
|
66
66
|
* @ignore
|
|
67
67
|
*/
|
|
68
68
|
drawTile(renderer: any, x: any, y: any, tmxTile: any): void;
|
|
69
|
+
/**
|
|
70
|
+
* draw a tile from raw (gid, flipMask, tileset) data — used by the hot
|
|
71
|
+
* rendering loop to bypass Tile construction
|
|
72
|
+
* @ignore
|
|
73
|
+
*/
|
|
74
|
+
drawTileRaw(renderer: any, x: any, y: any, gid: any, flipMask: any, tileset: any): void;
|
|
69
75
|
/**
|
|
70
76
|
* draw the tile map
|
|
71
77
|
* @ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXHexagonalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXHexagonalRenderer.js"],"names":[],"mappings":"AAmBA;;;GAGG;AACH;IACC;;OAEG;IACH,iBAFW,UAAU,EAgCpB;IA3BA,mBAA2C;IAC3C,kBAAuC;IACvC,qBAA8C;IAE9C,iBAAoB;IACpB,iBAAoB;IAUpB,oBAA0D;IAC1D,oBAA2D;IAE3D,iBAAsD;IACtD,eAAoD;IAEpD,oBAKC;IAGF;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,0DA0BC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,qCAiBC;IAED;;OAEG;IACH,sCAiBC;IAED;;OAEG;IACH,wCAiBC;IAED;;OAEG;IACH,yCAiBC;IAED;;;OAGG;IACH,+CAqFC;IAED;;;OAGG;IACH,+CAoBC;IAED;;;OAGG;IACH,4DAaC;IAED;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"TMXHexagonalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXHexagonalRenderer.js"],"names":[],"mappings":"AAmBA;;;GAGG;AACH;IACC;;OAEG;IACH,iBAFW,UAAU,EAgCpB;IA3BA,mBAA2C;IAC3C,kBAAuC;IACvC,qBAA8C;IAE9C,iBAAoB;IACpB,iBAAoB;IAUpB,oBAA0D;IAC1D,oBAA2D;IAE3D,iBAAsD;IACtD,eAAoD;IAEpD,oBAKC;IAGF;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,0DA0BC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,qCAiBC;IAED;;OAEG;IACH,sCAiBC;IAED;;OAEG;IACH,wCAiBC;IAED;;OAEG;IACH,yCAiBC;IAED;;;OAGG;IACH,+CAqFC;IAED;;;OAGG;IACH,+CAoBC;IAED;;;OAGG;IACH,4DAaC;IAED;;;;OAIG;IACH,wFAYC;IAED;;;OAGG;IACH,0DAoKC;CACD;wBA1gBuB,kBAAkB;yBAHH,2BAA2B"}
|
|
@@ -37,10 +37,16 @@ export default class TMXIsometricRenderer extends TMXRenderer {
|
|
|
37
37
|
*/
|
|
38
38
|
adjustPosition(obj: any): void;
|
|
39
39
|
/**
|
|
40
|
-
* draw the tile map
|
|
40
|
+
* draw the tile map (legacy entry point — accepts a fully-constructed Tile)
|
|
41
41
|
* @ignore
|
|
42
42
|
*/
|
|
43
43
|
drawTile(renderer: any, x: any, y: any, tmxTile: any): void;
|
|
44
|
+
/**
|
|
45
|
+
* draw a tile from raw (gid, flipMask, tileset) data — used by the hot
|
|
46
|
+
* rendering loop to bypass Tile construction
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
drawTileRaw(renderer: any, x: any, y: any, gid: any, flipMask: any, tileset: any): void;
|
|
44
50
|
/**
|
|
45
51
|
* draw the tile map
|
|
46
52
|
* @ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXIsometricRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXIsometricRenderer.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH;IACC;;OAEG;IACH,iBAFW,UAAU,EAQpB;IAHA,mBAAoC;IACpC,oBAAsC;IACtC,gBAA0C;IAG3C;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,0DASC;IAED;;;OAGG;IACH,+CAMC;IAED;;;OAGG;IACH,+CAMC;IAED;;;;OAIG;IACH,+BAWC;IAED;;;OAGG;IACH,4DASC;IAED;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"TMXIsometricRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXIsometricRenderer.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH;IACC;;OAEG;IACH,iBAFW,UAAU,EAQpB;IAHA,mBAAoC;IACpC,oBAAsC;IACtC,gBAA0C;IAG3C;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,0DASC;IAED;;;OAGG;IACH,+CAMC;IAED;;;OAGG;IACH,+CAMC;IAED;;;;OAIG;IACH,+BAWC;IAED;;;OAGG;IACH,4DASC;IAED;;;;OAIG;IACH,wFAQC;IAED;;;OAGG;IACH,0DA8HC;CACD;wBApPuB,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXObliqueRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXObliqueRenderer.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH;IAOE;;;OAGG;IACH,OAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,OAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,QAFU,MAAM,CAEsD;IAEtE;;;OAGG;IACH,QAFU,MAAM,CAEoD;IAEpE;;;OAGG;IACH,MAFU,MAAM,CAEyB;IAe1C;;;;OAIG;IACH,kBAHW,QAAQ,GACN,MAAM,CAqBlB;
|
|
1
|
+
{"version":3,"file":"TMXObliqueRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXObliqueRenderer.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH;IAOE;;;OAGG;IACH,OAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,OAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,QAFU,MAAM,CAEsD;IAEtE;;;OAGG;IACH,QAFU,MAAM,CAEoD;IAEpE;;;OAGG;IACH,MAFU,MAAM,CAEyB;IAe1C;;;;OAIG;IACH,kBAHW,QAAQ,GACN,MAAM,CAqBlB;CAgKD;kCAlPiC,4BAA4B;qBADzC,kBAAkB"}
|
|
@@ -23,10 +23,16 @@ export default class TMXOrthogonalRenderer extends TMXRenderer {
|
|
|
23
23
|
*/
|
|
24
24
|
tileToPixelCoords(x: any, y: any, v: any): any;
|
|
25
25
|
/**
|
|
26
|
-
* draw the tile map
|
|
26
|
+
* draw the tile map (legacy entry point — accepts a fully-constructed Tile)
|
|
27
27
|
* @ignore
|
|
28
28
|
*/
|
|
29
29
|
drawTile(renderer: any, x: any, y: any, tmxTile: any): void;
|
|
30
|
+
/**
|
|
31
|
+
* draw a tile from raw (gid, flipMask, tileset) data — used by the hot
|
|
32
|
+
* rendering loop to bypass Tile construction
|
|
33
|
+
* @ignore
|
|
34
|
+
*/
|
|
35
|
+
drawTileRaw(renderer: any, x: any, y: any, gid: any, flipMask: any, tileset: any): void;
|
|
30
36
|
/**
|
|
31
37
|
* draw the tile map
|
|
32
38
|
* @ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TMXOrthogonalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXOrthogonalRenderer.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IACC;;OAEG;IACH,iBAFW,UAAU,EAIpB;IAED;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,+CAGC;IAED;;;OAGG;IACH,+CAGC;IAED;;;OAGG;IACH,4DASC;IAED;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"TMXOrthogonalRenderer.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/renderer/TMXOrthogonalRenderer.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IACC;;OAEG;IACH,iBAFW,UAAU,EAIpB;IAED;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,+CAGC;IAED;;;OAGG;IACH,+CAGC;IAED;;;OAGG;IACH,4DASC;IAED;;;;OAIG;IACH,wFAQC;IAED;;;OAGG;IACH,0DA6EC;CACD;wBAxJuB,kBAAkB"}
|
|
@@ -135,12 +135,15 @@ export declare class Bounds {
|
|
|
135
135
|
*/
|
|
136
136
|
addPoint(point: Vector2d | Point, m?: Matrix2d | Matrix3d): void;
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
138
|
+
* Expands this bounds to include the axis-aligned bounding box of
|
|
139
|
+
* the given rect's four corners, optionally transformed through `m`
|
|
140
|
+
* first. With a non-identity `m` (rotation, scale, etc.) the result
|
|
141
|
+
* is the AABB of the transformed quad, not a transformed AABB.
|
|
139
142
|
* @param x0 - The left x coordinate of the quad.
|
|
140
143
|
* @param y0 - The top y coordinate of the quad.
|
|
141
144
|
* @param x1 - The right x coordinate of the quad.
|
|
142
145
|
* @param y1 - The bottom y coordinate of the quad.
|
|
143
|
-
* @param [m] - An optional transform to
|
|
146
|
+
* @param [m] - An optional transform applied to each corner before inclusion.
|
|
144
147
|
*/
|
|
145
148
|
addFrame(x0: number, y0: number, x1: number, y1: number, m?: Matrix2d | Matrix3d): void;
|
|
146
149
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bounds.d.ts","sourceRoot":"","sources":["../../src/physics/bounds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"bounds.d.ts","sourceRoot":"","sources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;IACH,KAAK;IAML;;;OAGG;IACH,SAAS;CAQT;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,yFAcrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sat.d.ts","sourceRoot":"","sources":["../../src/physics/sat.js"],"names":[],"mappings":"AAiNA;;;;;;;;;GASG;AACH,sCAPW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,aACP,QAAQ,YAAC,GACP,OAAO,CA8CnB;AAED;;;;;;;;;;GAUG;AACH,sCARW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,aACP,QAAQ,YAAC,GAEP,OAAO,
|
|
1
|
+
{"version":3,"file":"sat.d.ts","sourceRoot":"","sources":["../../src/physics/sat.js"],"names":[],"mappings":"AAiNA;;;;;;;;;GASG;AACH,sCAPW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,aACP,QAAQ,YAAC,GACP,OAAO,CA8CnB;AAED;;;;;;;;;;GAUG;AACH,sCARW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,aACP,QAAQ,YAAC,GAEP,OAAO,CAiEnB;AAED;;;;;;;;;GASG;AACH,sCAPW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,aACP,QAAQ,YAAC,GACP,OAAO,CAsKnB;AAED;;;;;;;;;;;;GAYG;AACH,sCARW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,YAClD,OAAO,KACP,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,SAClD,OAAO,aACP,QAAQ,YAAC,GAEP,OAAO,CAiBnB;4BAvhB0B,+BAA+B;2BADhC,8BAA8B;wBADjC,kCAAkC;wBAGlC,2BAA2B;iCAClB,oCAAoC;6BAC1C,0BAA0B;6BAC1B,4BAA4B"}
|
package/build/physics/world.d.ts
CHANGED
|
@@ -51,6 +51,22 @@ export default class World extends Container {
|
|
|
51
51
|
* @default false
|
|
52
52
|
*/
|
|
53
53
|
preRender: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Enable the WebGL2 procedural shader path for orthogonal tile
|
|
56
|
+
* layers. When `true` (default), eligible layers render via a
|
|
57
|
+
* single quad per tileset + a fragment shader doing per-pixel GID
|
|
58
|
+
* lookup — bypassing the per-tile drawImage loop entirely.
|
|
59
|
+
* Supported features on the shader path: animated tiles, all
|
|
60
|
+
* three flip bits (H/V/AD), per-layer opacity/tint/blend mode,
|
|
61
|
+
* and oversized bottom-aligned tiles up to 4 cells of overflow.
|
|
62
|
+
* Layers that don't qualify (Canvas/WebGL1, non-orthogonal,
|
|
63
|
+
* collection-of-image tilesets, non-zero `tileoffset`, or tile
|
|
64
|
+
* overflow beyond the shader's 4-cell limit) fall back to the
|
|
65
|
+
* legacy path automatically. Set to `false` to disable globally.
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
gpuTilemap: boolean;
|
|
54
70
|
/**
|
|
55
71
|
* the active physic bodies in this simulation
|
|
56
72
|
* @type {Set<Body>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/physics/world.js"],"names":[],"mappings":"AAeA;;;GAGG;AAEH;;;GAGG;AACH;IACC;;;;;OAKG;IACH,gBALW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,
|
|
1
|
+
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/physics/world.js"],"names":[],"mappings":"AAeA;;;GAGG;AAEH;;;GAGG;AACH;IACC;;;;;OAKG;IACH,gBALW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,EAsGhB;IA1FA;;;OAGG;IACH,KAFU,WAAW,CAED;IAEpB;;;;;;;;OAQG;IACH,QANU,MAAM,CAMO;IAEvB;;;;;OAKG;IACH,YAAa;IAEb;;;;OAIG;IACH,SAHU,QAAQ,CAGkB;IAEpC;;;;;;;OAOG;IACH,WAHU,OAAO,CAGK;IAEtB;;;;;;;;;;;;;;OAcG;IACH,YAHU,OAAO,CAGK;IAEtB;;;OAGG;IACH,QAFU,GAAG,CAAC,IAAI,CAAC,CAEI;IAEvB;;;OAGG;IACH,YAFU,QAAQ,CAOjB;IAED;;;OAGG;IACH,UAFU,QAAQ,CAEgB;IA6CnC;;;;;OAKG;IACH,cAHW,IAAI,GACF,KAAK,CAQjB;IAED;;;;;OAKG;IACH,iBAHW,IAAI,GACF,KAAK,CAQjB;IAED;;;;OAIG;IACH,yBASC;IAuBD;;;OAGG;IACH,SAFW,MAAM,QAiChB;CACD;sBAzQqB,4BAA4B;6BActB,iCAAiC;yBAfpC,qBAAqB;sBAgBzB,WAAW;qBAJX,eAAe;qBADf,eAAe"}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* Container represents a collection of child objects.
|
|
25
25
|
* When no explicit dimensions are given, width and height default to Infinity,
|
|
26
26
|
* meaning the container has no intrinsic size, no clipping, and acts as a pure
|
|
27
|
-
* grouping/transform node
|
|
27
|
+
* grouping/transform node.
|
|
28
28
|
* In this case, anchorPoint is treated as (0, 0) since there is no meaningful
|
|
29
29
|
* center for an infinite area. Bounds are then derived entirely from children
|
|
30
30
|
* when {@link Container#enableChildBoundsUpdate} is enabled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/renderable/container.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;;GASG;AACH;IACC;;;;;;;OAOG;IACH,gBAPW,MAAM,MACN,MAAM,UACN,MAAM,WACN,MAAM,SACN,OAAO,EAgHjB;IAzGA;;;OAGG;IACH,iBAAuB;IAEvB;;;;OAIG;IACH,MAHU,OAAO,CAGD;IAEhB;;;OAGG;IACH,4BAAyB;IAEzB;;;;;OAKG;IACH,SAHU,MAAM,CAGE;IAClB,wCAA8B;IAE9B;;;;OAIG;IACH,UAHU,OAAO,CAGG;IAEpB;;;;OAIG;IACH,WAHU,OAAO,CAGI;IAErB;;;;OAIG;IACH,UAHU,OAAO,CAGI;IAErB;;;OAGG;IACH,0BAEC;IAED;;;;;;OAMG;IACH,yBAHU,OAAO,CAGmB;IAEpC;;;;;;;OAOG;IACH,iBANU,KAAK,CAMmC;IAElD;;;OAGG;IACH,kBAAkB;IAoCnB,kBANU,MAAM,EAef;IAlBD;;;;;OAKG;IACH,cAHU,MAAM,CAKf;IAYD;;OAEG;IACH,cAmBC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAJW,UAAU,GAAC,MAAM,GAAC,MAAM,GAAC,WAAW,GAAC,OAAO,GAAC,SAAS,GAAC,UAAU,GAAC,eAAe,GAAC,UAAU,GAAC,UAAU,GAAC,OAAO,GAAC,aAAa,GAAC,eAAe,GAAC,YAAY,GAAC,IAAI,GAAC,UAAU,MAC1K,MAAM,GACJ,UAAU,CAwEtB;IAED;;;;;;OAMG;IACH,kBAJW,UAAU,GAAC,MAAM,GAAC,MAAM,GAAC,WAAW,GAAC,OAAO,GAAC,SAAS,GAAC,UAAU,GAAC,eAAe,GAAC,UAAU,GAAC,UAAU,GAAC,OAAO,GAAC,aAAa,GAAC,e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 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* additional import for TypeScript
|
|
3
|
+
* @import {Color} from "./../math/color.ts";
|
|
4
|
+
* @import {Ellipse} from "./../geometries/ellipse.ts";
|
|
5
|
+
* @import Renderer from "./../video/renderer.js";
|
|
6
|
+
*/
|
|
1
7
|
/**
|
|
2
8
|
* A 2D point light.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
9
|
+
*
|
|
10
|
+
* Light2d carries the *properties* of a light (color, radii, intensity,
|
|
11
|
+
* height, flags, position) and asks the active renderer to render it
|
|
12
|
+
* via `renderer.drawLight(this)`. The renderer picks the right machinery:
|
|
13
|
+
*
|
|
14
|
+
* - **WebGL**: a single quad through a shared procedural radial-falloff
|
|
15
|
+
* fragment shader (`RadialGradientEffect`). One shader is reused across
|
|
16
|
+
* every Light2d on the renderer; no per-light texture is allocated.
|
|
17
|
+
* - **Canvas**: a small `Gradient` config object (cached per-light in a
|
|
18
|
+
* `WeakMap` and rebuilt only when radii / color / intensity change),
|
|
19
|
+
* rasterized via `Gradient.toCanvas()` on every draw into a single
|
|
20
|
+
* shared `CanvasRenderTarget`, then composited with `drawImage`. The
|
|
21
|
+
* per-light cache holds only the gradient stops, not the bitmap — the
|
|
22
|
+
* render target is one-per-engine.
|
|
23
|
+
*
|
|
24
|
+
* Light2d itself is renderer-agnostic — no shader knowledge, no canvas
|
|
25
|
+
* allocation, no renderer reference held.
|
|
6
26
|
* @see stage.lights
|
|
7
27
|
*/
|
|
8
28
|
export default class Light2d extends Renderable {
|
|
9
29
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
30
|
+
* Create a 2D point light.
|
|
31
|
+
*
|
|
32
|
+
* A `Light2d` is a first-class world Renderable: add it to a container
|
|
33
|
+
* with `app.world.addChild(light)` (or any sub-container, including a
|
|
34
|
+
* `Sprite`, so the light follows the parent via its transform). On
|
|
35
|
+
* activation, the light auto-registers with the active `Stage`'s
|
|
36
|
+
* lighting set so the ambient overlay (`Stage.ambientLight`) cuts a
|
|
37
|
+
* hole at the light's visible area, and a radial gradient from the
|
|
38
|
+
* given `color` (full intensity at center → fully transparent at the
|
|
39
|
+
* radius) is composited additively on top — producing a soft spot
|
|
40
|
+
* light. Rendering happens inside each `Camera2d`'s post-effect FBO
|
|
41
|
+
* bracket so any camera shader (vignette, color-matrix, scanlines,
|
|
42
|
+
* etc.) wraps the lighting output.
|
|
43
|
+
*
|
|
44
|
+
* Set `radiusY` to a different value than `radiusX` for a stretched
|
|
45
|
+
* (elliptical) light. The `intensity` parameter scales the gradient's
|
|
46
|
+
* inner alpha; the `Stage.ambientLight` color and alpha control how
|
|
47
|
+
* dark the unlit areas are. Use `light.blendMode` to override the
|
|
48
|
+
* default additive blend if needed.
|
|
49
|
+
* @param {number} x - The horizontal position of the light's center (matches `Ellipse(x, y, w, h)` conventions).
|
|
50
|
+
* @param {number} y - The vertical position of the light's center.
|
|
12
51
|
* @param {number} radiusX - The horizontal radius of the light.
|
|
13
52
|
* @param {number} [radiusY=radiusX] - The vertical radius of the light.
|
|
14
|
-
* @param {Color|string} [color="#FFF"] -
|
|
15
|
-
* @param {number} [intensity=0.7] - The
|
|
53
|
+
* @param {Color|string} [color="#FFF"] - The color of the light at full intensity.
|
|
54
|
+
* @param {number} [intensity=0.7] - The peak alpha of the radial gradient at the light's center (0–1).
|
|
16
55
|
*/
|
|
17
56
|
constructor(x: number, y: number, radiusX: number, radiusY?: number, color?: Color | string, intensity?: number);
|
|
18
57
|
/**
|
|
@@ -39,25 +78,98 @@ export default class Light2d extends Renderable {
|
|
|
39
78
|
intensity: number;
|
|
40
79
|
/** @ignore */
|
|
41
80
|
visibleArea: Ellipse;
|
|
42
|
-
/** @ignore */
|
|
43
|
-
texture: CanvasRenderTarget;
|
|
44
81
|
/**
|
|
45
|
-
*
|
|
82
|
+
* When `true`, this light acts as a pure illumination source —
|
|
83
|
+
* the gradient texture isn't drawn. The light still feeds the
|
|
84
|
+
* `Stage` ambient-cutout pass and the WebGL lit-sprite
|
|
85
|
+
* pipeline's per-frame uniforms, so normal-mapped sprites still
|
|
86
|
+
* get shaded by it. Use this for SpriteIlluminator-style demos
|
|
87
|
+
* where the light should be invisible (only its effect on
|
|
88
|
+
* normal-mapped surfaces is what you want to see).
|
|
89
|
+
*
|
|
90
|
+
* Default `false`, preserving the legacy "soft glowing spot"
|
|
91
|
+
* behavior.
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
illuminationOnly: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Light height above the sprite plane (Z axis), in the same
|
|
98
|
+
* units as `radiusX`/`radiusY`. Used by the WebGL lit-sprite
|
|
99
|
+
* pipeline as the Z component of the light direction in the
|
|
100
|
+
* `dot(normal, lightDir)` calculation: a low height makes the
|
|
101
|
+
* lighting graze across the surface (long visible shadows on
|
|
102
|
+
* normal-map detail), a high height makes it head-on (more
|
|
103
|
+
* uniform brightness on the lit hemisphere).
|
|
104
|
+
*
|
|
105
|
+
* Default is `max(radiusX, radiusY) * 0.075` — a balanced look
|
|
106
|
+
* at the asset's native scale that prevents lights at the
|
|
107
|
+
* sprite's center from producing degenerate flat shading.
|
|
108
|
+
*
|
|
109
|
+
* Named `lightHeight` (not just `height`) to avoid colliding
|
|
110
|
+
* with the bbox-height getter Light2d inherits from `Rect`.
|
|
111
|
+
* @type {number}
|
|
112
|
+
*/
|
|
113
|
+
lightHeight: number;
|
|
114
|
+
/**
|
|
115
|
+
* Set new radii for this light.
|
|
116
|
+
*
|
|
117
|
+
* Updates `radiusX`/`radiusY` and the underlying bbox (via
|
|
118
|
+
* `Renderable.resize(width, height)`) so `getBounds()` and
|
|
119
|
+
* `getVisibleArea()` — which feed the ambient-cutout pass — track the
|
|
120
|
+
* new size. The Canvas renderer's gradient cache auto-invalidates on
|
|
121
|
+
* next draw via its property comparison; the WebGL procedural shader
|
|
122
|
+
* adapts to the new dimensions automatically.
|
|
123
|
+
*
|
|
124
|
+
* Named `setRadii` (not `resize`) so it does not shadow
|
|
125
|
+
* `Renderable.resize(width, height)` — code that operates on a
|
|
126
|
+
* generic `Renderable` and calls `.resize(w, h)` keeps working when
|
|
127
|
+
* the instance happens to be a `Light2d`.
|
|
128
|
+
* @param {number} radiusX - new horizontal radius
|
|
129
|
+
* @param {number} [radiusY=radiusX] - new vertical radius
|
|
130
|
+
*/
|
|
131
|
+
setRadii(radiusX: number, radiusY?: number): void;
|
|
132
|
+
/**
|
|
133
|
+
* returns a geometry representing the visible area of this light, in
|
|
134
|
+
* world-space coordinates (so it aligns with the rendered gradient
|
|
135
|
+
* regardless of camera scroll or container parenting).
|
|
46
136
|
* @returns {Ellipse} the light visible mask
|
|
47
137
|
*/
|
|
48
138
|
getVisibleArea(): Ellipse;
|
|
49
139
|
/**
|
|
50
140
|
* update function
|
|
51
|
-
* @param {number} dt - time since the last update in milliseconds.
|
|
52
141
|
* @returns {boolean} true if dirty
|
|
53
142
|
*/
|
|
54
143
|
update(): boolean;
|
|
55
144
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @param {
|
|
58
|
-
|
|
145
|
+
* preDraw this Light2d (automatically called by melonJS)
|
|
146
|
+
* @param {Renderer} renderer - a renderer instance
|
|
147
|
+
*/
|
|
148
|
+
preDraw(renderer: Renderer): void;
|
|
149
|
+
/**
|
|
150
|
+
* draw this Light2d (automatically called by melonJS).
|
|
151
|
+
*
|
|
152
|
+
* Delegates to `renderer.drawLight(this)` — each renderer picks its
|
|
153
|
+
* own implementation (procedural shader on WebGL; cached `Gradient`
|
|
154
|
+
* rasterized into a shared `CanvasRenderTarget` on Canvas). Light2d
|
|
155
|
+
* itself doesn't know which path is used.
|
|
156
|
+
* @param {Renderer} renderer - a renderer instance
|
|
157
|
+
*/
|
|
158
|
+
draw(renderer: Renderer): void;
|
|
159
|
+
/**
|
|
160
|
+
* Auto-register this light with the active Stage's lighting set when
|
|
161
|
+
* added to a container. The Stage uses that set to build the ambient
|
|
162
|
+
* overlay cutouts; rendering the light itself is handled normally as
|
|
163
|
+
* part of the world tree walk.
|
|
164
|
+
* @ignore
|
|
165
|
+
*/
|
|
166
|
+
onActivateEvent(): void;
|
|
167
|
+
/**
|
|
168
|
+
* Auto-deregister this light from the active Stage's lighting set when
|
|
169
|
+
* removed from a container.
|
|
170
|
+
* @ignore
|
|
59
171
|
*/
|
|
60
|
-
|
|
172
|
+
onDeactivateEvent(): void;
|
|
61
173
|
/**
|
|
62
174
|
* Destroy function<br>
|
|
63
175
|
* @ignore
|
|
@@ -67,7 +179,5 @@ export default class Light2d extends Renderable {
|
|
|
67
179
|
import Renderable from "./renderable.js";
|
|
68
180
|
import type { Color } from "./../math/color.ts";
|
|
69
181
|
import type { Ellipse } from "./../geometries/ellipse.ts";
|
|
70
|
-
import
|
|
71
|
-
import type CanvasRenderer from "./../video/canvas/canvas_renderer.js";
|
|
72
|
-
import type WebGLRenderer from "./../video/webgl/webgl_renderer.js";
|
|
182
|
+
import type Renderer from "./../video/renderer.js";
|
|
73
183
|
//# sourceMappingURL=light2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light2d.d.ts","sourceRoot":"","sources":["../../src/renderable/light2d.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"light2d.d.ts","sourceRoot":"","sources":["../../src/renderable/light2d.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,eAPW,MAAM,KACN,MAAM,WACN,MAAM,YACN,MAAM,UACN,KAAK,GAAC,MAAM,cACZ,MAAM,EAiGhB;IAlFA;;;;OAIG;IACH,OAHU,KAAK,CAG6B;IAE5C;;;OAGG;IACH,SAFU,MAAM,CAEM;IAEtB;;;OAGG;IACH,SAFU,MAAM,CAEM;IAEtB;;;;OAIG;IACH,WAHU,MAAM,CAGU;IAa1B,cAAc;IACd,qBAKC;IAKD;;;;;;;;;;;;;OAaG;IACH,kBAHU,OAAO,CAGY;IAE7B;;;;;;;;;;;;;;;;OAgBG;IACH,aAFU,MAAM,CAEqC;IAiCtD;;;;;;;;;;;;;;;;OAgBG;IACH,kBAHW,MAAM,YACN,MAAM,QAMhB;IAED;;;;;OAKG;IACH,kBAFa,OAAO,CAOnB;IAED;;;OAGG;IACH,UAFa,OAAO,CAInB;IAED;;;OAGG;IACH,kBAFW,QAAQ,QAKlB;IAED;;;;;;;;OAQG;IACH,eAFW,QAAQ,QAOlB;IAED;;;;;;OAMG;IACH,wBAKC;IAED;;;;OAIG;IACH,0BAKC;IAED;;;OAGG;IACH,gBAQC;CACD;uBArSsB,iBAAiB;2BAIhB,oBAAoB;6BAClB,4BAA4B;0BAC7B,wBAAwB"}
|