Three.js

A JavaScript-based WebGL engine

Three.js

Three. js is a JavaScript-based WebGL engine that can run GPU-powered games and other graphics-powered apps straight from the browser.

Overview

In the code below I create a three.js scene. The scene contains

  • a camera; and
  • a set of animated cubes and spheres (floaters)

I set the scene background using a skybox.

I did not add lighting.


The AnaglyphEffect is used to shade the rendered image so it can be viewed using Red Cyan 3D glasses.

import library modules and sets up scene

sets up camera

sets up floating cubes and spheres

sets up renderer

sets up animation

index-three-analyph

References