From 4561d83c6609cbfa2495cc5a4b0cb7dcdfc5430b Mon Sep 17 00:00:00 2001 From: Bobby Roe Date: Tue, 21 May 2024 13:17:06 -0700 Subject: [PATCH] update ? --- index.html | 4 ++-- index.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 568f2dd..aaf98a7 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,8 @@ diff --git a/index.js b/index.js index 18257db..70a5553 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,9 @@ camera.position.z = 5; const renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setSize(w, h); document.body.appendChild(renderer.domElement); +// THREE.ColorManagement.enabled = true; +renderer.toneMapping = THREE.ACESFilmicToneMapping; +renderer.outputColorSpace = THREE.LinearSRGBColorSpace; const earthGroup = new THREE.Group(); earthGroup.rotation.z = -23.4 * Math.PI / 180; @@ -26,6 +29,7 @@ const material = new THREE.MeshPhongMaterial({ bumpMap: loader.load("./textures/01_earthbump1k.jpg"), bumpScale: 0.04, }); +// material.map.colorSpace = THREE.SRGBColorSpace; const earthMesh = new THREE.Mesh(geometry, material); earthGroup.add(earthMesh); @@ -56,7 +60,7 @@ earthGroup.add(glowMesh); const stars = getStarfield({numStars: 2000}); scene.add(stars); -const sunLight = new THREE.DirectionalLight(0xffffff); +const sunLight = new THREE.DirectionalLight(0xffffff, 2.0); sunLight.position.set(-2, 0.5, 1.5); scene.add(sunLight);