diff --git a/globe/index.html b/globe/index.html deleted file mode 100644 index fa4f065..0000000 --- a/globe/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Three.js Globe - - - - - - - diff --git a/globe/js/main.js b/globe/js/main.js deleted file mode 100644 index 0d8598d..0000000 --- a/globe/js/main.js +++ /dev/null @@ -1,24 +0,0 @@ -// Set up the scene, camera, and renderer -var scene = new THREE.Scene(); -var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); -camera.position.z = 3; -var renderer = new THREE.WebGLRenderer(); -renderer.setSize(window.innerWidth, window.innerHeight); -document.body.appendChild(renderer.domElement); - -// Create a globe with a material and add it to the scene -var loader = new THREE.TextureLoader(); -loader.load('img/earth.jpg', function(texture) { - var geometry = new THREE.SphereGeometry(1, 32, 32); - var material = new THREE.MeshBasicMaterial({map: texture}); - var globe = new THREE.Mesh(geometry, material); - scene.add(globe); -}); - -// Set up an animation loop that rotates the globe -function animate() { - requestAnimationFrame(animate); - globe.rotation.y += 0.01; - renderer.render(scene, camera); -} -animate(); diff --git a/sphere/index.html b/sphere/index.html deleted file mode 100644 index bbd4887..0000000 --- a/sphere/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Sphere - - - - - - - diff --git a/sphere/js/main.js b/sphere/js/main.js deleted file mode 100644 index 96f2855..0000000 --- a/sphere/js/main.js +++ /dev/null @@ -1,22 +0,0 @@ -// Set up the scene, camera, and renderer -var scene = new THREE.Scene(); -var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); -camera.position.z = 5; -var renderer = new THREE.WebGLRenderer(); -renderer.setSize(window.innerWidth, window.innerHeight); -document.body.appendChild(renderer.domElement); - -// Create a sphere with a material and add it to the scene -var geometry = new THREE.SphereGeometry(1, 32, 32); -var material = new THREE.MeshBasicMaterial({color: 0xffffff}); -var sphere = new THREE.Mesh(geometry, material); -scene.add(sphere); - -// Set up an animation loop that rotates the sphere -function animate() { - requestAnimationFrame(animate); - sphere.rotation.x += 0.01; - sphere.rotation.y += 0.01; - renderer.render(scene, camera); -} -animate();