Add keymap to reset zoom
This commit is contained in:
parent
0e2cc929a3
commit
24afbfc854
|
@ -2,6 +2,7 @@
|
|||
A simple python script that draws an interactive mandelbrot set in the terminal
|
||||
|
||||
## Keybindings
|
||||
- Arrows - Move around
|
||||
- `(`/`)` - Zooming
|
||||
- `+`/`-` - Change the number of iterations to run
|
||||
- Arrow keys - Move around
|
||||
- `(`/`)` - Zoom in and out
|
||||
- `=` - Reset zoom
|
||||
- `+`/`-` - Change the number of iterations to run per pixel
|
||||
|
|
|
@ -91,6 +91,9 @@ def handle_keyboard(char):
|
|||
elif char == 41: # Zoom in
|
||||
ZOOM_LEVEL += 1
|
||||
return False
|
||||
elif char == 61: # Zoom reset
|
||||
ZOOM_LEVEL = 0
|
||||
return False
|
||||
elif char == 43: # Iterations up
|
||||
MAX_ITERS += 1
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue