A library for p5.js that allows coders to easily render p5.js sketches in AR/VR using WebXR
npm install p5.xr


p5.xr is an add-on for p5.js, a Javascript library that makes coding accessible for artists, designers, educators, and beginners. p5.xr adds the ability to __run p5 sketches in Augmented Reality or Virtual Reality__. It does this with the help of WebXR. This enables anyone familiar with p5 to start experimenting with these technologies with little setup.
p5.xr sketches can be run with p5's online editor. All of the existing p5 functionality works, and in addition, p5.xr allows you to:
- __Virtual Reality__
- Run any 2D or 3D p5 sketch in VR ( mobile, desktop or standalone device )
- __Augmented Reality__
- Make sketches that use Augmented Reality with any device that supports immersive AR Session
of your HTML file underneath the p5 link:
`
4. Change the createCanvas() call in your p5 WEBGL sketch to createVRCanvas() and put it in preload()` -or-Interested in contributing to this project? Check out the contributor docs.
Thanks goes to these wonderful people (emoji key):
Vedhant Agarwal 🚇 ⚠️ 💻 | Stalgia Grigg ⚠️ 🚇 🚧 💻 | Daniel Adams 💻 💡 🎨 | anagondesign 💡 | Samir Ghosh 💻 🎨 📖 | Tibor Udvari 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!