Creating Mind-Bending Optical Illusions with JavaScript @Radu
Creating Mind-Bending Optical Illusions with JavaScript  @Radu
Uploaded May 2023 | Updated September 2026, 2 weeks ago
In this video we'll practice basic JavaScript by implementing an optical illusion called the Café Wall Illusion or the Shifted Chessboard Illusion.

To code this illusion we'll be using the canvas element. The canvas element is an HTML element that allows for dynamic, scriptable rendering of 2D shapes and graphics. We use JavaScript to draw on the canvas.

By coding along you'll learn about variables and loops in JavaScript. You'll also learn a few things about drawing shapes with different colors. At the end I'll teach you how to negate the effect so the illusion doesn't happen anymore. The code is quite basic, but the end result is quite interesting so I think you'll enjoy this no mater if you are a beginner or advanced.

My course teaching HTML Canvas techniques:
youtube.com/playlist?list=PLB0Tybl0UNfb6BvBPePaiCNOFpzxeE86R
Creating Mind-Bending Optical Illusions with JavaScriptSelf-driving car - Q&A - And a Magic TrickAdvanced Drawing App | LIVE JavaScript Coding | Part 6: New UI, Shape Rotation, RefactoringA Virtual World - JavaScript Course: Lesson 1 / 11 [Spatial Graphs]A Surprising Visual Demo with JavaScript & HTML CanvasMachine Learning Course - Lesson 12: Elongation FeatureDecode the Drawings - Status & Prize UpdateJavaScript 🧤 Christmas Calendar 📅 Day 9 🎄Drawing CIRCLES in 10 Different Ways with JavaScriptAnimated Counter using Google Chrome Dev Tools and JavaScript (Fake Subscriber Count)JavaScript 🔔 Christmas Calendar 📅 Day 6 🎄JavaScript 🍭 Christmas Calendar 📅 Day 4 🎄
Radu Mariescu-Istodor |

Creating Mind-Bending Optical Illusions with JavaScript

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER