Skip to content

Commit

Permalink
update ?
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobby Roe committed May 21, 2024
1 parent a338f70 commit 4561d83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.131/build/three.module.js",
"jsm/": "https://cdn.jsdelivr.net/npm/three@0.131/examples/jsm/"
"three": "https://cdn.jsdelivr.net/npm/three@0.161/build/three.module.js",
"jsm/": "https://cdn.jsdelivr.net/npm/three@0.161/examples/jsm/"
}
}
</script>
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 4561d83

Please sign in to comment.