From aac19f3d1889bc1e5226eff6ecad5d5b3d60b23e Mon Sep 17 00:00:00 2001 From: FMS-Cat Date: Mon, 29 Mar 2021 23:20:53 +0900 Subject: [PATCH] aesthetics: lights for first section --- src/entities/LightsFirst.ts | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/entities/LightsFirst.ts b/src/entities/LightsFirst.ts index 5220727..297e8b2 100644 --- a/src/entities/LightsFirst.ts +++ b/src/entities/LightsFirst.ts @@ -12,7 +12,8 @@ export class LightsFirst extends Entity { public constructor( { scenes }: LightsFirstOptions ) { super(); - const light = new LightEntity( { + // -- 1 ---------------------------------------------------------------------------------------- + const light1 = new LightEntity( { scenes, shadowMapFov: 30.0, shadowMapNear: 1.0, @@ -20,11 +21,26 @@ export class LightsFirst extends Entity { namePrefix: process.env.DEV && 'lightFirst', } ); - light.color = [ 100.0, 100.0, 100.0 ]; - light.transform.lookAt( new Vector3( [ 4.0, 4.0, 4.0 ] ) ); + light1.color = [ 400.0, 400.0, 400.0 ]; + light1.transform.lookAt( new Vector3( [ 4.0, 4.0, 4.0 ] ) ); - this.children.push( light ); + this.children.push( light1 ); - this.lights = [ light ]; + // -- 2 ---------------------------------------------------------------------------------------- + const light2 = new LightEntity( { + scenes, + shadowMapFov: 30.0, + shadowMapNear: 1.0, + shadowMapFar: 20.0, + namePrefix: process.env.DEV && 'lightFirst', + } ); + + light2.color = [ 100.0, 140.0, 200.0 ]; + light2.transform.lookAt( new Vector3( [ -4.0, 0.0, -4.0 ] ) ); + + this.children.push( light2 ); + + // -- haha ------------------------------------------------------------------------------------- + this.lights = [ light1, light2 ]; } }