@woosh/meep-engine 2.119.103 → 2.119.104

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.119.103",
8
+ "version": "2.119.104",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1,5 +1,9 @@
1
1
  export class ImageRGBADataLoader extends AssetLoader<any, any> {
2
- constructor();
2
+ /**
3
+ *
4
+ * @param {string} [worker_path] Path to decoder worker, allows flexibility in deployment
5
+ */
6
+ constructor({ worker_path }?: string);
3
7
  decoder: CodecWithFallback;
4
8
  link(assetManager: any, engine: any): Promise<void>;
5
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ImageRGBADataLoader.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/asset/loaders/image/ImageRGBADataLoader.js"],"names":[],"mappings":"AAYA;IACI,cAOC;IAJG,2BAGC;IAGL,oDAOC;IAED;;;;;;OAMG;IACH,4BASC;IAED;;;;;;OAMG;IACH,mBAoBC;IAED,6EAiCC;CACJ;4BA5G2B,mBAAmB;kCACb,8BAA8B"}
1
+ {"version":3,"file":"ImageRGBADataLoader.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/asset/loaders/image/ImageRGBADataLoader.js"],"names":[],"mappings":"AAYA;IACI;;;OAGG;IACH,8BAFW,MAAM,EAWhB;IAJG,2BAGC;IAGL,oDAOC;IAED;;;;;;OAMG;IACH,4BASC;IAED;;;;;;OAMG;IACH,mBAoBC;IAED,6EAiCC;CACJ;4BAlH2B,mBAAmB;kCACb,8BAA8B"}
@@ -11,11 +11,17 @@ import { ImageRGBADataAsset } from "./ImageRGBADataAsset.js";
11
11
  const ASSET_TYPE_ARRAY_BUFFER = "arraybuffer";
12
12
 
13
13
  export class ImageRGBADataLoader extends AssetLoader {
14
- constructor() {
14
+ /**
15
+ *
16
+ * @param {string} [worker_path] Path to decoder worker, allows flexibility in deployment
17
+ */
18
+ constructor({
19
+ worker_path
20
+ } = {}) {
15
21
  super();
16
22
 
17
23
  this.decoder = new CodecWithFallback(
18
- new ThreadedImageDecoder(),
24
+ new ThreadedImageDecoder({ worker_path }),
19
25
  new NativeImageDecoder()
20
26
  );
21
27
  }
@@ -1,4 +1,9 @@
1
1
  export class ThreadedImageDecoder extends Codec {
2
+ /**
3
+ *
4
+ * @param {string} [worker_path]
5
+ */
6
+ constructor({ worker_path }?: string);
2
7
  /**
3
8
  *
4
9
  * @type {OnDemandWorkerManager}
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadedImageDecoder.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/codec/ThreadedImageDecoder.js"],"names":[],"mappings":"AAKA;IAYQ;;;OAGG;IACH,QAFU,qBAAqB,CAE+B;IAKlE,kCASC;IAED,gCAEC;CACJ;sBArCqB,YAAY;sCAHI,6DAA6D"}
1
+ {"version":3,"file":"ThreadedImageDecoder.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/codec/ThreadedImageDecoder.js"],"names":[],"mappings":"AAKA;IACI;;;OAGG;IACH,8BAFW,MAAM,EAuBhB;IAPG;;;OAGG;IACH,QAFU,qBAAqB,CAE+B;IAKlE,kCASC;IAED,gCAEC;CACJ;sBA5CqB,YAAY;sCAHI,6DAA6D"}
@@ -4,12 +4,19 @@ import { PNG_HEADER_BYTES } from "../png/PNG_HEADER_BYTES.js";
4
4
  import { Codec } from "./Codec.js";
5
5
 
6
6
  export class ThreadedImageDecoder extends Codec {
7
- constructor() {
7
+ /**
8
+ *
9
+ * @param {string} [worker_path]
10
+ */
11
+ constructor({
12
+ worker_path = 'bundle-worker-image-decoder.js'
13
+ }={}) {
14
+
8
15
  super();
9
16
 
10
17
  const workerBuilder = new WorkerBuilder();
11
18
 
12
- workerBuilder.importScript('bundle-worker-image-decoder.js');
19
+ workerBuilder.importScript(worker_path);
13
20
 
14
21
  workerBuilder.addMethod('decode', function (data, type) {
15
22
  return Lib.decode(data, type);