simvx.core.run¶
simvx.run(): unified launch function for SimVX projects.
Handles all launch modes:
import simvx
simvx.run() # Read simvx.toml, run its main file
simvx.run(MyNode) # Run specific class
simvx.run(MyNode, width=800) # With explicit settings
simvx.run(file=”main.py”) # Run a file, as python main.py would
A file with an if __name__ == "__main__": block is run as a script, exactly as
python main.py runs it, so its own code picks the root node and the App
settings, as the web export does. A file without one is a bare scene: it is
imported and its root Node class is chosen for it (see
- func:
_resolve_class_from_module). Naming a class always imports the file and runs that class, main block or not.
Module Contents¶
Functions¶
Run a SimVX application. |
Data¶
API¶
- simvx.core.run.log¶
‘getLogger(…)’
- simvx.core.run.__all__¶
[‘run’]
- simvx.core.run.run(node_class=None, *, width: int | None = None, height: int | None = None, title: str | None = None, file: str | None = None, class_name: str | None = None, **overrides) None[source]¶
Run a SimVX application.
Args: node_class: Node subclass to instantiate and run. If None, resolves from simvx.toml or
fileparameter. width: Window width override. height: Window height override. title: Window title override. file: Python file to run. With anif __name__ == "__main__":block it runs as a script, aspython filedoes, and its own code sets the App up; without one its root Node class is found and run. class_name: Specific class name to run from the file/module; the file is then imported and this class run, whether or not it has a main block. **overrides: Additional App kwargs (vsync, physics_fps, etc.).