@descix/frqtl-web 0.6.1-p3.1 → 0.6.1-p3.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/CLAUDE.md +10 -9
- package/README.md +4 -4
- package/dist/dist-manifest.json +11 -10
- package/dist/frqtl/parts/GraphingDetectorWall.js +1 -1
- package/dist/frqtl/parts/Wall.js +96 -9
- package/dist/frqtl-web.min.js +29 -29
- package/dist/sdk.html +3 -2
- package/dist/shim/engine/router.js +2 -2
- package/dist/shim/host/device.js +38 -0
- package/dist/shim/project/index.js +13 -4
- package/dist/shim/project/parts-spelling.js +8 -1
- package/dist/shim/project/record-format.js +30 -12
- package/dist/shim/registry/studio-landing.js +14 -11
- package/llms.txt +7 -7
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -5,7 +5,7 @@ in the browser. Physics comes out of local per-pixel rules — a frame moves one
|
|
|
5
5
|
occupancy, momentum — rather than force equations or wave PDEs. Double-slit fringes, wave interference
|
|
6
6
|
and blackbody spectra are computed live from the automaton, not replayed.
|
|
7
7
|
|
|
8
|
-
`0.6.1-p3.
|
|
8
|
+
`0.6.1-p3.2` (npm dist-tag `next`). The node twin is `@descix/frqtl-node` (the same modules,
|
|
9
9
|
plus `bootNode` and the hosted eyes).
|
|
10
10
|
|
|
11
11
|
## Install
|
|
@@ -14,11 +14,11 @@ plus `bootNode` and the hosted eyes).
|
|
|
14
14
|
## See it run immediately
|
|
15
15
|
Open this URL, or embed it in a claude.ai artifact iframe (self-contained):
|
|
16
16
|
|
|
17
|
-
https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.
|
|
17
|
+
https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.2/dist/artifact/double-slit.html
|
|
18
18
|
|
|
19
19
|
and the one-file form (a `<script>` tag, global `FRQTL`) booting a 3D sun:
|
|
20
20
|
|
|
21
|
-
https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.
|
|
21
|
+
https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.2/dist/artifact/sun.html
|
|
22
22
|
|
|
23
23
|
## A scene is a sketch
|
|
24
24
|
A scene is an ES module whose default export is `buildExperiment(exp)`. Its first statement is the
|
|
@@ -44,8 +44,8 @@ refused by name), and `await recipeContext.setDeclared(name, patch)` changes one
|
|
|
44
44
|
`parts/<NewKind>.js` (class renamed, imports rewritten to package specifiers), points the entry at it and re-runs in place.
|
|
45
45
|
`runner.declared` rows read `inParts` and `module`.
|
|
46
46
|
|
|
47
|
-
Read a real one before writing your own: `https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.
|
|
48
|
-
rung is a file under `dist/frqtl/scenes/`), and a part: `https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.
|
|
47
|
+
Read a real one before writing your own: `https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.2/dist/frqtl/scenes/double-slit.js` (every walk-through
|
|
48
|
+
rung is a file under `dist/frqtl/scenes/`), and a part: `https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.2/dist/frqtl/parts/DetectorWall.js`.
|
|
49
49
|
|
|
50
50
|
## Boot it — the two doors (`@descix/frqtl-web/boot`)
|
|
51
51
|
bootScene(mount, buildExperiment, { renderer: 'p5' | 'three', seed, onTick, render })
|
|
@@ -70,12 +70,13 @@ imports `./boot`, `./registry`, `./project`, `./host-view` or `./site-graph` by
|
|
|
70
70
|
row, so read the manifest from the same root: `new URL('dist-manifest.json', root)`. A page that holds only its map
|
|
71
71
|
recovers the root through `FRQTL_WEB_HOST_SPECIFIERS`: `imports[row.specifier]` minus `row.libPath`.
|
|
72
72
|
The root is an absolute URL or starts with `/`, `./` or `../`. A sketch held as text boots as `bootProject(mount, sketchProject(text))`.
|
|
73
|
-
Or skip the map: `<script src="https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.
|
|
73
|
+
Or skip the map: `<script src="https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.2/dist/frqtl-web.min.js"></script>` then `FRQTL.bootScene(…)`,
|
|
74
74
|
`FRQTL.Wall`, …
|
|
75
75
|
|
|
76
76
|
String kinds: `exp.addObject('Wall', props)` resolves the kind in the SCENE's realm (the frame the scene
|
|
77
77
|
runs in). A host that drives a scene in an iframe passes the string through that frame's `recipeContext`;
|
|
78
|
-
it never
|
|
78
|
+
it never resolves a kind in its own document, whose classes (`./parts` and `./project` register the published
|
|
79
|
+
parts there too) are not the frame's.
|
|
79
80
|
|
|
80
81
|
## Exports
|
|
81
82
|
| subpath | what |
|
|
@@ -83,7 +84,7 @@ it never imports the registry into its own document, where no kind is registered
|
|
|
83
84
|
| `.` | the parts (`Wall`, `SphereEmitter`, `Tunnel`, `FrqtlVision`, …), `bootScene`, `bootProject`, `engine`, `engineState`, `FrqtlCapture`, `RenderStages`, `FieldBuilder`, `CaptureEnvelope`, `validateRendererProvider` |
|
|
84
85
|
| `./boot` | `bootScene`, `bootProject` (in node it throws naming `@descix/frqtl-node`) |
|
|
85
86
|
| `./parts`, `./parts/*` | the parts barrel; one part = one file |
|
|
86
|
-
| `./project` | `FRQTL_WEB_SPECIFIERS`, `libPathOf`, `importMapFor`, `pageImportMapFor`, `FRQTL_WEB_HOST_SPECIFIERS`, `linkProject`, `sketchProject`, `SKETCH_ENTRY`, `projectIdentity`, `MANIFEST_FILE`, `MANIFEST_KEYS`, `normalizeManifest`, `parseManifest`, `serializeManifest`, `manifestFor`, `RECORD_FILES`, `RECORD_KEYS`, `CHANGE_KEYS`, `OPS`, `BY`, `CLIP_SECONDS`, `CLIP_NAME`, `clipName`, `jsonText`, `recordFolderFaults`, `applyRows` |
|
|
87
|
+
| `./project` | `FRQTL_WEB_SPECIFIERS`, `libPathOf`, `importMapFor`, `pageImportMapFor`, `FRQTL_WEB_HOST_SPECIFIERS`, `linkProject`, `sketchProject`, `SKETCH_ENTRY`, `projectIdentity`, `MANIFEST_FILE`, `MANIFEST_KEYS`, `normalizeManifest`, `parseManifest`, `serializeManifest`, `manifestFor`, `RECORD_FILES`, `RECORD_KEYS`, `CHANGE_KEYS`, `OPS`, `BY`, `CLIP_SECONDS`, `CLIP_NAME`, `clipName`, `jsonText`, `rowFaults`, `recordFolderFaults`, `applyRows` (stands alone: no other import is needed) |
|
|
87
88
|
| `./registry` | the walk-through rungs, the showcase roster, the scene list (`sceneGroups`), `projectOf(id, { mode })` → `{ manifest, files, renderState }`, a showcase tile's link (`showcaseHref(row)` relative to the serving site, `showcaseUrl(row)` absolute on `SHOWCASE_SITE.origin`; `row` is an element of the same imported `EXHIBITS`, and the link carries the row's effective mode on a multi-mode rung), and how STUDIO resolved the link it opened with (`STUDIO_LANDING_ATTR` on `<html>`, a `STUDIO_LANDING_OUTCOMES` id) |
|
|
88
89
|
| `./kinds` | `registerKind`, `kindNamed`, `kindOf` (the parent's row, frozen), `registeredKinds` — a composed fork registers its renamed class |
|
|
89
90
|
| `./host-view` | `declareHostView`, `HOST_VIEW_OUTCOMES`, `CONTRACT_VIOLATIONS`, `HOST_SDK_SCRIPT` — the DeSciX host-view declarer an app calls once, under its own policy |
|
|
@@ -126,6 +127,6 @@ Everything is a Frame (recursive); there is no separate "particle" class.
|
|
|
126
127
|
- The published build is WASM-only on the engine side (compiled surface).
|
|
127
128
|
|
|
128
129
|
## Curated notebooks
|
|
129
|
-
Index: `https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.
|
|
130
|
+
Index: `https://cdn.jsdelivr.net/npm/@descix/frqtl-web@0.6.1-p3.2/dist/notebooks/notebooks.json`
|
|
130
131
|
|
|
131
132
|
## No account, credits, or tokens are needed for anything above.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ comes out of local per-pixel rules — a frame moves one pixel per tick, single
|
|
|
5
5
|
rather than force equations. Interference, blackbody spectra and atom-like binding emerge from the
|
|
6
6
|
automaton.
|
|
7
7
|
|
|
8
|
-
`0.6.1-p3.
|
|
8
|
+
`0.6.1-p3.2` (npm dist-tag `next`). The node twin is `@descix/frqtl-node` — the same
|
|
9
9
|
modules, built from the same source.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
@@ -124,8 +124,8 @@ differ from `mode`: `declareHostView` throws a TypeError when they are the same
|
|
|
124
124
|
`HOST_SDK_SCRIPT` beside its page.
|
|
125
125
|
|
|
126
126
|
String kinds — `exp.addObject('Wall', props)` — resolve in the SCENE's realm. A host driving a scene in
|
|
127
|
-
an iframe passes the string through that frame's `recipeContext`; it never
|
|
128
|
-
|
|
127
|
+
an iframe passes the string through that frame's `recipeContext`; it never resolves a kind in its own
|
|
128
|
+
document, whose classes (`./parts` and `./project` register the published parts there too) are not the frame's.
|
|
129
129
|
|
|
130
130
|
## Exports
|
|
131
131
|
|
|
@@ -134,7 +134,7 @@ into its own document, where no kind is registered.
|
|
|
134
134
|
| `.` | the parts, `bootScene`, `bootProject`, `engine`, `engineState`, `FrqtlCapture`, `RenderStages`, `FieldBuilder`, `CaptureEnvelope`, `validateRendererProvider` |
|
|
135
135
|
| `./boot` | `bootScene`, `bootProject` (in node it throws, naming `@descix/frqtl-node`) |
|
|
136
136
|
| `./parts`, `./parts/*` | the parts barrel; one part = one file |
|
|
137
|
-
| `./project` | `FRQTL_WEB_SPECIFIERS`, `libPathOf`, `importMapFor`, `pageImportMapFor`, `FRQTL_WEB_HOST_SPECIFIERS`, `linkProject`, `sketchProject`, `SKETCH_ENTRY`, `projectIdentity`, `MANIFEST_FILE`, `MANIFEST_KEYS`, `normalizeManifest`, `parseManifest`, `serializeManifest`, `manifestFor`, `RECORD_FILES`, `RECORD_KEYS`, `CHANGE_KEYS`, `OPS`, `BY`, `CLIP_SECONDS`, `CLIP_NAME`, `clipName`, `jsonText`, `recordFolderFaults`, `applyRows` |
|
|
137
|
+
| `./project` | `FRQTL_WEB_SPECIFIERS`, `libPathOf`, `importMapFor`, `pageImportMapFor`, `FRQTL_WEB_HOST_SPECIFIERS`, `linkProject`, `sketchProject`, `SKETCH_ENTRY`, `projectIdentity`, `MANIFEST_FILE`, `MANIFEST_KEYS`, `normalizeManifest`, `parseManifest`, `serializeManifest`, `manifestFor`, `RECORD_FILES`, `RECORD_KEYS`, `CHANGE_KEYS`, `OPS`, `BY`, `CLIP_SECONDS`, `CLIP_NAME`, `clipName`, `jsonText`, `rowFaults`, `recordFolderFaults`, `applyRows` (stands alone: no other import is needed) |
|
|
138
138
|
| `./registry` | the walk-through rungs, the showcase roster, the scene list (`sceneGroups`), `projectOf`, a showcase tile's link (`showcaseHref(row)` relative to the serving site, `showcaseUrl(row)` absolute on `SHOWCASE_SITE.origin`; `row` is an element of the same imported `EXHIBITS`, and the link carries the row's effective mode on a multi-mode rung), and how STUDIO resolved the link it opened with (`STUDIO_LANDING_ATTR` on `<html>`, a `STUDIO_LANDING_OUTCOMES` id) |
|
|
139
139
|
| `./kinds` | `registerKind`, `kindNamed`, `kindOf`, `registeredKinds` — the kind registry a composed fork registers in |
|
|
140
140
|
| `./host-view` | `declareHostView`, `HOST_VIEW_OUTCOMES`, `CONTRACT_VIOLATIONS`, `HOST_SDK_SCRIPT` — the DeSciX host-view declarer an app calls under its own policy (below) |
|
package/dist/dist-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descix/frqtl-web",
|
|
3
|
-
"version": "0.6.1-p3.
|
|
3
|
+
"version": "0.6.1-p3.2",
|
|
4
4
|
"files": {
|
|
5
5
|
"artifact/double-slit.html": "25d93abfd0961a5e063429395801160a599fbb8e92c774a3128d5b0ba4ac415a",
|
|
6
6
|
"artifact/sun.html": "4ec3515a3a94553bb862a7894ecd43757004fd8087ba60ce97622a410b615383",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"experiments/empty/index.html": "063a8a4b23c4242d67a20a442235c798f18fdea1a3a8aebb29872a88030c2e30",
|
|
11
11
|
"fat/pkg-web/egpt_wasm.js": "4e9c3f04fcfe7b0a481dadd9a87f9bf76c6f34741ff1cdf57fecc2e76c56b8e5",
|
|
12
12
|
"fat/pkg-web/egpt_wasm_bg.wasm": "e204498ac7439c294653476c0d214345713e6170819281b27bbbcba217a5a5e9",
|
|
13
|
-
"frqtl-web.min.js": "
|
|
13
|
+
"frqtl-web.min.js": "6ba64b954074e1dbb5677e317c9bf00b9914374a66f6c4853e87c5839ace91f7",
|
|
14
14
|
"frqtl/assets/vendor/acorn.LICENSE": "76a876cf886ff9be2a8b5e2e86514fed06223c8c9f0c1e9ee9606e93841e00b7",
|
|
15
15
|
"frqtl/assets/vendor/acorn.PINNED.json": "52d5c4cf628a586aec54f780ab6b8d22ae7c22cfb290d0d86c2f589f3106b101",
|
|
16
16
|
"frqtl/assets/vendor/acorn.mjs": "efb0124a960b34d53f9928c4926bfcfd300bb6a3d7ab64ee949b3a8bed1c7e5f",
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
"frqtl/parts/FrqtlControlOverlay.js": "f862b1529265224aa96878b56b0c1c6e65683ba3fd6b517df86e17e92147f9c4",
|
|
251
251
|
"frqtl/parts/FrqtlControlsPanel.js": "792d03dea218bdc335ba7e04362be620edbfa331bed9de087d61942299728cc1",
|
|
252
252
|
"frqtl/parts/FrqtlVision.js": "118d0874249fa55783b196fd01297b3347951267a4add93381433a72c46e8622",
|
|
253
|
-
"frqtl/parts/GraphingDetectorWall.js": "
|
|
253
|
+
"frqtl/parts/GraphingDetectorWall.js": "a2fef24c2ef00416792c4b46a09c9544601e45e84593fa2287d2311f27a1bcee",
|
|
254
254
|
"frqtl/parts/LargeObject.js": "d6cae738b30965f3eba4be4399fb4410f17afc3267b51e3ad9e1ba7423e17922",
|
|
255
255
|
"frqtl/parts/LightColor.js": "8637e5a09bbad3a4fdd2034ccb44dfc1fda743e29b12b4c685a64b9e1df28daa",
|
|
256
256
|
"frqtl/parts/LiveChart.js": "8bd0b862d2f7a4e818ae9cfc47e5e0f56eb97ea0a00fb836bba3f2374c12a1ce",
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
"frqtl/parts/SphereEmitter.js": "645664f5a20924b777d9b4ad6fef6338e7de251d62c7f8a4c93e6b0f97b47d4a",
|
|
264
264
|
"frqtl/parts/Trace.js": "f9d91bb9435bc5fabfd7bfdbfbf3f3ae34e2338090251d9e9d6c11abc2ed25fb",
|
|
265
265
|
"frqtl/parts/Tunnel.js": "66bfca3d3d88ebf9a8cb7aa248b92cfc7d78a278449830b03e6b2700a21df891",
|
|
266
|
-
"frqtl/parts/Wall.js": "
|
|
266
|
+
"frqtl/parts/Wall.js": "34f8e4f5143925b42e42561eb54e93b0c1244debeb5c07a914beba3e8c4c75fd",
|
|
267
267
|
"frqtl/parts/index.js": "70b8e227e09663889f4c7942d385f843d977579765723f829880fd6e9868ac53",
|
|
268
268
|
"frqtl/scenes/absorbing-wall-3d.js": "722bb433142833f03150052b95039686aba0d9db510a5ff13fad95b5f17e0cf8",
|
|
269
269
|
"frqtl/scenes/absorbing-wall.js": "0a47ca64e56481841339cd5882cf0e54ec7c14d87a4306d016ead1ff26591197",
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
"notebooks/stats.html": "360db52d77ef46c690e7c865a7ce672d5032b916a0a0796f6070d5f17b03132b",
|
|
348
348
|
"notebooks/transcendentals.html": "1dfc5d40f0e3e6cccc785fb73d73ef82e24048d7affd10143370779ef2032b8c",
|
|
349
349
|
"notebooks/view-vendored-d3.html": "debeeef830f8c328b3b6e13b0b8fe26021ba55802b89d8dbe78b8a0c6c002eac",
|
|
350
|
-
"sdk.html": "
|
|
350
|
+
"sdk.html": "781acc2102e912379f48203d6bbf3592d65a159f9eed27f928c719bfe9232a6e",
|
|
351
351
|
"shim/bundle/index.js": "edc501a039ce47102657604df71fbc17ba3e4760ca087055351231c7469f5c50",
|
|
352
352
|
"shim/bundle/indexHtml.js": "2c4fbc502bb33fce93596cee19e143a58bb63c18d0b18ea597f81610e3a9a027",
|
|
353
353
|
"shim/bundle/zip.js": "00f7b5fb5f36ff40a59d86758c503d9d7fb43949c1b5a4f2e7367c43d92786f9",
|
|
@@ -357,12 +357,13 @@
|
|
|
357
357
|
"shim/engine/artifact-shell.js": "f23c327500f8174b12d464868f6ec9c1701e7a9a5faa1c43a2ddafc3191dc38c",
|
|
358
358
|
"shim/engine/boot-phases.js": "c6e12e12824bcf6f1a289f46e41c898a5416c80c131594525145aae9a3eefbfa",
|
|
359
359
|
"shim/engine/engine-stack-boot.js": "0abf57dcff2ca2bb025c787a17875d49d54d9218ac08c78cb9c678dbb6118d08",
|
|
360
|
-
"shim/engine/router.js": "
|
|
360
|
+
"shim/engine/router.js": "1c8bed954aecfcd06d1344051d8489f0f040967f9d0879ec7e7a0d1e58045d2c",
|
|
361
361
|
"shim/engine/site-graph.js": "b0d2569c67516d08bba17a152d5d3bfa0b036666eda7f11df74b4d68854e1b93",
|
|
362
362
|
"shim/experiment-frame/index.js": "5a0219aaa225d8f808c405b08623ce85ada37d83fb4f55f983db3303e431e47f",
|
|
363
363
|
"shim/expr/ast-schema.js": "4f1133b887639bbd86fab976292323bf4a955cdc873ff7ca8e8a8eb3b416923f",
|
|
364
364
|
"shim/field-descriptor/index.js": "6647d57d1523519114adc0a5cb66335ec5121c39ab294b9c97bdfb9e5d7f61e0",
|
|
365
365
|
"shim/frame-data/index.js": "df6957b0b4a8e0ee0035bc970647b90089b421ae7f05911cc047d48457164be6",
|
|
366
|
+
"shim/host/device.js": "85470e7c787398cb91516b724e884ac50104d56330ba7ff876308b6fb4b7b532",
|
|
366
367
|
"shim/host/host-view.js": "feec2f5fdc318e75cd01768c24891f85d2694a269696fcfffd9567d31983cf43",
|
|
367
368
|
"shim/host/index.js": "fade4b171218965570aa2e67e841920ebb3d972ff15e1cfa0394fd3fa123d82c",
|
|
368
369
|
"shim/index.js": "96165c6161ffddbace0be0cde0b3a83943298531537dd2cc9c6e281b8274ff19",
|
|
@@ -388,14 +389,14 @@
|
|
|
388
389
|
"shim/page-params/index.js": "c58732b8127da8c2b4ecfd922bf46a6c9a5e9ab7017f41c095a6ec937011f0fa",
|
|
389
390
|
"shim/project/fork.js": "07555f24c7e6d1bbe723853bc09ad570b9cd36cef248a07e98e7398d41ac70da",
|
|
390
391
|
"shim/project/identity.js": "8d3e0bb9df75eecf7d11a1ea7948ff66c559973a891574d0b208c9e8f8faf504",
|
|
391
|
-
"shim/project/index.js": "
|
|
392
|
+
"shim/project/index.js": "5121dd4c18aeea190d2a998fa7a13f86cb36b13cf043f8c549963c1ae51ba26e",
|
|
392
393
|
"shim/project/link.js": "0e3fc878bc45d9916baacd7cf129687ec6e82efd4f6f5036e4697180b3d0f87a",
|
|
393
394
|
"shim/project/manifest.js": "442267af07ae1b977ff6aeaca49d98ce82b77f548cfdd1ed0f258b3429d75f31",
|
|
394
395
|
"shim/project/parts-module.js": "b08e0149f086640692e1b2ff8e0d7ae0379c2bc934a0891418de5c2b8c0e8e60",
|
|
395
|
-
"shim/project/parts-spelling.js": "
|
|
396
|
+
"shim/project/parts-spelling.js": "4cc7b8a2f0aa1f3ad4c1c3cf15f74b2860a94ae2214dbef78d31c85ff8916cfe",
|
|
396
397
|
"shim/project/parts-writer.js": "121fa67261d6f366190c9ac4961fceed2f26ca7f35cf3fbffc767829afc69978",
|
|
397
398
|
"shim/project/read-text.js": "b89bd70e3a271e1f42c8ce9427a20cdd9a4c4c9c31b64c49ff1f56b095620136",
|
|
398
|
-
"shim/project/record-format.js": "
|
|
399
|
+
"shim/project/record-format.js": "87d5cc2eae8ff600db1db58a0e0047819f7c9839ff702acdedc366c7647eb0ef",
|
|
399
400
|
"shim/project/specifiers.js": "288e5e06e53b873449190f6f85855177a72e52623bd11eef016acafb8095d829",
|
|
400
401
|
"shim/registry/copy-gate.js": "cfbf52669c849b8837b326f2743458f1ead0720cad51a6c6d409c9bd6c7f9495",
|
|
401
402
|
"shim/registry/exhibits.js": "e137951429929dae6c38e996546b66dd19b575ee4f0aafbddf28096c847a27fc",
|
|
@@ -403,7 +404,7 @@
|
|
|
403
404
|
"shim/registry/scene-roster.js": "318fe373f71b1c58d05425693f2fad4bd5368f6095b65817c6d637430a0bfb73",
|
|
404
405
|
"shim/registry/scene-source.js": "c9c4b48c24d4b1ebee1549a7891a1ba708909b94b9403ce28eefbd902cacf49f",
|
|
405
406
|
"shim/registry/showcase-link.js": "daf5c1426aeb3c578bace5e0edea9ba2538cd82336d2cdc944e5fed6decd7551",
|
|
406
|
-
"shim/registry/studio-landing.js": "
|
|
407
|
+
"shim/registry/studio-landing.js": "bd81ad9333332de4a29b3121f963edd354450c75c97f4f43170a98c2dcceb7f3",
|
|
407
408
|
"shim/registry/walkthrough.js": "8f8b6f59e9e81c67c9c62f8fb271eee2e4d6e1fba6e116b227a2f1e3f9930230",
|
|
408
409
|
"shim/render-state/apply.js": "94a9e60cb1722c9a82aa00f2f161fd65e6f438147333856a786e42a4ad5b7064",
|
|
409
410
|
"shim/render-state/index.js": "72a6a3dcd8037893cb8fbd7ef32b126770e7efaec70847f8e4f2915ddb690b43",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* colour washed under the bins, so an un-hit face still reads as a plate and
|
|
37
37
|
* intensity rises monotonically from empty through every bin.
|
|
38
38
|
*
|
|
39
|
-
* Readouts: `getCollisionHistogram()` / `resetHistogram()` / `
|
|
39
|
+
* Readouts: `getCollisionHistogram()` / `resetHistogram()` / `getArrivals()` —
|
|
40
40
|
* inherited from `Wall`, UNCHANGED. `heatCanvas()` returns the ferry canvas.
|
|
41
41
|
*
|
|
42
42
|
* ── ESTIMATION BEFORE RUNNING: when will this plate have counted anything? ───
|
package/dist/frqtl/parts/Wall.js
CHANGED
|
@@ -774,14 +774,26 @@ import { wallBehaviorV2ValuesMap as _wallBehaviorV2ValuesMap, bounceDirectionVal
|
|
|
774
774
|
return out;
|
|
775
775
|
};
|
|
776
776
|
|
|
777
|
+
/** Does the op-program this wall's LargeObject is RUNNING remove the frame it triggers
|
|
778
|
+
* on (`set 0.is_alive = …`)? Read off the program itself — the one statement of what
|
|
779
|
+
* the wall does — never a hand list of behavior names (today: destroy and absorb). On
|
|
780
|
+
* such a wall a frame's listing in `tickData.objects[handle].frames` is not one
|
|
781
|
+
* arrival: the engine collects every frame in the mb_w-padded search rect
|
|
782
|
+
* (ENGINE_CONTRACT §5.1), so a frame is listed alive through its approach ticks and
|
|
783
|
+
* once more on its kill tick. */
|
|
784
|
+
function _runningProgramRemoves(wall) {
|
|
785
|
+
var prog = wall.lo && wall.lo.program;
|
|
786
|
+
return !!(prog && Array.isArray(prog.ops) &&
|
|
787
|
+
prog.ops.some(function (op) { return op && op.set === '0.is_alive'; }));
|
|
788
|
+
}
|
|
789
|
+
|
|
777
790
|
/**
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
* thermostat's activeQuanta read).
|
|
791
|
+
* ZONE-OCCUPANCY readout (loop-polish B): the number of frames THIS wall's
|
|
792
|
+
* engine collect pass listed on the sampled tick — every frame in its search rect
|
|
793
|
+
* (the rect padded by the dimension's mb_w). For a FULL-AREA background wall
|
|
794
|
+
* (collisionBehavior 'nothing' + the count hook) that listing IS the current live
|
|
795
|
+
* population inside the wall — the ONE canonical "how many live" authority (the
|
|
796
|
+
* emission-cap gate and the LiveChart `liveCount` projector read it).
|
|
785
797
|
*
|
|
786
798
|
* Layer 1 (API): dual-lane, mirroring the LiveChart PROJECTOR_SPEC shape —
|
|
787
799
|
* getLiveCount(tickData) — SAMPLE lane (per tick): read
|
|
@@ -794,12 +806,23 @@ import { wallBehaviorV2ValuesMap as _wallBehaviorV2ValuesMap, bounceDirectionVal
|
|
|
794
806
|
* COUNT increment only (bench LO7); counting never moves, kills, or recolors a
|
|
795
807
|
* frame (SU1).
|
|
796
808
|
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
809
|
+
* Guards: THROWS on a REMOVING wall (destroy / absorb) — there the listing reads
|
|
810
|
+
* (1 + approach-halo ticks) x arrivals, never the arrivals; `getArrivals` is the
|
|
811
|
+
* reader. THROWS on a wall without the count hook (no collected-frames buffer → it
|
|
812
|
+
* would silently report 0 forever).
|
|
799
813
|
* @param {Object} [tickData] — the universe.doTick() result (sample lane).
|
|
800
814
|
* @returns {number}
|
|
801
815
|
*/
|
|
802
816
|
Wall.prototype.getLiveCount = function (tickData) {
|
|
817
|
+
if (_runningProgramRemoves(this)) {
|
|
818
|
+
throw new Error(
|
|
819
|
+
'[Wall.getLiveCount] this wall REMOVES what it hits (collisionBehavior "' +
|
|
820
|
+
this.collisionBehavior + '") — getLiveCount is the zone-occupancy reader of a ' +
|
|
821
|
+
'non-removing wall, and on a removing wall it would count each frame once per ' +
|
|
822
|
+
'approach tick plus once on its kill tick. Read arrivals with ' +
|
|
823
|
+
'wall.getArrivals(tickData) → { total, delta } (the engine\'s own per-wall count).'
|
|
824
|
+
);
|
|
825
|
+
}
|
|
803
826
|
var counts = Array.isArray(this.hooks) && this.hooks.indexOf('count') !== -1;
|
|
804
827
|
if (!counts) {
|
|
805
828
|
throw new Error(
|
|
@@ -818,6 +841,70 @@ import { wallBehaviorV2ValuesMap as _wallBehaviorV2ValuesMap, bounceDirectionVal
|
|
|
818
841
|
return this._liveCount || 0;
|
|
819
842
|
};
|
|
820
843
|
|
|
844
|
+
/**
|
|
845
|
+
* ARRIVALS readout: how many frames have triggered THIS wall's collision program —
|
|
846
|
+
* read from the engine's own per-wall counter, `tickData.objects[handle].count`, the
|
|
847
|
+
* contract's one read authority for an LO count (ENGINE_CONTRACT §4.3). The `count`
|
|
848
|
+
* hook compiles `set 1.count = 1.count + 1` behind the trigger, so the engine counts
|
|
849
|
+
* one per trigger event; on a removing wall (destroy / absorb) each trigger is the
|
|
850
|
+
* frame's removal, so the count IS the arrivals. Never derived from the collected
|
|
851
|
+
* frame listing (that is the padded search-rect census — see getLiveCount).
|
|
852
|
+
*
|
|
853
|
+
* Layer 1 (API): dual-lane, the same shape as getLiveCount —
|
|
854
|
+
* getArrivals(tickData) — SAMPLE lane: read the engine count and return
|
|
855
|
+
* `{ total, delta }`: `total` = cumulative arrivals since the wall registered,
|
|
856
|
+
* `delta` = the change since the previously sampled TickData (this tick's
|
|
857
|
+
* arrivals when sampled every tick). IDEMPOTENT per TickData — sampling the same
|
|
858
|
+
* TickData twice returns the same `{ total, delta }`.
|
|
859
|
+
* getArrivals() — READ lane: the last sample (`{ total: 0, delta: 0 }` before the
|
|
860
|
+
* first tick).
|
|
861
|
+
*
|
|
862
|
+
* Layer 2 (physics): zero physics — a pure reader of a counter the compiled program
|
|
863
|
+
* already maintains (bench LO7); reading it moves nothing (SU1).
|
|
864
|
+
*
|
|
865
|
+
* Guards: THROWS on a wall without the count hook (the engine counter never moves →
|
|
866
|
+
* it would silently report 0 forever), and on a TickData that is not the one this
|
|
867
|
+
* wall's universe last produced (`universe._lastTickData`, the object `doTick()` returned
|
|
868
|
+
* and every tick listener receives). LO handles restart at 0 in every universe, so a
|
|
869
|
+
* TickData from another world indexes a different wall's count at the same handle; and
|
|
870
|
+
* an earlier TickData of this world would yield a wrong delta.
|
|
871
|
+
* @param {Object} [tickData] — the universe.doTick() result (sample lane).
|
|
872
|
+
* @returns {{ total: number, delta: number }}
|
|
873
|
+
*/
|
|
874
|
+
Wall.prototype.getArrivals = function (tickData) {
|
|
875
|
+
var counts = Array.isArray(this.hooks) && this.hooks.indexOf('count') !== -1;
|
|
876
|
+
if (!counts) {
|
|
877
|
+
throw new Error(
|
|
878
|
+
'[Wall.getArrivals] this wall does not COUNT (collisionBehavior "' +
|
|
879
|
+
this.collisionBehavior + '", hooks ' + JSON.stringify(this.hooks || []) +
|
|
880
|
+
') — the engine increments a wall\'s count only through the `count` hook; ' +
|
|
881
|
+
'add hooks: [\'count\'] (preset \'detector-screen\' = destroy + count).'
|
|
882
|
+
);
|
|
883
|
+
}
|
|
884
|
+
if (!this._arrivals) { this._arrivals = { td: null, total: 0, delta: 0 }; }
|
|
885
|
+
var a = this._arrivals;
|
|
886
|
+
if (tickData != null && tickData !== a.td) {
|
|
887
|
+
if (tickData !== this.universe._lastTickData) {
|
|
888
|
+
throw new Error('[Wall.getArrivals] "' + this.name + '": this is not the TickData its ' +
|
|
889
|
+
'own universe last produced (universe._lastTickData) — it is another world\'s, ' +
|
|
890
|
+
'where handle ' + this.lo.handle + ' is a different wall, or an earlier tick of ' +
|
|
891
|
+
'this one. Sample the TickData this wall\'s universe.doTick() just returned. (FAIL-LOUD.)');
|
|
892
|
+
}
|
|
893
|
+
var handle = this.lo.handle;
|
|
894
|
+
var oc = tickData.objects && tickData.objects[handle];
|
|
895
|
+
if (!oc || typeof oc.count !== 'number') {
|
|
896
|
+
throw new Error('[Wall.getArrivals] "' + this.name + '": this world\'s TickData carries no ' +
|
|
897
|
+
'objects[' + handle + '].count — every registered LargeObject is marshalled each ' +
|
|
898
|
+
'tick, so the wall is not registered here. (FAIL-LOUD.)');
|
|
899
|
+
}
|
|
900
|
+
var total = oc.count;
|
|
901
|
+
a.delta = total - a.total;
|
|
902
|
+
a.total = total;
|
|
903
|
+
a.td = tickData;
|
|
904
|
+
}
|
|
905
|
+
return { total: a.total, delta: a.delta };
|
|
906
|
+
};
|
|
907
|
+
|
|
821
908
|
/**
|
|
822
909
|
* ABSORB v2 readout: the wall's live { stored, absorbedTotal, radiatedTotal } (the
|
|
823
910
|
* REAL backing-frame mass ledger). Throws on a non-absorb wall. Call between ticks.
|