ugly-game 0.15.44 → 0.15.45
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/anim/animEval.js +5 -1
- package/dist/flightTestFixture.d.mts +2 -0
- package/dist/flightTestFixture.mjs +57 -0
- package/dist/gpuShadow.d.ts +1133 -0
- package/dist/gpuShadow.js +4463 -0
- package/package.json +1 -1
package/dist/anim/animEval.js
CHANGED
|
@@ -75,7 +75,11 @@ function sampleSlot(rig, slot) {
|
|
|
75
75
|
const d = slot.clip.duration;
|
|
76
76
|
// ⚠️ `loop === false` CLAMPS. A clip whose last pose differs from its first
|
|
77
77
|
// snaps at every wrap — see `LayerSlot.loop`.
|
|
78
|
-
const t = d > 0
|
|
78
|
+
const t = d > 0
|
|
79
|
+
? slot.loop === false
|
|
80
|
+
? Math.max(0, Math.min(slot.time, d))
|
|
81
|
+
: ((slot.time % d) + d) % d
|
|
82
|
+
: 0;
|
|
79
83
|
// ⚠️ NOT `sampleClipToLocals` — that returns composed Mat4s, and rotations
|
|
80
84
|
// cannot be blended once composed. `sampleClipToTRS` is its TRS-level twin,
|
|
81
85
|
// proven byte-equivalent by animSample.test.ts.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { FLIGHT_CHANNELS } from './flightTypes';
|
|
2
|
+
const emptyCounts = () => Object.fromEntries(FLIGHT_CHANNELS.map((channel) => [channel, 0]));
|
|
3
|
+
export function fixtureCapture() {
|
|
4
|
+
const channels = Object.fromEntries(FLIGHT_CHANNELS.map((channel) => [channel, []]));
|
|
5
|
+
channels.inputs = [
|
|
6
|
+
{ sequence: 2, monotonicMs: 2, tick: 0, kind: 0, flags: 0, payload: new Uint8Array([7]) },
|
|
7
|
+
];
|
|
8
|
+
channels.lifecycle = [
|
|
9
|
+
{ sequence: 1, monotonicMs: 1, tick: null, kind: 2, flags: 0, payload: new Uint8Array([8]) },
|
|
10
|
+
];
|
|
11
|
+
return {
|
|
12
|
+
header: {
|
|
13
|
+
recorderSchema: 1,
|
|
14
|
+
gameSchema: 2,
|
|
15
|
+
checkpointSchema: 3,
|
|
16
|
+
inputSchema: 4,
|
|
17
|
+
app: 'test',
|
|
18
|
+
buildId: 'build',
|
|
19
|
+
sessionId: 'session',
|
|
20
|
+
startedAtMs: 1,
|
|
21
|
+
capturedAtMs: 2,
|
|
22
|
+
capturedAtMonotonicMs: 2,
|
|
23
|
+
capturedAtTick: 0,
|
|
24
|
+
tickRate: 60,
|
|
25
|
+
environment: { runtime: 'node' },
|
|
26
|
+
reason: ['manual'],
|
|
27
|
+
},
|
|
28
|
+
anchor: {
|
|
29
|
+
requestId: 1,
|
|
30
|
+
tick: 0,
|
|
31
|
+
monotonicMs: 0,
|
|
32
|
+
schema: 3,
|
|
33
|
+
checkpoint: new Uint8Array([1, 2, 3]),
|
|
34
|
+
rng: new Uint32Array([4, 5]),
|
|
35
|
+
encodedBytes: 3,
|
|
36
|
+
transferBytes: 3,
|
|
37
|
+
},
|
|
38
|
+
channels,
|
|
39
|
+
truncation: {
|
|
40
|
+
dropped: emptyCounts(),
|
|
41
|
+
droppedBytes: emptyCounts(),
|
|
42
|
+
rejectedOversize: emptyCounts(),
|
|
43
|
+
},
|
|
44
|
+
replay: { status: 'unverified' },
|
|
45
|
+
selfTelemetry: {
|
|
46
|
+
calls: 1,
|
|
47
|
+
averageMs: 0.01,
|
|
48
|
+
p95Ms: 0.02,
|
|
49
|
+
p99Ms: 0.02,
|
|
50
|
+
maxMs: 0.02,
|
|
51
|
+
retainedBytes: 100,
|
|
52
|
+
checkpointRequests: 1,
|
|
53
|
+
checkpointFailures: 0,
|
|
54
|
+
checkpointMs: 1,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|