WebGL
WebGL enables GPU programming in the web browser to generate computer graphics with software preinstalled on every modern computer, including mobile devices. These pages cover the use of WebGL for creative coding and learning purposes.
Tutorials 📚
Feel free to skip this and explore the content below. If you want to understand how it works, I wrote a series of tutorials to teach basic WebGL programming. All the examples build on top of the code covered there.
👉 Get started on the tutorials.
Fractal Explorers 🧭
Zoom into fractals and explore a parameter space via sliders and other interactive controls. When you find something cool you can export it as an image or use a shareable URL.
Code in the fractal explorers is based on the examples below.
Examples 👨💻
These examples demonstrate a specific aspect of WebGL or drawing algorithm. They're intended to be simple and focus with clear code. Each example is a standalone web page with all JavaScript inline and no dependencies, so you can see how the entire thing works. You'll find links to the source so you can easily read it, even on a phone.
Boilerplate code is needed to setup WebGL. You'll see the same code in every example and, if you don't know WebGL, it won't make sense. The tutorials cover what the boilerplate does. Once you understand that, you can focus on what makes each example unique.
You don't have to learn WebGL, though! Click around and explore.
Basic examples
Fractals
Mandelbrot fractals
-
Basic Mandelbrot fractal -
Smooth coloring -
"Mandelbrot Iterations" (animated) -
"Mandelbrot Party" (animated) -
Touch/mouse navigation (interactive)