Welcome to DinoClassroom, a Three.js simulation where a classroom full of laptops with no internet has one thing left to do: play the offline Dinosaur game. But there's a twist — you can walk up to a laptop or whiteboard and enter the game through a 3D portal, experiencing it from inside while the classroom keeps running in sync!
-
Clone the repository:
git clone https://github.com/pratplana2182197/threejs-classroom-dino.git cd threejs-classroom-dino
-
Install dependencies (requires Node.js):
npm install
-
Run the development server:
npm run dev
-
Open your browser and navigate to:
http://localhost:5173
- First-person 3D navigation using
W
,A
,S
,D
+ mouse - Realistic classroom environment with desks, laptops, lights, and shadows
- Toggle sunlight with key
N
and ceiling lights with keyL
- Interactive laptops and whiteboard that run the classic Dino game
- Press
E
near a laptop or screen to enter the Dino game through a portal - Inside the Dino world:
Space
orArrow Up
to jumpArrow Down
to duck- Camera can rotate freely
- A screen shows the classroom view from the portal
- Game state is preserved inside and outside the screen
- Lights in the classroom can still be toggled
Developed as a final project for the Interactive Graphics course implemented in Three.js.
Feel free to open issues or pull requests if you have suggestions or improvements!
Enjoy the DinoClassroom experience!