Move to settings dropdown instead of category buttons, add Buffalo Fractal, fix settings issue

This commit is contained in:
csd4ni3l
2025-06-25 20:05:33 +02:00
parent 81e60e5862
commit 333e5a23e8
6 changed files with 65 additions and 20 deletions

View File

@@ -12,6 +12,7 @@ initial_real_imag = {
"mandelbar": (-2.0, 1.0, -1.0, 1.0),
"phoenix_fractal": (-2.0, 1.0, -1.0, 1.0),
"lambda_fractal": (-2.0, 1.0, -1.0, 1.0),
"buffalo_fractal": (-2.0, 1.5, -2.0, 1.0),
"burning_ship": (-2.0, 1.5, -2.0, 1.0),
"newton_fractal": (-2.0, 2.0, -2.0, 2.0)
}
@@ -23,7 +24,7 @@ c_for_julia_type = {
"Snowflake": (-0.8, 0.156)
}
iter_fractals = ["mandelbrot", "mandelbar", "phoenix_fractal", "lambda_fractal", "julia", "burning_ship", "newton_fractal"]
iter_fractals = ["mandelbrot", "mandelbar", "phoenix_fractal", "lambda_fractal", "julia", "burning_ship", "buffalo_fractal", "newton_fractal"]
button_style = {'normal': UITextureButtonStyle(font_name="Roboto", font_color=arcade.color.BLACK), 'hover': UITextureButtonStyle(font_name="Roboto", font_color=arcade.color.BLACK),
'press': UITextureButtonStyle(font_name="Roboto", font_color=arcade.color.BLACK), 'disabled': UITextureButtonStyle(font_name="Roboto", font_color=arcade.color.BLACK)}
@@ -53,6 +54,19 @@ settings = {
"Zoom Increase Per Click": {"type": "slider", "min": 2, "max": 100, "config_key": "mandelbar_zoom_increase", "default": 2},
"Max Iterations": {"type": "slider", "min": 100, "max": 10000, "config_key": "mandelbar_max_iter", "default": 200, "step": 100}
},
"Burning Ship": {
"Float Precision": {"type": "option", "options": ["Single", "Double"], "config_key": "burning_ship_precision", "default": "Single"},
"Escape Radius": {"type": "slider", "min": 1, "max": 10, "config_key": "burning_ship_escape_radius", "default": 2, "step": 0.1},
"Zoom Increase Per Click": {"type": "slider", "min": 2, "max": 100, "config_key": "burning_ship_zoom_increase", "default": 2},
"Max Iterations": {"type": "slider", "min": 100, "max": 10000, "config_key": "burning_ship_max_iter", "default": 200, "step": 100}
},
"Buffalo Fractal": {
"Float Precision": {"type": "option", "options": ["Single", "Double"], "config_key": "buffalo_fractal_precision", "default": "Single"},
"N": {"type": "slider", "min": 1, "max": 10, "config_key": "buffalo_fractal_n", "default": 2, "step": 1},
"Escape Radius": {"type": "slider", "min": 1, "max": 10, "config_key": "buffalo_fractal_escape_radius", "default": 2, "step": 0.1},
"Zoom Increase Per Click": {"type": "slider", "min": 2, "max": 100, "config_key": "buffalo_fractal_zoom_increase", "default": 2},
"Max Iterations": {"type": "slider", "min": 100, "max": 10000, "config_key": "buffalo_fractal_max_iter", "default": 200, "step": 100}
},
"Phoenix Fractal": {
"Float Precision": {"type": "option", "options": ["Single", "Double"], "config_key": "phoenix_fractal_precision", "default": "Single"},
"Escape Radius": {"type": "slider", "min": 1, "max": 10, "config_key": "phoenix_fractal_escape_radius", "default": 2, "step": 0.1},
@@ -65,12 +79,6 @@ settings = {
"Zoom Increase Per Click": {"type": "slider", "min": 2, "max": 100, "config_key": "phoenix_fractal_zoom_increase", "default": 2},
"Max Iterations": {"type": "slider", "min": 100, "max": 10000, "config_key": "phoenix_fractal_max_iter", "default": 200, "step": 100}
},
"Burning Ship": {
"Float Precision": {"type": "option", "options": ["Single", "Double"], "config_key": "burning_ship_precision", "default": "Single"},
"Escape Radius": {"type": "slider", "min": 1, "max": 10, "config_key": "burning_ship_escape_radius", "default": 2, "step": 0.1},
"Zoom Increase Per Click": {"type": "slider", "min": 2, "max": 100, "config_key": "burning_ship_zoom_increase", "default": 2},
"Max Iterations": {"type": "slider", "min": 100, "max": 10000, "config_key": "burning_ship_max_iter", "default": 200, "step": 100}
},
"Sierpinsky Carpet": {
"Float Precision": {"type": "option", "options": ["Single", "Double"], "config_key": "sierpinsky_precision", "default": "Single"},
"Zoom Increase Per Click": {"type": "slider", "min": 2, "max": 100, "config_key": "sierpinsky_zoom_increase", "default": 2},