Add self-contained Mandelbrot HTML renderer - #1678
Open
tiagonbotelho wants to merge 1 commit into
Open
Conversation
Adds mandelbrot.html, a standalone canvas-based Mandelbrot set viewer with no build step or dependencies. Supports pan (drag), zoom (scroll wheel, pinch, double-click), and adaptive iteration counts as you zoom in, with chunked rendering via requestAnimationFrame to keep the UI responsive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new standalone mandelbrot.html page that renders the Mandelbrot set directly in the browser (no build tooling), with interactive pan/zoom controls and a small on-screen HUD.
Changes:
- Introduces a self-contained HTML/CSS/JS Mandelbrot renderer using
<canvas>and per-pixel iteration. - Implements pan (pointer drag), zoom (wheel / double-click), and touch pinch scaling.
- Uses chunked rendering via
requestAnimationFrameto keep redraws responsive.
Show a summary per file
| File | Description |
|---|---|
| mandelbrot.html | New self-contained Mandelbrot canvas renderer with interactive navigation and chunked redraws. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
Comment on lines
+186
to
+192
| } | ||
|
|
||
| ctx.putImageData(imageData, 0, 0); | ||
| row = rowsEnd; | ||
| if (row < h) { | ||
| renderHandle = requestAnimationFrame(renderChunk); | ||
| } |
Comment on lines
+18
to
+21
| #canvas { | ||
| display: block; | ||
| cursor: grab; | ||
| } |
Comment on lines
+4
to
+5
| <meta charset="UTF-8"> | ||
| <title>Mandelbrot Set Renderer</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
mandelbrot.html, a standalone, dependency-free HTML/canvas/JS Mandelbrot set viewer.Features
requestAnimationFramekeeps the UI responsive during redrawsRto reset the viewTesting
Verified locally with a headless Chrome/Playwright script: confirmed the fractal renders correctly, and that zoom/pan interactions update the view as expected (screenshots attached in the session channel).
📚 Documentation preview 📚: https://bowtie-json-schema--1678.org.readthedocs.build/en/1678/