/** * Implentation of the earth. * Texture from https://upload.wikimedia.org/wikipedia/commons/d/d6/Nasa_land_ocean_ice_8192.jpg */ import * as THREE from '/website/node_modules/three/build/three.module.js'; const earthTexture = new THREE.TextureLoader().load('/website/earth/earth.jpg'); const earthSphere = new THREE.SphereGeometry(10, 32, 16); const material = new THREE.MeshStandardMaterial({ map: earthTexture }); export const earth = new THREE.Mesh( earthSphere, material ); export const pivot = new THREE.Object3D(); earth.add(pivot); earth.position.x = 100; var forward = true; export function rotation(){ earth.rotation.y += 0.01; pivot.rotation.x -= 0.025; }