Skip to content

 Threejs and TypeScript
 SocketIO and TypeScript
 Blender Topological Earth
 Sweet Home 3D
 Design Patterns Python
 Design Patterns TypeScript
 Course Coupon Codes
Python   TypeScript
Kindle Edition Kindle Edition
$9.99 $14.99 $9.99 $14.99
Paperback Paperback
$14.99 $19.99 $14.99 $19.99

Deploying to Production

Video Lecture

Deploying to Production Deploying to Production Deploying to Production


In this next several lessons, I will show you how to deploy your Threejs project to a production server on the internet.

The next lessons will cover,

At the end, our Threejs project, developed using TypeScript, will be officially on the internet for the public to see.

You can use any example from any section of the course as your project to deploy. Or even a project that you've written yourself along the way.

For this example, I will use the code from the ballgame branch of my Three.js-TypeScript-Boilerplate,

The Ball Game

The ballgame branch is a good example to use since it is significantly more sophisticated that the default boilerplate master branch.

Some of the features of The ballgame branch are

  • It uses the familiar Boilerplate Client and Server TypeScript structure with the Nodejs server
  • It is a multiplayer game
  • It demonstrates server side Cannonjs physics
  • It uses SocketIO for the game multiplayer communications
  • It demonstrates using several materials including the MeshMatcapMaterial, MeshBasicMaterial and MeshPhongMaterial with environment maps.
  • It demonstrates the Reflector object used for the floor mirror effect
  • It demonstrates the CubeCamera which can also be used for more realistic reflections
  • It demonstrates loading a pre built 3d model
  • It demonstrates a Custom Camera controller which is a cross between the Orbit and trackball controls.
  • It demonstrates modifying the UI in case of Desktop or Mobile browser. (PointerLock API or XYControllers)

All these things together make a much more impressive Threejs project that demonstrates many of the considerations needed when building a Threejs project from the ground up.

To download the Three.js-TypeScript-Boilerplate and switch to the ballgame branch,

git clone

cd Three.js-TypeScript-Boilerplate

git checkout ballgame 

npm install

npm run dev