change to template-based shaders, move fractal chooser to menus, add

burning ship and newton fractal, add escape radius to more fractals
This commit is contained in:
csd4ni3l
2025-05-27 21:55:27 +02:00
parent 564ce565a5
commit 22c46778d9
9 changed files with 453 additions and 146 deletions

View File

@@ -2,7 +2,7 @@ import arcade, arcade.gui, pyglet, json
from PIL import Image
from game.shader import create_mandelbrot_shader
from game.shader import create_iter_calc_shader
from utils.constants import menu_background_color, button_style, mandelbrot_initial_real_min, mandelbrot_initial_real_max, mandelbrot_initial_imag_min, mandelbrot_initial_imag_max
from utils.preload import button_texture, button_hovered_texture
@@ -25,7 +25,7 @@ class MandelbrotViewer(arcade.gui.UIView):
def on_show_view(self):
super().on_show_view()
self.shader_program, self.mandelbrot_image = create_mandelbrot_shader(self.window.width, self.window.height, self.settings_dict.get("mandelbrot_precision", "Single").lower())
self.shader_program, self.mandelbrot_image = create_iter_calc_shader("mandelbrot", self.window.width, self.window.height, self.settings_dict.get("mandelbrot_precision", "Single").lower(), int(self.settings_dict.get("mandelbrot_n", 2)), int(self.settings_dict.get("mandelbrot_escape_radius", 2)))
self.mandelbrot_sprite = pyglet.sprite.Sprite(img=self.mandelbrot_image)