VR Air Draw is an immersive WebXR application that lets users physically paint floating 3D strokes in virtual space using VR hand controllers โ with a fully interactive virtual dashboard for color, thickness, clear, and save controls, all usable from inside the headset without breaking immersion.
Put on a VR headset, press the trigger, and draw anything โ floating sculptures, diagrams, freeform art โ suspended in 3D space around you.
This project is a deep exploration of WebXR and real-time 3D interaction design:
- VR/XR Game Development โ Real-time 3D rendering, spatial controller tracking, raycasting interaction, and immersive UX design using WebXR and Three.js.
This is not a tutorial clone โ it is a custom-built VR creative tool running entirely in a browser with no app store installation required.
| Feature | Description |
|---|---|
| Real-time stroke rendering | Trigger-held XYZ coordinates are instantly connected into 3D line geometry |
| Multi-stroke support | Multiple independent floating strokes built separately in one session |
| Virtual dashboard | Collision-detectable VR menu with interactive buttons inside the headset |
| Raycasting interaction | Controller laser ray detects dashboard button intersections precisely |
| Thickness control | + / - buttons adjust stroke width for all new lines dynamically |
| Color randomizer | One-tap color cycling algorithm changes stroke color on demand |
| Clear & Save | Full scene clear or export all 3D coordinate + color data as a structured file |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ VR HEADSET (WebXR) โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 3D Air Drawing โ โ
โ โ โ โ
โ โ Right Trigger held โ โ
โ โ โ Track XYZ controller position โ โ
โ โ โ Connect points โ Line geometryโ โ
โ โ โ Render stroke in 3D scene โ โ
โ โ โ โ
โ โ VR Dashboard (raycasting) โ โ
โ โ โ Color ยท Thickness ยท Clear โ โ
โ โ โ Save strokes to file โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ Three.js renderer โ WebXR session โ
โ Stereoscopic output to headset lenses โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- WebXR API โ Headset session management, stereoscopic rendering, spatial controller tracking
- Three.js โ 3D scene, line geometry, raycasting, VR dashboard rendering
- JavaScript (ES Modules) โ Controller event handling, drawing logic, stroke management
- Vite โ Build tool and local development server
- TLS/SSL Certificates โ HTTPS hosting required by browser VR APIs
Node.js v18+ npm / yarn
A WebXR-compatible browser (Chrome / Edge)
A VR headset (Meta Quest recommended) or WebXR emulator
git clone https://github.com/Anil-CAI/vr_airdraw.git
cd vr_airdrawnpm install# WebXR requires HTTPS โ run with SSL
npm run dev -- --https
# Or for production build:
npm run build && npm run preview- Connect your VR headset to the same local network
- Open the HTTPS URL in your headset browser (Meta Quest Browser recommended)
- Press "Enter VR"
- Hold right trigger โ move your hand to draw floating 3D strokes
- Aim at the dashboard buttons โ trigger to interact (color, thickness, clear, save)
vr_airdraw/
โ
โโโ index.html # App entry point + HTTPS VR launcher
โโโ main.js # Core VR app logic
โ โโโ setupScene() # Three.js scene, camera, renderer
โ โโโ trackControllers() # WebXR controller pose tracking
โ โโโ handleDrawing() # Trigger โ XYZ โ 3D line geometry
โ โโโ handleDashboard() # Raycasting VR menu interaction
โ
โโโ style.css # Pre-VR dashboard UI styling
โโโ package.json # Frontend dependencies
โโโ vite.config.js # Build + HTTPS config
- WebXR session with dual controller tracking
- Real-time 3D line drawing with trigger input
- Multi-stroke support โ independent floating strokes
- VR dashboard with raycasting button interaction
- Color randomizer and stroke thickness controls
- Clear all strokes from scene
- Save all 3D stroke data as structured file
- Hand tracking support โ draw without physical controllers
- Haptic feedback โ feel texture while drawing
- 3D brush shapes โ draw with spheres, cubes, ribbons instead of lines
- Undo / redo stroke history
- Drawing export to
.glb/.obj3D file format - Multi-user session โ collaborate in the same drawing canvas over WebRTC
- Gallery mode โ load and view previously saved drawings in VR
This project demonstrates a focused and production-relevant skill set for VR game development and XR engineering roles:
| Domain | Skills Demonstrated |
|---|---|
| VR Development | WebXR session management, stereoscopic rendering, spatial controller tracking |
| 3D Graphics | Three.js real-time geometry, raycasting, material rendering, scene management |
| Immersive UX Design | In-VR dashboard interaction, spatial UI layout, controller-native controls |
| Procedural Generation | Real-time XYZ coordinate capture and dynamic 3D line geometry construction |
| JavaScript Engineering | ES Modules, event-driven controller input, file export via Blob API |
| Web Standards | WebXR API, HTTPS/TLS hosting, browser-native VR without app store |
This project directly maps to the technical work done at Japan's leading XR and game development companies:
ๆฅๆฌ่ช: ใใฎใใญใธใงใฏใใฏWebXRใจThree.jsใไฝฟใฃใVR็ฉบ้ๆ็ปใขใใชใฑใผใทใงใณใงใใใฝใใผใปใคใณใฟใฉใฏใใฃใใจใณใฟใใคใณใกใณใใใใณใใคใใ ใณใชใฉใๆฅๆฌใฎใฒใผใ ไผๆฅญใงๅใใใจใ็ฎๆจใงใใ
(This project is a VR spatial drawing application built with WebXR and Three.js. My goal is to work at Japanese game companies such as Sony Interactive Entertainment and Bandai Namco.)
| Project | Description |
|---|---|
| ๐ Galaxy Cinema VR | WebXR virtual cinema โ local video playback in an immersive galaxy environment |
| ๐ค ROS Turtlesim Guide | ROS2 robot control fundamentals using Turtlesim simulation |
Anil Kumar โ VR Game Developer & Robotics Engineer from India, building toward a career in Japan's XR and robotics industry.
- Currently learning: ROS2 ยท C++ ยท OpenXR ยท Japanese (JLPT N5)
- Open to: VR Developer / XR Game Engineer roles in Japan
This project is open source under the MIT License.