summaryrefslogtreecommitdiff
path: root/public/App.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/App.js')
-rw-r--r--public/App.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/public/App.js b/public/App.js
index f63ae7e..eb47dbc 100644
--- a/public/App.js
+++ b/public/App.js
@@ -306,17 +306,30 @@ export function initializeView() {
});
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(width, height, false);
+ renderer.toneMapping = THREE.ACESFilmicToneMapping;
+ renderer.toneMappingExposure = 1.15;
+ renderer.outputColorSpace = THREE.SRGBColorSpace;
const scene = new THREE.Scene();
scene.background = (new THREE.Color("#11171a"));
+ const envScene = new THREE.Scene();
+ const pmrem = new THREE.PMREMGenerator(renderer);
+ const envTexture = pmrem.fromScene(envScene, 0.04).texture;
+ scene.environment = envTexture;
+ scene.environmentIntensity = 0.55;
const camera = new THREE.PerspectiveCamera(34, (width / height), 0.1, 100);
camera.position.set(6.4, 4.6, 7.2);
camera.lookAt(0, 0, 0);
const group = new THREE.Group();
scene.add(group);
- scene.add(new THREE.AmbientLight("#f0e6c8", 1.9));
+ scene.add(new THREE.AmbientLight("#f0e6c8", 0.55));
const keyLight = new THREE.DirectionalLight("#f2c76b", 2.8);
keyLight.position.set(4, 7, 5);
scene.add(keyLight);
+ const rimLight = new THREE.DirectionalLight("#7fa8ff", 1.4);
+ rimLight.position.set(-6, -3, -4);
+ scene.add(rimLight);
+ const bounceLight = new THREE.HemisphereLight("#3d4a56", "#141a1e", 0.9);
+ scene.add(bounceLight);
const controls = new OrbitControls(camera, canvas);
controls.target.copy({ x: 0, y: 0, z: 0 });
controls.enableDamping = true;