BasicRendering
[components / rendering / basic / BasicRendering.js]
https://github.com/WhitestormJS/whitestorm.js/blob/dev/src/framework/components/rendering/basic/BasicRendering.js
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
.$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
},
}
Updated less than a minute ago