@woosh/meep-engine 2.39.6 → 2.39.7

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/engine/Engine.js CHANGED
@@ -34,7 +34,6 @@ import { MetricCollection } from "./development/performance/MetricCollection.js"
34
34
  import { PeriodicConsolePrinter } from "./development/performance/monitor/PeriodicConsolePrinter.js";
35
35
  import { MetricStatistics } from "./development/performance/MetricStatistics.js";
36
36
  import { logger } from "./logging/GlobalLogger.js";
37
- import { TaskLoadingScreen } from "../view/task/TaskLoadingScreen.js";
38
37
 
39
38
 
40
39
  function EngineSettings() {
@@ -406,18 +405,6 @@ class Engine {
406
405
  }
407
406
  }
408
407
 
409
- /**
410
- * @deprecated Use {@link TaskLoadingScreen#load} instead
411
- * @param {Task|TaskGroup} task
412
- * @returns {Promise<any>}
413
- */
414
- loadSlowTask(task) {
415
- assert.defined(task, 'task');
416
- assert.notNull(task, 'task');
417
-
418
- return TaskLoadingScreen.load(this, task);
419
- }
420
-
421
408
  /**
422
409
  * Startup
423
410
  * @returns {Promise}
@@ -6,6 +6,7 @@ import { noop } from "../../core/function/Functions.js";
6
6
  import { compileAllMaterials } from "../graphics/ecs/compileAllMaterials.js";
7
7
  import { createTaskWaitForMeshesToLoad } from "../graphics/ecs/mesh/createTaskWaitForMeshesToLoad.js";
8
8
  import { loadVisibleTerrainTiles } from "../ecs/terrain/util/loadVisibleTerrainTiles.js";
9
+ import { TaskLoadingScreen } from "../../view/task/TaskLoadingScreen.js";
9
10
 
10
11
 
11
12
  /**
@@ -117,7 +118,7 @@ export function transitionToScene({ tasks = [], scene, engine, name }) {
117
118
  }
118
119
  );
119
120
 
120
- const promise = engine.loadSlowTask(taskGroup);
121
+ const promise = TaskLoadingScreen.load(engine, taskGroup);
121
122
 
122
123
  Task.joinAll(tasks, () => {
123
124
  engine.executor.runMany(extraTasks);
@@ -28,6 +28,7 @@ import { MeshSystem } from "../../engine/graphics/ecs/mesh/MeshSystem.js";
28
28
  import TopDownCameraControllerSystem from "../../engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js";
29
29
  import { TopDownCameraLanderSystem } from "../../engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.js";
30
30
  import LightSystem from "../../engine/graphics/ecs/light/LightSystem.js";
31
+ import { TaskLoadingScreen } from "../../view/task/TaskLoadingScreen.js";
31
32
 
32
33
  function makeEngineConfig(engine) {
33
34
  const config = new EngineConfiguration();
@@ -182,7 +183,7 @@ function main(engine) {
182
183
 
183
184
  const tBuildLevel = prepare_gen_task({ ecd });
184
185
 
185
- engine.loadSlowTask(tBuildLevel);
186
+ TaskLoadingScreen.load(engine, tBuildLevel);
186
187
 
187
188
  engine.executor.runGroup(tBuildLevel);
188
189
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "productName": "Meep",
6
6
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.39.6",
8
+ "version": "2.39.7",
9
9
  "dependencies": {
10
10
  "gl-matrix": "3.4.3",
11
11
  "fast-levenshtein": "2.0.6",
@@ -33,6 +33,7 @@ import {
33
33
  } from "../../engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
34
34
  import { CellFilterAngleToNormal } from "../../generation/filtering/numeric/complex/CellFilterAngleToNormal.js";
35
35
  import { CellFilterCache } from "../../generation/filtering/numeric/CellFilterCache.js";
36
+ import { TaskLoadingScreen } from "../../view/task/TaskLoadingScreen.js";
36
37
 
37
38
  const HEIGHT_RANGE = 100;
38
39
 
@@ -267,7 +268,7 @@ async function main(engine) {
267
268
 
268
269
  const task = theme_engine.apply(grid, ecd);
269
270
 
270
- const promise_load = engine.loadSlowTask(task);
271
+ const promise_load = TaskLoadingScreen.load(engine, task);
271
272
 
272
273
  engine.executor.runGroup(task);
273
274
 
@@ -2,6 +2,7 @@ import TaskProgressView from "./TaskProgressView.js";
2
2
  import { AssetLoaderStatusView } from "../asset/AssetLoaderStatusView.js";
3
3
  import { logger } from "../../engine/logging/GlobalLogger.js";
4
4
  import { array_remove_first } from "../../core/collection/array/array_remove_first.js";
5
+ import { assert } from "../../core/assert.js";
5
6
 
6
7
  /**
7
8
  * @type {TaskLoadingScreen}
@@ -41,6 +42,14 @@ export class TaskLoadingScreen {
41
42
  * @returns {Promise<void>}
42
43
  */
43
44
  async load(engine, task) {
45
+
46
+ assert.defined(task, 'task');
47
+ assert.notNull(task, 'task');
48
+
49
+ assert.defined(engine, 'engine');
50
+ assert.notNull(engine, 'engine');
51
+
52
+
44
53
  await Promise.allSettled([this._active_promise]);
45
54
 
46
55
  this._clearReleaseTimeout();