
Posted on • Edited on • Originally published atcodinhood.com
A Walkable Christmas Scene built with ThreeJS
This simple 3D Christmas Scene was built with basic geometry and shapes provided byThree.js. The player controls were implemented using thePointerLockControls module along with a few functions to handle keyboard input. Collision detection was implemented only on the top surface, which means you can walk through objects like trees and snowmen but jump on other objects like the top hats.
The Code
The entire project, from drawing and placing objects to adding interactivity, only took about 700 lines of Javascript. The code is also broken into 28 functions that initialize variables, render objects, respond to user input, and animate.
This is the first Three.js project I've worked on, so any improvements would be greatly appreciated. Let me know what you think so far.
Top comments(3)

- Email
- LocationNY
- EducationMount Allison University
- PronounsHe/him
- WorkCo-founder at Forem
- Joined
wow
wow indeed ❤️👍🏾
For further actions, you may consider blocking this person and/orreporting abuse