@flare-engine/assets 0.2.1 → 0.3.1

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/dist/index.js CHANGED
@@ -1,282 +1,392 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _flare_engine_events = require("@flare-engine/events");
3
+ //#region src/asset-manager.ts
4
+ /**
5
+ * AssetManager — loads, caches, and provides access to game assets.
6
+ *
7
+ * Platform-agnostic: the actual loading is delegated to an `AssetLoader`
8
+ * function injected at construction. This allows Skia-dependent texture
9
+ * loading to live in the React layer while keeping this module testable.
10
+ */
11
+ var AssetManager = class {
12
+ /** Fires on each asset loaded with current progress (0-1). */
13
+ onProgress = new _flare_engine_events.Signal();
14
+ /** Current loading progress 0-1. */
15
+ progress = 0;
16
+ _assets = /* @__PURE__ */ new Map();
17
+ _loader;
18
+ constructor(loader) {
19
+ this._loader = loader;
20
+ }
21
+ /**
22
+ * Load all assets in the manifest.
23
+ * Resolves when all assets are loaded and cached.
24
+ */
25
+ async load(manifest) {
26
+ if (manifest.length === 0) {
27
+ this.progress = 1;
28
+ this.onProgress.emit(1);
29
+ return;
30
+ }
31
+ let loaded = 0;
32
+ const total = manifest.length;
33
+ const promises = manifest.map(async (entry) => {
34
+ const asset = await this._loader(entry);
35
+ this._assets.set(entry.key, asset);
36
+ loaded++;
37
+ this.progress = loaded / total;
38
+ this.onProgress.emit(this.progress);
39
+ });
40
+ await Promise.all(promises);
41
+ }
42
+ /**
43
+ * Load all assets without rejecting on the first failure. Successful assets
44
+ * are cached; failures are collected and returned. Progress still advances to
45
+ * 1 once every entry has settled. Prefer this over {@link load} when a partial
46
+ * asset set is acceptable (e.g. optional/decorative assets).
47
+ */
48
+ async loadManifestSettled(manifest) {
49
+ const loaded = [];
50
+ const failed = [];
51
+ if (manifest.length === 0) {
52
+ this.progress = 1;
53
+ this.onProgress.emit(1);
54
+ return {
55
+ loaded,
56
+ failed
57
+ };
58
+ }
59
+ let settled = 0;
60
+ const total = manifest.length;
61
+ const promises = manifest.map(async (entry) => {
62
+ try {
63
+ const asset = await this._loader(entry);
64
+ this._assets.set(entry.key, asset);
65
+ loaded.push(entry.key);
66
+ } catch (error) {
67
+ failed.push({
68
+ key: entry.key,
69
+ error
70
+ });
71
+ } finally {
72
+ settled++;
73
+ this.progress = settled / total;
74
+ this.onProgress.emit(this.progress);
75
+ }
76
+ });
77
+ await Promise.all(promises);
78
+ return {
79
+ loaded,
80
+ failed
81
+ };
82
+ }
83
+ /** Get a loaded asset by key. Returns undefined if not found. */
84
+ get(key) {
85
+ return this._assets.get(key);
86
+ }
87
+ /** Check if an asset is loaded. */
88
+ has(key) {
89
+ return this._assets.has(key);
90
+ }
91
+ /** Remove an asset from the cache. */
92
+ unload(key) {
93
+ return this._assets.delete(key);
94
+ }
95
+ /** Clear all cached assets. */
96
+ clear() {
97
+ this._assets.clear();
98
+ this.progress = 0;
99
+ }
17
100
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- AssetManager: () => AssetManager,
24
- addAnimation: () => addAnimation,
25
- createProceduralAtlas: () => createProceduralAtlas,
26
- createSpriteSheet: () => createSpriteSheet,
27
- createTexture: () => createTexture,
28
- decodeImage: () => decodeImage,
29
- getFrame: () => getFrame,
30
- parseAseprite: () => parseAseprite,
31
- parseTexturePackerArray: () => parseTexturePackerArray,
32
- parseTexturePackerHash: () => parseTexturePackerHash
33
- });
34
- module.exports = __toCommonJS(index_exports);
35
-
36
- // src/texture.ts
101
+ //#endregion
102
+ //#region src/decode-image.ts
103
+ /**
104
+ * Decode raw image bytes into a Skia SkImage.
105
+ *
106
+ * Returns null on failure — never throws. Callers are responsible for
107
+ * handling null (e.g. falling back to a placeholder texture).
108
+ */
109
+ function decodeImage(Skia, bytes) {
110
+ const data = Skia.Data.fromBytes(bytes);
111
+ return Skia.Image.MakeImageFromEncoded(data);
112
+ }
113
+ //#endregion
114
+ //#region src/texture.ts
115
+ /** Create a Texture from a Skia SkImage. */
37
116
  function createTexture(key, image) {
38
- return {
39
- key,
40
- image,
41
- width: image.width(),
42
- height: image.height()
43
- };
117
+ return {
118
+ key,
119
+ image,
120
+ width: image.width(),
121
+ height: image.height()
122
+ };
44
123
  }
45
-
46
- // src/sprite-sheet.ts
124
+ //#endregion
125
+ //#region src/loaders.ts
126
+ /**
127
+ * A web `AssetLoader` backed by `fetch`. `texture` entries are decoded into a
128
+ * `Texture`; `binary` yields a `Uint8Array`; `json`/`spritesheet` yield the
129
+ * parsed JSON (feed a spritesheet result to `parseTexturePackerHash` etc.).
130
+ *
131
+ * Fail-fast: a non-OK response or a null decode throws, so `AssetManager.load`
132
+ * rejects. Use `AssetManager.loadManifestSettled` for partial-failure tolerance.
133
+ */
134
+ function createFetchAssetLoader(options) {
135
+ const { decodeImage } = options;
136
+ const fetchFn = options.fetch ?? globalThis.fetch;
137
+ return async (entry) => {
138
+ const response = await fetchFn(entry.path);
139
+ if (!response.ok) throw new Error(`[flare-engine/assets] fetch failed for "${entry.key}" (${entry.path}): ${response.status}`);
140
+ switch (entry.type) {
141
+ case "texture": {
142
+ const bytes = new Uint8Array(await response.arrayBuffer());
143
+ const image = decodeImage(bytes);
144
+ if (!image) throw new Error(`[flare-engine/assets] image decode failed for "${entry.key}" (${entry.path})`);
145
+ return createTexture(entry.key, image);
146
+ }
147
+ case "binary": return new Uint8Array(await response.arrayBuffer());
148
+ default: return response.json();
149
+ }
150
+ };
151
+ }
152
+ /**
153
+ * A native `AssetLoader` backed by an injected `readFile`. `texture` entries are
154
+ * decoded into a `Texture`; `binary` yields the raw `Uint8Array`;
155
+ * `json`/`spritesheet` yield the JSON parsed from UTF-8 bytes.
156
+ *
157
+ * Fail-fast: a null decode (or a rejecting `readFile`) throws.
158
+ */
159
+ function createFileAssetLoader(options) {
160
+ const { readFile, decodeImage } = options;
161
+ return async (entry) => {
162
+ const bytes = await readFile(entry.path);
163
+ switch (entry.type) {
164
+ case "texture": {
165
+ const image = decodeImage(bytes);
166
+ if (!image) throw new Error(`[flare-engine/assets] image decode failed for "${entry.key}" (${entry.path})`);
167
+ return createTexture(entry.key, image);
168
+ }
169
+ case "binary": return bytes;
170
+ default: return JSON.parse(new TextDecoder().decode(bytes));
171
+ }
172
+ };
173
+ }
174
+ //#endregion
175
+ //#region src/sprite-sheet.ts
176
+ /** Create an empty sprite sheet. */
47
177
  function createSpriteSheet() {
48
- return {
49
- frames: [],
50
- frameMap: /* @__PURE__ */ new Map(),
51
- animations: /* @__PURE__ */ new Map()
52
- };
178
+ return {
179
+ frames: [],
180
+ frameMap: /* @__PURE__ */ new Map(),
181
+ animations: /* @__PURE__ */ new Map()
182
+ };
53
183
  }
184
+ /**
185
+ * Warn (dev builds only) when a TexturePacker frame is exported rotated.
186
+ * Rotated frames are not yet remapped, so they render sideways — the frame is
187
+ * named so the artist can re-export it. Full rotation support is post-launch.
188
+ */
189
+ function warnRotatedFrame(name) {
190
+ if (typeof __DEV__ !== "undefined" && __DEV__) console.warn(`[flare-engine/assets] sprite frame "${name}": rotation unsupported — re-export without rotation`);
191
+ }
192
+ /** Parse TexturePacker JSON hash format. */
54
193
  function parseTexturePackerHash(json) {
55
- const data = json;
56
- const sheet = createSpriteSheet();
57
- const entries = Object.entries(data.frames);
58
- for (let i = 0; i < entries.length; i++) {
59
- const entry = entries[i];
60
- if (!entry) continue;
61
- const [name, value] = entry;
62
- const f = value.frame;
63
- sheet.frames.push({ name, x: f.x, y: f.y, w: f.w, h: f.h });
64
- sheet.frameMap.set(name, i);
65
- }
66
- return sheet;
194
+ const data = json;
195
+ const sheet = createSpriteSheet();
196
+ const entries = Object.entries(data.frames);
197
+ for (let i = 0; i < entries.length; i++) {
198
+ const entry = entries[i];
199
+ if (!entry) continue;
200
+ const [name, value] = entry;
201
+ if (value.rotated) warnRotatedFrame(name);
202
+ const f = value.frame;
203
+ sheet.frames.push({
204
+ name,
205
+ x: f.x,
206
+ y: f.y,
207
+ w: f.w,
208
+ h: f.h
209
+ });
210
+ sheet.frameMap.set(name, i);
211
+ }
212
+ return sheet;
67
213
  }
214
+ /** Parse TexturePacker JSON array format. */
68
215
  function parseTexturePackerArray(json) {
69
- const data = json;
70
- const sheet = createSpriteSheet();
71
- for (let i = 0; i < data.frames.length; i++) {
72
- const entry = data.frames[i];
73
- if (!entry) continue;
74
- const f = entry.frame;
75
- sheet.frames.push({
76
- name: entry.filename,
77
- x: f.x,
78
- y: f.y,
79
- w: f.w,
80
- h: f.h
81
- });
82
- sheet.frameMap.set(entry.filename, i);
83
- }
84
- return sheet;
216
+ const data = json;
217
+ const sheet = createSpriteSheet();
218
+ for (let i = 0; i < data.frames.length; i++) {
219
+ const entry = data.frames[i];
220
+ if (!entry) continue;
221
+ if (entry.rotated) warnRotatedFrame(entry.filename);
222
+ const f = entry.frame;
223
+ sheet.frames.push({
224
+ name: entry.filename,
225
+ x: f.x,
226
+ y: f.y,
227
+ w: f.w,
228
+ h: f.h
229
+ });
230
+ sheet.frameMap.set(entry.filename, i);
231
+ }
232
+ return sheet;
85
233
  }
234
+ /** Parse Aseprite JSON export. */
86
235
  function parseAseprite(json) {
87
- const data = json;
88
- const sheet = createSpriteSheet();
89
- const frameEntries = Array.isArray(data.frames) ? data.frames : Object.values(data.frames);
90
- for (let i = 0; i < frameEntries.length; i++) {
91
- const entry = frameEntries[i];
92
- if (!entry) continue;
93
- const f = entry.frame;
94
- sheet.frames.push({
95
- name: entry.filename,
96
- x: f.x,
97
- y: f.y,
98
- w: f.w,
99
- h: f.h
100
- });
101
- sheet.frameMap.set(entry.filename, i);
102
- }
103
- const tags = data.meta?.frameTags;
104
- if (tags) {
105
- for (const tag of tags) {
106
- const indices = [];
107
- if (tag.direction === "reverse") {
108
- for (let i = tag.to; i >= tag.from; i--) {
109
- indices.push(i);
110
- }
111
- } else if (tag.direction === "pingpong") {
112
- for (let i = tag.from; i <= tag.to; i++) {
113
- indices.push(i);
114
- }
115
- for (let i = tag.to - 1; i > tag.from; i--) {
116
- indices.push(i);
117
- }
118
- } else {
119
- for (let i = tag.from; i <= tag.to; i++) {
120
- indices.push(i);
121
- }
122
- }
123
- const firstFrame = frameEntries[tag.from];
124
- const durationMs = firstFrame?.duration ?? 100;
125
- sheet.animations.set(tag.name, {
126
- name: tag.name,
127
- frameIndices: indices,
128
- frameDuration: durationMs / 1e3,
129
- loop: true
130
- });
131
- }
132
- }
133
- return sheet;
236
+ const data = json;
237
+ const sheet = createSpriteSheet();
238
+ const frameEntries = Array.isArray(data.frames) ? data.frames : Object.values(data.frames);
239
+ for (let i = 0; i < frameEntries.length; i++) {
240
+ const entry = frameEntries[i];
241
+ if (!entry) continue;
242
+ const f = entry.frame;
243
+ sheet.frames.push({
244
+ name: entry.filename,
245
+ x: f.x,
246
+ y: f.y,
247
+ w: f.w,
248
+ h: f.h
249
+ });
250
+ sheet.frameMap.set(entry.filename, i);
251
+ }
252
+ const tags = data.meta?.frameTags;
253
+ if (tags) for (const tag of tags) {
254
+ const indices = [];
255
+ if (tag.direction === "reverse") for (let i = tag.to; i >= tag.from; i--) indices.push(i);
256
+ else if (tag.direction === "pingpong") {
257
+ for (let i = tag.from; i <= tag.to; i++) indices.push(i);
258
+ for (let i = tag.to - 1; i > tag.from; i--) indices.push(i);
259
+ } else for (let i = tag.from; i <= tag.to; i++) indices.push(i);
260
+ const durationMs = frameEntries[tag.from]?.duration ?? 100;
261
+ sheet.animations.set(tag.name, {
262
+ name: tag.name,
263
+ frameIndices: indices,
264
+ frameDuration: durationMs / 1e3,
265
+ loop: true
266
+ });
267
+ }
268
+ return sheet;
134
269
  }
270
+ /**
271
+ * Add a custom animation sequence to a sprite sheet.
272
+ */
135
273
  function addAnimation(sheet, name, frameIndices, frameDuration, loop = true) {
136
- sheet.animations.set(name, { name, frameIndices, frameDuration, loop });
274
+ sheet.animations.set(name, {
275
+ name,
276
+ frameIndices,
277
+ frameDuration,
278
+ loop
279
+ });
137
280
  }
281
+ /** Get a frame by name. Returns undefined if not found. */
138
282
  function getFrame(sheet, name) {
139
- const idx = sheet.frameMap.get(name);
140
- if (idx === void 0) return void 0;
141
- return sheet.frames[idx];
283
+ const idx = sheet.frameMap.get(name);
284
+ if (idx === void 0) return void 0;
285
+ return sheet.frames[idx];
142
286
  }
143
-
144
- // src/asset-manager.ts
145
- var import_events = require("@flare-engine/events");
146
- var AssetManager = class {
147
- /** Fires on each asset loaded with current progress (0-1). */
148
- onProgress = new import_events.Signal();
149
- /** Current loading progress 0-1. */
150
- progress = 0;
151
- _assets = /* @__PURE__ */ new Map();
152
- _loader;
153
- constructor(loader) {
154
- this._loader = loader;
155
- }
156
- /**
157
- * Load all assets in the manifest.
158
- * Resolves when all assets are loaded and cached.
159
- */
160
- async load(manifest) {
161
- if (manifest.length === 0) {
162
- this.progress = 1;
163
- this.onProgress.emit(1);
164
- return;
165
- }
166
- let loaded = 0;
167
- const total = manifest.length;
168
- const promises = manifest.map(async (entry) => {
169
- const asset = await this._loader(entry);
170
- this._assets.set(entry.key, asset);
171
- loaded++;
172
- this.progress = loaded / total;
173
- this.onProgress.emit(this.progress);
174
- });
175
- await Promise.all(promises);
176
- }
177
- /** Get a loaded asset by key. Returns undefined if not found. */
178
- get(key) {
179
- return this._assets.get(key);
180
- }
181
- /** Check if an asset is loaded. */
182
- has(key) {
183
- return this._assets.has(key);
184
- }
185
- /** Remove an asset from the cache. */
186
- unload(key) {
187
- return this._assets.delete(key);
188
- }
189
- /** Clear all cached assets. */
190
- clear() {
191
- this._assets.clear();
192
- this.progress = 0;
193
- }
194
- };
195
-
196
- // src/decode-image.ts
197
- function decodeImage(Skia, bytes) {
198
- const data = Skia.Data.fromBytes(bytes);
199
- return Skia.Image.MakeImageFromEncoded(data);
200
- }
201
-
202
- // src/procedural-atlas.ts
287
+ //#endregion
288
+ //#region src/procedural-atlas.ts
289
+ /**
290
+ * Build a flat atlas `SkImage` from a list of colored rectangles.
291
+ *
292
+ * Row-packs frames left-to-right until `maxWidth` is exceeded, then wraps
293
+ * to a new row. Returns both the backing image and a `SpriteSheet` whose
294
+ * frames match the packed positions, so consumers can look up frames by
295
+ * name exactly as with a real `parseTexturePacker*` sheet.
296
+ *
297
+ * Useful for:
298
+ * - bootstrapping gameplay before final art lands (replace with one
299
+ * `parseTexturePackerHash` call once the real atlas arrives),
300
+ * - engine tests / benchmarks that need a valid `SkImage` without
301
+ * shipping any binary asset.
302
+ *
303
+ * **Canonical placeholder-atlas pattern:** a game can ship a full "shape
304
+ * atlas" that draws every entity (enemies, bosses, ships, pickups) as
305
+ * composed primitives onto an offscreen Skia surface, then wraps the result
306
+ * in a `SpriteSheet`.
307
+ * That pattern (declarative shape spec → Skia draw calls → `SpriteSheet`
308
+ * with one named frame per shape) is the recommended way to build a
309
+ * manifest-swappable placeholder atlas: when final art lands, swap the
310
+ * shape draw-calls for `parseTexturePackerHash(jsonText)` with no other
311
+ * code changes.
312
+ */
203
313
  function createProceduralAtlas(Skia, frames, options = {}) {
204
- const maxWidth = options.maxWidth ?? 1024;
205
- const padding = options.padding ?? 0;
206
- const positions = layoutRows(frames, maxWidth, padding);
207
- const surface = Skia.Surface.Make(positions.width, positions.height);
208
- if (surface === null) {
209
- throw new Error(`Skia.Surface.Make returned null for ${positions.width}x${positions.height}`);
210
- }
211
- const canvas = surface.getCanvas();
212
- const paint = Skia.Paint();
213
- const color = new Float32Array(4);
214
- const sheet = createSpriteSheet();
215
- for (let i = 0; i < frames.length; i++) {
216
- const spec = frames[i];
217
- const pos = positions.rects[i];
218
- if (spec === void 0 || pos === void 0) continue;
219
- writeArgb(color, spec.color);
220
- paint.setColor(color);
221
- canvas.drawRect(Skia.XYWHRect(pos.x, pos.y, spec.w, spec.h), paint);
222
- const frame = {
223
- name: spec.name,
224
- x: pos.x,
225
- y: pos.y,
226
- w: spec.w,
227
- h: spec.h
228
- };
229
- sheet.frames.push(frame);
230
- sheet.frameMap.set(spec.name, i);
231
- }
232
- return {
233
- image: surface.makeImageSnapshot(),
234
- sheet,
235
- width: positions.width,
236
- height: positions.height
237
- };
314
+ const positions = layoutRows(frames, options.maxWidth ?? 1024, options.padding ?? 0);
315
+ const surface = Skia.Surface.Make(positions.width, positions.height);
316
+ if (surface === null) throw new Error(`Skia.Surface.Make returned null for ${positions.width}x${positions.height}`);
317
+ const canvas = surface.getCanvas();
318
+ const paint = Skia.Paint();
319
+ const color = /* @__PURE__ */ new Float32Array(4);
320
+ const sheet = createSpriteSheet();
321
+ for (let i = 0; i < frames.length; i++) {
322
+ const spec = frames[i];
323
+ const pos = positions.rects[i];
324
+ if (spec === void 0 || pos === void 0) continue;
325
+ writeArgb(color, spec.color);
326
+ paint.setColor(color);
327
+ canvas.drawRect(Skia.XYWHRect(pos.x, pos.y, spec.w, spec.h), paint);
328
+ const frame = {
329
+ name: spec.name,
330
+ x: pos.x,
331
+ y: pos.y,
332
+ w: spec.w,
333
+ h: spec.h
334
+ };
335
+ sheet.frames.push(frame);
336
+ sheet.frameMap.set(spec.name, i);
337
+ }
338
+ return {
339
+ image: surface.makeImageSnapshot(),
340
+ sheet,
341
+ width: positions.width,
342
+ height: positions.height
343
+ };
238
344
  }
239
345
  function layoutRows(frames, maxWidth, padding) {
240
- const rects = [];
241
- let x = 0;
242
- let y = 0;
243
- let rowHeight = 0;
244
- let atlasWidth = 0;
245
- for (const spec of frames) {
246
- if (x > 0 && x + spec.w > maxWidth) {
247
- y += rowHeight + padding;
248
- x = 0;
249
- rowHeight = 0;
250
- }
251
- rects.push({ x, y });
252
- x += spec.w + padding;
253
- if (spec.h > rowHeight) rowHeight = spec.h;
254
- if (x - padding > atlasWidth) atlasWidth = x - padding;
255
- }
256
- const atlasHeight = y + rowHeight;
257
- return {
258
- rects,
259
- width: atlasWidth > 0 ? atlasWidth : 1,
260
- height: atlasHeight > 0 ? atlasHeight : 1
261
- };
346
+ const rects = [];
347
+ let x = 0;
348
+ let y = 0;
349
+ let rowHeight = 0;
350
+ let atlasWidth = 0;
351
+ for (const spec of frames) {
352
+ if (x > 0 && x + spec.w > maxWidth) {
353
+ y += rowHeight + padding;
354
+ x = 0;
355
+ rowHeight = 0;
356
+ }
357
+ rects.push({
358
+ x,
359
+ y
360
+ });
361
+ x += spec.w + padding;
362
+ if (spec.h > rowHeight) rowHeight = spec.h;
363
+ if (x - padding > atlasWidth) atlasWidth = x - padding;
364
+ }
365
+ const atlasHeight = y + rowHeight;
366
+ return {
367
+ rects,
368
+ width: atlasWidth > 0 ? atlasWidth : 1,
369
+ height: atlasHeight > 0 ? atlasHeight : 1
370
+ };
262
371
  }
263
372
  function writeArgb(out, argb) {
264
- out[0] = (argb >>> 16 & 255) / 255;
265
- out[1] = (argb >>> 8 & 255) / 255;
266
- out[2] = (argb & 255) / 255;
267
- out[3] = (argb >>> 24 & 255) / 255;
373
+ out[0] = (argb >>> 16 & 255) / 255;
374
+ out[1] = (argb >>> 8 & 255) / 255;
375
+ out[2] = (argb & 255) / 255;
376
+ out[3] = (argb >>> 24 & 255) / 255;
268
377
  }
269
- // Annotate the CommonJS export names for ESM import in node:
270
- 0 && (module.exports = {
271
- AssetManager,
272
- addAnimation,
273
- createProceduralAtlas,
274
- createSpriteSheet,
275
- createTexture,
276
- decodeImage,
277
- getFrame,
278
- parseAseprite,
279
- parseTexturePackerArray,
280
- parseTexturePackerHash
281
- });
378
+ //#endregion
379
+ exports.AssetManager = AssetManager;
380
+ exports.addAnimation = addAnimation;
381
+ exports.createFetchAssetLoader = createFetchAssetLoader;
382
+ exports.createFileAssetLoader = createFileAssetLoader;
383
+ exports.createProceduralAtlas = createProceduralAtlas;
384
+ exports.createSpriteSheet = createSpriteSheet;
385
+ exports.createTexture = createTexture;
386
+ exports.decodeImage = decodeImage;
387
+ exports.getFrame = getFrame;
388
+ exports.parseAseprite = parseAseprite;
389
+ exports.parseTexturePackerArray = parseTexturePackerArray;
390
+ exports.parseTexturePackerHash = parseTexturePackerHash;
391
+
282
392
  //# sourceMappingURL=index.js.map