RenderingModule
WHS.app.RenderingModule
const app = new WHS.App([
new WHS.app.ElementModule(),
new WHS.app.SceneModule(),
new WHS.app.CameraModule({
position: new THREE.Vector3(0, 6, 18),
far: 10000
}),
new WHS.app.RenderingModule({
bgColor: 0x162129,
renderer: {
antialias: true,
shadowmap: {
type: THREE.PCFSoftShadowMap
}
}
}, {shadow: true})
]);
Parameters
Name | Description | Default value |
---|---|---|
width | Rendertarget width | window.innerWidth |
height | Rendertarget height | window.innerHeight |
resolution | Relative resolution:1 - normal2 - 2x times more pixels...and go on | new Vector2(1, 1) |
bgColor | HEX color of background | 0x000000 |
bgOpacity | Background opacity [0 - 1] | 1 |
renderer | Additional WebGLRenderer parameters | {} |
Required dependencies
This module requires some dependencies:
element
scene
camera
.setSize(width, height)
Update rendertarget width
and height
.
Exported dependencies
Name | Description |
---|---|
renderer | THREE.WebGLRenderer instance |
Updated almost 8 years ago