[feat] 33 LOD groups: pack lods, a LOD Group in object settings, force/edit/select, VR force - #257
Conversation
…orce (WIP: e2e pending) - P1 contract: a pack item row's `lods` place as the object's LOD group (userData.lod, normalizeLodGroup in lodGroupCore.js is the one boundary); levels are a RENDER-TIME per-mesh geometry swap matched by node name inside lod.js's bracket (registerLodPass), drawn with LOD0's own material; lazy (built when first needed, once per file); thresholds by screen size (25% / 10% defaults, 15% hysteresis); implicit group from the pack row for pieces placed before their pack had lods - write path lodGroupActions.js: one props undo entry + one objectParameters 'lod' message (applier in commandsHandler, wireValidate shape, props kind in objectActions) - P2 LodGroupPanel.svelte in Inspector: level bar with draggable edges (one entry per drag), Force LOD, Generate levels (meshopt in the worker), replace a level with an object / Explorer drop, select-a-level preview, per-level material override, gizmo on a level (lodLevelEdit.js + Scene isLodLevelProxy branches), Show LOD level overlay, cull; api.lod handle gains force()/levels() - P3 VR props panel LOD row (readout + cycle Force LOD) - docs: PACKS.md lods field, MODULES.md - vitest lodGroupCore (22) green; svelte-check 333/47 = baseline - e2e lod-group: 22/24 on the first run, both reds fixed (test premises + block writes now take effect the same frame); re-run, lod-panel and vr-props-panel NOT yet run (slots/memory) - see the handover Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gh the loader - lod-real-packs (new, skips without LOD_PACKS_DIR): 33-pack-fix-lod's real level files (architecture-kit Gate + WallStone, default Duck with its camera node + parent scale, cube_diorama Cat with 3 meshes) each build as name-matched SWAPS covering every mesh and draw fewer triangles far away (Gate 5440 -> 1080, Duck 8424 -> 1684, Cat 20108 -> 4014) - lod-panel 7.3 was a check that could not fail (it compared a count with itself): it now counts lod messages before/after the overlay toggles - lodGroupStats levels carry `paired` + `error` - held battery on this head: lod-group 24/24, lod-panel 49/49, vr-props-panel, lod (31), inspector, undo, lod-real-packs all ALL PASS; vitest 400; svelte-check 333/47 = baseline; npm run build green (dev server stopped) - counterfactuals: hysteresis (vitest: a 100-frame bob on an edge switches once; band 0 pops back at once); a block write taking effect the same frame (lod-group 4.1 was red before 24fe36b's same-frame re-read); shared materials (1.8: the mesh wears its own material mid-draw; 5.2 shows the override path is a copy) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Merge note for the integrator: this PR plus #259 (33-anim-core @ea7d312). A trial merge conflicts in 6 files: PACKS.md, App.svelte, Explorer.svelte, explorerDrop.js, fileHandler.svelte.js and wireValidate.js. All six are unions, because both lanes added a field at the same spot (
On the resolved tree, svelte-check is 333/47 (the baseline) and vitest passes 418. The e2e suites were not re-run on it. Resolved copies of the six files: #259 already carries |
|
Re-checked against 33-pack-fix-lod's final files (packs PR #11, origin/feat/33-fix-lod c075327). |
Roadmap 33 lane 33-lod-editor: items K2 (loading pack LODs, contract P1) and K6 (a LOD Group in object settings). K1's moving-only flicker turned out not to be LOD: it is z-fighting in the asset (33-pack-fix-lod measured it, and the fix is in packs).
What it does
lods(contract P1). A row'slods: [{file, ratio}]is placed as the object's LOD group (userData.lod). It is saved, replicated and undone with the object, and it rides the pack stub.lodBiaspulls the thresholds in.lodsgets an implicit group from the pack row.LodGroupPanel.svelte):objectParameters {parameter: 'lod', uuid, lod}with awireValidateshape, undone through thepropskind with alodkey.api.lod. The handle gainsforce(n)andlevels().lodsfield and MODULES.md. The user docs page is in the docs repo (docs-33-lod-editor).Design write-up: the top of the lane handover (
STATUS-33-lod-editor.md).Proof (on 81d4ccf)
lod-group24/24lod-panel49/49, through the real UI, two peers includedlod-real-packs: 33-pack-fix-lod's real files for Gate, WallStone, Duck and Cat all build as name-matched swaps covering every mesh, and far renders draw fewer triangles (Gate 5440 → 1080, Duck 8424 → 1684)vr-props-panel,lod(31's),inspectorandundoall passlodGroupCore(22).npm run build: green.lod-group4.1 was red before the same-frame re-read.lanes-30/after-33/33-lod-editor/.Merge notes
lodGroup,lodGroupActions,lodLevelEditat the end (222/222/222 on this branch; 223 after the union with [feat] 33 P2: animated, functional pack items (doors that open, no autoplay) #259); re-count after the union.lod.js: the newregisterLodPassseam, the overlay,simplifiedGeometry, and a REVERSED restore. Other 33 lanes do not touch it.objectActionspropskind,commandsHandlerobjectParameters,vrControlsPROPS_ROWS, Scene.svelte gizmo branches: all additive hunks.root.userData.lodonobjectfile/ the snapshot /animimportin its own branch.OWED on device
🤖 Generated with Claude Code