feat(scene-editor): share environment profiles and separate SOC material surfaces
This commit is contained in:
@@ -64,3 +64,45 @@ An atomic IndexedDB transaction retains the old document under
|
||||
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.
|
||||
|
||||
|
||||
Owner refinement, 2026-11-04: reusable environment profiles and SOC surfaces
|
||||
------------------------------------------------------------------------
|
||||
|
||||
The first Environment Inspector section is now Profiles. A shared local
|
||||
IndexedDB library (`missioncore-environment-profiles`) holds named environment
|
||||
snapshots, independently of a model. The immutable NodeDC preset is the initial
|
||||
option. Save as creates a new identity; overwrite retains that identity and
|
||||
uses a transactional revision check. Duplicate names and stale overwrites are
|
||||
rejected. Library updates notify other mounted scene editors and browser tabs.
|
||||
Limits are 64 user profiles and 16 MB of encoded configuration including LUTs.
|
||||
|
||||
Applying a profile copies post-processing/environment and camera behaviour
|
||||
(zoom strength, autorotation) into the current scene. Camera pose, materials,
|
||||
object assignments, visibility and editor layout remain scene-owned. Later
|
||||
scene edits and library overwrites never propagate into other scenes. The
|
||||
selected profile ID is persisted in scene JSON; settings remain usable if the
|
||||
library record is absent. Existing custom environments are preserved on load.
|
||||
Environment JSON uses `missioncore.environment-profile/v1`; import also accepts
|
||||
an older full scene JSON and extracts only the environment. Full scene JSON
|
||||
import/export remains in a separate subsection of Profiles.
|
||||
|
||||
SOC materials have two independent complete MaterialSurface configurations:
|
||||
active surface at the existing MaterialSpec root, and inactive surface under
|
||||
`chargeGradient.inactive`. Both expose colour, metalness, roughness, opacity,
|
||||
reflection, clear coat, emission, double-sided rendering and all seven texture
|
||||
slots with their normal/tiling controls. Active gradient additionally exposes
|
||||
its colour pairs, intensity, speed, scale, contrast and saturation. Its emission
|
||||
is additive to the active surface's own emission. Legacy fallback fields migrate
|
||||
without losing their values; the formerly fixed active base colour migrates to
|
||||
an editable dark colour. Surface version 1 also starts the previously ignored
|
||||
base emission at zero so the donor white emission cannot bleach the gradient
|
||||
on upgrade. Newly edited base emission then persists independently. Texture
|
||||
quotas include both surfaces.
|
||||
|
||||
The material inspector can preview either mode without changing telemetry or
|
||||
saved scene mode. Preview falls back to 50% only for the active appearance when
|
||||
SOC is absent, and ends on leaving editing. Automatic mode retains valid stale
|
||||
SOC and uses the independent inactive surface only when no retained value exists.
|
||||
The renderer switches the complete surface and its texture bindings together;
|
||||
async texture completion cannot apply a hidden mode's texture over the live mode.
|
||||
|
||||
Reference in New Issue
Block a user