Web target, plan 5c: skinned entities and the second consumer
The last of slice 5's three plans. The glTF writer learns joints and skins, which closes #82; frame code in the page gets @ on matrix stacks, np.eye and set_joints; the page draws each skinned entity as a three.js SkinnedMesh posed from the store; examples/web_crowd.py gains a walking figure. Then the second consumer's 3D world is ported to Python and comes from manifoldx export --web, in seven tasks in its own repository, and its page script keeps only the document panels, labels, sound and fullscreen around the export.
@ results that differ from a float64-accumulated chain, numpy 2.4.4 on this hostset_joints from matrices it builds with np.eye, nested np.array, np.stack and @, and the page draws them posed. web_crowd's walking figure replays with no mismatch in Node and in Chromium. Then the second consumer's world (grounds, stands, rooms, theater, props, people, input and camera) runs from export --web, checked by a scripted visit of 1,800 frames or more replayed in Python, Node and Chromium in its CI, and by its bench before and after.
architectureThe desktop keeps a pose per entity in JointStore (src/manifoldx/skinning.py:43). The export writes the poses of posed entities into ecs.bin beside the components, and the joint count of each skinned geometry into the header; the page's Store keeps a pose per entity and resets it on destroy and respawn, as the desktop's release hooks do. scene.js leaves skinned entities out of the batches and draws each as a SkinnedMesh whose bones are not in the scene graph: their matrixWorld is the pose, so three's skeleton multiplies it by identity inverses (Q6 of the spec: one draw call per skinned entity). The consumer's world becomes a manifoldx app in Python that reads the same space JSON at setup; its host page frames the export and talks to it through events (spec Q1).
techPython 3.13 and numpy 2; plain ES modules; Node 20+ for node --test and the replay; three.js 0.186.1 as vendored, its GLTFLoader in the Node suite; Playwright with Chromium in the browser CI job on lavapipe; pygltflib in the glTF tests.
spec.knowledge/analysis/2026-11-07-web-target-slice5-design.html (approved; sections 05, 08, 11, 12 and 13; Q1, Q6, Q7 and Q8 of section 16)
builds onplan 5a (merged as #166) and plan 5b (merged as #169). This plan's branch is feat/web-target-5c from main at b399468; its PR targets main. gia-uh/manifoldx#13 (desktop anchors), being fixed on fix/gui-anchors, is assumed merged before task 8: the consumer's button column sits on a side.
code it changesdesktop: src/manifoldx/skinning.py, src/manifoldx/gltf/writer.py, glb.py, engine_export.py. web: src/manifoldx/web/ types.py, transpile.py, snapshot.py, replay.py, and in js/: pyrt.js, manifoldx.js, scene.js. examples/web_crowd.py. Then the consumer's repository (tasks 8 to 14).
executionsubagent-driven, one queue worker per task, in order. Tasks 2 to 5 depend on 1 only through the test fixtures; 3 needs 2 (@ builds the poses); 4 needs 3; 5 needs 2; 6 needs 3 and 4; 7 closes the manifoldx PR. Tasks 8 to 14 run in order after the PR merges.
Open questions
Each had a recommendation; the maintainer accepted all five on 2026-11-07. Tasks are written for those answers.
1 · Labels and speech bubbles while the port waits for slice 7settled · maintainer
The consumer draws HTML labels and speech bubbles at 3D points, with overlap avoidance (its drawLabels, about 50 lines). The spec moves them into manifoldx in slice 7 and says nothing of them for 5c. Once the world is in the export, the host page cannot project a 3D point: the camera is in the frame. Either the labels disappear from the consumer between 5c and slice 7, or frame code projects the points and emits their screen positions to the host.
recommendationAdd Camera.project to frame code (task 5; the desktop already has it at src/manifoldx/camera.py:103, so parity holds) and let the world emit the label anchors' pixels each frame they change. The host keeps its label code until slice 7. If the answer is no, drop task 5 and task 14 removes the labels and bubbles with the world code.
2 · The download once the world comes from the library glbsettled · maintainer
Today the consumer builds its geometry and its canvas textures in the browser from a small JSON file: 581 KB on a first visit without the music, by its audit. After the port, every geometry and texture is in the library glb, written as raw float32 with no meshopt (that is #156, slice 6), and the spec's Q7 only bounds the rooms (203 KB gzipped). The grounds, stands, people and props may weigh more than the rooms.
recommendationTask 8 measures the gzipped glb and ecs.bin of the grounds alone, and task 12 of the whole space with every room. Both numbers go on #140. If the first visit grows past twice the audit's 581 KB, propose moving #156's meshopt ahead of slice 7, as Q7 does for slice 9; the port still merges, and its deployment waits for that answer.
3 · The pixel ratio, until slice 6settled · maintainer
The export page renders at min(devicePixelRatio, 2) (src/manifoldx/web/js/browser.js:153). The consumer starts a phone at ratio 1, at most 1.5 elsewhere, and scales it down to 0.7 when frames run slow. A phone of ratio 3 would draw four times the pixels after the port, and the spec puts the ratio cap and scaler in slice 6 (#160).
recommendationKeep it in slice 6. The bench of task 14 runs before and after at a device scale factor of 1, so it compares the world code and not the ratio. The port merges in 5c and reaches visitors once slice 6's cap lands; task 14 says so in its PR.
4 · Publishing runs the export on the serversettled · maintainer
The consumer publishes a fair by copying its viewer and writing the space JSON. After the port, publishing runs export --web per space in its backend. The export opens an offscreen wgpu device when the app has startup handlers (src/manifoldx/web/export.py:112-114), and load_texture needs one, so the backend's image needs a software Vulkan driver it does not have.
recommendationInstall mesa's lavapipe in the consumer's image, as manifoldx's CI does, and measure in task 8 the image's growth and the export's time per space. Building the textures as SVG or as arrays to avoid the device would change more code for the same result.
5 · The consumer's own work in flightsettled · maintainer
The consumer has a scope spec dated today (a character editor, visitor cards, analytics, video) whose tasks touch the same page script. A port that deletes the world sections while other branches edit them will conflict on every merge.
recommendationThe port builds beside the current viewer: a new entry page serves the export, and the old page stays as it is until task 14 swaps them and deletes the world code. Changes to the world sections of the page script made after task 8 starts are ported in the task that owns that section; the panels are free to change throughout.
Done when
The spec's criterion for 5c, and for slice 5
manifoldx (tasks 1 to 7): Engine.export_gltf writes a posed skinned entity with JOINTS_0, WEIGHTS_0, a skin and its pose, and three's GLTFLoader puts each vertex where the desktop draws it (#82 closed). compare(replay_python(...), replay_node(...)) is None for tests/web/apps/skinned.py and for web_crowd with its walking figure, the trace carrying each posed entity's joints; in Chromium the figure's bone matrices equal what the Python replay's set_joints gave, frame by frame, and the draw calls are the batches plus one per skinned entity. CI's test, web and browser jobs are green.
The second consumer (tasks 8 to 14): its world comes from manifoldx export --web: the grounds, stands and props as the library scene; the walkers, promoters, crew, guide and player moving and posed by set_joints; the animated props; walking by keys, by a click on the ground and by the Joystick; its button column as GUI Buttons; a stand's room spawned when the visitor comes to its door and destroyed when it leaves the cache of three. Its page script holds no world code (the frame loop, the people, the props, input and camera are deleted); what remains is the host page with the document panels, the labels (Q1), sound and fullscreen, talking to the export only through events.
Checked three ways in the consumer's CI: a scripted visit of 1,800 frames or more (walk the plaza, click-to-walk to a stand, enter and leave its room, press each button, push the Joystick) through Python and Node with compare None; the same script through Chromium with the frame checks for keys, clicks, widget events and the clock; and its bench before and after against the spec's budget (section 11): no worse in draw calls and in main-thread time per frame with the CPU slowed four times, at the six viewpoints. The measurements Q7 and Q8 asked for are posted on #140.
Global constraints
- Functional parity (spec section 02): a skinned entity in the page is posed by the desktop's rules:
set_jointswrites at once, joints past J keep their matrix, a destroyed or respawned slot goes back to identity (src/manifoldx/skinning.py:97-109), and the error messages are the desktop's (src/manifoldx/engine.py:143-164,:1082-1111). - Exact replays: a float32 value both sides compute compares bit for bit (
rel0 in parity tests), a float64 one withinREL = 2**-30(src/manifoldx/web/replay.py:389). Where numpy's rounding order cannot be matched, the form is outside the subset with a hint, as 5a did for**. - No app JavaScript. The consumer's host page talks to the export only through events (spec section 06):
mx:emitout,{"mx": "emit", ...}messages in. manifoldx.jsandpyrt.jsimport neither three.js nor a DOM name; the skinned drawing is inscene.js.- An export error names the Python file and line and what to write instead where one form exists.
- Node and Playwright are test dependencies only; tests skip with
node not found,playwright not installedorchromium not installed, and the browser job fails on any skip. - Shared host: each task's verify runs only the tests covering it.
make testand the browser job run in CI. No export of the consumer's full fair on this host outside task 8's and 12's measurements, which run once each. - manifoldx is public: no consumer's repository, people, places, domains or machines in code, tests, commits, issues or PR text. Say "the second consumer", "a third consumer". The consumer's own repository follows its own rules.
- Commits are conventional and end with the co-author line; stage files by name; scratch goes under pytest's
tmp_pathor the system temp dir, never in the repo. Nevergit push --force.
Review focus
- float32
@on another CPU. numpy's float32 matmul on stacks matched a forward chain accumulated in float64 and rounded after each step, 0 differences in 32,000 values on this host (numpy 2.4.4, AVX-512). OpenBLAS picks its kernel per CPU; CI's runner may differ. The parity test prints the CPU'sfmaflag and the count, so a failure there is read, not retried. test in task 2 - A skinned slot destroyed and reused. A figure posed, destroyed, and a new figure spawned into its slot in the same frame or later: the new one draws at rest, in the trace and on screen, as the desktop's release hook resets the block. tests in tasks 3 and 4
- Fewer joints than the geometry has.
set_jointswith J = 2 on a 3-joint figure moves joints 0 and 1 and leaves joint 2 where the last call put it, not at identity. test in task 3 - A pose set at setup. An entity posed before
run()must arrive posed: inecs.bin, in the first frame's trace and in the first frame drawn, never the rest pose for one frame. tests in tasks 3 and 4 - set_material on a skinned entity. It has no batch to move between; its own SkinnedMesh takes the new material, and
materialOfreads the store as for batched entities. test in task 4
File structure
| file | responsibility |
|---|---|
| src/manifoldx/skinning.py | JointStore.pose(entity, j), joint_count(geometry) (task 1) |
| src/manifoldx/gltf/writer.py, glb.py | Node.joints; JOINTS_0 and WEIGHTS_0; a skin and its joint nodes; MAT4 and uint8 accessors (task 1) |
| src/manifoldx/gltf/engine_export.py | nodes() passes each skinned entity's pose (task 1) |
| src/manifoldx/web/types.py, transpile.py | @, np.eye, nested np.array, np.stack of any rank (task 2); set_joints on the engine and the handle (task 3); camera.project (task 5) |
| src/manifoldx/web/js/pyrt.js | nd.matmul, nd.eye, nd.array of rows, stack of any rank (task 2) |
| src/manifoldx/web/snapshot.py | the header's skinned and poses; pose bytes in ecs.bin (task 3) |
| src/manifoldx/web/js/manifoldx.js | Store.skinned, Store.joints, setJoints, release on destroy and spawn, traceJoints (task 3); cameraMatrix and project (task 5) |
| src/manifoldx/web/replay.py | joints_trace(engine), the trace's joints (task 3) |
| src/manifoldx/web/js/scene.js | skinned entities as SkinnedMesh, out of the batches (task 4) |
| examples/web_crowd.py | the walking figure (task 6) |
| tests/test_gltf_skin.py, tests/web/js/gltf_skin.test.mjs | the desktop writer and three's reading of it (task 1) |
| tests/web/test_matmul.py | array parity for task 2 |
| tests/web/apps/skinned.py, tests/web/test_joints.py | the joints across the export and the replay (task 3) |
| tests/web/js/scene.test.mjs, tests/web/test_node_suites.py | the skinned drawing in Node, on skinned.py's export (task 4) |
| tests/web/apps/projecting.py, tests/web/test_project.py | camera.project (task 5) |
| tests/web/test_web_crowd.py, tests/web/browser/test_web_crowd_page.py | the figure in the replay and in Chromium (task 6) |
| know-how/web-export.md, CHANGELOG.md, AGENTS.md | docs (task 7) |
| the consumer's repository | a world package of Python modules (app, grounds, stands, rooms, people, props, controls, textures), the host page, the publisher, CI jobs, the bench (tasks 8 to 14) |
Tasks
1Desktop: the glTF writer writes joints, a skin and the current pose (#82; changes behaviour)skinning.py · gltf/writer.py · gltf/glb.py · gltf/engine_export.py · tests/test_gltf_skin.py · tests/web/js/gltf_skin.test.mjs · tests/web/test_node_suites.py · CHANGELOG.md
This task changes what Engine.export_gltf writes for an entity spawned from a geometry with joints. Today it writes the rest positions as a plain mesh node and reports nothing (#82). After it, the node carries JOINTS_0, WEIGHTS_0 and a skin posed as the entity is drawn, so a viewer that ignored joints now poses the figure, and the file holds more nodes (one per joint and one skeleton node per skinned entity). Unskinned entities are written as before.
interfaces
JointStore (src/manifoldx/skinning.py:43-109), Node and _Writer (src/manifoldx/gltf/writer.py:16, :130-205), GlbBuilder.accessor (src/manifoldx/gltf/glb.py:35), nodes() and export_engine (src/manifoldx/gltf/engine_export.py:101-150) · produces JointStore.pose(entity: int, j: int) -> np.ndarray, (j, 4, 4) float32 row-major, identity for an entity never posed; joint_count(geometry: dict) -> int in skinning.py, int(max(joints)) + 1; Node.joints: np.ndarray | None = None, a (J, 4, 4) row-major pose; library meshes of a skinned geometry carry JOINTS_0 and WEIGHTS_0 and no skin; _TYPE[16] = "MAT4" and uint8 in _COMPONENT- Write the failing tests in a new
tests/test_gltf_skin.py, reading the glb withtests/gltf_helpers.py'sload(a pygltflibGLTF2, as plan 5a's departures say). The fixture builds the figure ofexamples/skinning.py(four parts, joints 0 to 3) at setup on an offscreen engine, spawns it atpos=(1, 2, 3)with a rotation of 0.5 rad about y andscale=(2, 2, 2), and poses it withhandle.set_joints(P),Pfour float32 matrices: identity, a translation by (0, 0.1, 0), and rotations of 0.3 and -0.3 rad about x through the shoulders. A Node test,tests/web/js/gltf_skin.test.mjs, on a glb that a new session fixtureskinned_glb_pathintests/web/test_node_suites.pywrites besideexpected.json(each vertex atTRS · P[joint] · (x, y, z, 1), computed in numpy float64) and passes asMX_SKIN_GLB: Runuv run pytest tests/test_gltf_skin.py tests/web/test_node_suites.py -q: the new tests fail (noJOINTS_0, nopose). - Implement.
JointStore.posereadsmirror[block_of[entity], :j].transpose(0, 2, 1).glb.pygainsnp.dtype(np.uint8): 5121and_TYPE[16] = "MAT4"._Writer.accessorsaddsJOINTS_0(uint8, the joint in column 0) andWEIGHTS_0(float32, 1 in column 0) when the geometry has"joints", so library meshes carry them too; skinned and unskinned uses of one geometry share the accessors as today._Writer.node, whennode.jointsis set: J joint nodes, each{"name": f"{name}_joint_{j}", "matrix": node.joints[j].T.ravel()}; a skeleton nodef"{name}_skeleton"with the TRS the plain node would have, its children the joints, added to the scene's roots; one skin{"joints", "inverseBindMatrices": J identities as a MAT4 accessor, "skeleton"}; the mesh node keeps the name and extras, takes"skin", and has no TRS. The reason is in departure 3.nodes()setsjoints=engine._render_pipeline._joints.pose(i, joint_count(geo))for a geometry with joints. - Run the same command: all pass. Run
uv run pytest tests/test_gltf_library.py tests/test_gltf_export.py -qtoo (the files that exist under those names;ls tests/test_gltf*): unskinned output is unchanged. - Add to
CHANGELOG.mdunder[Unreleased],### Changed:Engine.export_gltf writes a skinned entity with its joints and its current pose: JOINTS_0 and WEIGHTS_0 on its mesh, a skin with identity inverse binds, and one joint node per joint under a node carrying the entity's Transform. Viewers that ignored the joints now pose the figure. Lifts the 0.10.0 known limitation (#82).Leave the released section's text as it is. - Commit:
feat(gltf): skinned entities export with their joints and pose (#82), the body saying it changes the written file for skinned entities.
uv run pytest tests/test_gltf_skin.py tests/test_gltf_library.py tests/web/test_node_suites.py -q: all pass. Write the joint matrices row-major once (drop the .T): the Node test fails on the first rotated vertex.
2The array subset gains @ on matrix stacks, np.eye, nested np.array and np.stack of any rankweb/types.py · web/transpile.py · js/pyrt.js · tests/web/test_matmul.py
interfaces
NdArray, CAST, TYPED, stack, nd.array (src/manifoldx/web/js/pyrt.js:237-541), ND_FUNCTIONS and lib_call (src/manifoldx/web/types.py:640-646, :1276-1300), the dtype passed last (plan 5a, departure 32) · produces $rt.nd.matmul(a, b, dtype) on shapes (..., n, k) @ (..., k, m), leading dimensions equal or one side of rank 2; $rt.nd.eye(n, dtype); $rt.nd.array(rows, dtype) taking a list of equal-length lists of numbers or of rank-1 arrays, giving rank 2; stack(list, 0, dtype) of equal-shape arrays of any rank, giving shape [k, ...shape] (axis 1 keeps today's rank-1 form); types: ast.MatMult between nd operands of rank ≥ 2 types as nd(numpy 2's dtype, max rank); numpy.eye types as nd(dtype or "f64", 2); np.array of a list of lists or of arrays types as nd(d, 2)- Write the failing tests in
tests/web/test_matmul.pywithtests/web/parity.py'srun_both, eachmain()returning a value both sides trace: Runuv run pytest tests/web/test_matmul.py -q: they fail at the export (MatMulton numpy arrays is outside the subset). - Types and transpile.
ND_OPSgainsast.MatMult: "matmul"; the binop rule types it as above and fails a rank-1 operand with the message of the test.numpy.eyejoinslib_callwith one positionalNanddtype=(other arguments fail as "this call tonp.eye()").np.arrayof a list whose elements are lists of numbers or rank-1 arrays becomes$rt.nd.array(rows, d);np.stackaccepts any equal rank withaxis0 (default), axis 1 only for rank 1 as now. - Runtime. float32
matmul: for each output element,acc = 0, then for k in orderacc = Math.fround(acc + a_ik * b_kj), the product of two float32 values being exact in a double: the forward FMA chain numpy's float32 matmul computes (departure 1). float64:acc += a_ik * b_kj. Broadcasting: leading dimensions equal, or one operand of rank 2; anything else throws numpy'sValueErrorfor the shapes. - Run the same command: all pass. Write the measured count and CPU into this plan's departure 1 if they differ from it.
- Commit:
feat(web): @ on matrix stacks, np.eye, nested np.array and np.stack of any rank.
uv run pytest tests/web/test_matmul.py tests/web/test_ndarray.py tests/web/test_numpy.py -q: all pass, the breaking test included.
3set_joints in frame code: poses in ecs.bin, in the page's store and in the traceweb/types.py · web/transpile.py · web/snapshot.py · web/replay.py · js/manifoldx.js · tests/web/apps/skinned.py · tests/web/test_joints.py
interfaces
JointStore.pose and joint_count (task 1), nd.matmul, nd.eye, nested nd.array, stack (task 2), ecs_bytes (src/manifoldx/web/snapshot.py:291), Store.fromBuffer, spawn, destroy (src/manifoldx/web/js/manifoldx.js:150-281), EntityHandle (:556), store_trace and the digest (src/manifoldx/web/replay.py:326-349) · produces header ecs.skinned: {gid: J} for every skinned geometry in the library and ecs.poses: [{"entity": i, "at": [offset, bytes]}], each a (MAX_JOINTS, 4, 4) float32 row-major block of a posed alive entity; JS Store.skinned: Map<number, number>, Store.joints: Map<number, Float32Array> (MAX_JOINTS × 16, row-major), Store.setJoints(indices, data, j); destroy and spawn delete the slots' poses; engine.set_joints(indices, matrices), EntityHandle.set_joints(matrices); MAX_JOINTS = 32 in manifoldx.js; trace key "joints": {str(i): [[16 floats] × J]} per posed alive entity, J from skinned, or {"digest": d, "n": k} past JOINTS_DIGEST_PAST = 8 posed entities; Python joints_trace(engine) -> dict in replay.py, JS traceJoints(store); types: "set_joints" in RUNTIME_SURFACE for manifoldx.Engine and manifoldx.engine.EntityHandle, returning None- Write
tests/web/apps/skinned.py:FIG, a 3-joint figure geometry (body, two arms) built at setup asexamples/skinning.pybuilds its figure;BOX, a plain cube. Setup spawns three figures and a box, keeps the handles in a module-levelFiguresobject with class-level annotations (5a, departure 49), poses figure 0 withhandle.set_joints(...)beforerun(), and callsengine.set_origin(100.0, -50.0). A helperabout(px, py, pz, axis, angle) -> np.ndarraybuilds a (4, 4) float32 rotation about a pivot from a nestednp.arrayofmath.cos,math.sinand numbers, then@with two translations. Systempose(dt): angle fromengine.elapsed; for each alive figure, a (3, 4, 4)np.stack; oneengine.set_joints(np.array([f.index for f in alive]), np.stack(poses)). Frame 10: figure 1 getsset_jointswith J = 2 once and leaves the crowd call. Frame 30: figure 2 destroyed; frame 31: a new figure spawned into its slot, not posed until frame 40. Then the failing tests intests/web/test_joints.py: Runuv run pytest tests/web/test_joints.py -q: fails at the export (set_jointson an EntityHandle is outside the surface). - Export.
ecs_byteswritesskinnedfrom the geometry registry (every registered geometry with"joints",joint_counteach) andposesfor each alive entity whoseblock_ofis not 0, its block read withpose(i, MAX_JOINTS), each block on a multiple of 4 bytes as 5a's blocks are. - Runtime.
Store.fromBufferloads both.setJoints(indices, data, j)creates a pose of 32 identities for a slot that has none and writes j matrices into it.engine.set_jointsandEntityHandle.set_jointscheck and fail in the desktop's order and words (src/manifoldx/engine.py:1094-1110,:155-163): shapes first, then the geometry of each entity through its Mesh column andskinned; the values are cast to float32; an empty index list does nothing.Store.destroydeletes the pose of every slot it frees andStore.spawnof each slot it hands out, as the release hooks run (src/manifoldx/skinning.py:97). - Trace.
joints_tracereads the desktop'sJointStorefor alive entities with a block, ascending, J fromjoint_countof the entity's geometry;traceJointsreadsStore.jointsthe same way. Past 8 the digest is 5a's formula over the float32 words of all J-joint blocks, in entity order. Both traces add"joints"beside"store". - Run
uv run pytest tests/web/test_joints.py tests/web/test_ecs_snapshot.py tests/web/test_handles.py -q: all pass. - Commit:
feat(web): set_joints in frame code, poses in ecs.bin and the trace.
uv run pytest tests/web/test_joints.py tests/web/test_ecs_snapshot.py tests/web/test_handles.py tests/web/test_store.py -q: all pass, the breaking test included.
4The page draws each skinned entity as a SkinnedMesh posed from the storejs/scene.js · tests/web/js/scene.test.mjs · tests/web/test_node_suites.py
interfaces
Store.skinned, Store.joints (task 3), library meshes with JOINTS_0, which GLTFLoader reads as skinIndex and skinWeight (task 1), buildScene, writeInstance, sync (src/manifoldx/web/js/scene.js:111-310) · produces MxScene.skinned: Map<number, SkinnedMesh> keyed by entity; skinned entities are in no batch; each SkinnedMesh has J bones outside the scene graph, matrixAutoUpdate false, bound with mesh.bind(new Skeleton(bones), new Matrix4()); sync sets the mesh's matrix from the Transform row as writeInstance does, each bone's matrixWorld from the pose (transposed into three's column-major) or the identity, and the mesh's boundingSphere as the desktop pads it, r * 1.5 + 0.5 about the box centre (src/manifoldx/renderer.py:113-120); materialOf is unchanged- Add a session fixture
skinned_exporttotests/web/test_node_suites.py(skinned.py exported, asspawner_exportis) passed asMX_SKINNED_EXPORT, and the failing tests intests/web/js/scene.test.mjs: Runuv run pytest tests/web/test_node_suites.py -q: the new cases fail. - Implement in
scene.js:buildScenerecords which library geometries haveskinIndex; the batch membership pass skips their entities; a pass over alive skinned entities creates, keeps or disposes their SkinnedMesh (geometry shared, skeleton per entity,skeleton.dispose()on removal) under the same parent as the batches; shadows, fog and the calibration apply as to batches. Skinned meshes rebuild when the store object or its version changes, as batches do (5a, departure 53), and their matrices and bones are written every sync. - Run the same command: all pass.
- Commit:
feat(web): the page draws skinned entities posed from the store.
uv run pytest tests/web/test_node_suites.py -q: all pass. Skip the bone write once: "bone matrices are the store's pose" fails.
5Camera.project in frame code (open question 1)web/types.py · web/transpile.py · js/manifoldx.js · tests/web/apps/projecting.py · tests/web/test_project.py
Runs if question 1 is answered as recommended; otherwise skip it and mark it done with a one-line note.
interfaces
Camera.project, get_view_matrix, get_projection_matrix (src/manifoldx/camera.py:103-120 and their definitions in that file), nd.matmul float32 (task 2), the page's camera object (plan 2) · produces JS cameraMatrix(camera, aspect) -> Float32Array(16), projection times view in float32 as the desktop computes it; camera.project(points, width, height) returning [xy, w], an f64 NdArray (n, 2) and an f64 NdArray (n,); types: "project" in the camera's surface returning tuple[nd[f64, 2], nd[f64, 1]]- Write
tests/web/apps/projecting.py: the camera orbits a point; five world points as a float64 (5, 3) array, one behind the camera; a system storesxy.tolist()andw.tolist()fromengine.camera.project(PTS, engine.w, engine.h)inengine.state. Thentests/web/test_project.py: Runuv run pytest tests/web/test_project.py -q: fails at the export. - Implement
cameraMatrixfrom the desktop's two functions line for line in float32, the product throughnd.matmul;projectas the desktop's body: points as float64 with a column of ones, times the matrix transposed, the divide and the pixel formulas in float64. Addprojectto the camera's surface. - Run the same command: all pass.
- Commit:
feat(web): Camera.project in frame code.
uv run pytest tests/web/test_project.py tests/web/test_frames.py -q: all pass, the breaking test included.
6web_crowd gains a walking figure, replayed in Node and in Chromiumexamples/web_crowd.py · tests/web/test_web_crowd.py · tests/web/fixtures/web_crowd_script.json · tests/web/browser/test_web_crowd_page.py
interfaces
PATHS and the fixture (tests/web/test_web_crowd.py:14-60); the browser conftest's export and BATCHES_OF (tests/web/browser/conftest.py) · produces in examples/web_crowd.py: FIGURE, a 6-joint geometry (body, head, two legs, two arms) built at setup; one figure spawned at setup; a system walk(dt) moving it by its handle along a circle of radius 6 about the origin at 1.2 m/s and posing it each frame with handle.set_joints(np.stack([...])), legs and arms swinging by 0.5 * sin(walked * 2.2), opposite pairs in opposite phase; key f pauses and resumes it; engine.state["walked"] joins PATHS- Write the failing tests. In
tests/web/test_web_crowd.py: the existing replay test is unchanged and now carriesjoints; Intests/web/browser/test_web_crowd_page.py: Addftwice to the script (frames 400 and 460), regenerate the fixture with the generator the seventh test checks, and runuv run pytest tests/web/test_web_crowd.py -q: the new tests fail. - Implement the figure in
examples/web_crowd.py. Its matrices useabout()as in task 3's app (nestednp.arrayand@), the swing on float64 trigonometry (5a, departure 9). The figure has no Velocity and no Wave, so web_crowd's queries leave it out:pickanddriftstill see only boxes. - Run
uv run pytest tests/web/test_web_crowd.py -q, then the browser file where Chromium is installed: all pass. If 5a's or 5b's counts in that file move because the figure takes a slot, update them and say which in this plan's departures. - Commit:
feat(examples): a walking skinned figure in web_crowd.
uv run pytest tests/web/test_web_crowd.py tests/web/browser/test_web_crowd_page.py -q: all pass, or the browser file skipped here and green in CI's browser job.
7Docs, CHANGELOG, the PR and CIknow-how/web-export.md · CHANGELOG.md · AGENTS.md
know-how/web-export.md: the surface gainsset_joints(engine and handle),@on matrix stacks with its float32 rule,np.eye, nestednp.array,np.stackof any rank andcamera.project; a matrix times a vector is out, and how to write it; skinned entities draw one call each (spec Q6).CHANGELOG.mdunder[Unreleased],### Added:In export --web frame code: set_joints on the engine and on handles, @ on matrix stacks, np.eye, nested np.array, np.stack of any rank and Camera.project; the page draws skinned entities posed (#140).AGENTS.md's web target line names plan 5c and the plan's path.- Commit
docs(web): skinned entities and matrices in the know-how, push the branch, open the PR againstmainwithCloses #82and not #140 (it closes with the consumer's port), and work it until CI'stest,webandbrowserjobs are green. Ask the maintainer to merge.
CI green on the PR, the browser job listing test_web_crowd_page.py with no skips; grep -n set_joints know-how/web-export.md finds the new lines.
The second consumer's port
Tasks 8 to 14 run in the second consumer's repository after this plan's PR merges, on one issue, one branch and one PR there, as plan 2's and plan 3's consumer tasks did for the first consumer. The consumer's page script is 3,446 lines; this table is its split by its own section comments, and which task replaces each section. Line counts are today's and move as the consumer works (question 5).
| section of the page script | lines | after the port |
|---|---|---|
| renderer, scene, light; building blocks | 119 | Python setup (task 8) |
| the grounds; platforms; the first slice and the merge | 424 | Python setup, static parts merged per 32 m cell (task 8) |
| stands; and the canvas texture module (a separate file) | 497 + 384 | Python setup, textures drawn with Pillow (task 9) |
| models (bodies, poses); people | 247 | skinned geometries and set_joints (task 10) |
| input, camera (its world half); the loop's joystick, button column and frame loop | ≈ 310 | frame code, a Joystick and GUI Buttons (task 11) |
| inside a stand; interiors and the theater | 356 | rooms spawned from the library (task 12) |
| prop kits; miradors and the world's tail (greenery, clouds, kits placed) | ≈ 880 | Python setup and query systems (task 13) |
| the sheet, messages, cards, picker, map; panel wiring of input | ≈ 470 | stays: the host page's document panels (Q1 of the spec) |
| labels and speech bubbles | ≈ 50 | stays, fed by an event (question 1), until slice 7 |
| fullscreen and orientation, sound start, the host handshake, the resolution scaler | ≈ 110 | stays (sound and fullscreen until slices 6 and 7); the scaler goes with the world (question 3) |
Sum: about 2,860 lines of the page script and the 384-line texture module are replaced, about 3,240 lines of JavaScript, by an estimated 2,500 to 3,000 lines of Python in a new world package. The page script keeps about 590 lines. The consumer already depends on manifoldx (its models are built with manifoldx.modeling and written with manifoldx.gltf), and its person builder already groups each body's vertices by joint, so people become skinned geometries without a new model format.
8Consumer: the issue, the pin, the world app's shell with the grounds, the host page, publishing, and the first measurementsthe consumer's repository: pyproject.toml · a world package (app, grounds) · a new entry page · its publisher · Dockerfile · CI · tests/world/
interfaces
export_web (manifoldx.web.export), replay_python, replay_node, compare (manifoldx.web.replay), manifoldx.modeling, the host-page bridge (5b, task 9) · produces in the consumer: world/app.py, the manifoldx app, reading the space JSON the viewer reads today (path from the SPACE_JSON environment variable, default the demo space) at setup; world/grounds.py, build_grounds(engine, space) -> Grounds (the walkable surface, the blocks and platform heights later tasks use: height_at(x, z), blocked(x, z)); merge_cells(parts, cell=32.0), static parts merged per cell into vertex-coloured geometries; a new entry page that frames the export and relays events; the publisher writes world/<space>/ per space with export_web; tests/world/visit.py, the frame-script builder every later task extends- Open an issue in the consumer's repository (the 3D world from
manifoldx export --web), linking gia-uh/manifoldx#140 and this plan; branch from its main. Following its AGENTS.md, copy tasks 8 to 14 into a plan page in its plans folder with its real file names, and mark progress there as well as here. - Pin manifoldx to the merge commit in
pyproject.toml's[tool.uv.sources];uv sync; its tests still pass. - Write the failing tests in
tests/world/test_grounds.py: Runuv run pytest tests/world -q: all fail (no world package). - Implement
world/app.py(engine, sun, fog and sky from the renderer section's values) andworld/grounds.pyfrom the grounds, platforms, first-slice and merge sections. The merge keeps the page script's key (cell in x and z) so culling stays as its audit measured; animated and spawned things are never merged. The entry page frames the export'sindex.html, forwardsmx:emitmessages to the document panels' code and posts{"mx": "emit"}messages in. The current viewer is untouched (question 5). - Publishing: the publisher runs
export_webfor each space of a fair into the bundle. Install lavapipe in the image (question 4). Add Node to its CI so the replay tests run there. - Measure once, on a quiet host: the gzipped
scene.glbandecs.binof the demo space's grounds, the export's time per space, and the image's growth. Post them on the consumer's issue and, without naming the consumer, on gia-uh/manifoldx#140 (question 2). - Run
uv run pytest tests/world -q: all pass. Commit:feat(world): the grounds from manifoldx export --web.
uv run pytest tests/world -q: all pass, the replay not skipped. Shift one platform's height in height_at by 0.1: the height test fails.
9Consumer: the stands and their texturesthe consumer's world package (stands, textures) · tests/world/test_stands.py
interfaces
build_grounds, merge_cells (task 8), manifoldx.textures.load_texture, engine.set_material, engine.elapsed · produces build_stands(engine, space, grounds) -> list[Stand], a Stand holding its place, door, kit and the handles of its parts that change (boards, billboards); world/textures.py with one function per texture of the canvas module (logo, product card, screen, billboard, sign, displays, directory, badge), each returning a Pillow image the app loads at setup; a system rotate_billboards swapping each billboard's material every 8 s by engine.elapsed- Write the failing tests in
tests/world/test_stands.py: Runuv run pytest tests/world/test_stands.py -q: fails. - Implement from the stands section and the texture module. Text on textures is drawn with a font file the repository already ships, or one it adds; a texture's look may differ in antialiasing from the canvas, not in layout.
- Run the same command: all pass. Commit:
feat(world): the stands and their textures in Python.
uv run pytest tests/world/test_stands.py tests/world/test_grounds.py -q: all pass.
10Consumer: the people as skinned entities posed by set_jointsthe consumer's world package (people) · its person model builder · tests/world/test_people.py
interfaces
Mesh(joints=), engine.set_joints(indices, matrices), @, np.stack, np.eye, nested np.array (tasks 2 and 3), random.Random made at setup (5b), the person model builder's joint groups and pivots · produces skinned(look) -> manifoldx.modeling.Mesh, one joint per group, every look registered at setup so the library holds it; People with the walkers, promoters, crew, guide and player, each an app object holding its handle, path state and pose angles; a system pose_people(dt) making one (N, J, 4, 4) stack and one engine.set_joints per frame; a handler for the host's look event that destroys the player and spawns it with the chosen look at the same place and heading- Write the failing tests in
tests/world/test_people.py: Runuv run pytest tests/world/test_people.py -q: fails. - Implement from the models and people sections and the grounds' deal and sit helpers. Random pauses draw from one
random.Randomseeded at setup. - Run the same command: all pass. Commit:
feat(world): people as skinned entities posed by set_joints.
uv run pytest tests/world/test_people.py -q: all pass. Swap two joints' order in skinned(): the stride test fails.
11Consumer: walking, the camera, the Joystick and the button columnthe consumer's world package (controls) · tests/world/test_controls.py · tests/world/visit.py
interfaces
engine.input, the pointer and key events, manifoldx.gui.Joystick, Button and anchored panels (5b and #13), height_at, blocked (task 8), the player (task 10) · produces a system walk(dt) taking keys, the Joystick's value and a click-to-walk target; ray(engine, x, y) and the ground pick for a click; the camera in third and first person with the page script's distances and easing; the button column as GUI Buttons in a panel anchored to the right; nearest() of the interactive things, and an open event to the host with {"kind", "id"} when the hint button or E acts; handlers for the host's place event (jump, take-me-to and the bench's viewpoints)- Write the failing tests in
tests/world/test_controls.py, extendingvisit.pywith key, click and Joystick frames: Runuv run pytest tests/world/test_controls.py -q: fails. - Implement from the input and camera section and the loop's joystick and button-column code. The touch pinch is slice 8: the wheel zooms.
- Run the same command: all pass. Commit:
feat(world): walking, camera, Joystick and buttons in frame code.
uv run pytest tests/world/test_controls.py tests/world/test_people.py -q: all pass.
12Consumer: rooms spawned at their doors, the theater, and the Q7 measurementthe consumer's world package (rooms) · tests/world/test_rooms.py
interfaces
engine.spawn of library geometries and engine.destroy (5a), time.time() (5b), the stands (task 9), the player and place (tasks 10 and 11) · produces Rooms: every stand's interior built at setup as geometries and materials only (no entity), spawned when the visitor comes within 12 m of its door, at most three kept, the oldest not on screen destroyed; entering and leaving as the page script's enter and leave, the fade as a host event; the theater hall the same way, its screen following the agenda by time.time()- Write the failing tests in
tests/world/test_rooms.py: Runuv run pytest tests/world/test_rooms.py -q: fails. - Implement from the sections on rooms, interiors and the theater.
- Measure once (spec Q7): the gzipped library glb of the demo space with every room, against the same build with no rooms. Post both on the consumer's issue and on gia-uh/manifoldx#140 without naming the consumer: if the rooms add more than 203 KB, propose there that slice 9 moves before slice 7.
- Run the same command: all pass. Commit:
feat(world): rooms and the theater spawned at their doors.
uv run pytest tests/world/test_rooms.py -q: all pass. Keep four rooms: the cache test fails.
13Consumer: the prop kits and the animated propsthe consumer's world package (props) · tests/world/test_props.py
interfaces
random.Random (5b) · produces one function per kit piece of the prop kits section, built at setup; Components for what moves alike (Spin, Bob, Orbit, Drift) and one query system each; the dogs and other props with their own logic as app objects holding handles; detail by distance: a stand's details and crew take a material made at setup with opacity 0 beyond 48 m and scenes beyond 72 m, as the third consumer hides its floors (spec section 03)- Write the failing tests in
tests/world/test_props.py: Runuv run pytest tests/world/test_props.py -q: fails. - Implement from the prop kits section and the world's tail (miradors, greenery, clouds, kits placed).
- Run the same command: all pass. Commit:
feat(world): prop kits and animated props.
uv run pytest tests/world/test_props.py -q: all pass.
14Consumer: the cut, the scripted visit in CI, the bench before and after, and Q8the consumer's page script and pages · its bench · CI · tests/world/test_visit.py · tests/world/browser/
interfaces
Camera.project (task 5) · produces the visit script (1,800 frames or more); the host page as the only page script, holding the document panels, the labels fed by a labels event of anchors' pixels, sound and fullscreen; the bench reading __mx.renderer and placing the visitor through the place event; a browser CI job with Playwright, Chromium and lavapipe- Write the failing tests.
tests/world/test_visit.py:test_the_visit_replays, the full visit (walk the plaza, click-to-walk to a stand, enter and leave its room, press each button, push the Joystick) through Python and Node,compareNone.tests/world/browser/test_visit_page.py: the same script driven through the host page with Playwright's keyboard, mouse and a two-finger touch (5b's conftest helper as a model),compare(replay_python(page_frames), page_trace)None, and the frame checks: each key and click in its frame, each widget event the frame after its pointer, the clock never backwards; alabelsevent places a label at the pixelCamera.projectgives. - Run them: they fail while the entry page still loads the old viewer.
- The cut. The entry page frames the host page, which frames the export. Delete from the page script the sections tasks 8 to 13 replaced, the frame loop and every three.js import; delete the canvas texture module; remove the world's markup from its page.
grep -n "three"over the page script finds nothing. - The bench. Point it at
__mx.rendererand theplaceevent; run it on main and on the branch at a device scale factor of 1 with the CPU slowed four times (question 3), compare with its compare tool, and check the spec's budget: no worse in draw calls and main-thread time per frame at the six viewpoints, frame code under 18 ms. Q8: triangles per view and the share the frustum keeps, before and after; if they grow, open a manifoldx issue for splitting large batches by a spatial cell insidescene.js, as Q8 says. Post the table on the consumer's issue and, without naming the consumer, on gia-uh/manifoldx#140, with the host's load. - CI: add the
browserjob. Run both test files: all pass. Commitfeat(world): the 3D world comes from manifoldx export --web, open the PR, work it until CI is green, and ask the maintainer to merge. Deployment waits for questions 2 and 3, and for the maintainer's go.
The consumer's CI green with the replay and browser jobs not skipped; the page script has no three.js import and no frame loop; the bench table on #140 meets the budget or names the line that does not.
Where this plan departs from the spec
- 1 · float32
@is a forward chain accumulated in float64; a matrix times a vector is out. Section 05 lists@on stacks without a rounding rule. Measured for this plan with numpy 2.4.4 on this host (AVX-512): float32 matmul on (4, 4), (3, 3), (1000, 3, 3) and (30, 32, 4, 4) stacks equals, in 32,000 values out of 32,000, a loop that adds each exact product to the accumulator in float64 and rounds to float32 after each step, k in order (an FMA chain). Rounding each product first differs in 12,164 values, summing in reverse in 15,927, pairwise in 14,936. A (n, n) matrix times a (n,) vector goes through another kernel: 1,682 of 15,000 values for n = 3 differ from every sequential order tried, while the same product written as a column (n, 1) matches the chain. So the vector form fails the export with a hint (task 2). - 2 · Nested
np.arrayandnp.stackof any rank join the subset. A write through an index stays outside the subset (section 05), so the desktop example's way of building a joint matrix,m[:3, :3] = r(examples/skinning.py:44-46), has no page form; a matrix built from rows, and a stack of matrices, are the forms that remain. 5a'snp.stacktook rank-1 arrays only (5a, departure 37). - 3 · The skin's node layout. Section 08 says the export writes a skin of identity inverse binds. glTF ignores the transform of a skinned mesh's node, and three's GLTFLoader binds a skinned mesh with the identity (
src/manifoldx/web/vendor/three/addons/loaders/GLTFLoader.js:4297) and then draws it with the mesh node's world matrix. Only a mesh node with no transform, and joint nodes under a node that holds the entity's Transform, give TRS · J · v in both readings (task 1). - 4 · The page's bones are outside the scene graph, and normals follow three's rule. Each bone's
matrixWorldis the pose itself, soSkeleton.updatemultiplies it by identity inverses. three skins a normal by the joint matrix; the desktop by the inverse transpose of its 3x3 (src/manifoldx/engine.py:146-148). They agree for rotations, translations and uniform scale; a joint with non-uniform scale shades differently, which the spec allows (pixel equality is a non-goal). - 5 · Poses travel as full 32-joint blocks, and the trace shows J per geometry. Section 10 says the snapshot writes "the joint matrices". The desktop keeps 32 per block and joints past a call's J keep their matrix, so a later call with a larger J must find what an earlier one wrote;
ecs.bincarries whole blocks. The trace shows the geometry's own joints (its largest joint index plus one), and a digest past 8 posed entities, because the consumer's 40 people over 1,800 frames would otherwise put about seven million numbers in each trace. - 6 ·
Camera.projectjoins frame code (task 5, question 1). Not in the spec; it keeps the consumer's labels in its host page until slice 7. - 7 · One export per space until slice 9. Section 14 gives spaces on demand to slice 9. The consumer already switches spaces by loading another frame behind the current one; each space becomes its own export and the switch stays as it is.
- 8 · The consumer's port is sized and ordered here. Section 12 says the port is planned in the consumer's repository. The queue workers need its scope, order and checks here; task 8 copies tasks 8 to 14 into the consumer's own plan page with its file names.
- 9 · Static parts are merged per 32 m cell at setup. Batching by (geometry, material) alone would put each colour of the grounds in one batch spanning the grounds, culled whole: the culling Q8 worries about. The consumer's page script already merges static parts per cell; the port does the same in Python, so Q8's measurement compares like with like. Q8's batch split inside
scene.jsstays for what is not merged (rooms, people, animated props), if task 14 finds it needed. - 10 · The labels and the fade overlay stay in the host page, through events. Section 12 lists what the host keeps as the panels, sound and fullscreen; the labels (question 1) and the black fade of a room's entry are DOM the host already draws.
- 11 · Draw calls count skinned entities. 5a's test asserts one call per batch; with skinned entities outside the batches (spec Q6) the count is the batches plus one per skinned entity (task 6).
- 12 · @ broadcasts leading dimensions as numpy does, and an
np.ndarrayannotation is a vector (found in task 2). Task 2 asked for leading dimensions equal or one side of rank 2, anything else throwing.nd.matmulbroadcasts them by numpy's rule instead (a dimension of 1 stretches,(1, 4, 4) @ (5, 4, 4)included), so the page throws exactly where numpy throws, with numpy's "remapped shapes" message; the code is the same size as the check would have been. A vector on the left (v @ m,v @ w) fails the export too, with its own hint, for the same reason as a matrix times a vector. int32@wraps each step as numpy's int32 does; bool is out. In the tests, a helper that returns a matrix leaves its return unannotated:-> np.ndarraytypes as a float64 vector (types.py, the annotation rule), which tasks 3 and 6 should know when they writeabout(). Measured with the parity test, numpy 2.4.4 on this host (fma): 0 of 3,200 float32 values differ, as departure 1 says. - 13 · The skinned app's helpers, and numpy functions wait for a call's return (found in task 3).
tests/web/apps/skinned.pykeeps the plan's shape with three small changes: frame 0 poses nothing, so the trace's first frame shows the pose setup gave (the crowd call would overwrite it);--boxand--shapesin the app's arguments make the two error cases, and the box's pose isnp.stack([np.eye(4, dtype=np.float32)]), sincenp.eye(4)[None]indexes by None, outside the subset;SKINNED_Nstays an environment variable. Writing it found a type bug of task 2: a numpy function (np.stackabove all) of a value not typed yet, such as the return of a helper typed later in the fixed point, typed as unknown for good, so a helper returningnp.stack([...])of other helpers' matrices failed the export.nd_functionnow waits (returns the empty type) asbinopalready did. The loader the plan callsStore.fromBufferisStore.load. The breaking test sees the kept pose at frame 31, the respawn: a destroyed slot is dead in frame 30's trace on both sides. - 14 · The page's skinned meshes bind detached, and the basic light skins its normal (found in task 4). Task 4 says to bind with
mesh.bind(new Skeleton(bones), new Matrix4()). three's defaultAttachedBindModeresetsbindMatrixInverseto the inverse of the mesh's world matrix at everyupdateMatrixWorld(three.core.js,SkinnedMesh.updateMatrixWorld), which cancels the entity's Transform; each SkinnedMesh setsbindMode = DetachedBindMode, so the inverse stays the identity and a vertex lands at TRS · pose[j] · v (the vertex test fails without it).synccallsskeleton.update()itself, soboneMatricesare current before a render. The mx basic material (Basic and Phong) lit its fixed light from the unskinnednormal; underUSE_SKINNINGit now reads three's skinnedobjectNormal, as departure 4 intends. The Node tests load skinned.py through its export folder's ownreplay.mjsandmanifoldx.js: the source's copy does not take the folder's NdArray for an array. - 15 · projecting.py builds its points in frame code (task 5). The snapshot carries 1-d arrays only, so a (5, 3) float64 global cannot cross. The app keeps four points as a list of lists and builds the array each frame with nested
np.array, the fifth point mirrored behind the camera (twice the camera's position, the target being the origin), which keeps its w negative on the whole orbit. Inproject, the page sums each clip coordinate in order in float64, where numpy's(n, 4) @ (4, 4)runs BLAS; the float64 tolerance covers it, and the matrices themselves are float32 bit for bit. - 16 · The figure takes slot 1, and web_crowd's counts move by one (task 6). The figure spawns at setup after the ground, so the boxes start at slot 2. In
tests/web/test_web_crowd.py(5a's and 5b's counts) the alive counts at frames 7, 63, 199, 301 and 599 gain one, the high water at frames 199 and 200 is 98 (was 97), and the key count at the end is 7 (was 5:ftwice). In the browser file, the alive counts at 7 and 63 are 50 and 98, the neighbour the material test reads skips the figure (it is in no batch), andtest_one_draw_call_per_batchkeeps its four batches while the draw-call count moves to the new test (batches plus one, on each of 42 ticks). The bone test compares each bone'smatrixWorldrather thanskeleton.boneMatrices: the plan's words, and with identity inverse binds the two are the same matrices. The figure's walked distance sits inengine.state["walked"]and its handle and pause flag in aWalkerobject, as the snapshot writes instance fields only; the head and body joints arenp.eye(4, dtype=np.float32)in frame code, since a (4, 4) global cannot cross the snapshot (departure 15).
Self-review
Spec coverage, 5c of section 12: joints in the glTF writer and #82 (task 1), @ in the page (2), set_joints (3), the page drawing skinned entities (4), the walking figure in web_crowd (6), the second consumer's port (8 to 14). Section 08: JOINTS_0, WEIGHTS_0 of 1, a skin of identity inverse binds, poses in ecs.bin, a SkinnedMesh per entity (1, 3, 4). Section 13's items for 5c: the glTF writer's joints read by GLTFLoader in Node (1); "a skinned entity's bone matrices equal what set_joints was given" in Chromium (6); @ on stacks in the parity tests (2). Section 11's consumer budget and Q7 and Q8 (12, 14). The done criterion for slice 5 (14).
Names across tasks: JointStore.pose, joint_count (1) in 3; nd.matmul, nd.eye, nested nd.array, stack (2) in 3, 5, 6, 10; Store.skinned, Store.joints, setJoints, the trace's joints (3) in 4 and 6; MxScene.skinned (4) in 6; camera.project (5) in 14; build_grounds, height_at, blocked, merge_cells, visit.py (8) in 9 to 14; the open, place, look and labels events (10, 11, 14).
Proportion: code is given for tests whose assertions carry values; implementations are named by signature and by the desktop file and line, or the consumer's section, they follow.