@woosh/meep-engine 2.85.7 → 2.85.8

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.85.7",
8
+ "version": "2.85.8",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -5,20 +5,31 @@ export class EngineHarness {
5
5
  */
6
6
  static addFpsCounter(engine: Engine): void;
7
7
  /**
8
- *
9
- * @param {Engine} engine
10
- * @param {EntityComponentDataset} ecd
11
- * @param {Vector3} [target]
12
- * @param {number} [distance]
13
- * @param {number} [pitch]
14
- * @param {number} [yaw]
15
- * @param {boolean} [autoClip]
16
- * @param {number} [distanceMin]
17
- * @param {number} [distanceMax]
18
- * @param {number} [fieldOfView] in degrees
8
+ * @param {Object} param
9
+ * @param {Engine} param.engine
10
+ * @param {EntityComponentDataset} param.ecd
11
+ * @param {Vector3} [param.target]
12
+ * @param {number} [param.distance]
13
+ * @param {number} [param.pitch]
14
+ * @param {number} [param.yaw]
15
+ * @param {boolean} [param.autoClip]
16
+ * @param {number} [param.distanceMin]
17
+ * @param {number} [param.distanceMax]
18
+ * @param {number} [param.fieldOfView] in degrees
19
19
  * @returns {Entity}
20
20
  */
21
- static buildCamera({ engine, ecd, target, distance, pitch, yaw, autoClip, distanceMin, distanceMax, fieldOfView }: Engine): Entity;
21
+ static buildCamera({ engine, ecd, target, distance, pitch, yaw, autoClip, distanceMin, distanceMax, fieldOfView }: {
22
+ engine: Engine;
23
+ ecd: EntityComponentDataset;
24
+ target?: Vector3;
25
+ distance?: number;
26
+ pitch?: number;
27
+ yaw?: number;
28
+ autoClip?: boolean;
29
+ distanceMin?: number;
30
+ distanceMax?: number;
31
+ fieldOfView?: number;
32
+ }): Entity;
22
33
  /**
23
34
  *
24
35
  * @param {Engine} engine
@@ -42,21 +53,30 @@ export class EngineHarness {
42
53
  */
43
54
  static buildBasics({ engine, focus, heightMap, heightRange, pitch, yaw, distance, terrainSize, terrainResolution, enableWater, enableTerrain, enableLights, cameraFieldOfView, cameraFarDistance, cameraController, cameraAutoClip, shadowmapResolution, showFps }: Engine): Promise<void>;
44
55
  /**
45
- *
46
- * @param {Engine} engine
47
- * @param {EntityComponentDataset} ecd
48
- * @param shadowmapResolution
56
+ * @param {Object} param
57
+ * @param {Engine} param.engine
58
+ * @param {EntityComponentDataset} [param.ecd]
59
+ * @param {number} [param.shadowmapResolution]
49
60
  */
50
- static buildLights({ engine, ecd, shadowmapResolution }: Engine): Promise<void>;
61
+ static buildLights({ engine, ecd, shadowmapResolution }: {
62
+ engine: Engine;
63
+ ecd?: EntityComponentDataset;
64
+ shadowmapResolution?: number;
65
+ }): Promise<void>;
51
66
  /**
52
- *
53
- * @param {number} [cameraEntity]
54
- * @param {Engine} engine
55
- * @param {number} [sensitivity]
56
- * @param {EntityComponentDataset} [ecd]
67
+ * @param {Object} param
68
+ * @param {number} [param.cameraEntity]
69
+ * @param {Engine} param.engine
70
+ * @param {number} [param.sensitivity]
71
+ * @param {EntityComponentDataset} [param.ecd]
57
72
  * @returns {Entity}
58
73
  */
59
- static buildOrbitalCameraController({ cameraEntity, engine, ecd, sensitivity }?: number): Entity;
74
+ static buildOrbitalCameraController({ cameraEntity, engine, ecd, sensitivity }: {
75
+ cameraEntity?: number;
76
+ engine: Engine;
77
+ sensitivity?: number;
78
+ ecd?: EntityComponentDataset;
79
+ }): Entity;
60
80
  /**
61
81
  *
62
82
  * @param {Engine} engine
@@ -96,6 +116,7 @@ export namespace EngineHarness {
96
116
  }
97
117
  import Engine from "./Engine.js";
98
118
  import { EngineConfiguration } from "./EngineConfiguration.js";
119
+ import Vector3 from "../core/geom/Vector3.js";
99
120
  import Entity from "./ecs/Entity.js";
100
121
  import Terrain from "./ecs/terrain/ecs/Terrain.js";
101
122
  //# sourceMappingURL=EngineHarness.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EngineHarness.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineHarness.js"],"names":[],"mappings":"AAsDA;IAmBI;;;OAGG;IACH,6BAFW,MAAM,QAYhB;IAkED;;;;;;;;;;;;;OAaG;IACH,mHAZW,MAAM,GAUJ,MAAM,CA+DlB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,oQAnBW,MAAM,iBAmFhB;IAGD;;;;;OAKG;IACH,yDAJW,MAAM,iBAkDhB;IAED;;;;;;;OAOG;IACH,iFANW,MAAM,GAIJ,MAAM,CA2ClB;IAGD;;;;;;;;;;;OAWG;IACH,mGAVW,MAAM,GAQJ,OAAO,CA0DnB;IApbG;;;OAGG;IACH,QAFU,MAAM,CAEiC;IAMjD;;;OAGG;IACH,YAFU,eAAQ,IAAI,CAET;IAmBjB;;;;OAIG;IACH,8DAJmB,mBAAmB,UAAQ,MAAM,WAEvC,QAAQ,MAAM,CAAC,CA2D3B;CAsVJ;;IAID;;;OAGG;IACH,uCAMC;;mBA7ekB,aAAa;oCACI,0BAA0B;mBAN3C,iBAAiB;oBAEhB,8BAA8B"}
1
+ {"version":3,"file":"EngineHarness.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineHarness.js"],"names":[],"mappings":"AAsDA;IAmBI;;;OAGG;IACH,6BAFW,MAAM,QAYhB;IAkED;;;;;;;;;;;;;OAaG;IACH;QAZyB,MAAM,EAApB,MAAM;QACwB,GAAG;QACjB,MAAM,GAAtB,OAAO;QACQ,QAAQ,GAAvB,MAAM;QACS,KAAK,GAApB,MAAM;QACS,GAAG,GAAlB,MAAM;QACU,QAAQ,GAAxB,OAAO;QACQ,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACS,WAAW,GAA1B,MAAM;QACJ,MAAM,CA+DlB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,oQAnBW,MAAM,iBAmFhB;IAGD;;;;;OAKG;IACH;QAJyB,MAAM,EAApB,MAAM;QACyB,GAAG;QACnB,mBAAmB,GAAlC,MAAM;sBAoDhB;IAED;;;;;;;OAOG;IACH;QAN0B,YAAY,GAA3B,MAAM;QACQ,MAAM,EAApB,MAAM;QACS,WAAW,GAA1B,MAAM;QACyB,GAAG;QAChC,MAAM,CA2ClB;IAGD;;;;;;;;;;;OAWG;IACH,mGAVW,MAAM,GAQJ,OAAO,CA0DnB;IAxbG;;;OAGG;IACH,QAFU,MAAM,CAEiC;IAMjD;;;OAGG;IACH,YAFU,eAAQ,IAAI,CAET;IAmBjB;;;;OAIG;IACH,8DAJmB,mBAAmB,UAAQ,MAAM,WAEvC,QAAQ,MAAM,CAAC,CA2D3B;CA0VJ;;IAID;;;OAGG;IACH,uCAMC;;mBAjfkB,aAAa;oCACI,0BAA0B;oBAX1C,yBAAyB;mBAK1B,iBAAiB;oBAEhB,8BAA8B"}
@@ -152,17 +152,17 @@ export class EngineHarness {
152
152
  }
153
153
 
154
154
  /**
155
- *
156
- * @param {Engine} engine
157
- * @param {EntityComponentDataset} ecd
158
- * @param {Vector3} [target]
159
- * @param {number} [distance]
160
- * @param {number} [pitch]
161
- * @param {number} [yaw]
162
- * @param {boolean} [autoClip]
163
- * @param {number} [distanceMin]
164
- * @param {number} [distanceMax]
165
- * @param {number} [fieldOfView] in degrees
155
+ * @param {Object} param
156
+ * @param {Engine} param.engine
157
+ * @param {EntityComponentDataset} param.ecd
158
+ * @param {Vector3} [param.target]
159
+ * @param {number} [param.distance]
160
+ * @param {number} [param.pitch]
161
+ * @param {number} [param.yaw]
162
+ * @param {boolean} [param.autoClip]
163
+ * @param {number} [param.distanceMin]
164
+ * @param {number} [param.distanceMax]
165
+ * @param {number} [param.fieldOfView] in degrees
166
166
  * @returns {Entity}
167
167
  */
168
168
  static buildCamera(
@@ -317,12 +317,16 @@ export class EngineHarness {
317
317
 
318
318
 
319
319
  /**
320
- *
321
- * @param {Engine} engine
322
- * @param {EntityComponentDataset} ecd
323
- * @param shadowmapResolution
320
+ * @param {Object} param
321
+ * @param {Engine} param.engine
322
+ * @param {EntityComponentDataset} [param.ecd]
323
+ * @param {number} [param.shadowmapResolution]
324
324
  */
325
- static async buildLights({ engine, ecd = engine.entityManager.dataset, shadowmapResolution = 1024 }) {
325
+ static async buildLights({
326
+ engine,
327
+ ecd = engine.entityManager.dataset,
328
+ shadowmapResolution = 1024
329
+ }) {
326
330
  const em = engine.entityManager;
327
331
 
328
332
  if (!em.hasSystem(LightSystem)) {
@@ -371,11 +375,11 @@ export class EngineHarness {
371
375
  }
372
376
 
373
377
  /**
374
- *
375
- * @param {number} [cameraEntity]
376
- * @param {Engine} engine
377
- * @param {number} [sensitivity]
378
- * @param {EntityComponentDataset} [ecd]
378
+ * @param {Object} param
379
+ * @param {number} [param.cameraEntity]
380
+ * @param {Engine} param.engine
381
+ * @param {number} [param.sensitivity]
382
+ * @param {EntityComponentDataset} [param.ecd]
379
383
  * @returns {Entity}
380
384
  */
381
385
  static async buildOrbitalCameraController({