mirror of
https://github.com/isledecomp/isle.pizza.git
synced 2026-03-01 06:17:38 +00:00
Improve score cube lighting to match in-game appearance
- Use flat, even lighting (high ambient + soft front light) - Remove harsh directional shadows from edges - Adjust camera position slightly for better framing
This commit is contained in:
parent
9c9b0e5599
commit
960a4c078e
@ -18,7 +18,7 @@ export class WdbModelRenderer {
|
|||||||
this.scene = new THREE.Scene();
|
this.scene = new THREE.Scene();
|
||||||
|
|
||||||
this.camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
|
this.camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
|
||||||
this.camera.position.set(0, 0, 7);
|
this.camera.position.set(0, 0.2, 7);
|
||||||
|
|
||||||
this.renderer = new THREE.WebGLRenderer({
|
this.renderer = new THREE.WebGLRenderer({
|
||||||
canvas,
|
canvas,
|
||||||
@ -35,16 +35,14 @@ export class WdbModelRenderer {
|
|||||||
* Setup scene lighting - override to customize
|
* Setup scene lighting - override to customize
|
||||||
*/
|
*/
|
||||||
setupLighting() {
|
setupLighting() {
|
||||||
const ambient = new THREE.AmbientLight(0xffffff, 0.7);
|
// Flat, even lighting similar to in-game
|
||||||
|
const ambient = new THREE.AmbientLight(0xffffff, 1.5);
|
||||||
this.scene.add(ambient);
|
this.scene.add(ambient);
|
||||||
|
|
||||||
const directional = new THREE.DirectionalLight(0xffffff, 0.5);
|
// Soft front light
|
||||||
directional.position.set(5, 5, 5);
|
const frontLight = new THREE.DirectionalLight(0xffffff, 0.3);
|
||||||
this.scene.add(directional);
|
frontLight.position.set(0, 0, 5);
|
||||||
|
this.scene.add(frontLight);
|
||||||
const backLight = new THREE.DirectionalLight(0xffffff, 0.3);
|
|
||||||
backLight.position.set(-5, -3, -5);
|
|
||||||
this.scene.add(backLight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user