From 26cd709e3b1cf9e04aa0b9b7e8b7bbf7ed88c7a8 Mon Sep 17 00:00:00 2001 From: oli Date: Tue, 2 Apr 2024 12:00:36 +0200 Subject: [PATCH] Changed material for stars to whiten them Changed material in function addStar() from MeshStandardMaterial to MeshBasicMaterial to prevent stars to be displayed gray instead of white. See issue: https://github.com/fireship-io/threejs-scroll-animation-demo/issues/20 --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 26e5545..33c9573 100644 --- a/main.js +++ b/main.js @@ -45,7 +45,7 @@ scene.add(pointLight, ambientLight); function addStar() { const geometry = new THREE.SphereGeometry(0.25, 24, 24); - const material = new THREE.MeshStandardMaterial({ color: 0xffffff }); + const material = new THREE.MeshBasicMaterial({ color: 0xffffff }); const star = new THREE.Mesh(geometry, material); const [x, y, z] = Array(3)