Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@marshallmurphy
Created July 28, 2020 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshallmurphy/736c5c86111b6323a6b55b0fa8269dc8 to your computer and use it in GitHub Desktop.
Save marshallmurphy/736c5c86111b6323a6b55b0fa8269dc8 to your computer and use it in GitHub Desktop.
//...
// SCENE
const scene = new THREE.Scene();
// TEXTURES
const loader = new THREE.TextureLoader();
const mercuryTexture = loader.load("assets/mercury.jpg");
// MATERIALS
const mercuryMaterial = new THREE.MeshStandardMaterial({ map: mercuryTexture });
// MESHES
const geometry = new THREE.SphereGeometry(1, 32, 16);
const mercuryMesh = new THREE.Mesh(geometry, mercuryMaterial);
mercuryMesh.position.set(25, 0, 0);
mercuryMesh.scale.setScalar(0.8);
scene.add(mercuryMesh);
// LIGHTING
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment