Skip to content

Anil-CAI/vr_theater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŒ Galaxy Cinema VR

An immersive WebXR virtual movie theater set in a cosmic galaxy environment


๐Ÿ“– What is Galaxy Cinema VR?

Galaxy Cinema VR is a browser-based Virtual Reality application that lets users watch their own locally stored video files inside a fully immersive, peaceful 3D galaxy environment โ€” no uploads, no subscriptions, no cloud storage required.

The user selects any video file from their device, presses a single button, and is transported into a virtual cosmic cinema where a giant screen floats among 15,000 procedurally generated stars and glowing nebulae.

Built as a solo project to explore the intersection of WebXR, 3D real-time rendering, and immersive user experience design โ€” the three pillars of next-generation VR game development.


โœจ Key Features

Feature Description
๐ŸŒŸ Procedural Galaxy 15,000 stars dynamically generated and animated in a massive 3D sphere
๐ŸŒŒ Nebula Clouds Transparent volumetric gas clouds placed for depth and atmosphere
๐ŸŽฌ Local Video Playback Plays any video from device storage โ€” no upload or server required
๐Ÿ“บ 16:9 Cinema Screen Full-scale virtual screen with real-time video texturing via Three.js
๐Ÿ’ก Dynamic Screen Lighting Rectangular light attached to the screen simulates real cinema glow
๐Ÿฅฝ Meta Quest 3 Optimized Full stereoscopic WebXR rendering for immersive VR headset experience
๐Ÿ”’ Privacy First All video processing happens in browser memory โ€” no data ever leaves the device
๐ŸŒ Zero Installation Runs entirely in a web browser โ€” no app store, no download required

๐ŸŽฏ Project Motivation

This project was born from two parallel interests:

  1. VR Game Development โ€” Learning to build real-time 3D environments using Three.js and WebXR, understanding spatial rendering, lighting physics, and immersive UX design patterns used in modern VR games.

  2. Japan Career Goal โ€” Japan's game and XR industry (Nintendo, Sony Interactive, Capcom, Bandai Namco) leads the world. This project demonstrates hands-on capability with the exact technologies these studios use and value: real-time 3D rendering, VR interface design, and hardware-native WebXR APIs.


๐Ÿ› ๏ธ Technologies Used

Core Stack

  • Three.js โ€” 3D graphics engine for scene, camera, geometry, materials, and lighting
  • WebXR API โ€” Web standard for VR hardware interface, stereoscopic rendering, and headset tracking
  • Vite โ€” Build tool and development server for fast module bundling
  • HTML5 / CSS3 / JavaScript โ€” Pre-VR UI dashboard and application logic

Key Web APIs

  • navigator.xr โ€” WebXR device detection and session management
  • URL.createObjectURL() โ€” In-browser video blob processing (no server upload)
  • THREE.VideoTexture โ€” Real-time video frame piping to 3D canvas material
  • THREE.RectAreaLight โ€” Physically accurate rectangular cinema screen light

๐Ÿ—๏ธ System Architecture

Galaxy Cinema VR
โ”‚
โ”œโ”€โ”€ A. Initialization
โ”‚   โ”œโ”€โ”€ 3D Scene + Camera setup
โ”‚   โ”œโ”€โ”€ HTTPS security check (required for WebXR on Meta Quest)
โ”‚   โ””โ”€โ”€ WebXR hardware compatibility check
โ”‚
โ”œโ”€โ”€ B. Pre-VR Dashboard (2D UI)
โ”‚   โ”œโ”€โ”€ Local video file selector
โ”‚   โ”œโ”€โ”€ In-browser blob URL generation (privacy-safe)
โ”‚   โ””โ”€โ”€ "Enter Galaxy" button (unlocked after valid file)
โ”‚
โ”œโ”€โ”€ C. Galaxy Environment
โ”‚   โ”œโ”€โ”€ Procedural star field (15,000 points, random 3D sphere)
โ”‚   โ”œโ”€โ”€ Nebula gas clouds (transparent colored spheres)
โ”‚   โ””โ”€โ”€ Continuous ambient star rotation (time-based animation)
โ”‚
โ”œโ”€โ”€ D. Cinema Screen
โ”‚   โ”œโ”€โ”€ 16:9 geometry canvas positioned at default camera focus
โ”‚   โ”œโ”€โ”€ THREE.VideoTexture โ€” live video โ†’ 3D material
โ”‚   โ”œโ”€โ”€ RectAreaLight attached to screen coordinates
โ”‚   โ””โ”€โ”€ Floor grid for spatial depth/scale reference
โ”‚
โ””โ”€โ”€ E. WebXR Session
    โ”œโ”€โ”€ Flat browser โ†’ stereoscopic headset rendering
    โ””โ”€โ”€ Video playback begins on 3D cinema screen

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18+) and npm installed
  • A WebXR-compatible browser (Chrome, Edge, Firefox Reality)
  • Meta Quest 3 headset or any WebXR browser (desktop VR mode works too)
  • Project must be served over HTTPS for VR features (required by WebXR)

Installation

# Clone the repository
git clone https://github.com/Anil-CAI/vr_theater.git

# Navigate into the project
cd vr_theater

# Install dependencies
npm install

# Start the development server
npm run dev

Running on Meta Quest 3

# Build for production (serves over HTTPS via Vite)
npm run build
npm run preview

# Or use a local HTTPS tunnel for development:
npx vite --https

Then on your Meta Quest 3:

  1. Open the Meta Quest Browser
  2. Navigate to your local HTTPS URL
  3. Select your video file from device storage
  4. Press "Enter Galaxy" โ€” put on your headset and enjoy ๐ŸŒŒ

๐Ÿ“ Project Structure

vr_theater/
โ”œโ”€โ”€ index.html          # Entry point + pre-VR dashboard UI
โ”œโ”€โ”€ main.js             # Core application logic
โ”‚   โ”œโ”€โ”€ sceneSetup()    # Three.js scene, camera, renderer
โ”‚   โ”œโ”€โ”€ buildGalaxy()   # Procedural star + nebula generation
โ”‚   โ”œโ”€โ”€ buildScreen()   # Cinema screen + video texture + lighting
โ”‚   โ””โ”€โ”€ enterVR()       # WebXR session initialization
โ”œโ”€โ”€ style.css           # Pre-VR dashboard styling
โ”œโ”€โ”€ package.json        # Vite + dependencies
โ””โ”€โ”€ vite.config.js      # Build configuration

๐Ÿ—บ๏ธ Roadmap

  • Procedural galaxy environment (stars + nebulae)
  • Local video file playback in VR
  • Meta Quest 3 WebXR integration
  • Dynamic cinema screen lighting
  • Hand tracking support (Meta Quest 3 native)
  • Spatial audio โ€” video sound positioned from screen direction
  • Multiple theater environments (space station, underwater, forest)
  • VR UI panel โ€” play/pause/seek controls usable in headset
  • Playlist support โ€” queue multiple local videos
  • Multi-user mode โ€” watch together in the same galaxy (WebRTC)

๐Ÿ”— Skills Demonstrated

This project directly demonstrates skills relevant to VR game development and XR engineering roles:

Skill Area Demonstrated By
Real-time 3D rendering Three.js scene, materials, lighting, animation loop
VR hardware interface WebXR API session management, stereoscopic rendering
Procedural generation Mathematical star field generation (15,000 points)
Immersive UX design HTTPS security flow, progressive UI unlock, spatial anchoring
Performance optimization Blob URL video processing, efficient render loop
Web standards WebXR, HTML5 Video, Canvas API, ES Modules

๐Ÿ‡ฏ๐Ÿ‡ต Japan Connection

This project aligns directly with the XR and game development work done at Japanese studios I'm targeting:

  • Sony Interactive Entertainment โ€” PlayStation VR2 experience design
  • Telexistence (TX Inc.) โ€” VR interface engineering for remote robot control
  • Bandai Namco โ€” Immersive VR arcade and home experience development
  • Capcom โ€” Real-time 3D environment and rendering engineering

ๆ—ฅๆœฌ่ชž: ใ“ใฎใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใฏVRๆŠ€่ก“ใจWebXR้–‹็™บใฎๅฎŸ่ทต็š„ใชใ‚นใ‚ญใƒซใ‚’็คบใ—ใฆใ„ใพใ™ใ€‚ๆ—ฅๆœฌใฎใ‚ฒใƒผใƒ ใƒปใƒญใƒœใƒ†ใ‚ฃใ‚ฏใ‚นไผๆฅญใงๅƒใใ“ใจใŒ็›ฎๆจ™ใงใ™ใ€‚

(This project demonstrates practical VR and WebXR development skills. My goal is to work at a Japanese game or robotics company.)


๐Ÿ‘ค About the Developer

Anil Kumar โ€” VR Game Developer & Robotics Engineer from India, working toward a career in Japan's game and XR industry.


๐Ÿ“„ License

This project is open source under the MIT License.


Built with passion for VR, space, and the future of immersive technology ยท India โ†’ Japan ๐Ÿ‡ฎ๐Ÿ‡ณ โ†’ ๐Ÿ‡ฏ๐Ÿ‡ต

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors