mirror of
https://github.com/seigler/webgl-threejs-hello
synced 2025-07-27 09:46:13 +00:00
⚡ Apply halftone postprocessing
This commit is contained in:
parent
c6580a8fe7
commit
ee38101670
3 changed files with 13 additions and 9 deletions
|
@ -2,8 +2,10 @@ class Lighting extends THREE.Object3D {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
let lightDirection = 0;
|
||||
|
||||
let dirLight = new THREE.DirectionalLight( 0xffffff, 1 );
|
||||
dirLight.color.setHSL( 0.1, 1, 0.95 );
|
||||
dirLight.color.setHSL( 0.095, 1, 0.95 );
|
||||
dirLight.position.set( -1, 1.75, 1 );
|
||||
dirLight.position.multiplyScalar( 2 );
|
||||
|
||||
|
@ -20,14 +22,14 @@ class Lighting extends THREE.Object3D {
|
|||
dirLight.shadow.camera.far = 3500;
|
||||
|
||||
this.add(dirLight);
|
||||
this.add(new THREE.DirectionalLightHelper( dirLight, 1 ));
|
||||
// this.add(new THREE.DirectionalLightHelper( dirLight, 1 ));
|
||||
|
||||
let hemiLight = new THREE.HemisphereLight( 0xffffff, 0xffffff, 0.6 );
|
||||
hemiLight.color.setHSL( 0.6, 1, 0.6 );
|
||||
hemiLight.groundColor.setHSL( 0.095, 1, 0.75 );
|
||||
hemiLight.groundColor.setHSL( 0.095, 1, 0.6 );
|
||||
hemiLight.position.set( 0, 4, 0 );
|
||||
this.add( hemiLight );
|
||||
this.add( new THREE.HemisphereLightHelper( hemiLight, 1 ) );
|
||||
// this.add( new THREE.HemisphereLightHelper( hemiLight, 1 ) );
|
||||
|
||||
this.onUpdate = this.onUpdate.bind(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue