Dies ist das Repository meines kleinen Portfolios.
Im Hintergrund läuft eine Planetensimulation, geschrieben in JavaScript und Three.js.
Die zu sehenden Texturen stammen von:
https://www.solarsystemscope.com/textures/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
621 B
20 lines
621 B
/** |
|
* Implentation of the jupiter. |
|
* Texture from https://www.solarsystemscope.com/textures/1 |
|
*/ |
|
|
|
import * as THREE from '/website/node_modules/three/build/three.module.js'; |
|
|
|
|
|
const jupiterTexture = new THREE.TextureLoader().load('/website/jupiter/jupiter.jpg'); |
|
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; |
|
|
|
export function rotation(){ |
|
jupiter.rotation.x -= 0.01; |
|
jupiter.rotation.y -= 0.01; |
|
jupiter.rotation.z -= 0.01; |
|
}
|
|
|