ThreeJS Basic Interaction

A computer game is basically an interactive animation. Different animation loops are played based on the key inputs given by the user.In this example you can see how basic keyboard interaction can be added to a 3D animation using ThreeJS library. Sample model created using Mixamo

To make this work, the scripts listed below are required: :

  1. ColladaLoader - for loading model in .dae format
  2. OrbitControls - predefined camera controls with mouse

Left click and move mouse to rotate camera. Scroll to zoom in and out.
Press space key to reset.

  1. W - Make character walk
  2. A - Turn Left
  3. D - Turn Right