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::UnsupportedNodewarning. component_from_uri/*_from_uri/*_from_sourcenodes are skipped with anMvsError::UnsupportedNode.- Surface representation degrades to VdW spheres (Solid).
- When multiple
focusnodes exist, the last one processed (document order) wins.
Structs§
- MvsEntity
- Marker attached to every entity spawned by the executor. On each reload old
MvsEntityentities are hidden, marked retired, then despawned shortly after the replacement scene is built. - MvsLabel
- A MVS
labelnode, spawned at the centroid of its component’s atoms. Theupdate_mvs_label_billboardssystem 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.
- MvsState
Resource - Holds the most recently loaded [
State] (for UI tree inspection). Replaced on each successful load. - Orbit
Camera - Orbit-camera target state written by
cameraandfocusnodes. A viewer reads this resource to position its camera;focusalways wins overcamerabecause it is applied after the root-level camera node.
Enums§
- Load
MvsEvent - 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.