Skip to content

How to import views from MVS?

marek edited this page Feb 8, 2026 · 2 revisions

How to import views from MVS?

  • Below, we describe the behaviour implemented in extractViewsFromMVS() function and in the deconstruction useEffect in Viewer.tsx.
  1. Open single state tree

    • Although single state tree does not have any explicit snapshots (views), we create a default snapshot from the root, we also set the new snapshot metadata based on global story metadata (title, description), which is similar to what Molstar does itself.
    • Then, we convert the state tree automatically to the multiple kind; we leave the camera empty if no camera node was defined.
    • Load state tree into context, from now on, we have unified the behaviour for single and multiplekinds.
  2. Open multiple state tree

    • Load state tree into context.
    • Selection of the snapshot (view) is possible by different means (using the custom ViewCard UI interface or using the default Molstar UI).
    • Based on the user's action, either modify the concrete view in the state tree by overriding it, or push it to the state tree snapshots' list.

Clone this wiki locally