Class: GrWorld

GrWorld.GrWorld(params)

GrWorld

The GrWorld is basically a wrapper around THREE.js's scene, except that it keeps a list of GrObject rather than Object3D.

It contains a scene (and it puts things into it for you). It also contains a renderer and a camera.

When this creates a renderer, it places it into the dom (see the where option).

By default, the world is created with a reasonable default renderer, camera and groundplane. Orbit controls are installed.

Constructor

new GrWorld(params)

Construct an empty world

Parameters:
Name Type Description
params GrWorldProperties
Source:

Members

camera :THREE.PerspectiveCamera

Type:
  • THREE.PerspectiveCamera
Source:

objects :Array.<GrObject>

Type:
  • Array.<GrObject>
Source:

renderer :THREE.WebGLRenderer

Type:
  • THREE.WebGLRenderer
Source:

Methods

advance()

advance all of the objects

Source:

animate()

perform a cycle of the animation loop - this measures the time since the last redraw and advances that much before redrawing

Source:

draw()

draw the default camera to the default renderer

Source:

go()

start an (endless) animation loop - this just keeps going

Source: