simvx.graphics.web_export._export¶
Main export_web function.
Module Contents¶
Functions¶
Export a SimVX game as a standalone HTML file. |
Data¶
API¶
- simvx.graphics.web_export._export.export_web(game_path: str | pathlib.Path, output: str | pathlib.Path = 'game.html', *, width: int = 800, height: int = 600, title: str = 'SimVX', root_class: str | None = None, physics_fps: int = 60, charset: str | None = None, responsive: bool = False, pyodide_version: str = '0.29.3', extra_packages: list[str] | None = None) pathlib.Path[source]¶
Export a SimVX game as a standalone HTML file.
Auto-detects 3D usage and includes the appropriate WebGPU pipeline. Dependencies are resolved from PEP 723 inline metadata, pyproject.toml, or the extra_packages parameter (PEP 723 takes precedence).
Args: game_path: Path to the game’s Python module. output: Output HTML file path. width, height: Engine viewport dimensions. title: Browser page title. root_class: Name of the root Node subclass. Auto-detected if None. physics_fps: Physics tick rate. charset: Characters to pre-bake in the MSDF atlas. responsive: Adapt engine viewport to browser window size. pyodide_version: Pyodide CDN version. extra_packages: Additional Pyodide packages to load (e.g.
["requests"]).Returns: Path to the generated HTML file.