@woosh/meep-engine 2.110.0 → 2.110.2
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/build/meep.cjs +21 -6
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +21 -6
- package/package.json +1 -1
- package/src/core/model/object/ObjectPoolFactory.d.ts +7 -7
- package/src/core/model/object/ObjectPoolFactory.d.ts.map +1 -1
- package/src/core/model/object/ObjectPoolFactory.js +16 -6
- package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
- package/src/core/process/executor/ConcurrentExecutor.js +11 -2
- package/src/engine/ecs/ik/IKProblem.d.ts +2 -1
- package/src/engine/ecs/ik/IKProblem.d.ts.map +1 -1
package/build/meep.cjs
CHANGED
|
@@ -84123,6 +84123,8 @@ class ConcurrentExecutor {
|
|
|
84123
84123
|
task.state.set(TaskState.FAILED);
|
|
84124
84124
|
task.on.failed.send1(reason);
|
|
84125
84125
|
|
|
84126
|
+
if (!task.on.failed.hasHandlers()) ;
|
|
84127
|
+
|
|
84126
84128
|
this.resolveTasks();
|
|
84127
84129
|
|
|
84128
84130
|
this.on.task_completed.send1(task);
|
|
@@ -84210,7 +84212,12 @@ class ConcurrentExecutor {
|
|
|
84210
84212
|
try {
|
|
84211
84213
|
executionTime = this.#runTaskForTimeMonitored(task, sliceTimeLeft);
|
|
84212
84214
|
} catch (e) {
|
|
84213
|
-
|
|
84215
|
+
const error = new Error("Task threw an exception");
|
|
84216
|
+
|
|
84217
|
+
error.cause = e;
|
|
84218
|
+
|
|
84219
|
+
// console.error(`Task threw an exception`, task, e);
|
|
84220
|
+
this.#fail_task(task, error);
|
|
84214
84221
|
}
|
|
84215
84222
|
|
|
84216
84223
|
this.#cycle_count++;
|
|
@@ -97933,15 +97940,21 @@ class ImmutableObjectPool {
|
|
|
97933
97940
|
}
|
|
97934
97941
|
}
|
|
97935
97942
|
|
|
97943
|
+
/**
|
|
97944
|
+
* @template T
|
|
97945
|
+
*/
|
|
97936
97946
|
class ObjectPoolFactory {
|
|
97937
97947
|
/**
|
|
97938
|
-
* @template T
|
|
97939
97948
|
* @param {function():T} creator
|
|
97940
97949
|
* @param {function(T)} destroyer
|
|
97941
97950
|
* @param {function(T)} resetter
|
|
97942
|
-
* @constructor
|
|
97943
97951
|
*/
|
|
97944
|
-
constructor(
|
|
97952
|
+
constructor(
|
|
97953
|
+
creator,
|
|
97954
|
+
destroyer = noop,
|
|
97955
|
+
resetter = noop
|
|
97956
|
+
) {
|
|
97957
|
+
|
|
97945
97958
|
/**
|
|
97946
97959
|
* @private
|
|
97947
97960
|
* @type {function(): T}
|
|
@@ -97965,7 +97978,6 @@ class ObjectPoolFactory {
|
|
|
97965
97978
|
this.pool = [];
|
|
97966
97979
|
|
|
97967
97980
|
/**
|
|
97968
|
-
* @private
|
|
97969
97981
|
* @type {number}
|
|
97970
97982
|
*/
|
|
97971
97983
|
this.maxSize = 256;
|
|
@@ -97983,17 +97995,20 @@ class ObjectPoolFactory {
|
|
|
97983
97995
|
this.resetter(oldInstance);
|
|
97984
97996
|
|
|
97985
97997
|
return oldInstance;
|
|
97998
|
+
|
|
97986
97999
|
} else {
|
|
98000
|
+
|
|
97987
98001
|
const newInstance = this.creator();
|
|
97988
98002
|
|
|
97989
98003
|
return newInstance;
|
|
98004
|
+
|
|
97990
98005
|
}
|
|
97991
98006
|
}
|
|
97992
98007
|
|
|
97993
98008
|
/**
|
|
97994
98009
|
*
|
|
97995
98010
|
* @param {T} object
|
|
97996
|
-
* @returns {boolean}
|
|
98011
|
+
* @returns {boolean} true if object was added back to the pool, false if pool was full and object was destroyed instead
|
|
97997
98012
|
*/
|
|
97998
98013
|
release(object) {
|
|
97999
98014
|
|