animader-cli 0.5.0 → 0.7.0
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/lib/show.mjs +29 -19
- package/package.json +4 -4
- package/player/boot.mjs +88 -5
- package/player/controller.mjs +262 -17
- package/player/devchannel.mjs +15 -10
- package/player/transport.mjs +56 -71
- package/resources/editor/.animader/schemas/metadata.json +3 -3
- package/resources/editor/.animader/schemas/pngine.sjon +449 -43
- package/src/commands/dev.mjs +3 -2
- package/toolchain/manifest.json +17 -17
- package/toolchain/uniform-type-name.js +18 -5
package/src/commands/dev.mjs
CHANGED
|
@@ -126,8 +126,9 @@ export function devCommandUsageText() {
|
|
|
126
126
|
'tree (kernels and nested assets included; out/ and dist/ excluded)',
|
|
127
127
|
'and rebuilds on edits: bursts coalesce, a change during a build',
|
|
128
128
|
'discards that candidate and queues exactly one rebuild, and the page',
|
|
129
|
-
'is told to reload only on a successful build — a full reload
|
|
130
|
-
'
|
|
129
|
+
'is told to reload only on a successful build — a full reload that',
|
|
130
|
+
'returns paused at the moment it left (a `?t=<seconds>` URL moment wins;',
|
|
131
|
+
'the release player carries no session store). A failed build keeps',
|
|
131
132
|
'serving the last successful generation and reports the error; before',
|
|
132
133
|
'the first successful build the root serves an error/recovery page.',
|
|
133
134
|
'',
|
package/toolchain/manifest.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "animader-toolchain/1",
|
|
3
|
-
"toolchainVersion": "0.
|
|
3
|
+
"toolchainVersion": "0.7.0",
|
|
4
4
|
"target": {
|
|
5
5
|
"os": "darwin",
|
|
6
6
|
"arch": "arm64"
|
|
7
7
|
},
|
|
8
|
-
"createdAt": "2026-
|
|
8
|
+
"createdAt": "2026-12-04T21:53:22.317Z",
|
|
9
9
|
"producers": {
|
|
10
10
|
"animader": {
|
|
11
|
-
"version": "0.
|
|
12
|
-
"revision": "
|
|
11
|
+
"version": "0.7.0",
|
|
12
|
+
"revision": "2bd4e0ab75e8b72aad1a4714451e6f293f9fbdde"
|
|
13
13
|
},
|
|
14
14
|
"pngine": {
|
|
15
|
-
"version": "4.
|
|
16
|
-
"revision": "
|
|
15
|
+
"version": "4.5.0",
|
|
16
|
+
"revision": "55570e7d7b1afdf94a2e42306b9dd8d1dbcc9ea6"
|
|
17
17
|
},
|
|
18
18
|
"pacer": {
|
|
19
19
|
"version": "0.2.0",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"path": "animader/animader.wasm",
|
|
29
29
|
"package": "animader",
|
|
30
30
|
"spec": "animader/wasm",
|
|
31
|
-
"sha256": "
|
|
32
|
-
"bytes":
|
|
31
|
+
"sha256": "22d474da64ec6c64ece9bb574951c4e17e50f6cf6e0ed87839d69d250f586ea5",
|
|
32
|
+
"bytes": 1177425
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "animader/index.js",
|
|
@@ -177,21 +177,21 @@
|
|
|
177
177
|
"path": "pngine.mjs",
|
|
178
178
|
"package": "pngine",
|
|
179
179
|
"spec": "pngine/viewer",
|
|
180
|
-
"sha256": "
|
|
181
|
-
"bytes":
|
|
180
|
+
"sha256": "1198991325ae8550fc054825515ed49892ca67fb3e78d1e5cc617519e7ef9d9d",
|
|
181
|
+
"bytes": 145385
|
|
182
182
|
}
|
|
183
183
|
],
|
|
184
184
|
"pngineCore": {
|
|
185
185
|
"spec": "pngine/core",
|
|
186
|
-
"sha256": "
|
|
187
|
-
"bytes":
|
|
186
|
+
"sha256": "06076c06aaef40d0da7cb663e5762d679cb419cb9a9b6929cc7775c9d917a232",
|
|
187
|
+
"bytes": 96615
|
|
188
188
|
},
|
|
189
189
|
"tools": {
|
|
190
190
|
"pngineCli": {
|
|
191
191
|
"package": "@pngine/darwin-arm64",
|
|
192
192
|
"file": "bin/pngine",
|
|
193
|
-
"sha256": "
|
|
194
|
-
"bytes":
|
|
193
|
+
"sha256": "531e460c85b996f086342a5efe4c64e686fcfd29ddad5b397b2764632be98405",
|
|
194
|
+
"bytes": 6464376
|
|
195
195
|
},
|
|
196
196
|
"pacerCli": {
|
|
197
197
|
"package": "@mr_hugo/pacer-darwin-arm64",
|
|
@@ -204,9 +204,9 @@
|
|
|
204
204
|
"uniformTypeName": {
|
|
205
205
|
"file": "toolchain/uniform-type-name.js",
|
|
206
206
|
"source": "pngine npm/pngine/src/uniform-convert.js",
|
|
207
|
-
"sha256": "
|
|
208
|
-
"bytes":
|
|
207
|
+
"sha256": "f57fb6912e43b2c46753cf6ab5cc207442bcdbe7af9db49e31a61b32fd41e1c0",
|
|
208
|
+
"bytes": 9105
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
|
-
"digest": "
|
|
211
|
+
"digest": "7c18a5c409856fb68a3d1771e86aaa0b7b9d8174b0ace916ea22bf3870a596c3"
|
|
212
212
|
}
|
|
@@ -62,19 +62,32 @@ export function uniformTypeName(tag) {
|
|
|
62
62
|
* block's base. `buffer` is null when the payload names nothing: one minted
|
|
63
63
|
* before the buffer-name block (3.0.1 and earlier), or a buffer the block
|
|
64
64
|
* does not list.
|
|
65
|
-
*
|
|
65
|
+
*
|
|
66
|
+
* A control entry (parseUniformTable marks them) describes with the same key
|
|
67
|
+
* set as every field and `control: true`: type "f32", no buffer — its value
|
|
68
|
+
* reaches the GPU through the frame's own control-inputs write, so no host
|
|
69
|
+
* writeBuffer can name it — offset 0, elemCount 0 (§6.1).
|
|
70
|
+
* @param {Map<string, {bufferId: number, offset: number, size: number, type: number, elemCount: number, control?: boolean, slot?: number}>} uniforms
|
|
66
71
|
* @param {Map<string, {id: number, pool?: number}>} buffers - the buffer-name block
|
|
67
|
-
* @returns {Record<string, {type: string, size: number, buffer: string | null, offset: number, elemCount: number}>}
|
|
72
|
+
* @returns {Record<string, {type: string, size: number, buffer: string | null, offset: number, elemCount: number, control: boolean}>}
|
|
68
73
|
*/
|
|
69
74
|
export function describeUniforms(uniforms, buffers) {
|
|
70
75
|
const nameOf = (id) => {
|
|
71
76
|
for (const [name, b] of buffers) if (id >= b.id && id < b.id + (b.pool || 1)) return name;
|
|
72
77
|
return null;
|
|
73
78
|
};
|
|
74
|
-
/** @type {Record<string, {type: string, size: number, buffer: string | null, offset: number, elemCount: number}>} */
|
|
79
|
+
/** @type {Record<string, {type: string, size: number, buffer: string | null, offset: number, elemCount: number, control: boolean}>} */
|
|
75
80
|
const out = {};
|
|
76
81
|
for (const [name, info] of uniforms) {
|
|
77
|
-
|
|
82
|
+
const control = info.control === true;
|
|
83
|
+
out[name] = {
|
|
84
|
+
type: uniformTypeName(info.type),
|
|
85
|
+
size: info.size,
|
|
86
|
+
buffer: control ? null : nameOf(info.bufferId),
|
|
87
|
+
offset: info.offset,
|
|
88
|
+
elemCount: info.elemCount,
|
|
89
|
+
control,
|
|
90
|
+
};
|
|
78
91
|
}
|
|
79
92
|
return out;
|
|
80
93
|
}
|
|
@@ -86,7 +99,7 @@ export function describeUniforms(uniforms, buffers) {
|
|
|
86
99
|
* are 16-byte multiples, so elements are padded, not packed). Accepts flat
|
|
87
100
|
* ([1,2,3,4,5,6]) or nested ([[1,2,3],[4,5,6]]) input; missing trailing
|
|
88
101
|
* elements stay zero. Exported for tests/npm/gpu-uniform-arrays.test.js.
|
|
89
|
-
* @param {
|
|
102
|
+
* @param {unknown} value - a number, flat/nested numbers, or any value the public API may carry (the caller owns shape validation)
|
|
90
103
|
* @param {number} uniformType - UniformType enum value (the ELEMENT type for arrays)
|
|
91
104
|
* @param {number} size - Expected byte size (TOTAL array bytes for arrays)
|
|
92
105
|
* @param {number} [elemCount] - Array element count; 0/undefined = not an array
|