Skip to main content

Module mvs_executor

Module mvs_executor 

Source
Expand description

MVS Execution Engine.

Walks a parsed MolViewSpec [State] tree and spawns Bevy entities that render it. The engine is fault tolerant: an error in one branch of the tree emits an MvsError message and execution continues with sibling nodes, so a single bad download or empty selector never aborts the whole scene.

§Entry point

Send a LoadMvsEvent message; the execute_mvs_on_load system (registered by MvsPlugin) parses the state, clears any previously spawned MvsEntity entities, and rebuilds the scene.

§MVP limitations

  • HTTP/HTTPS downloads are not supported (emit MvsError::UnsupportedNode); use local file paths only.
  • Assembly / symmetry structures render the plain asymmetric unit and emit an MvsError::UnsupportedNode warning.
  • component_from_uri / *_from_uri / *_from_source nodes are skipped with an MvsError::UnsupportedNode.
  • Surface representation degrades to VdW spheres (Solid).
  • When multiple focus nodes exist, the last one processed (document order) wins.

Structs§

MvsEntity
Marker attached to every entity spawned by the executor. On each reload old MvsEntity entities are hidden, marked retired, then despawned shortly after the replacement scene is built.
MvsLabel
A MVS label node, spawned at the centroid of its component’s atoms. The update_mvs_label_billboards system projects this world-space anchor to screen space each frame and keeps a companion UI [Text] entity positioned there.
MvsPlugin
Registers the MVS executor: messages, resources, and the load system.
MvsStateResource
Holds the most recently loaded [State] (for UI tree inspection). Replaced on each successful load.
OrbitCamera
Orbit-camera target state written by camera and focus nodes. A viewer reads this resource to position its camera; focus always wins over camera because it is applied after the root-level camera node.

Enums§

LoadMvsEvent
Request to load a MolViewSpec state.
MvsError
Non-fatal problems encountered while executing a state. Each is emitted as a message; a status bar can subscribe to surface them to the user.