mirror of
https://github.com/denismhz/solar-system.git
synced 2025-11-09 08:06:22 +01:00
20 lines
404 B
JavaScript
20 lines
404 B
JavaScript
import * as THREE from "three";
|
|
|
|
const textL = new THREE.TextureLoader();
|
|
|
|
const r = 1737 / 6000;
|
|
const s = 50;
|
|
|
|
const moonMaterial = new THREE.MeshPhongMaterial({
|
|
map: textL.load("../../img/moon/moonmap4k.jpg"),
|
|
bumpMap: textL.load("../../img/moon/moonbump4k.jpg"),
|
|
bumpScale: 0.2,
|
|
});
|
|
|
|
const moonMesh = new THREE.Mesh(
|
|
new THREE.SphereGeometry(r, s, s),
|
|
moonMaterial
|
|
);
|
|
|
|
export { moonMesh };
|