@futdevpro/fsm-dynamo 1.20.94 → 1.20.97
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/_modules/game/_models/flying-effect.control-model.d.ts +7 -0
- package/build/_modules/game/_models/flying-effect.control-model.d.ts.map +1 -1
- package/build/_modules/game/_models/flying-effect.control-model.js +12 -1
- package/build/_modules/game/_models/flying-effect.control-model.js.map +1 -1
- package/build/_modules/game/_models/flying-effect.interface.d.ts +3 -0
- package/build/_modules/game/_models/flying-effect.interface.d.ts.map +1 -1
- package/build/_modules/game/_models/simulation-clock.control-model.d.ts +39 -0
- package/build/_modules/game/_models/simulation-clock.control-model.d.ts.map +1 -0
- package/build/_modules/game/_models/simulation-clock.control-model.js +122 -0
- package/build/_modules/game/_models/simulation-clock.control-model.js.map +1 -0
- package/build/_modules/game/_models/simulation-clock.interface.d.ts +44 -0
- package/build/_modules/game/_models/simulation-clock.interface.d.ts.map +1 -0
- package/build/_modules/game/_models/simulation-clock.interface.js +3 -0
- package/build/_modules/game/_models/simulation-clock.interface.js.map +1 -0
- package/build/_modules/game/index.d.ts +2 -0
- package/build/_modules/game/index.d.ts.map +1 -1
- package/build/_modules/game/index.js +2 -0
- package/build/_modules/game/index.js.map +1 -1
- package/build/_modules/location/_collections/loc-regions.util.d.ts.map +1 -1
- package/build/_modules/location/_collections/loc-regions.util.js +14 -9
- package/build/_modules/location/_collections/loc-regions.util.js.map +1 -1
- package/build-esm/_modules/game/_models/flying-effect.control-model.js +12 -1
- package/build-esm/_modules/game/_models/simulation-clock.control-model.js +117 -0
- package/build-esm/_modules/game/_models/simulation-clock.interface.js +1 -0
- package/build-esm/_modules/game/index.js +2 -0
- package/build-esm/_modules/location/_collections/loc-regions.util.js +8 -3
- package/package.json +4 -3
|
@@ -5,6 +5,7 @@ export declare class DyFM_FlyingEffect_ControlModel {
|
|
|
5
5
|
private readonly defaultDurationMs;
|
|
6
6
|
private readonly defaultRisePx;
|
|
7
7
|
private readonly defaultStackGapPx;
|
|
8
|
+
private reducedMotion;
|
|
8
9
|
private items;
|
|
9
10
|
private sequence;
|
|
10
11
|
private paused;
|
|
@@ -16,6 +17,12 @@ export declare class DyFM_FlyingEffect_ControlModel {
|
|
|
16
17
|
private evictedCount;
|
|
17
18
|
private highWatermark;
|
|
18
19
|
constructor(config?: DyFM_FlyingEffect_Config);
|
|
20
|
+
/**
|
|
21
|
+
* BFR-WARFACTORY-006 — reduced motion (e.g. the player setting or `prefers-reduced-motion`): the text no longer RISES,
|
|
22
|
+
* it stays at its anchor + stack offset and only fades (a fade is not motion). Takes effect from the next snapshot —
|
|
23
|
+
* lifetimes, stacking and expiry are unchanged, so switching it mid-game is safe.
|
|
24
|
+
*/
|
|
25
|
+
setReducedMotion(reducedMotion: boolean): void;
|
|
19
26
|
spawn(command: DyFM_FlyingEffect_SpawnCommand, nowMs: number): DyFM_FlyingEffect_Snapshot;
|
|
20
27
|
advanceTo(nowMs: number): readonly DyFM_FlyingEffect_Snapshot[];
|
|
21
28
|
setPaused(paused: boolean, nowMs: number): readonly DyFM_FlyingEffect_Snapshot[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flying-effect.control-model.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/flying-effect.control-model.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAE7B,0BAA0B,EAC1B,8BAA8B,EAE/B,MAAM,2BAA2B,CAAC;AAiBnC,+FAA+F;AAC/F,qBAAa,8BAA8B;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,aAAa,CAAK;gBAEd,MAAM,GAAE,wBAA6B;
|
|
1
|
+
{"version":3,"file":"flying-effect.control-model.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/flying-effect.control-model.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAE7B,0BAA0B,EAC1B,8BAA8B,EAE/B,MAAM,2BAA2B,CAAC;AAiBnC,+FAA+F;AAC/F,qBAAa,8BAA8B;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,aAAa,CAAK;gBAEd,MAAM,GAAE,wBAA6B;IAQjD;;;;OAIG;IACH,gBAAgB,CAAC,aAAa,EAAE,OAAO,GAAG,IAAI;IAI9C,KAAK,CAAC,OAAO,EAAE,8BAA8B,EAAE,KAAK,EAAE,MAAM,GAAG,0BAA0B;IAsDzF,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,0BAA0B,EAAE;IAW/D,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,0BAA0B,EAAE;IAoBhF,KAAK,IAAI,IAAI;IAIb,YAAY,IAAI,SAAS,0BAA0B,EAAE;IA+BrD,cAAc,IAAI,6BAA6B;IAc/C,OAAO,CAAC,eAAe;IAqBvB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,IAAI;CAGb"}
|
|
@@ -8,6 +8,7 @@ class DyFM_FlyingEffect_ControlModel {
|
|
|
8
8
|
defaultDurationMs;
|
|
9
9
|
defaultRisePx;
|
|
10
10
|
defaultStackGapPx;
|
|
11
|
+
reducedMotion;
|
|
11
12
|
items = [];
|
|
12
13
|
sequence = 0;
|
|
13
14
|
paused = false;
|
|
@@ -23,6 +24,15 @@ class DyFM_FlyingEffect_ControlModel {
|
|
|
23
24
|
this.defaultDurationMs = this.positive(config.defaultDurationMs ?? 1_400, 'defaultDurationMs');
|
|
24
25
|
this.defaultRisePx = this.nonNegative(config.defaultRisePx ?? 52, 'defaultRisePx');
|
|
25
26
|
this.defaultStackGapPx = this.nonNegative(config.defaultStackGapPx ?? 18, 'defaultStackGapPx');
|
|
27
|
+
this.reducedMotion = config.reducedMotion === true;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* BFR-WARFACTORY-006 — reduced motion (e.g. the player setting or `prefers-reduced-motion`): the text no longer RISES,
|
|
31
|
+
* it stays at its anchor + stack offset and only fades (a fade is not motion). Takes effect from the next snapshot —
|
|
32
|
+
* lifetimes, stacking and expiry are unchanged, so switching it mid-game is safe.
|
|
33
|
+
*/
|
|
34
|
+
setReducedMotion(reducedMotion) {
|
|
35
|
+
this.reducedMotion = reducedMotion === true;
|
|
26
36
|
}
|
|
27
37
|
spawn(command, nowMs) {
|
|
28
38
|
this.validateCommand(command);
|
|
@@ -132,7 +142,7 @@ class DyFM_FlyingEffect_ControlModel {
|
|
|
132
142
|
mergeKey: item.mergeKey,
|
|
133
143
|
progress,
|
|
134
144
|
opacity: 1 - progress,
|
|
135
|
-
offsetY: -(item.risePx * progress + item.stackGapPx * stackIndex),
|
|
145
|
+
offsetY: -((this.reducedMotion ? 0 : item.risePx * progress) + item.stackGapPx * stackIndex),
|
|
136
146
|
stackIndex,
|
|
137
147
|
};
|
|
138
148
|
});
|
|
@@ -146,6 +156,7 @@ class DyFM_FlyingEffect_ControlModel {
|
|
|
146
156
|
expiredCount: this.expiredCount,
|
|
147
157
|
evictedCount: this.evictedCount,
|
|
148
158
|
paused: this.paused,
|
|
159
|
+
reducedMotion: this.reducedMotion,
|
|
149
160
|
lastTimeMs: this.lastTimeMs,
|
|
150
161
|
};
|
|
151
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flying-effect.control-model.js","sourceRoot":"","sources":["../../../../src/_modules/game/_models/flying-effect.control-model.ts"],"names":[],"mappings":";;;AAAA,6FAAiF;AA0BjF,+FAA+F;AAC/F,MAAa,8BAA8B;IACxB,QAAQ,CAAS;IACjB,iBAAiB,CAAS;IAC1B,aAAa,CAAS;IACtB,iBAAiB,CAAS;IACnC,KAAK,GAAqB,EAAE,CAAC;IAC7B,QAAQ,GAAG,CAAC,CAAC;IACb,MAAM,GAAG,KAAK,CAAC;IACf,gBAAgB,GAAkB,IAAI,CAAC;IACvC,UAAU,GAAkB,IAAI,CAAC;IACjC,YAAY,GAAG,CAAC,CAAC;IACjB,WAAW,GAAG,CAAC,CAAC;IAChB,YAAY,GAAG,CAAC,CAAC;IACjB,YAAY,GAAG,CAAC,CAAC;IACjB,aAAa,GAAG,CAAC,CAAC;IAE1B,YAAY,SAAmC,EAAE;QAC/C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,IAAI,GAAG,EAAE,UAAU,EAAE,wBAAwB,CAAC,CAAC;QACnG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,IAAI,KAAK,EAAE,mBAAmB,CAAC,CAAC;QAC/F,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,IAAI,EAAE,EAAE,eAAe,CAAC,CAAC;QACnF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,iBAAiB,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"flying-effect.control-model.js","sourceRoot":"","sources":["../../../../src/_modules/game/_models/flying-effect.control-model.ts"],"names":[],"mappings":";;;AAAA,6FAAiF;AA0BjF,+FAA+F;AAC/F,MAAa,8BAA8B;IACxB,QAAQ,CAAS;IACjB,iBAAiB,CAAS;IAC1B,aAAa,CAAS;IACtB,iBAAiB,CAAS;IACnC,aAAa,CAAU;IACvB,KAAK,GAAqB,EAAE,CAAC;IAC7B,QAAQ,GAAG,CAAC,CAAC;IACb,MAAM,GAAG,KAAK,CAAC;IACf,gBAAgB,GAAkB,IAAI,CAAC;IACvC,UAAU,GAAkB,IAAI,CAAC;IACjC,YAAY,GAAG,CAAC,CAAC;IACjB,WAAW,GAAG,CAAC,CAAC;IAChB,YAAY,GAAG,CAAC,CAAC;IACjB,YAAY,GAAG,CAAC,CAAC;IACjB,aAAa,GAAG,CAAC,CAAC;IAE1B,YAAY,SAAmC,EAAE;QAC/C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,IAAI,GAAG,EAAE,UAAU,EAAE,wBAAwB,CAAC,CAAC;QACnG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,IAAI,KAAK,EAAE,mBAAmB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AAC;CACF;AA9OD,wEA8OC"}
|
|
@@ -39,6 +39,8 @@ export interface DyFM_FlyingEffect_Config {
|
|
|
39
39
|
defaultDurationMs?: number;
|
|
40
40
|
defaultRisePx?: number;
|
|
41
41
|
defaultStackGapPx?: number;
|
|
42
|
+
/** BFR-WARFACTORY-006 — no rise, fade only (switchable later with `setReducedMotion`). Default: `false`. */
|
|
43
|
+
reducedMotion?: boolean;
|
|
42
44
|
}
|
|
43
45
|
export interface DyFM_FlyingEffect_Diagnostics {
|
|
44
46
|
activeCount: number;
|
|
@@ -48,6 +50,7 @@ export interface DyFM_FlyingEffect_Diagnostics {
|
|
|
48
50
|
expiredCount: number;
|
|
49
51
|
evictedCount: number;
|
|
50
52
|
paused: boolean;
|
|
53
|
+
reducedMotion: boolean;
|
|
51
54
|
lastTimeMs: number | null;
|
|
52
55
|
}
|
|
53
56
|
//# sourceMappingURL=flying-effect.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flying-effect.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/flying-effect.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC7C;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,uBAAuB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"flying-effect.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/flying-effect.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC7C;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,uBAAuB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;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
|
1
|
+
import { DyFM_SimulationClock_AdvanceInput, DyFM_SimulationClock_AdvanceResult, DyFM_SimulationClock_Config, DyFM_SimulationClock_State } from './simulation-clock.interface';
|
|
2
|
+
/**
|
|
3
|
+
* BFR-WARFACTORY-010 — framework-independent, monotonic simulation clock.
|
|
4
|
+
*
|
|
5
|
+
* - The CALLER supplies real delta, speed and pause; the clock never reads wall time (deterministic, replayable).
|
|
6
|
+
* - Fixed-step mode (`fixedStepSeconds`): scaled time goes into an accumulator, whole steps are committed and the
|
|
7
|
+
* remainder carries over — at speed 10 the loop runs ten times as many steps of the same size, so fast-forward is
|
|
8
|
+
* behaviour-neutral. Variable mode (no `fixedStepSeconds`): one step of `realDelta * speed` (not neutral).
|
|
9
|
+
* - Real deltas are clamped (`maxRealDeltaSeconds`) and fixed steps capped (`maxStepsPerAdvance`); what is cut or
|
|
10
|
+
* dropped is reported, never silently lost.
|
|
11
|
+
* - `exportState` / `importState` (versioned; the legacy `{ elapsedSimulationSeconds }` shape is accepted) / `reset`.
|
|
12
|
+
* An invalid snapshot is rejected WITHOUT touching the running clock.
|
|
13
|
+
*/
|
|
14
|
+
export declare class DyFM_SimulationClock_ControlModel {
|
|
15
|
+
private readonly fixedStepSeconds;
|
|
16
|
+
private readonly maxRealDeltaSeconds;
|
|
17
|
+
private readonly maxStepsPerAdvance;
|
|
18
|
+
private elapsedSeconds;
|
|
19
|
+
private accumulatorSeconds;
|
|
20
|
+
/** Creates the clock; an invalid configuration throws (`DYFM-SIM-CLOCK-CONFIG`). */
|
|
21
|
+
constructor(config?: DyFM_SimulationClock_Config);
|
|
22
|
+
/** Total committed simulation seconds. */
|
|
23
|
+
now(): number;
|
|
24
|
+
/** Advances by one real frame. Paused, speed ≤ 0 or a non-finite input ⇒ nothing passes (a zero result). */
|
|
25
|
+
advance(input: DyFM_SimulationClock_AdvanceInput): DyFM_SimulationClock_AdvanceResult;
|
|
26
|
+
/** The save/load snapshot. */
|
|
27
|
+
exportState(): DyFM_SimulationClock_State;
|
|
28
|
+
/**
|
|
29
|
+
* Restores a snapshot; returns `false` (and changes NOTHING) when it is invalid. Accepts the legacy
|
|
30
|
+
* `{ elapsedSimulationSeconds }` shape (no `schemaVersion`) as an empty accumulator.
|
|
31
|
+
*/
|
|
32
|
+
importState(snapshot: unknown): boolean;
|
|
33
|
+
/** A new run: zero elapsed time and accumulator. */
|
|
34
|
+
reset(): void;
|
|
35
|
+
private static isNonNegative;
|
|
36
|
+
private static positive;
|
|
37
|
+
private static configError;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=simulation-clock.control-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation-clock.control-model.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/simulation-clock.control-model.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EAClC,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,qBAAa,iCAAiC;IAC5C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IACtD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;IAC7C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAC5C,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,kBAAkB,CAAa;IAEvC,oFAAoF;gBACxE,MAAM,GAAE,2BAAgC;IAcpD,0CAA0C;IAC1C,GAAG,IAAI,MAAM;IAIb,4GAA4G;IAC5G,OAAO,CAAC,KAAK,EAAE,iCAAiC,GAAG,kCAAkC;IA4CrF,8BAA8B;IAC9B,WAAW,IAAI,0BAA0B;IAIzC;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAoBvC,oDAAoD;IACpD,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B,OAAO,CAAC,MAAM,CAAC,QAAQ;IAQvB,OAAO,CAAC,MAAM,CAAC,WAAW;CAO3B"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyFM_SimulationClock_ControlModel = void 0;
|
|
4
|
+
const error_control_model_1 = require("../../../_models/control-models/error.control-model");
|
|
5
|
+
/**
|
|
6
|
+
* BFR-WARFACTORY-010 — framework-independent, monotonic simulation clock.
|
|
7
|
+
*
|
|
8
|
+
* - The CALLER supplies real delta, speed and pause; the clock never reads wall time (deterministic, replayable).
|
|
9
|
+
* - Fixed-step mode (`fixedStepSeconds`): scaled time goes into an accumulator, whole steps are committed and the
|
|
10
|
+
* remainder carries over — at speed 10 the loop runs ten times as many steps of the same size, so fast-forward is
|
|
11
|
+
* behaviour-neutral. Variable mode (no `fixedStepSeconds`): one step of `realDelta * speed` (not neutral).
|
|
12
|
+
* - Real deltas are clamped (`maxRealDeltaSeconds`) and fixed steps capped (`maxStepsPerAdvance`); what is cut or
|
|
13
|
+
* dropped is reported, never silently lost.
|
|
14
|
+
* - `exportState` / `importState` (versioned; the legacy `{ elapsedSimulationSeconds }` shape is accepted) / `reset`.
|
|
15
|
+
* An invalid snapshot is rejected WITHOUT touching the running clock.
|
|
16
|
+
*/
|
|
17
|
+
class DyFM_SimulationClock_ControlModel {
|
|
18
|
+
fixedStepSeconds;
|
|
19
|
+
maxRealDeltaSeconds;
|
|
20
|
+
maxStepsPerAdvance;
|
|
21
|
+
elapsedSeconds = 0;
|
|
22
|
+
accumulatorSeconds = 0;
|
|
23
|
+
/** Creates the clock; an invalid configuration throws (`DYFM-SIM-CLOCK-CONFIG`). */
|
|
24
|
+
constructor(config = {}) {
|
|
25
|
+
this.fixedStepSeconds = config.fixedStepSeconds === undefined
|
|
26
|
+
? undefined
|
|
27
|
+
: DyFM_SimulationClock_ControlModel.positive(config.fixedStepSeconds, 'fixedStepSeconds');
|
|
28
|
+
this.maxRealDeltaSeconds =
|
|
29
|
+
DyFM_SimulationClock_ControlModel.positive(config.maxRealDeltaSeconds ?? 0.25, 'maxRealDeltaSeconds');
|
|
30
|
+
this.maxStepsPerAdvance = DyFM_SimulationClock_ControlModel.positive(config.maxStepsPerAdvance ?? 240, 'maxStepsPerAdvance');
|
|
31
|
+
if (!Number.isInteger(this.maxStepsPerAdvance)) {
|
|
32
|
+
throw DyFM_SimulationClock_ControlModel.configError('maxStepsPerAdvance must be an integer');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Total committed simulation seconds. */
|
|
36
|
+
now() {
|
|
37
|
+
return this.elapsedSeconds;
|
|
38
|
+
}
|
|
39
|
+
/** Advances by one real frame. Paused, speed ≤ 0 or a non-finite input ⇒ nothing passes (a zero result). */
|
|
40
|
+
advance(input) {
|
|
41
|
+
const idle = {
|
|
42
|
+
simulationDeltaSeconds: 0, steps: 0, stepSeconds: this.fixedStepSeconds ?? 0,
|
|
43
|
+
clampedRealSeconds: 0, droppedSimulationSeconds: 0,
|
|
44
|
+
};
|
|
45
|
+
if (input.paused || !Number.isFinite(input.realDeltaSeconds) || !Number.isFinite(input.speed)
|
|
46
|
+
|| input.speed <= 0 || input.realDeltaSeconds <= 0) {
|
|
47
|
+
return idle;
|
|
48
|
+
}
|
|
49
|
+
const realSeconds = Math.min(input.realDeltaSeconds, this.maxRealDeltaSeconds);
|
|
50
|
+
const clampedRealSeconds = input.realDeltaSeconds - realSeconds;
|
|
51
|
+
const scaledSeconds = realSeconds * input.speed;
|
|
52
|
+
if (this.fixedStepSeconds === undefined) {
|
|
53
|
+
// Variable step: one update of the scaled delta (documented as NOT behaviour-neutral across speeds)
|
|
54
|
+
this.elapsedSeconds += scaledSeconds;
|
|
55
|
+
return {
|
|
56
|
+
simulationDeltaSeconds: scaledSeconds, steps: 1, stepSeconds: scaledSeconds,
|
|
57
|
+
clampedRealSeconds: clampedRealSeconds, droppedSimulationSeconds: 0,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
// Fixed step: commit whole steps, carry the remainder, cap the burst (spiral-of-death guard)
|
|
61
|
+
this.accumulatorSeconds += scaledSeconds;
|
|
62
|
+
// the epsilon keeps 3 × (1/60) from rounding down to 2 steps
|
|
63
|
+
const available = Math.floor(this.accumulatorSeconds / this.fixedStepSeconds + 1e-9);
|
|
64
|
+
const steps = Math.min(available, this.maxStepsPerAdvance);
|
|
65
|
+
let droppedSimulationSeconds = 0;
|
|
66
|
+
this.accumulatorSeconds = Math.max(0, this.accumulatorSeconds - available * this.fixedStepSeconds);
|
|
67
|
+
if (available > steps) {
|
|
68
|
+
droppedSimulationSeconds = (available - steps) * this.fixedStepSeconds;
|
|
69
|
+
}
|
|
70
|
+
this.elapsedSeconds += steps * this.fixedStepSeconds;
|
|
71
|
+
return {
|
|
72
|
+
simulationDeltaSeconds: steps * this.fixedStepSeconds, steps: steps, stepSeconds: this.fixedStepSeconds,
|
|
73
|
+
clampedRealSeconds: clampedRealSeconds, droppedSimulationSeconds: droppedSimulationSeconds,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** The save/load snapshot. */
|
|
77
|
+
exportState() {
|
|
78
|
+
return { schemaVersion: 1, elapsedSimulationSeconds: this.elapsedSeconds, accumulatorSeconds: this.accumulatorSeconds };
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Restores a snapshot; returns `false` (and changes NOTHING) when it is invalid. Accepts the legacy
|
|
82
|
+
* `{ elapsedSimulationSeconds }` shape (no `schemaVersion`) as an empty accumulator.
|
|
83
|
+
*/
|
|
84
|
+
importState(snapshot) {
|
|
85
|
+
if (!snapshot || typeof snapshot !== 'object') {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
const state = snapshot;
|
|
89
|
+
const accumulator = state.schemaVersion === undefined ? 0 : state.accumulatorSeconds;
|
|
90
|
+
if ((state.schemaVersion !== undefined && state.schemaVersion !== 1)
|
|
91
|
+
|| !DyFM_SimulationClock_ControlModel.isNonNegative(state.elapsedSimulationSeconds)
|
|
92
|
+
|| !DyFM_SimulationClock_ControlModel.isNonNegative(accumulator)) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
this.elapsedSeconds = state.elapsedSimulationSeconds;
|
|
96
|
+
this.accumulatorSeconds = accumulator;
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
/** A new run: zero elapsed time and accumulator. */
|
|
100
|
+
reset() {
|
|
101
|
+
this.elapsedSeconds = 0;
|
|
102
|
+
this.accumulatorSeconds = 0;
|
|
103
|
+
}
|
|
104
|
+
static isNonNegative(value) {
|
|
105
|
+
return typeof value === 'number' && Number.isFinite(value) && value >= 0;
|
|
106
|
+
}
|
|
107
|
+
static positive(value, field) {
|
|
108
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) {
|
|
109
|
+
throw DyFM_SimulationClock_ControlModel.configError(`${field} must be a finite number > 0 (got ${value})`);
|
|
110
|
+
}
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
static configError(message) {
|
|
114
|
+
return new error_control_model_1.DyFM_Error({
|
|
115
|
+
message: `DyFM_SimulationClock: ${message}`,
|
|
116
|
+
errorCode: 'DYFM-SIM-CLOCK-CONFIG',
|
|
117
|
+
issuerService: 'DyFM_SimulationClock_ControlModel',
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.DyFM_SimulationClock_ControlModel = DyFM_SimulationClock_ControlModel;
|
|
122
|
+
//# sourceMappingURL=simulation-clock.control-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation-clock.control-model.js","sourceRoot":"","sources":["../../../../src/_modules/game/_models/simulation-clock.control-model.ts"],"names":[],"mappings":";;;AAAA,6FAAiF;AAQjF;;;;;;;;;;;GAWG;AACH,MAAa,iCAAiC;IAC3B,gBAAgB,CAAqB;IACrC,mBAAmB,CAAS;IAC5B,kBAAkB,CAAS;IACpC,cAAc,GAAW,CAAC,CAAC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AQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IAC3E,CAAC;IAEO,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,KAAa;QAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACvE,MAAM,iCAAiC,CAAC,WAAW,CAAC,GAAG,KAAK,qCAAqC,KAAK,GAAG,CAAC,CAAC;QAC7G,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,MAAM,CAAC,WAAW,CAAC,OAAe;QACxC,OAAO,IAAI,gCAAU,CAAC;YACpB,OAAO,EAAE,yBAAyB,OAAO,EAAE;YAC3C,SAAS,EAAE,uBAAuB;YAClC,aAAa,EAAE,mCAAmC;SACnD,CAAC,CAAC;IACL,CAAC;CACF;AA9HD,8EA8HC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** BFR-WARFACTORY-010 — `DyFM_SimulationClock_ControlModel` configuration. */
|
|
2
|
+
export interface DyFM_SimulationClock_Config {
|
|
3
|
+
/**
|
|
4
|
+
* Fixed simulation step in seconds (e.g. `1 / 60`). When set, `advance` accumulates scaled time and returns how many
|
|
5
|
+
* fixed steps to run — fast-forward then runs MORE steps of the SAME size, so gameplay is behaviour-neutral across
|
|
6
|
+
* speeds. When unset, one variable step of `realDelta * speed` is returned (NOT behaviour-neutral across speeds).
|
|
7
|
+
*/
|
|
8
|
+
fixedStepSeconds?: number;
|
|
9
|
+
/** Real-delta clamp in seconds (a tab switch / breakpoint must not become one giant step). Default: `0.25`. */
|
|
10
|
+
maxRealDeltaSeconds?: number;
|
|
11
|
+
/** Fixed mode: at most this many steps per `advance`; the excess is DROPPED and reported. Default: `240`. */
|
|
12
|
+
maxStepsPerAdvance?: number;
|
|
13
|
+
}
|
|
14
|
+
/** BFR-WARFACTORY-010 — the input of one `advance` (the caller owns real time, speed and pause). */
|
|
15
|
+
export interface DyFM_SimulationClock_AdvanceInput {
|
|
16
|
+
/** Real (wall) seconds since the previous frame — measured by the caller; the clock never reads wall time. */
|
|
17
|
+
realDeltaSeconds: number;
|
|
18
|
+
/** Simulation speed multiplier (`0` = stopped). The UI's speed choices stay the caller's. */
|
|
19
|
+
speed: number;
|
|
20
|
+
/** Paused ⇒ no simulation time passes. */
|
|
21
|
+
paused: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** BFR-WARFACTORY-010 — what one `advance` produced. */
|
|
24
|
+
export interface DyFM_SimulationClock_AdvanceResult {
|
|
25
|
+
/** Simulation seconds committed by this call (`steps * stepSeconds`). */
|
|
26
|
+
simulationDeltaSeconds: number;
|
|
27
|
+
/** How many simulation updates to run now (fixed mode: 0..maxStepsPerAdvance; variable mode: 0 or 1). */
|
|
28
|
+
steps: number;
|
|
29
|
+
/** The size of each step in seconds. */
|
|
30
|
+
stepSeconds: number;
|
|
31
|
+
/** Real seconds cut off by `maxRealDeltaSeconds`. */
|
|
32
|
+
clampedRealSeconds: number;
|
|
33
|
+
/** Simulation seconds dropped by `maxStepsPerAdvance` (fixed mode). */
|
|
34
|
+
droppedSimulationSeconds: number;
|
|
35
|
+
}
|
|
36
|
+
/** BFR-WARFACTORY-010 — the save/load snapshot (versioned). */
|
|
37
|
+
export interface DyFM_SimulationClock_State {
|
|
38
|
+
schemaVersion: 1;
|
|
39
|
+
/** Total committed simulation seconds. */
|
|
40
|
+
elapsedSimulationSeconds: number;
|
|
41
|
+
/** Fixed mode: scaled time not yet committed to a step (carried over, so no time is lost between frames). */
|
|
42
|
+
accumulatorSeconds: number;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=simulation-clock.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation-clock.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/game/_models/simulation-clock.interface.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+GAA+G;IAC/G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6GAA6G;IAC7G,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,oGAAoG;AACpG,MAAM,WAAW,iCAAiC;IAChD,8GAA8G;IAC9G,gBAAgB,EAAE,MAAM,CAAC;IACzB,6FAA6F;IAC7F,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wDAAwD;AACxD,MAAM,WAAW,kCAAkC;IACjD,yEAAyE;IACzE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,yGAAyG;IACzG,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uEAAuE;IACvE,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,+DAA+D;AAC/D,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,CAAC,CAAC;IACjB,0CAA0C;IAC1C,wBAAwB,EAAE,MAAM,CAAC;IACjC,6GAA6G;IAC7G,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation-clock.interface.js","sourceRoot":"","sources":["../../../../src/_modules/game/_models/simulation-clock.interface.ts"],"names":[],"mappings":""}
|
|
@@ -10,6 +10,8 @@ export * from './_models/seeded-random-registry.interface';
|
|
|
10
10
|
export * from './_models/seeded-random-registry.control-model';
|
|
11
11
|
export * from './_models/flying-effect.interface';
|
|
12
12
|
export * from './_models/flying-effect.control-model';
|
|
13
|
+
export * from './_models/simulation-clock.interface';
|
|
14
|
+
export * from './_models/simulation-clock.control-model';
|
|
13
15
|
export * from './_collections/audio-mixer.util';
|
|
14
16
|
export * from './_collections/audio-scale.util';
|
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/game/index.ts"],"names":[],"mappings":"AACA,cAAc,6BAA6B,CAAC;AAG5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/game/index.ts"],"names":[],"mappings":"AACA,cAAc,6BAA6B,CAAC;AAG5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AAGzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC"}
|
|
@@ -15,6 +15,8 @@ tslib_1.__exportStar(require("./_models/seeded-random-registry.interface"), expo
|
|
|
15
15
|
tslib_1.__exportStar(require("./_models/seeded-random-registry.control-model"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./_models/flying-effect.interface"), exports);
|
|
17
17
|
tslib_1.__exportStar(require("./_models/flying-effect.control-model"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./_models/simulation-clock.interface"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./_models/simulation-clock.control-model"), exports);
|
|
18
20
|
// COLLECTIONS
|
|
19
21
|
tslib_1.__exportStar(require("./_collections/audio-mixer.util"), exports);
|
|
20
22
|
tslib_1.__exportStar(require("./_collections/audio-scale.util"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/game/index.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACR,sEAA4C;AAE5C,SAAS;AACT,iFAAuD;AACvD,mFAAyD;AACzD,gFAAsD;AACtD,8EAAoD;AACpD,0EAAgD;AAChD,kFAAwD;AACxD,gFAAsD;AACtD,qFAA2D;AAC3D,yFAA+D;AAC/D,4EAAkD;AAClD,gFAAsD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/game/index.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACR,sEAA4C;AAE5C,SAAS;AACT,iFAAuD;AACvD,mFAAyD;AACzD,gFAAsD;AACtD,8EAAoD;AACpD,0EAAgD;AAChD,kFAAwD;AACxD,gFAAsD;AACtD,qFAA2D;AAC3D,yFAA+D;AAC/D,4EAAkD;AAClD,gFAAsD;AACtD,+EAAqD;AACrD,mFAAyD;AAEzD,cAAc;AACd,0EAAgD;AAChD,0EAAgD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loc-regions.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loc-regions.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAMjF;;;GAGG;AACH,qBAAa,YAAY;IAEvB,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,EAAE,CAAkC;IACnF,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,qBAAqB,EAAE,CAAmC;IACtF,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAmC;IAEjF,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAS/B,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAiB/B;;;;;;;;;;OAUG;IACH,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe;IAcrD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAc7C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB;CAa3D"}
|
|
@@ -5,9 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
/* const ISOs = [];
|
|
6
6
|
const PhoneCodes = [];
|
|
7
7
|
const Divisions = []; */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// ⚠️ DEFAULT imports, never `import * as` (measured 2026-09-24, TEST checkout country picker EMPTY): in the ES-module
|
|
9
|
+
// build a bundler (esbuild / Angular production, webpack) turns a JSON namespace import into `{ default: [...] }`, and the
|
|
10
|
+
// index-based `JSONListify` below then finds NOTHING — every country / phone-code / division list was empty. The CommonJS
|
|
11
|
+
// build hid it (`esModuleInterop`), and so did the unit tests. The default import is the same array in BOTH builds;
|
|
12
|
+
// the guard is `src/location-esm-bundle.spec.ts` (bundles `build-esm` with esbuild).
|
|
13
|
+
const country_codes_ISO_3166_json_1 = tslib_1.__importDefault(require("./assets/country-codes-ISO-3166.json"));
|
|
14
|
+
const country_phone_codes_json_1 = tslib_1.__importDefault(require("./assets/country-phone-codes.json"));
|
|
15
|
+
const country_divisions_ISO_3166_all_list_json_1 = tslib_1.__importDefault(require("./assets/country-divisions-ISO-3166-all-list.json"));
|
|
11
16
|
const object_util_1 = require("../../../_collections/utils/object.util");
|
|
12
17
|
const error_control_model_1 = require("../../../_models/control-models/error.control-model");
|
|
13
18
|
/**
|
|
@@ -20,22 +25,22 @@ class DyFM_Regions {
|
|
|
20
25
|
static phoneCodes = DyFM_Regions.getAllPhoneCodes();
|
|
21
26
|
static countryISOs = DyFM_Regions.getAllCountryISO();
|
|
22
27
|
static getAllDivisions() {
|
|
23
|
-
if (!
|
|
28
|
+
if (!country_divisions_ISO_3166_all_list_json_1.default)
|
|
24
29
|
throw new error_control_model_1.DyFM_Error({ message: 'Cannot find ISO-3166 JSON file.' });
|
|
25
|
-
return object_util_1.DyFM_Object.JSONListify(
|
|
30
|
+
return object_util_1.DyFM_Object.JSONListify(country_divisions_ISO_3166_all_list_json_1.default);
|
|
26
31
|
}
|
|
27
32
|
static getAllPhoneCodes() {
|
|
28
|
-
if (!
|
|
33
|
+
if (!country_phone_codes_json_1.default)
|
|
29
34
|
throw new error_control_model_1.DyFM_Error({ message: 'Cannot find ISO-3166 JSON file.' });
|
|
30
|
-
return object_util_1.DyFM_Object.JSONListify(
|
|
35
|
+
return object_util_1.DyFM_Object.JSONListify(country_phone_codes_json_1.default);
|
|
31
36
|
}
|
|
32
37
|
/* private static getSubdivisionCollection(): DivisionCollection {
|
|
33
38
|
return Divisions as DivisionCollection;
|
|
34
39
|
} */
|
|
35
40
|
static getAllCountryISO() {
|
|
36
|
-
if (!
|
|
41
|
+
if (!country_codes_ISO_3166_json_1.default)
|
|
37
42
|
throw new error_control_model_1.DyFM_Error({ message: 'Cannot find ISO-3166 JSON file.' });
|
|
38
|
-
const result = object_util_1.DyFM_Object.JSONListify(
|
|
43
|
+
const result = object_util_1.DyFM_Object.JSONListify(country_codes_ISO_3166_json_1.default);
|
|
39
44
|
result.forEach((iso) => {
|
|
40
45
|
iso.phoneCode = this.phoneCodes.find((pc) => pc.iso === iso.iso2)?.code;
|
|
41
46
|
iso.divisions = this.divisions.filter((d) => d.iso === iso.iso2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loc-regions.util.js","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":";;;;AACA;;wBAEwB;AACxB,
|
|
1
|
+
{"version":3,"file":"loc-regions.util.js","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":";;;;AACA;;wBAEwB;AACxB,sHAAsH;AACtH,2HAA2H;AAC3H,0HAA0H;AAC1H,oHAAoH;AACpH,qFAAqF;AACrF,+GAAwD;AAExD,yGAA2D;AAC3D,yIAA0E;AAS1E,yEAAsE;AACtE,6FAAiF;AAGjF;;;GAGG;AACH,MAAa,YAAY;IACvB,qFAAqF;IACrF,MAAM,CAAU,SAAS,GAA2B,YAAY,CAAC,eAAe,EAAE,CAAC;IACnF,MAAM,CAAU,UAAU,GAA4B,YAAY,CAAC,gBAAgB,EAAE,CAAC;IACtF,MAAM,CAAU,WAAW,GAAsB,YAAY,CAAC,gBAAgB,EAAE,CAAC;IAEzE,MAAM,CAAC,eAAe;QAC5B,IAAI,CAAC,kDAAS;YAAE,MAAM,IAAI,gCAAU,CAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC,CAAC;QAErF,OAAO,yBAAW,CAAC,WAAW,CAAC,kDAAS,CAAC,CAAC;IAC5C,CAAC;IACO,MAAM,CAAC,gBAAgB;QAC7B,IAAI,CAAC,kCAAU;YAAE,MAAM,IAAI,gCAAU,CAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC,CAAC;QAEtF,OAAO,yBAAW,CAAC,WAAW,CAAC,kCAAU,CAAC,CAAC;IAC7C,CAAC;IAED;;QAEI;IAC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CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,gCAAU,CAAC;gBACnB,OAAO,EAAE,uCAAuC,IAAI,EAAE;aACvD,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,cAAc,CAAC,IAAY;QAChC,MAAM,SAAS,GAA0B,IAAI,CAAC,UAAU,CAAC,IAAI,CAC3D,CAAC,IAA2B,EAAW,EAAE,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAC3D,CAAC;QAEF,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,gCAAU,CAAC;gBACnB,OAAO,EAAE,uCAAuC,IAAI,EAAE;aACvD,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;;AA9GH,oCA+GC"}
|
|
@@ -5,6 +5,7 @@ export class DyFM_FlyingEffect_ControlModel {
|
|
|
5
5
|
defaultDurationMs;
|
|
6
6
|
defaultRisePx;
|
|
7
7
|
defaultStackGapPx;
|
|
8
|
+
reducedMotion;
|
|
8
9
|
items = [];
|
|
9
10
|
sequence = 0;
|
|
10
11
|
paused = false;
|
|
@@ -20,6 +21,15 @@ export class DyFM_FlyingEffect_ControlModel {
|
|
|
20
21
|
this.defaultDurationMs = this.positive(config.defaultDurationMs ?? 1_400, 'defaultDurationMs');
|
|
21
22
|
this.defaultRisePx = this.nonNegative(config.defaultRisePx ?? 52, 'defaultRisePx');
|
|
22
23
|
this.defaultStackGapPx = this.nonNegative(config.defaultStackGapPx ?? 18, 'defaultStackGapPx');
|
|
24
|
+
this.reducedMotion = config.reducedMotion === true;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* BFR-WARFACTORY-006 — reduced motion (e.g. the player setting or `prefers-reduced-motion`): the text no longer RISES,
|
|
28
|
+
* it stays at its anchor + stack offset and only fades (a fade is not motion). Takes effect from the next snapshot —
|
|
29
|
+
* lifetimes, stacking and expiry are unchanged, so switching it mid-game is safe.
|
|
30
|
+
*/
|
|
31
|
+
setReducedMotion(reducedMotion) {
|
|
32
|
+
this.reducedMotion = reducedMotion === true;
|
|
23
33
|
}
|
|
24
34
|
spawn(command, nowMs) {
|
|
25
35
|
this.validateCommand(command);
|
|
@@ -129,7 +139,7 @@ export class DyFM_FlyingEffect_ControlModel {
|
|
|
129
139
|
mergeKey: item.mergeKey,
|
|
130
140
|
progress,
|
|
131
141
|
opacity: 1 - progress,
|
|
132
|
-
offsetY: -(item.risePx * progress + item.stackGapPx * stackIndex),
|
|
142
|
+
offsetY: -((this.reducedMotion ? 0 : item.risePx * progress) + item.stackGapPx * stackIndex),
|
|
133
143
|
stackIndex,
|
|
134
144
|
};
|
|
135
145
|
});
|
|
@@ -143,6 +153,7 @@ export class DyFM_FlyingEffect_ControlModel {
|
|
|
143
153
|
expiredCount: this.expiredCount,
|
|
144
154
|
evictedCount: this.evictedCount,
|
|
145
155
|
paused: this.paused,
|
|
156
|
+
reducedMotion: this.reducedMotion,
|
|
146
157
|
lastTimeMs: this.lastTimeMs,
|
|
147
158
|
};
|
|
148
159
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { DyFM_Error } from '../../../_models/control-models/error.control-model';
|
|
2
|
+
/**
|
|
3
|
+
* BFR-WARFACTORY-010 — framework-independent, monotonic simulation clock.
|
|
4
|
+
*
|
|
5
|
+
* - The CALLER supplies real delta, speed and pause; the clock never reads wall time (deterministic, replayable).
|
|
6
|
+
* - Fixed-step mode (`fixedStepSeconds`): scaled time goes into an accumulator, whole steps are committed and the
|
|
7
|
+
* remainder carries over — at speed 10 the loop runs ten times as many steps of the same size, so fast-forward is
|
|
8
|
+
* behaviour-neutral. Variable mode (no `fixedStepSeconds`): one step of `realDelta * speed` (not neutral).
|
|
9
|
+
* - Real deltas are clamped (`maxRealDeltaSeconds`) and fixed steps capped (`maxStepsPerAdvance`); what is cut or
|
|
10
|
+
* dropped is reported, never silently lost.
|
|
11
|
+
* - `exportState` / `importState` (versioned; the legacy `{ elapsedSimulationSeconds }` shape is accepted) / `reset`.
|
|
12
|
+
* An invalid snapshot is rejected WITHOUT touching the running clock.
|
|
13
|
+
*/
|
|
14
|
+
export class DyFM_SimulationClock_ControlModel {
|
|
15
|
+
fixedStepSeconds;
|
|
16
|
+
maxRealDeltaSeconds;
|
|
17
|
+
maxStepsPerAdvance;
|
|
18
|
+
elapsedSeconds = 0;
|
|
19
|
+
accumulatorSeconds = 0;
|
|
20
|
+
/** Creates the clock; an invalid configuration throws (`DYFM-SIM-CLOCK-CONFIG`). */
|
|
21
|
+
constructor(config = {}) {
|
|
22
|
+
this.fixedStepSeconds = config.fixedStepSeconds === undefined
|
|
23
|
+
? undefined
|
|
24
|
+
: DyFM_SimulationClock_ControlModel.positive(config.fixedStepSeconds, 'fixedStepSeconds');
|
|
25
|
+
this.maxRealDeltaSeconds =
|
|
26
|
+
DyFM_SimulationClock_ControlModel.positive(config.maxRealDeltaSeconds ?? 0.25, 'maxRealDeltaSeconds');
|
|
27
|
+
this.maxStepsPerAdvance = DyFM_SimulationClock_ControlModel.positive(config.maxStepsPerAdvance ?? 240, 'maxStepsPerAdvance');
|
|
28
|
+
if (!Number.isInteger(this.maxStepsPerAdvance)) {
|
|
29
|
+
throw DyFM_SimulationClock_ControlModel.configError('maxStepsPerAdvance must be an integer');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Total committed simulation seconds. */
|
|
33
|
+
now() {
|
|
34
|
+
return this.elapsedSeconds;
|
|
35
|
+
}
|
|
36
|
+
/** Advances by one real frame. Paused, speed ≤ 0 or a non-finite input ⇒ nothing passes (a zero result). */
|
|
37
|
+
advance(input) {
|
|
38
|
+
const idle = {
|
|
39
|
+
simulationDeltaSeconds: 0, steps: 0, stepSeconds: this.fixedStepSeconds ?? 0,
|
|
40
|
+
clampedRealSeconds: 0, droppedSimulationSeconds: 0,
|
|
41
|
+
};
|
|
42
|
+
if (input.paused || !Number.isFinite(input.realDeltaSeconds) || !Number.isFinite(input.speed)
|
|
43
|
+
|| input.speed <= 0 || input.realDeltaSeconds <= 0) {
|
|
44
|
+
return idle;
|
|
45
|
+
}
|
|
46
|
+
const realSeconds = Math.min(input.realDeltaSeconds, this.maxRealDeltaSeconds);
|
|
47
|
+
const clampedRealSeconds = input.realDeltaSeconds - realSeconds;
|
|
48
|
+
const scaledSeconds = realSeconds * input.speed;
|
|
49
|
+
if (this.fixedStepSeconds === undefined) {
|
|
50
|
+
// Variable step: one update of the scaled delta (documented as NOT behaviour-neutral across speeds)
|
|
51
|
+
this.elapsedSeconds += scaledSeconds;
|
|
52
|
+
return {
|
|
53
|
+
simulationDeltaSeconds: scaledSeconds, steps: 1, stepSeconds: scaledSeconds,
|
|
54
|
+
clampedRealSeconds: clampedRealSeconds, droppedSimulationSeconds: 0,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
// Fixed step: commit whole steps, carry the remainder, cap the burst (spiral-of-death guard)
|
|
58
|
+
this.accumulatorSeconds += scaledSeconds;
|
|
59
|
+
// the epsilon keeps 3 × (1/60) from rounding down to 2 steps
|
|
60
|
+
const available = Math.floor(this.accumulatorSeconds / this.fixedStepSeconds + 1e-9);
|
|
61
|
+
const steps = Math.min(available, this.maxStepsPerAdvance);
|
|
62
|
+
let droppedSimulationSeconds = 0;
|
|
63
|
+
this.accumulatorSeconds = Math.max(0, this.accumulatorSeconds - available * this.fixedStepSeconds);
|
|
64
|
+
if (available > steps) {
|
|
65
|
+
droppedSimulationSeconds = (available - steps) * this.fixedStepSeconds;
|
|
66
|
+
}
|
|
67
|
+
this.elapsedSeconds += steps * this.fixedStepSeconds;
|
|
68
|
+
return {
|
|
69
|
+
simulationDeltaSeconds: steps * this.fixedStepSeconds, steps: steps, stepSeconds: this.fixedStepSeconds,
|
|
70
|
+
clampedRealSeconds: clampedRealSeconds, droppedSimulationSeconds: droppedSimulationSeconds,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** The save/load snapshot. */
|
|
74
|
+
exportState() {
|
|
75
|
+
return { schemaVersion: 1, elapsedSimulationSeconds: this.elapsedSeconds, accumulatorSeconds: this.accumulatorSeconds };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Restores a snapshot; returns `false` (and changes NOTHING) when it is invalid. Accepts the legacy
|
|
79
|
+
* `{ elapsedSimulationSeconds }` shape (no `schemaVersion`) as an empty accumulator.
|
|
80
|
+
*/
|
|
81
|
+
importState(snapshot) {
|
|
82
|
+
if (!snapshot || typeof snapshot !== 'object') {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
const state = snapshot;
|
|
86
|
+
const accumulator = state.schemaVersion === undefined ? 0 : state.accumulatorSeconds;
|
|
87
|
+
if ((state.schemaVersion !== undefined && state.schemaVersion !== 1)
|
|
88
|
+
|| !DyFM_SimulationClock_ControlModel.isNonNegative(state.elapsedSimulationSeconds)
|
|
89
|
+
|| !DyFM_SimulationClock_ControlModel.isNonNegative(accumulator)) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
this.elapsedSeconds = state.elapsedSimulationSeconds;
|
|
93
|
+
this.accumulatorSeconds = accumulator;
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
/** A new run: zero elapsed time and accumulator. */
|
|
97
|
+
reset() {
|
|
98
|
+
this.elapsedSeconds = 0;
|
|
99
|
+
this.accumulatorSeconds = 0;
|
|
100
|
+
}
|
|
101
|
+
static isNonNegative(value) {
|
|
102
|
+
return typeof value === 'number' && Number.isFinite(value) && value >= 0;
|
|
103
|
+
}
|
|
104
|
+
static positive(value, field) {
|
|
105
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) {
|
|
106
|
+
throw DyFM_SimulationClock_ControlModel.configError(`${field} must be a finite number > 0 (got ${value})`);
|
|
107
|
+
}
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
static configError(message) {
|
|
111
|
+
return new DyFM_Error({
|
|
112
|
+
message: `DyFM_SimulationClock: ${message}`,
|
|
113
|
+
errorCode: 'DYFM-SIM-CLOCK-CONFIG',
|
|
114
|
+
issuerService: 'DyFM_SimulationClock_ControlModel',
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,6 +12,8 @@ export * from './_models/seeded-random-registry.interface';
|
|
|
12
12
|
export * from './_models/seeded-random-registry.control-model';
|
|
13
13
|
export * from './_models/flying-effect.interface';
|
|
14
14
|
export * from './_models/flying-effect.control-model';
|
|
15
|
+
export * from './_models/simulation-clock.interface';
|
|
16
|
+
export * from './_models/simulation-clock.control-model';
|
|
15
17
|
// COLLECTIONS
|
|
16
18
|
export * from './_collections/audio-mixer.util';
|
|
17
19
|
export * from './_collections/audio-scale.util';
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/* const ISOs = [];
|
|
2
2
|
const PhoneCodes = [];
|
|
3
3
|
const Divisions = []; */
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
|
|
4
|
+
// ⚠️ DEFAULT imports, never `import * as` (measured 2026-09-24, TEST checkout country picker EMPTY): in the ES-module
|
|
5
|
+
// build a bundler (esbuild / Angular production, webpack) turns a JSON namespace import into `{ default: [...] }`, and the
|
|
6
|
+
// index-based `JSONListify` below then finds NOTHING — every country / phone-code / division list was empty. The CommonJS
|
|
7
|
+
// build hid it (`esModuleInterop`), and so did the unit tests. The default import is the same array in BOTH builds;
|
|
8
|
+
// the guard is `src/location-esm-bundle.spec.ts` (bundles `build-esm` with esbuild).
|
|
9
|
+
import ISOs from './assets/country-codes-ISO-3166.json';
|
|
10
|
+
import PhoneCodes from './assets/country-phone-codes.json';
|
|
11
|
+
import Divisions from './assets/country-divisions-ISO-3166-all-list.json';
|
|
7
12
|
import { DyFM_Object } from '../../../_collections/utils/object.util';
|
|
8
13
|
import { DyFM_Error } from '../../../_models/control-models/error.control-model';
|
|
9
14
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/fsm-dynamo",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.97",
|
|
4
4
|
"description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
|
|
5
5
|
"DyBu_settings": {
|
|
6
6
|
"packageType": "full-stack-package",
|
|
@@ -375,16 +375,17 @@
|
|
|
375
375
|
"@types/jasmine": "~4.3.5",
|
|
376
376
|
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
377
377
|
"@typescript-eslint/parser": "^8.41.0",
|
|
378
|
+
"esbuild": "0.25.12",
|
|
378
379
|
"eslint": "~9.39.5",
|
|
379
380
|
"eslint-plugin-import": "^2.29.0",
|
|
380
381
|
"eslint-plugin-jsdoc": "^48.0.0",
|
|
381
382
|
"eslint-plugin-max-params-no-constructor": "^0.0.4",
|
|
382
383
|
"eslint-plugin-prettier": "^5.1.3",
|
|
383
384
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
385
|
+
"husky": "^9.1.7",
|
|
384
386
|
"jasmine": "5.10.0",
|
|
385
387
|
"jasmine-spec-reporter": "^7.0.0",
|
|
386
|
-
"prettier": "^3.3.0",
|
|
387
388
|
"openai": "~5.23.2",
|
|
388
|
-
"
|
|
389
|
+
"prettier": "^3.3.0"
|
|
389
390
|
}
|
|
390
391
|
}
|