Skip to content

Feat/multi scenes - #619

Draft
MaxNumerique wants to merge 124 commits into
nextfrom
feat/multi_scenes
Draft

MaxNumerique wants to merge 124 commits into
nextfrom
feat/multi_scenes

Conversation

@MaxNumerique

Copy link
Copy Markdown
Contributor

No description provided.

MaxNumerique and others added 30 commits November 30, 2026 14:43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The style, component style, component type style, scene style and treeview config rows gain a scene_id that leads their key. The treeview keeps one row under the initial scene until it is scoped by scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each scene gets its own cached styles, read and written under its scene_id. The model selection cache is kept per scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
useDataStyleStore(sceneId) returns the store dataStyle-<sceneId>. Its public API is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Importing a snapshot clears and writes the rows of the importing scene only, so a duplicated scene never overwrites its source. A live snapshot of another scene is read raw so IndexedDB can clone it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closing a scene deletes its rows of the 5 scene keyed tables before its stores are disposed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
closeScene must clear the scene's styles and delete its treeview config row. clear must delete the scene's rows in all 4 style tables. A duplicate must keep the source row's colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The core, camera and scene slices become one instance per scene
(runInSceneScope) instead of createSharedComposable singletons. Every
scene RPC they send (render, update_camera, set_z_scaling,
set_background_color) carries the scene id. setCameraOptions moves the
local and the viewer cameras; the end of an interaction goes through it.
The light viewable reading moves to light_viewable.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The highlight and zoom box slices become one instance per scene, the
ruler takes its scene. Their highlight, ruler, reset_ruler and
get_point_position requests carry the scene id: the viewer store's
pick_world_position and set_picked_point take the scene they pick in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The filter requests (clipping planes, shrink, explode, slice, threshold)
carry the calling scene and render it. The brightness sampling reads the
render window of its own scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scene's viewport resizes its own canvas and view stream, and renders
its own view only. Test: resize targets its own view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
useHybridViewerStore(sceneId) returns the store hybridViewer-<sceneId>,
composed of the slices of that scene, with the same API. importStores
restores the snapshot in its own scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
initHybridViewer opens the view stream of the scene's view_id instead of
"-1": the views share one image topic and each stream only takes the
images of its own view. A duplicated scene then shows the content, the
z-scaling and the camera copied from its source. The hybrid viewer
loads the scenes store when it needs it (load_store.ts), as the scenes
store creates the hybrid viewers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setCameraOptions and setZScaling propagate by default: once applied to
their scene, scenesStore.propagateCamera(sceneId) gives the z-scaling
and the camera to each scene linked on camera, with propagate = false so
that nothing comes back. The end of an interaction, resetCamera, the
camera orientation and camera_manager presets (now applied to a given
scene) go through them. Tests: propagateCamera does not re-propagate,
propagateCamera ignores unlinked scenes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scene, mesh, image and model visibility styles of a scene act on the
hybrid viewer of that same scene, captured at store creation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewer renders a filter (clipping planes, shrink, explode, slice,
threshold) in the calling scene only, while the filter applies to the
data: every other scene showing that data, read from
scenesStore.contents, is rendered too. Test: renders every scene showing
the filtered data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new viewer holds no scene and reset_visualization now needs one: once
connected, ws_connect creates scene_1 when the project has no scene yet,
before any hybrid viewer opens its view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Disposing a scene's scope deletes its view stream, which stops observing
the images of its view, and its local render window. Test: a closed
scene releases its view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
useDataStyleStore and useHybridViewerStore keep the store definition of
each scene instead of calling defineStore on every call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxNumerique and others added 30 commits December 2, 2026 12:03
…or it

Registering a data no longer shows it: the detail is added to the viewer
whose camera it sharpens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
addData, importItem and importWorkflow no longer take a viewer: an imported data
shows in all the viewers, so closing a viewer never deletes a data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A duplicated and linked viewer shares its camera, no longer its content: the
content channel and the channels of a link are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing targets a viewer on import anymore: lastUsedViewerId, setLastUsed, the
pointerdown that set it, its snapshot field and the focusViewer browser helper
are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A camera synced by a linked viewer while a viewer closes reached it after
its deletion and failed with "Viewer viewer_1 not found".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e app bar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… projects

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A viewer restored, duplicated or resized by a layout change shows a loader
until its first image at its new size comes, so its data never show
unstyled or stretched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…switcher

The viewers are added from the layout switcher and synced by the bridges or
the sync switch; each step waits for the viewer loaders to go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts only

The other browser tests keep their screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…viewer ones

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewer now colours an edge attribute with the chosen component: the
references showed component 0 on the range of component 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	app/components/ClippingPlanes.vue
#	app/components/ViewToolbar.vue
#	app/composables/physical_property_coloring.ts
#	app/utils/import_item.ts
#	internal/stores/data_style/model/edges/component.ts
#	internal/stores/data_style/model/index.ts
#	tests/browser/components/ViewerApp.vue
Viewer/Ui.vue has several root nodes: the class never applied, and the
browser tests now fail on the Vue warning it raises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
importFile imports into every viewer and takes no viewer; the expect groups
of the new tests are padded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
To find why the viewer closes its connection on Windows when a second
viewer is created. To revert once the cause is found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A resize waiting for the next tick or the view stream resumed after the
viewer was closed, and rendered its released render window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A filter panel open during an import sent the new data to the viewer
before add_to_viewer was handled, and the viewer answered 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A viewer opened again under the same id, as viewer_1 on a project import,
was hydrated from the state of the closed one: it kept its deleted view
stream and its created status, so it showed nothing and the import stopped
on a second delete of the view stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A viewer shown again, as on a project import, measures its container after
its trees are opened: the zero width clamped both panels to their minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chip only showed in the viewer of a CRS alignment: the creation tools,
which pick in any viewer, had none to close their picking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewers were closed after reset_viewers and import_project: their views
then asked for renders of viewers the viewer no longer knew, and removed
render observers of dropped views, which an import showed as an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant