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.
21 lines
607 B
21 lines
607 B
4 years ago
|
/**
|
||
|
* Implentation of the merkur.
|
||
|
* Texture from https://www.solarsystemscope.com/textures/1
|
||
|
*/
|
||
|
|
||
|
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 material = new THREE.MeshStandardMaterial({ map: merkurTexture });
|
||
|
export const merkur = new THREE.Mesh( merkurSphere, material );
|
||
|
|
||
|
merkur.position.x = 40;
|
||
|
|
||
|
export function rotation(){
|
||
|
merkur.rotation.x -= 0.01;
|
||
|
merkur.rotation.y -= 0.01;
|
||
|
merkur.rotation.z -= 0.01;
|
||
|
}
|