diff options
-rw-r--r-- | settings.txt | 4 | ||||
-rw-r--r-- | src/main.rs | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/settings.txt b/settings.txt index 6456874..e179772 100644 --- a/settings.txt +++ b/settings.txt @@ -23,9 +23,11 @@ antialiasing 1 # focal length in "meters" focal-length 1 # field of view in degrees -fov 45 +fov 90 # set this to 1 to use HSV instead of RGB for color hsv 0 +# set this to 1 to automatically start playing SDFs when they load +autoplay 0 # framerate cap. # by default, vsync is enabled, so you don't need to change this unless you want # to run at an even lower framerate than your monitor's refresh rate diff --git a/src/main.rs b/src/main.rs index 782ef32..65b68ff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ /* @TODO: - pause screen -- autoplay setting +- reload settings.txt when changed - strip ' ' and '\n' from *inside* string - flash error on bad string (see @TODO(error handling)) - RnToRn functions (& add back in RToR) @@ -379,10 +379,13 @@ impl State { .select_nth_unstable_by(i, |a, b| a.total_cmp(b)) .1; drop(sdf_values); - let initial_view = View { + let mut initial_view = View { level_set, ..Default::default() }; + if self.settings.get_i32("autoplay").unwrap_or(0) != 0 { + initial_view.unpause(false); + } self.initial_view = initial_view.clone(); self.view = initial_view; } |