melonjs 19.3.0 → 19.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -2
- 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 +37 -2
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/audio.d.ts +77 -253
- package/build/audio/audio.d.ts.map +1 -1
- package/build/audio/backend.d.ts +121 -0
- package/build/audio/backend.d.ts.map +1 -0
- package/build/audio/playback.d.ts +157 -0
- package/build/audio/playback.d.ts.map +1 -0
- package/build/audio/procedural.d.ts +105 -0
- package/build/audio/procedural.d.ts.map +1 -0
- package/build/audio/types.d.ts +205 -0
- package/build/audio/types.d.ts.map +1 -0
- package/build/index.d.ts +6 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3334 -498
- 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 +27 -0
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +1 -1
- package/build/level/tiled/factories/shape.d.ts.map +1 -1
- package/build/level/tiled/factories/tile.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/loader/loader.d.ts +2 -2
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/parsers/aseprite.d.ts +37 -0
- package/build/loader/parsers/aseprite.d.ts.map +1 -0
- package/build/physics/adapter.d.ts +560 -0
- package/build/physics/adapter.d.ts.map +1 -0
- package/build/physics/bounds.d.ts +18 -5
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/builtin/body.d.ts +605 -0
- package/build/physics/builtin/body.d.ts.map +1 -0
- package/build/physics/builtin/builtin-adapter.d.ts +91 -0
- package/build/physics/builtin/builtin-adapter.d.ts.map +1 -0
- package/build/physics/builtin/detector.d.ts +167 -0
- package/build/physics/builtin/detector.d.ts.map +1 -0
- package/build/physics/builtin/quadtree.d.ts +112 -0
- package/build/physics/builtin/quadtree.d.ts.map +1 -0
- package/build/physics/builtin/raycast.d.ts +4 -0
- package/build/physics/builtin/raycast.d.ts.map +1 -0
- package/build/physics/{sat.d.ts → builtin/sat.d.ts} +7 -7
- package/build/physics/builtin/sat.d.ts.map +1 -0
- package/build/physics/world.d.ts +77 -26
- package/build/physics/world.d.ts.map +1 -1
- package/build/renderable/collectable.d.ts +7 -1
- package/build/renderable/collectable.d.ts.map +1 -1
- package/build/renderable/container.d.ts +0 -13
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +78 -17
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/trigger.d.ts +14 -1
- package/build/renderable/trigger.d.ts.map +1 -1
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/system/timer.d.ts +0 -5
- package/build/system/timer.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/canvas/canvas_renderer.d.ts +0 -130
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/renderer.d.ts +126 -1
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.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/material_batcher.d.ts +8 -1
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
- package/build/video/webgl/effects/shine.d.ts +87 -0
- package/build/video/webgl/effects/shine.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/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 +19 -106
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/package.json +1 -1
- package/build/physics/body.d.ts +0 -351
- package/build/physics/body.d.ts.map +0 -1
- package/build/physics/detector.d.ts +0 -72
- package/build/physics/detector.d.ts.map +0 -1
- package/build/physics/quadtree.d.ts +0 -69
- package/build/physics/quadtree.d.ts.map +0 -1
- package/build/physics/sat.d.ts.map +0 -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,kBAFU,UAAU,EAAE,CAEI;IAE1B;;;OAGG;IACH,YAFU,OAAO,CAEM;IAEvB;;;;;OAKG;IACH,aAHU,MAAM,CAGmC;IAEnD;;;OAGG;IACH,OAFU,MAAM,CAEO;IASvB,UAAqB;IACrB,aAAuB;IACvB,aAAwB;IA8BxB;;;;;;;;;OASG;IACH,WAFU,WAAW,CAEsC;IAE3D;;;;;;;;;;;OAWG;IACH,YAHU,KAAK,CAAC,IAAI,GAAC,IAAI,CAAC,GAAC,IAAI,CAGT;IAEtB;;;;;OAKG;IACH,aAFU,MAAM,CAEI;IAEpB;;;;;;;;;;;;;;OAcG;IACH,YAHU,MAAM,CAGQ;IAwBzB,wBAkCC;IAfC,2CAKE;IAOH,+BAAgD;IAKjD;;;;;;;OAOG;IACH,2BAqDC;IAED;;;;;;OAMG;IACH,kCALW,MAAM,cACN,OAAO,GACL;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAC,CA+C1C;IAGD,0BAOC;IAED;;;;;;;OAOG;IACH,sBANW,WAAW,QASrB;IAFA,cAAwB;IAIzB;;;OAGG;IACH,eAFa,WAAW,CAIvB;IAED;;;;;OAKG;IACH,aAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAKlB;IAED;;;;;;;;;;OAUG;IACH,WATW,MAAM,KACN,MAAM,GACJ,IAAI,CAoBhB;IAED;;;;;;OAMG;IACH,cALW,IAAI,KACJ,MAAM,KACN,MAAM,GACJ,IAAI,CA4BhB;IAfC,uCAA6B;IAiB/B;;;;;;OAMG;IACH,oBALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,IAAI,CAQhB;IAED;;;;;;;;;OASG;IACH,UARW,MAAM,KACN,MAAM,gBACN,MAAM,GACJ,IAAI,CA6ChB;IAED;;;;;;;;;OASG;IACH,aARW,MAAM,KACN,MAAM,QA8BhB;IAED;;;OAGG;IACH,yBAQC;IAED;;;OAGG;IACH,qCAIC;CACD;uBAlrBsB,gCAAgC;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,CA4GxB;IAED;;;OAGG;IACH,aAFa,QAAQ,EAAE,CAMtB;IAED;;OAEG;IACH,gBAKC;CACD;4BAplB2B,sBAAsB;sBAV5B,+BAA+B;qBAOhC,eAAe"}
|
|
@@ -135,6 +135,18 @@ export default class TMXTileset {
|
|
|
135
135
|
* @private
|
|
136
136
|
*/
|
|
137
137
|
private _lastUpdate;
|
|
138
|
+
/**
|
|
139
|
+
* If `tileset.image` was loaded via the .aseprite binary parser, walk
|
|
140
|
+
* its `meta.frameTags` and synthesize per-tile animations. Each tag
|
|
141
|
+
* `{ from, to }` becomes an animation on tile `from` that cycles through
|
|
142
|
+
* tiles `[from..to]` using each frame's `duration`.
|
|
143
|
+
*
|
|
144
|
+
* Throws on tag configurations that don't map to Tiled's animation model:
|
|
145
|
+
* non-forward direction (Tiled animations are forward-only) and non-zero
|
|
146
|
+
* repeat counts (Tiled animations loop forever).
|
|
147
|
+
* @ignore
|
|
148
|
+
*/
|
|
149
|
+
_applyAsepriteFrameTags(tileset: any): void;
|
|
138
150
|
/**
|
|
139
151
|
* Parse individual tile entries for animations, properties, and images.
|
|
140
152
|
* @param {object[]|object} [tiles] - tile entries (array in JSON, object in XML)
|
|
@@ -197,6 +209,21 @@ export default class TMXTileset {
|
|
|
197
209
|
* @ignore
|
|
198
210
|
*/
|
|
199
211
|
drawTile(renderer: CanvasRenderer | WebGLRenderer, dx: number, dy: number, tmxTile: Tile): void;
|
|
212
|
+
/**
|
|
213
|
+
* draw a tile at the specified position from raw (gid, flipMask) data
|
|
214
|
+
*
|
|
215
|
+
* Like {@link drawTile} but bypasses the {@link Tile} object entirely:
|
|
216
|
+
* the renderer hot loop can pass the GID and flip mask straight from
|
|
217
|
+
* `layer.layerData` without ever allocating a Tile instance.
|
|
218
|
+
*
|
|
219
|
+
* @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
|
|
220
|
+
* @param {number} dx - destination x position
|
|
221
|
+
* @param {number} dy - destination y position
|
|
222
|
+
* @param {number} gid - the tile's global id (with flip bits already stripped)
|
|
223
|
+
* @param {number} flipMask - 3-bit packed flip mask (H=1, V=2, AD=4)
|
|
224
|
+
* @ignore
|
|
225
|
+
*/
|
|
226
|
+
drawTileRaw(renderer: CanvasRenderer | WebGLRenderer, dx: number, dy: number, gid: number, flipMask: number): void;
|
|
200
227
|
}
|
|
201
228
|
import { Vector2d } from "../../math/vector2d.ts";
|
|
202
229
|
//# 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,EAoNjB;IAjNA;;;;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;IAEvB;;;OAGG;IACH,cAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,OAFU,MAAM,CAE0B;IAE1C;;;;OAIG;IACH,gBAHU,MAAM,CAGsC;IAEtD;;;;OAIG;IACH,UAHU,MAAM,CAG6B;IAE7C;;;;OAIG;IACH,cAHU,MAAM,CAGkC;IAElD;;;;OAIG;IACH,eAHU,MAAM,CAGqC;IAErD;;;OAGG;IACH,sBAAsB;IACtB,sBAAsB;IACtB,kBAA+B;IAC/B,kBAAgC;IAChC,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IAsBxB;;;;OAIG;IACH,cAHU,GAAG,CAAC,MAAM,EAAE;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC,CAG/C;IAE7B;;;;OAIG;IACH,mBAA2B;IAE3B;;;OAGG;IACH,oBAAoB;IAsCrB;;;;;;;;;;OAUG;IACH,4CAgEC;IAED;;;;OAIG;IACH,oBAHW,MAAM,EAAE,GAAC,MAAM,QA2GzB;IAED;;;;OAIG;IACH,oBAHW,MAAM,QA0ChB;IArCA,WAAoC;IASpC,aAKE;IACF,WAAoC;IAwBrC;;;;OAIG;IACH,kBAHW,MAAM,GACJ,gBAAgB,GAAC,iBAAiB,GAAC,SAAS,CAIxD;IAED;;;;;OAKG;IACH,qBAJW,MAAM,QACN,MAAM,QAKhB;IAED;;;;OAIG;IACH,cAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,MAAM,CAYlB;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,GAAC,SAAS,CAI5B;IAED;;;;;OAKG;IACH,WAJW,MAAM,GACJ,OAAO,CAwBnB;IAED;;;;;;;OAOG;IACH,mBANW,cAAc,GAAC,aAAa,MAC5B,MAAM,MACN,MAAM,WACN,IAAI,QAqFd;IAED;;;;;;;;;;;;;OAaG;IACH,sBAPW,cAAc,GAAC,aAAa,MAC5B,MAAM,MACN,MAAM,OACN,MAAM,YACN,MAAM,QA+FhB;CACD;yBA7uBwB,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shape.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/factories/shape.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,4CAJW,MAAM,GACJ,UAAU,
|
|
1
|
+
{"version":3,"file":"shape.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/factories/shape.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,4CAJW,MAAM,GACJ,UAAU,CAqCtB;uBA3CsB,mCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/factories/tile.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tile.d.ts","sourceRoot":"","sources":["../../../../src/level/tiled/factories/tile.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,2CAJW,MAAM,GACJ,UAAU,CAgBtB"}
|
|
@@ -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"}
|
package/build/loader/loader.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export function setOptions(options: {
|
|
|
32
32
|
* @name setBaseURL
|
|
33
33
|
* @memberof loader
|
|
34
34
|
* @public
|
|
35
|
-
* @param {string} type - "*", "audio", "video", "binary", "image", "json", "js", "tmx", "tsx", "fontface"
|
|
35
|
+
* @param {string} type - "*", "audio", "video", "binary", "image", "json", "js", "tmx", "tsx", "fontface", "aseprite"
|
|
36
36
|
* @param {string} [url="./"] - default base URL
|
|
37
37
|
* @example
|
|
38
38
|
* // change the base URL relative address for audio assets
|
|
@@ -47,7 +47,7 @@ export function setBaseURL(type: string, url?: string): void;
|
|
|
47
47
|
* @typedef {object} Asset
|
|
48
48
|
* @memberof loader
|
|
49
49
|
* @property {string} name - name of the asset
|
|
50
|
-
* @property {string} type - the type of the asset ("audio"|"binary"|"image"|"json"|"js"|"tmx"|"tmj"|"tsx"|"tsj"|"fontface"|"video")
|
|
50
|
+
* @property {string} type - the type of the asset ("audio"|"binary"|"image"|"json"|"js"|"tmx"|"tmj"|"tsx"|"tsj"|"fontface"|"video"|"aseprite")
|
|
51
51
|
* @property {string|string[]} [src] - path and/or file name of the resource (for audio assets only the path is required).
|
|
52
52
|
* For image assets, an array of sources can be provided as a fallback chain (e.g. compressed texture formats by priority, with a PNG fallback).
|
|
53
53
|
* The loader will try each source in order and use the first one that loads successfully.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.js"],"names":[],"mappings":"AAmFA;;;GAGG;AACH,mDAEC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,oCAdG;IAAyB,WAAW;IACV,OAAO;IACP,eAAe;CACzC,QAqBF;AAED;;;;;;;;;;;;;;GAcG;AACH,iCATW,MAAM,QACN,MAAM,QAwBhB;AAiID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,gCAnBW,MAAM,4BA6BhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,gCA3CW,KAAK,EAAE,2CAEP,OAAO,QAiFjB;AAED;;;;;;;;;;;;;;;IAeI;AACJ,4BAbW,MAAM,QAqChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,4BA3BW,KAAK,0CAGH,MAAM,CA4DlB;AAED;;;;;;;GAOG;AACH,8BALW,KAAK,GACH,OAAO,CAiGnB;AAED;;;;;GAKG;AACH,kCAqFC;AAED;;;;;;GAMG;AACH,4BAJW,MAAM,GACJ,MAAM,CAUlB;AAED;;;;;;GAMG;AACH,+BAJW,MAAM,GACJ,MAAM,CAUlB;AAED;;;;;;GAMG;AACH,gCAJW,MAAM,GACJ,gBAAgB,GAAC,eAAe,GAAC,IAAI,CAWjD;AAED;;;;;;GAMG;AACH,6BAJW,MAAM,GACJ,IAAI,CAUhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,4BA1BW,MAAM,GACJ,MAAM,CAgClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,4BA1BW,MAAM,GACJ,MAAM,CA+BlB;AAED;;;;;;GAMG;AACH,8BAJW,MAAM,GACJ,gBAAgB,CAU5B;AAED;;;;;;GAMG;AACH,6BAJW,MAAM,GACJ,QAAQ,CAUpB;AAh4BD;;;GAGG;AAGH,2BAAwB;AAExB;;GAEG;AACH;;EAA0B;AAE1B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAbU,MAAM,CAaO;AAEvB;;;;;;;;;;;;;;;;GAgBG;AACH,4BAbU,OAAO,CAakB;AAyEnC;;;;;;;;;GASG;AACH,4BAAkB;AAElB;;;;;;;;;;;GAWG;AACH,gCAAsB;AAEtB;;;;;;;;;;GAUG;AACH,6BAAmB;;;;oBA4FN,MAAM"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a raw .aseprite ArrayBuffer into a composited bitmap and an atlas-style
|
|
3
|
+
* JSON sidecar. Exported for advanced use cases (e.g. runtime-generated sprites)
|
|
4
|
+
* — the preload path below is the usual entry point.
|
|
5
|
+
*/
|
|
6
|
+
export function parseAseprite(buffer: any, imageName?: string): Promise<{
|
|
7
|
+
bitmap: any;
|
|
8
|
+
json: {
|
|
9
|
+
frames: {};
|
|
10
|
+
meta: {
|
|
11
|
+
app: string;
|
|
12
|
+
version: string;
|
|
13
|
+
image: any;
|
|
14
|
+
format: string;
|
|
15
|
+
size: {
|
|
16
|
+
w: number;
|
|
17
|
+
h: any;
|
|
18
|
+
};
|
|
19
|
+
scale: string;
|
|
20
|
+
frameTags: any;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* preload an .aseprite binary file: fetches the file, parses + composites it,
|
|
26
|
+
* then stores the resulting bitmap in `imgList` and the JSON sidecar in
|
|
27
|
+
* `jsonList` under the same asset name — so TextureAtlas, TMXTileset, etc.
|
|
28
|
+
* can resolve it via the usual getImage() / getJSON() lookups.
|
|
29
|
+
* @param {loader.Asset} data - asset descriptor
|
|
30
|
+
* @param {Function} [onload]
|
|
31
|
+
* @param {Function} [onerror]
|
|
32
|
+
* @param {Object} [settings]
|
|
33
|
+
* @returns {number}
|
|
34
|
+
* @ignore
|
|
35
|
+
*/
|
|
36
|
+
export function preloadAseprite(data: loader.Asset, onload?: Function, onerror?: Function, settings?: Object): number;
|
|
37
|
+
//# sourceMappingURL=aseprite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aseprite.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/aseprite.js"],"names":[],"mappings":"AA+gBA;;;;GAIG;AACH;;;;;;;;;;;;;;;;;GAMC;AAED;;;;;;;;;;;GAWG;AACH,sCAPW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CAwBlB"}
|