feat(rover): add live scene and material editing with environment migration
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# Rover scene material and environment editor
|
||||
|
||||
Owner request: 2026-09-25. The operator adjusts the appearance of the selected
|
||||
vehicle without leaving its observation viewport. The pencil in the existing
|
||||
3D View header enters an editing mode. A bottom material palette and movable,
|
||||
modeless material/environment inspectors apply changes immediately.
|
||||
|
||||
The earlier combined control/design modal was explicitly superseded by the
|
||||
owner. Driving settings retain their existing modal. A separate workspace
|
||||
would hide the live scene and duplicate navigation; the admitted surface is an
|
||||
edit mode of the existing rover view, with no new product root.
|
||||
|
||||
The scene document belongs to vehicle + model revision, persists in IndexedDB
|
||||
on this operator computer, includes imported texture data, and can be exported
|
||||
or imported as JSON. Loading and persistence failures remain visible; closing
|
||||
an inspector never waits for saving. This is appearance only, not a firmware,
|
||||
calibration or hardware profile. Editing pauses local drive input and prevents
|
||||
new drive input until exit; it never arms a vehicle.
|
||||
|
||||
NodeDC ThreeDAsset.definition provides the environment field catalog and
|
||||
PlayCanvas remains the renderer. The NodeDC inspector chrome is not copied.
|
||||
Design Guideline Window (modeless, draggable), Inspector, ControlRow,
|
||||
InspectorSelectField, RangeControl, ColorField, Switch, Button, IconButton and
|
||||
ToastStack own all controls and surfaces. Canonical edit/layers/globe icons
|
||||
identify edit, materials and environment. Material thumbnails are domain PBR
|
||||
previews inside canonical buttons.
|
||||
|
||||
The v020 Blender file is an immutable source. Export retains separate semantic
|
||||
material groups and UVs; clicking a rendered surface selects its shared material.
|
||||
The palette explicitly states that edits affect every surface using that
|
||||
material. Appearance groups include chassis, rubber, track steel, enclosure,
|
||||
MOLLE, motor aluminum, black hardware and accessories.
|
||||
|
||||
Acceptance: donor field coverage, scene validation/persistence isolation,
|
||||
renderer resource cleanup, edit/control exclusion, TypeScript/unit/build and
|
||||
browser QA for picking, live edits, dragging, normal/expanded layout, keyboard,
|
||||
texture loading, persistence and return to observation. No physical motion is
|
||||
part of editor acceptance.
|
||||
|
||||
Owner refinement: the 3D header overlays the viewport with no opaque strip.
|
||||
The original NodeDC environment preset remains the default and is restored
|
||||
through the environment inspector, preserving materials. Every material has an
|
||||
editable display name. A permanent final plus tile creates a new PBR material;
|
||||
explicit assignment applies it to the picked semantic group. IDs remain stable
|
||||
when renamed. Custom materials and assignments persist in the same document.
|
||||
|
||||
Verified on 2026-09-25: TypeScript/production build, all 972 frontend tests,
|
||||
normal and expanded browser layout, transparent header, the NodeDC reset control,
|
||||
GPU picking, material naming/creation/assignment, draggable inspector and Escape.
|
||||
A synthetic checker texture was uploaded, rendered and retained with its custom
|
||||
material, name and assignment after a page reload. The texture was then removed
|
||||
and the enclosure's original material reassigned. Browser error/warning log was
|
||||
empty. No motor commands were sent; the canonical service remains on port 8000.
|
||||
The inherited renderer still reduces MSAA to one sample. Local scene storage is
|
||||
not cross-computer synchronization. Both bounds are recorded in MISSIONCOR-85.
|
||||
|
||||
Follow-up: the owner still saw the withdrawn gray preset after clearing browser
|
||||
cache. Changing defaults and using the reset in one browser did not migrate
|
||||
other saved IndexedDB scene documents. Added environmentVersion 2 and a narrow
|
||||
load migration: only the exact original neutral environment is replaced with
|
||||
NodeDC defaults. Material edits, textures, assignments and camera options survive.
|
||||
An atomic IndexedDB transaction retains the old document under
|
||||
`:before-environment-v2` before replacing it. Individually edited environments
|
||||
and explicit JSON imports are preserved; the version prevents future resets.
|
||||
Regression tests cover the legacy scene, material preservation, idempotence,
|
||||
custom environments, deliberate gray scenes, imports and already restored scenes.
|
||||
Reference in New Issue
Block a user