diff --git a/earth/earth.js b/earth/earth.js index a99b5f5..daddb90 100644 --- a/earth/earth.js +++ b/earth/earth.js @@ -15,11 +15,11 @@ export const pivot = new THREE.Object3D(); earth.add(pivot); -earth.position.x = 100; +earth.position.x = -100; var forward = true; export function rotation(){ earth.rotation.y += 0.01; - pivot.rotation.x -= 0.025; + pivot.rotation.y -= 0.05; } diff --git a/index.html b/index.html index 994734c..1641a9d 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,13 @@ Space - - + +
+
+

„Jedes Lebewesen ist ein Rädchen im Getriebe des Universums. Obwohl scheinbar nur seine unmittelbare Umgebung betroffen ist, erstreckt sich der Einflussbereich jedes Lebewesens über eine unendliche Distanz.“ - Nikola Tesla +

+
+
+ diff --git a/jupiter/jupiter.js b/jupiter/jupiter.js index 2c9c832..25d430a 100644 --- a/jupiter/jupiter.js +++ b/jupiter/jupiter.js @@ -11,7 +11,7 @@ const jupiterSphere = new THREE.SphereGeometry(15, 32, 16); const material = new THREE.MeshStandardMaterial({ map: jupiterTexture }); export const jupiter = new THREE.Mesh( jupiterSphere, material ); -jupiter.position.x = 170; +jupiter.position.x = -170; export function rotation(){ jupiter.rotation.x -= 0.01; diff --git a/main.js b/main.js index 70530e5..c5743d0 100644 --- a/main.js +++ b/main.js @@ -11,6 +11,7 @@ import * as MARS from '/website/mars/mars.js'; import * as JUPITER from '/website/jupiter/jupiter.js'; import * as SATURN from '/website/saturn/saturn.js'; import * as MOON from '/website/moon/moon.js'; +import * as URANUS from '/website/uranus/uranus.js'; import { OrbitControls } from '/website/node_modules/three/examples/jsm/controls/OrbitControls.js'; @@ -43,6 +44,7 @@ const pivotMERKUR = new THREE.Object3D(); const pivotMARS = new THREE.Object3D(); const pivotJUPITER = new THREE.Object3D(); const pivotSATURN = new THREE.Object3D(); +const pivotURANUS = new THREE.Object3D(); sun.add(pivotEARTH); sun.add(pivotVENUS); @@ -50,6 +52,7 @@ sun.add(pivotMERKUR); sun.add(pivotMARS); sun.add(pivotJUPITER); sun.add(pivotSATURN); +sun.add(pivotURANUS); pivotEARTH.add(EARTH.earth); pivotVENUS.add(VENUS.venus); @@ -57,6 +60,7 @@ pivotMERKUR.add(MERKUR.merkur); pivotMARS.add(MARS.mars); pivotJUPITER.add(JUPITER.jupiter); pivotSATURN.add(SATURN.saturn); +pivotURANUS.add(URANUS.uranus); // Der Mond dreht sich sich um die erde. @@ -116,7 +120,14 @@ function animate() { sun.rotation.x += 0.001; //sun.rotation.y += 0.005; //sun.rotation.z += 0.001; - //EARTH.rotation(); + EARTH.rotation(); + MERKUR.rotation(); + VENUS.rotation(); + MARS.rotation(); + JUPITER.rotation(); + SATURN.rotation(); + URANUS.rotation(); + pivotEARTH.rotation.y += 0.005; pivotMERKUR.rotation.y -= 0.005; @@ -128,6 +139,7 @@ function animate() { pivotMARS.rotation.z -= 0.005; pivotJUPITER.rotation.z += 0.005; pivotSATURN.rotation.z -= 0.005; + pivotURANUS.rotation.x += 0.005; controls.update(); renderer.render( scene, camera ); diff --git a/merkur/merkur.js b/merkur/merkur.js index 9a72ab6..b82f517 100644 --- a/merkur/merkur.js +++ b/merkur/merkur.js @@ -7,11 +7,11 @@ import * as THREE from '/website/node_modules/three/build/three.module.js'; const merkurTexture = new THREE.TextureLoader().load('/website/merkur/merkur.jpg'); -const merkurSphere = new THREE.SphereGeometry(10, 32, 16); +const merkurSphere = new THREE.SphereGeometry(5, 32, 16); const material = new THREE.MeshStandardMaterial({ map: merkurTexture }); export const merkur = new THREE.Mesh( merkurSphere, material ); -merkur.position.x = 40; +merkur.position.x = -40; export function rotation(){ merkur.rotation.x -= 0.01; diff --git a/jupiter/.mars.js.swp b/uranus/.uranus.js.swp similarity index 92% rename from jupiter/.mars.js.swp rename to uranus/.uranus.js.swp index 982d7a4..4e854d3 100644 Binary files a/jupiter/.mars.js.swp and b/uranus/.uranus.js.swp differ diff --git a/uranus/uranus.jpg b/uranus/uranus.jpg new file mode 100644 index 0000000..d0abf4c Binary files /dev/null and b/uranus/uranus.jpg differ diff --git a/uranus/uranus.js b/uranus/uranus.js new file mode 100644 index 0000000..e82f3e8 --- /dev/null +++ b/uranus/uranus.js @@ -0,0 +1,21 @@ +/** + * Implentation of the uranus. + * Texture from https://www.solarsystemscope.com/textures/1 + */ + +import * as THREE from '/website/node_modules/three/build/three.module.js'; + + +const uranusTexture = new THREE.TextureLoader().load('/website/uranus/uranus.jpg'); +const uranusSphere = new THREE.SphereGeometry(15, 32, 16); +const material = new THREE.MeshStandardMaterial({ map: uranusTexture }); +export const uranus = new THREE.Mesh( uranusSphere, material ); + +uranus.position.x = -210; +uranus.position.y = -210; + +export function rotation(){ + uranus.rotation.x -= 0.01; + uranus.rotation.y -= 0.01; + uranus.rotation.z -= 0.01; +} diff --git a/venus/venus.js b/venus/venus.js index 117254a..ad25966 100644 --- a/venus/venus.js +++ b/venus/venus.js @@ -7,7 +7,7 @@ import * as THREE from '/website/node_modules/three/build/three.module.js'; const venusTexture = new THREE.TextureLoader().load('/website/venus/venus.jpg'); -const venusSphere = new THREE.SphereGeometry(10, 32, 16); +const venusSphere = new THREE.SphereGeometry(7, 32, 16); const material = new THREE.MeshStandardMaterial({ map: venusTexture }); export const venus = new THREE.Mesh( venusSphere, material );