+Uranus hinzugefügt +Laufbahnen überarbeitet

master
root 4 years ago
parent d42fef0c99
commit d364332d4c
  1. 4
      earth/earth.js
  2. 10
      index.html
  3. 2
      jupiter/jupiter.js
  4. 14
      main.js
  5. 4
      merkur/merkur.js
  6. BIN
      uranus/.uranus.js.swp
  7. BIN
      uranus/uranus.jpg
  8. 21
      uranus/uranus.js
  9. 2
      venus/venus.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;
}

@ -7,7 +7,13 @@
<title>Space</title>
</head>
<body>
<canvas id="bg"></canvas>
<script type="module" src="main.js"></script>
<canvas id="bg"></canvas>
<main>
<header>
<h1>„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
</h1>
</header>
</main>
<script type="module" src="main.js"></script>
</body>
</html>

@ -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;

@ -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 );

@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

@ -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;
}

@ -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 );

Loading…
Cancel
Save