@dice-o-rolla/dice-engine 0.3.0 → 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/dice-engine.js +9 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -7
package/dist/dice-engine.js
CHANGED
|
@@ -320,6 +320,7 @@ export class DiceEngine extends TypedEventEmitter {
|
|
|
320
320
|
const throwGenerator = new ThrowGenerator(random, this.#throwOptions);
|
|
321
321
|
const simulationId = `simulation-${this.#nextSimulationId++}`;
|
|
322
322
|
this.#removeDisplayedDice();
|
|
323
|
+
this.#physics.clear();
|
|
323
324
|
const dice = [];
|
|
324
325
|
let trace;
|
|
325
326
|
let failure;
|
|
@@ -504,7 +505,7 @@ export class DiceEngine extends TypedEventEmitter {
|
|
|
504
505
|
if (abortListener !== undefined) {
|
|
505
506
|
options.signal?.addEventListener('abort', abortListener, { once: true });
|
|
506
507
|
}
|
|
507
|
-
|
|
508
|
+
const replay = {
|
|
508
509
|
trace,
|
|
509
510
|
resolve,
|
|
510
511
|
reject,
|
|
@@ -513,7 +514,13 @@ export class DiceEngine extends TypedEventEmitter {
|
|
|
513
514
|
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
514
515
|
...(abortListener === undefined ? {} : { abortListener }),
|
|
515
516
|
};
|
|
516
|
-
this.#
|
|
517
|
+
this.#replay = replay;
|
|
518
|
+
try {
|
|
519
|
+
this.#scheduleReplayFrame();
|
|
520
|
+
}
|
|
521
|
+
catch (error) {
|
|
522
|
+
this.#finishReplay(replay, error);
|
|
523
|
+
}
|
|
517
524
|
return promise;
|
|
518
525
|
}
|
|
519
526
|
catch (error) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Runtime package version used in portable trace provenance. */
|
|
2
|
-
export declare const DICE_ENGINE_VERSION = "0.3.
|
|
2
|
+
export declare const DICE_ENGINE_VERSION = "0.3.1";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Runtime package version used in portable trace provenance. */
|
|
2
|
-
export const DICE_ENGINE_VERSION = '0.3.
|
|
2
|
+
export const DICE_ENGINE_VERSION = '0.3.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dice-o-rolla/dice-engine",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Framework-neutral physical dice engine with Rapier and Three.js browser adapters.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dice",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@dice-o-rolla/dice-core": "0.3.
|
|
51
|
-
"@dice-o-rolla/dice-geometry": "0.3.
|
|
52
|
-
"@dice-o-rolla/dice-physics": "0.3.
|
|
53
|
-
"@dice-o-rolla/dice-physics-rapier": "0.3.
|
|
54
|
-
"@dice-o-rolla/dice-renderer": "0.3.
|
|
55
|
-
"@dice-o-rolla/dice-renderer-three": "0.3.
|
|
50
|
+
"@dice-o-rolla/dice-core": "0.3.1",
|
|
51
|
+
"@dice-o-rolla/dice-geometry": "0.3.1",
|
|
52
|
+
"@dice-o-rolla/dice-physics": "0.3.1",
|
|
53
|
+
"@dice-o-rolla/dice-physics-rapier": "0.3.1",
|
|
54
|
+
"@dice-o-rolla/dice-renderer": "0.3.1",
|
|
55
|
+
"@dice-o-rolla/dice-renderer-three": "0.3.1"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=20.0.0"
|