These docs are for v1.2. Click to read the latest docs for v2-beta.x.

WHS.BasicRendering is an simple rendering plugin that use a WebGLRenderer to directly draw your scene to the screen.
it wraps a THREE.WebGLRenderer and accept the associated configuration.

Configuration

Configuration can be defined in the rendering property of the WHS.World

const conf = {
  world: {
    rendering: {
      // optional configuration of the BasicRendering plugin
    }
  }
}

const world = new WHS.World(conf);

MODULES

.$renderer

THREE.WebGLRenderer object.

Here is the description of available properties:

Size

Change the size of the rendering buffer

{
  // ...

   width: ...
   height: ...
}

Background

Change the background color of the screen

{
  // ...

  rendering: {
    background: {
      color: 0x162129
    }
  }
}

Renderer

Change the THREE.WebGLRenderer options

{
  // ...

  rendering: {
    renderer: {
      antialias: true,
      // ... refer to THREE.js doc for WebGLRenderer
    }
  }
}

Shadowmap

Change the shadowmap options

{
  // ...

  rendering: {
    shadowmap: {
      type: THREE.PCFSoftShadowMap
      // ... refer to THREE.js doc for Shadowmap options
    }
  }
}

Stats

Stats widget can be displayed by this plugin

{
  // ...

  stats: true,

  modules: {
    stats: true
  },
}