Created
March 8, 2019 08:36
-
-
Save peyloride/338803d245985b968480a860e9fa8948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the sphere's material | |
const sphereMaterial = | |
new THREE.MeshLambertMaterial( | |
{ | |
color: 0xCC0000, | |
wireframe: true | |
}); | |
// Set up the sphere vars | |
const RADIUS = 50; | |
const SEGMENTS = 16; | |
const RINGS = 16; | |
// Create a new mesh with | |
// sphere geometry | |
const sphere = new THREE.Mesh( | |
new THREE.SphereGeometry( | |
RADIUS, | |
SEGMENTS, | |
RINGS), | |
sphereMaterial); | |
// Move the Sphere back in Z so we | |
// can see it. | |
sphere.position.z = -400; | |
// Finally, add the sphere to the scene. | |
scene.add(sphere); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment