Loading repository data…
Loading repository data…
HaloV01d / repository
Optical Illusions WebGL Prototype is a web-based interactive prototype designed to explore and generate optical illusions using real-time 3D graphics. The project is built with JavaScript and WebGL (via Three.js) and focuses on rapid prototyping, visual experimentation, and user interaction.
Interactive web project for exploring classic visual illusions with real-time 3D graphics.
Built with JavaScript, Three.js, and WebGL.
This project demonstrates how perception can be distorted by context, contrast, and spatial cues. Each illusion is presented as an interactive scene with controls and guide text so users can observe the effect and reveal the underlying geometry or measurements.
DatasetGenerator.js can programmatically render batches of illusion images with randomized parameters (lighting, contrast, geometry, etc.).dataset/ organized by illusion type (e.g. dataset/checker_shadow/checker_shadow_labels.json).Optical-Illusions-in-Computer-Graphics/
|-- index.html
|-- package.json
|-- README.md
|-- dataset/
| |-- checker_shadow/
| | `-- checker_shadow_labels.json
| |-- mach_band/
| | `-- mach_band_labels.json
| |-- ponzo/
| | `-- ponzo_labels.json
| |-- rotating_snakes/
| | `-- rotating_snakes_labels.json
| `-- zollner/
| `-- zollner_labels.json
`-- src/
|-- Checker_Shadow.js
|-- DatasetGenerator.js
|-- IllusionBase.js
|-- MachBand.js
|-- Ponzo.js
|-- RotatingSnakes.js
|-- SceneManager.js
`-- Zollner.js
npm install
npx vite
Then open the local URL printed in the terminal (usually http://localhost:5173).
npx vite build
npx vite preview