feat: add a headless mode, driven by clap CLI args
--headless renders the current view straight to a PNG and exits, with no window/event loop: it builds its own offscreen wgpu device and reuses the same reference-orbit + ExportRender path as the "Export PNG" button. --width/--height set the output resolution (default 1920x1080); not yet supported with --buddhabrot. Refactors FractalApp::new's state construction and CLI handling into default_state()/apply_cli() so headless mode can reuse them, and factors the PNG tile-render/readback/encode loop into a shared export_to_png_blocking() used by both the windowed export path and headless. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018GFBP9qrNg6NGJWzzP36xe
This commit is contained in:
@@ -14,6 +14,7 @@ png = "0.18.1"
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
env_logger = "0.11.11"
|
||||
clap = { version = "4.5.51", features = ["derive"] }
|
||||
pollster = "1.0.1"
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
futures-channel = { version = "0.3.34", default-features = false, features = ["alloc", "std"] }
|
||||
|
||||
Reference in New Issue
Block a user