Set up the three.js rendering layer, call in gameInit
THREE ObjectThe three.js module, supplied by the user
cameraFOV number optional, default 60Vertical field of view in degrees
// in gameInit, with three.js loaded by the user
new ThreeJSPlugin(THREE);
threeJS.scene.add(new THREE.AmbientLight);
The three.js perspective camera
Lock the camera to the LittleJS 2D camera so the z=0 plane matches world space
Far plane of the aligned camera before any zoom out, from camera.far on the
first aligned frame; while aligned, change this rather than camera.far
Near plane of the aligned camera before any zoom out, from camera.near on the
first aligned frame; while aligned, change this rather than camera.near
The three.js scene, add lights and meshes here
The three.js module passed into the constructor
Position the camera so the z=0 plane exactly matches LittleJS world space,
called automatically when cameraAlign2D is set
Sync the canvas layout and render the scene, called automatically each frame