parent
d42fef0c99
commit
d364332d4c
9 changed files with 48 additions and 9 deletions
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; |
||||
} |
Loading…
Reference in new issue