LittleJS 1.30.1

ThreeJS

LittleJS Three.js Plugin

  • Renders a three.js scene on a canvas behind the LittleJS canvases
  • The three.js module is passed in by the user, nothing is bundled
  • Keep canvasClearColor transparent so the 3D scene shows through
  • Aligned camera mode locks the 3D camera to the LittleJS 2D camera
  • ThreeJSObject lets LittleJS physics drive a three.js mesh
  • Call new ThreeJSPlugin(THREE) in gameInit to set up

Classes

Members

Typedefs

Members

Global ThreeJS plugin object

Typedefs

ThreeCamera : anythreejs.js:36

A three.js PerspectiveCamera; three.js is the game's own and untyped here, so it is any, named for what it is

ThreeModule : anythreejs.js:24

The three.js module; three.js is the game's own and untyped here, so it is any, named for what it is

ThreeObject3D : anythreejs.js:40

A three.js Object3D, a mesh or a group; three.js is the game's own and untyped here, so it is any, named for what it is

ThreeRenderer : anythreejs.js:28

A three.js WebGLRenderer; three.js is the game's own and untyped here, so it is any, named for what it is

ThreeScene : anythreejs.js:32

A three.js Scene; three.js is the game's own and untyped here, so it is any, named for what it is