2.8K tris19.6 × 19.3 × 20.5 m
Use it in code
Remix in the editorspace-station.js · 713 lines
Self-contained ES module — only depends on three. Call the factory and add the group to your scene.
/**
* Space Station — Codels 3D model library
* License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the model (it floats — pickups, planets)
* Triangles: 2,832 · Size (W × H × D): 19.64 × 19.26 × 20.45 m
*
* Usage:
* import { createSpaceStation } from './space-station.js';
*
* const model = createSpaceStation();
* model.position.set(0, 0, 0);
* scene.add(model);
*/
import * as THREE from 'three';
const deg = THREE.MathUtils.degToRad;
// Revolve a 2D profile [[radius, y], ...] around the Y axis.
function lathe(points, segments, phiStart = 0, phiLength = Math.PI * 2) {
return new THREE.LatheGeometry(points.map(([x, y]) => new THREE.Vector2(x, y)), segments, phiStart, phiLength);
}
export function createSpaceStation() {
const root = new THREE.Group();
root.name = 'SpaceStation';
// Materials
const hullMat = new THREE.MeshStandardMaterial({ name: 'hull', color: 0xdde2e8, roughness: 0.45, metalness: 0.3, flatShading: true });
const trimMat = new THREE.MeshStandardMaterial({ name: 'trim', color: 0x3a4049, roughness: 0.55, metalness: 0.45, flatShading: true });
const metalMat = new THREE.MeshStandardMaterial({ name: 'metal', color: 0x8a929c, roughness: 0.4, metalness: 0.6, flatShading: true });
const windowMat = new THREE.MeshStandardMaterial({ name: 'window', color: 0xffc46b, roughness: 0.3, emissive: 0xffc46b, flatShading: true });
const cellMat = new THREE.MeshStandardMaterial({ name: 'cell', color: 0x2c55b8, roughness: 0.25, metalness: 0.5, flatShading: true });
const panelBackMat = new THREE.MeshStandardMaterial({ name: 'panelBack', color: 0x1b2238, roughness: 0.7, flatShading: true });
const accentMat = new THREE.MeshStandardMaterial({ name: 'accent', color: 0xe0683a, roughness: 0.5, metalness: 0.2, flatShading: true });
const redMat = new THREE.MeshStandardMaterial({ name: 'red', color: 0xff4a3a, roughness: 0.4, emissive: 0xff2a1f, emissiveIntensity: 1.3, flatShading: true });
const greenMat = new THREE.MeshStandardMaterial({ name: 'green', color: 0x7dff5a, roughness: 0.4, emissive: 0x5cff3a, emissiveIntensity: 1.2, flatShading: true });
const dishMat = new THREE.MeshStandardMaterial({ name: 'dish', color: 0xeef0f3, roughness: 0.45, flatShading: true, side: THREE.DoubleSide });
// Shared geometries
const cylinderGeo = new THREE.CylinderGeometry(0.95, 0.95, 5.0623, 10, 1, true);
const boxGeo = new THREE.BoxGeometry(0.14, 0.32, 3.4486);
const boxGeo2 = new THREE.BoxGeometry(0.36, 0.1, 2.7812);
const cylinderGeo2 = new THREE.CylinderGeometry(1.01, 1.01, 0.16, 10, 1, true);
const cylinderGeo3 = new THREE.CylinderGeometry(1.15, 1.15, 0.7, 10, 1, true);
const sphereGeo = new THREE.SphereGeometry(0.12, 6, 4);
const cylinderGeo4 = new THREE.CylinderGeometry(0.32, 0.32, 6.6662, 6);
const cylinderGeo5 = new THREE.CylinderGeometry(0.42, 0.42, 0.35, 6);
const cylinderGeo6 = new THREE.CylinderGeometry(0.9, 0.9, 1, 10);
const cylinderGeo7 = new THREE.CylinderGeometry(0.75, 0.75, 0.12, 10);
const boxGeo3 = new THREE.BoxGeometry(0.6, 0.3, 0.1);
const cylinderGeo8 = new THREE.CylinderGeometry(0.22, 0.22, 6.5, 6);
const cylinderGeo9 = new THREE.CylinderGeometry(0.32, 0.32, 0.18, 6);
const boxGeo4 = new THREE.BoxGeometry(0.14, 0.14, 1.3);
const boxGeo5 = new THREE.BoxGeometry(4.2, 0.06, 1.7);
const boxGeo6 = new THREE.BoxGeometry(1.25, 0.1, 1.5);
const boxGeo7 = new THREE.BoxGeometry(4.3, 0.1, 0.08);
// Parts
const ring = new THREE.Group();
ring.name = 'ring';
root.add(ring);
const module1 = new THREE.Mesh(cylinderGeo, hullMat);
module1.name = 'module1';
module1.position.set(2.645, 0, 8.1406);
module1.rotation.set(deg(-18.8623), deg(17.0911), deg(-84.2664));
ring.add(module1);
const box3 = new THREE.Mesh(boxGeo, windowMat);
box3.position.set(2.9262, 0.05, 9.006);
box3.rotation.set(0, deg(108), 0);
ring.add(box3);
const box4 = new THREE.Mesh(boxGeo2, windowMat);
box4.position.set(2.7068, 0.92, 8.3308);
box4.rotation.set(0, deg(108), 0);
ring.add(box4);
const cylinder5 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder5.position.set(1.1638, 0, 8.6219);
cylinder5.rotation.set(deg(-18.8623), deg(17.0911), deg(-84.2664));
ring.add(cylinder5);
const cylinder6 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder6.position.set(4.1263, 0, 7.6593);
cylinder6.rotation.set(deg(-18.8623), deg(17.0911), deg(-84.2664));
ring.add(cylinder6);
const joint1 = new THREE.Mesh(cylinderGeo3, trimMat);
joint1.name = 'joint1';
joint1.position.set(0, 0, 9);
joint1.rotation.set(0, 0, deg(-90));
ring.add(joint1);
const sphere8 = new THREE.Mesh(sphereGeo, redMat);
sphere8.position.set(0, 0, 10.2);
ring.add(sphere8);
const module2 = new THREE.Mesh(cylinderGeo, hullMat);
module2.name = 'module2';
module2.position.set(6.9248, 0, 5.0312);
module2.rotation.set(deg(-66.875), deg(28.3938), deg(-41.9256));
ring.add(module2);
const box10 = new THREE.Mesh(boxGeo, windowMat);
box10.position.set(7.661, 0.05, 5.566);
box10.rotation.set(0, deg(144), 0);
ring.add(box10);
const box11 = new THREE.Mesh(boxGeo2, windowMat);
box11.position.set(7.0866, 0.92, 5.1487);
box11.rotation.set(0, deg(144), 0);
ring.add(box11);
const cylinder12 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder12.position.set(6.0093, 0, 6.2912);
cylinder12.rotation.set(deg(-66.875), deg(28.3938), deg(-41.9256));
ring.add(cylinder12);
const cylinder13 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder13.position.set(7.8402, 0, 3.7712);
cylinder13.rotation.set(deg(-66.875), deg(28.3938), deg(-41.9256));
ring.add(cylinder13);
const joint2 = new THREE.Mesh(cylinderGeo3, trimMat);
joint2.name = 'joint2';
joint2.position.set(5.2901, 0, 7.2812);
joint2.rotation.set(deg(-41.9256), deg(28.3938), deg(-66.875));
ring.add(joint2);
const module3 = new THREE.Mesh(cylinderGeo, hullMat);
module3.name = 'module3';
module3.position.set(8.5595, 0, 0);
module3.rotation.set(deg(-90), 0, 0);
ring.add(module3);
const box16 = new THREE.Mesh(boxGeo, windowMat);
box16.position.set(9.4695, 0.05, 0);
box16.rotation.set(0, deg(180), 0);
ring.add(box16);
const box17 = new THREE.Mesh(boxGeo2, windowMat);
box17.position.set(8.7595, 0.92, 0);
box17.rotation.set(0, deg(180), 0);
ring.add(box17);
const cylinder18 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder18.position.set(8.5595, 0, 1.5574);
cylinder18.rotation.set(deg(-90), 0, 0);
ring.add(cylinder18);
const cylinder19 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder19.position.set(8.5595, 0, -1.5574);
cylinder19.rotation.set(deg(-90), 0, 0);
ring.add(cylinder19);
const joint3 = new THREE.Mesh(cylinderGeo3, trimMat);
joint3.name = 'joint3';
joint3.position.set(8.5595, 0, 2.7812);
joint3.rotation.set(deg(-84.2664), deg(17.0911), deg(-18.8623));
ring.add(joint3);
const sphere21 = new THREE.Mesh(sphereGeo, greenMat);
sphere21.position.set(9.7008, 0, 3.152);
ring.add(sphere21);
const module4 = new THREE.Mesh(cylinderGeo, hullMat);
module4.name = 'module4';
module4.position.set(6.9248, 0, -5.0312);
module4.rotation.set(deg(-66.875), deg(-28.3938), deg(41.9256));
ring.add(module4);
const box23 = new THREE.Mesh(boxGeo, windowMat);
box23.position.set(7.661, 0.05, -5.566);
box23.rotation.set(0, deg(216), 0);
ring.add(box23);
const box24 = new THREE.Mesh(boxGeo2, windowMat);
box24.position.set(7.0866, 0.92, -5.1487);
box24.rotation.set(0, deg(216), 0);
ring.add(box24);
const cylinder25 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder25.position.set(7.8402, 0, -3.7712);
cylinder25.rotation.set(deg(-66.875), deg(-28.3938), deg(41.9256));
ring.add(cylinder25);
const cylinder26 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder26.position.set(6.0093, 0, -6.2912);
cylinder26.rotation.set(deg(-66.875), deg(-28.3938), deg(41.9256));
ring.add(cylinder26);
const joint4 = new THREE.Mesh(cylinderGeo3, trimMat);
joint4.name = 'joint4';
joint4.position.set(8.5595, 0, -2.7812);
joint4.rotation.set(deg(-84.2664), deg(-17.0911), deg(18.8623));
ring.add(joint4);
const module5 = new THREE.Mesh(cylinderGeo, hullMat);
module5.name = 'module5';
module5.position.set(2.645, 0, -8.1406);
module5.rotation.set(deg(-18.8623), deg(-17.0911), deg(84.2664));
ring.add(module5);
const box29 = new THREE.Mesh(boxGeo, windowMat);
box29.position.set(2.9262, 0.05, -9.006);
box29.rotation.set(0, deg(252), 0);
ring.add(box29);
const box30 = new THREE.Mesh(boxGeo2, windowMat);
box30.position.set(2.7068, 0.92, -8.3308);
box30.rotation.set(0, deg(252), 0);
ring.add(box30);
const cylinder31 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder31.position.set(4.1263, 0, -7.6593);
cylinder31.rotation.set(deg(-18.8623), deg(-17.0911), deg(84.2664));
ring.add(cylinder31);
const cylinder32 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder32.position.set(1.1638, 0, -8.6219);
cylinder32.rotation.set(deg(-18.8623), deg(-17.0911), deg(84.2664));
ring.add(cylinder32);
const joint5 = new THREE.Mesh(cylinderGeo3, trimMat);
joint5.name = 'joint5';
joint5.position.set(5.2901, 0, -7.2812);
joint5.rotation.set(deg(-41.9256), deg(-28.3938), deg(66.875));
ring.add(joint5);
const sphere34 = new THREE.Mesh(sphereGeo, redMat);
sphere34.position.set(5.9954, 0, -8.252);
ring.add(sphere34);
const module6 = new THREE.Mesh(cylinderGeo, hullMat);
module6.name = 'module6';
module6.position.set(-2.645, 0, -8.1406);
module6.rotation.set(deg(18.8623), deg(17.0911), deg(84.2664));
ring.add(module6);
const box36 = new THREE.Mesh(boxGeo, windowMat);
box36.position.set(-2.9262, 0.05, -9.006);
box36.rotation.set(0, deg(288), 0);
ring.add(box36);
const box37 = new THREE.Mesh(boxGeo2, windowMat);
box37.position.set(-2.7068, 0.92, -8.3308);
box37.rotation.set(0, deg(288), 0);
ring.add(box37);
const cylinder38 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder38.position.set(-1.1638, 0, -8.6219);
cylinder38.rotation.set(deg(18.8623), deg(17.0911), deg(84.2664));
ring.add(cylinder38);
const cylinder39 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder39.position.set(-4.1263, 0, -7.6593);
cylinder39.rotation.set(deg(18.8623), deg(17.0911), deg(84.2664));
ring.add(cylinder39);
const joint6 = new THREE.Mesh(cylinderGeo3, trimMat);
joint6.name = 'joint6';
joint6.position.set(0, 0, -9);
joint6.rotation.set(0, 0, deg(90));
ring.add(joint6);
const module7 = new THREE.Mesh(cylinderGeo, hullMat);
module7.name = 'module7';
module7.position.set(-6.9248, 0, -5.0312);
module7.rotation.set(deg(66.875), deg(28.3938), deg(41.9256));
ring.add(module7);
const box42 = new THREE.Mesh(boxGeo, windowMat);
box42.position.set(-7.661, 0.05, -5.566);
box42.rotation.set(0, deg(324), 0);
ring.add(box42);
const box43 = new THREE.Mesh(boxGeo2, windowMat);
box43.position.set(-7.0866, 0.92, -5.1487);
box43.rotation.set(0, deg(324), 0);
ring.add(box43);
const cylinder44 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder44.position.set(-6.0093, 0, -6.2912);
cylinder44.rotation.set(deg(66.875), deg(28.3938), deg(41.9256));
ring.add(cylinder44);
const cylinder45 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder45.position.set(-7.8402, 0, -3.7712);
cylinder45.rotation.set(deg(66.875), deg(28.3938), deg(41.9256));
ring.add(cylinder45);
const joint7 = new THREE.Mesh(cylinderGeo3, trimMat);
joint7.name = 'joint7';
joint7.position.set(-5.2901, 0, -7.2812);
joint7.rotation.set(deg(41.9256), deg(28.3938), deg(66.875));
ring.add(joint7);
const sphere47 = new THREE.Mesh(sphereGeo, greenMat);
sphere47.position.set(-5.9954, 0, -8.252);
ring.add(sphere47);
const module8 = new THREE.Mesh(cylinderGeo, hullMat);
module8.name = 'module8';
module8.position.set(-8.5595, 0, 0);
module8.rotation.set(deg(90), 0, 0);
ring.add(module8);
const box49 = new THREE.Mesh(boxGeo, windowMat);
box49.position.set(-9.4695, 0.05, 0);
box49.rotation.set(0, deg(360), 0);
ring.add(box49);
const box50 = new THREE.Mesh(boxGeo2, windowMat);
box50.position.set(-8.7595, 0.92, 0);
box50.rotation.set(0, deg(360), 0);
ring.add(box50);
const cylinder51 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder51.position.set(-8.5595, 0, -1.5574);
cylinder51.rotation.set(deg(90), 0, 0);
ring.add(cylinder51);
const cylinder52 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder52.position.set(-8.5595, 0, 1.5574);
cylinder52.rotation.set(deg(90), 0, 0);
ring.add(cylinder52);
const joint8 = new THREE.Mesh(cylinderGeo3, trimMat);
joint8.name = 'joint8';
joint8.position.set(-8.5595, 0, -2.7812);
joint8.rotation.set(deg(84.2664), deg(17.0911), deg(18.8623));
ring.add(joint8);
const module9 = new THREE.Mesh(cylinderGeo, hullMat);
module9.name = 'module9';
module9.position.set(-6.9248, 0, 5.0312);
module9.rotation.set(deg(66.875), deg(-28.3938), deg(-41.9256));
ring.add(module9);
const box55 = new THREE.Mesh(boxGeo, windowMat);
box55.position.set(-7.661, 0.05, 5.566);
box55.rotation.set(0, deg(396), 0);
ring.add(box55);
const box56 = new THREE.Mesh(boxGeo2, windowMat);
box56.position.set(-7.0866, 0.92, 5.1487);
box56.rotation.set(0, deg(396), 0);
ring.add(box56);
const cylinder57 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder57.position.set(-7.8402, 0, 3.7712);
cylinder57.rotation.set(deg(66.875), deg(-28.3938), deg(-41.9256));
ring.add(cylinder57);
const cylinder58 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder58.position.set(-6.0093, 0, 6.2912);
cylinder58.rotation.set(deg(66.875), deg(-28.3938), deg(-41.9256));
ring.add(cylinder58);
const joint9 = new THREE.Mesh(cylinderGeo3, trimMat);
joint9.name = 'joint9';
joint9.position.set(-8.5595, 0, 2.7812);
joint9.rotation.set(deg(84.2664), deg(-17.0911), deg(-18.8623));
ring.add(joint9);
const sphere60 = new THREE.Mesh(sphereGeo, redMat);
sphere60.position.set(-9.7008, 0, 3.152);
ring.add(sphere60);
const module10 = new THREE.Mesh(cylinderGeo, hullMat);
module10.name = 'module10';
module10.position.set(-2.645, 0, 8.1406);
module10.rotation.set(deg(18.8623), deg(-17.0911), deg(-84.2664));
ring.add(module10);
const box62 = new THREE.Mesh(boxGeo, windowMat);
box62.position.set(-2.9262, 0.05, 9.006);
box62.rotation.set(0, deg(432), 0);
ring.add(box62);
const box63 = new THREE.Mesh(boxGeo2, windowMat);
box63.position.set(-2.7068, 0.92, 8.3308);
box63.rotation.set(0, deg(432), 0);
ring.add(box63);
const cylinder64 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder64.position.set(-4.1263, 0, 7.6593);
cylinder64.rotation.set(deg(18.8623), deg(-17.0911), deg(-84.2664));
ring.add(cylinder64);
const cylinder65 = new THREE.Mesh(cylinderGeo2, trimMat);
cylinder65.position.set(-1.1638, 0, 8.6219);
cylinder65.rotation.set(deg(18.8623), deg(-17.0911), deg(-84.2664));
ring.add(cylinder65);
const joint10 = new THREE.Mesh(cylinderGeo3, trimMat);
joint10.name = 'joint10';
joint10.position.set(-5.2901, 0, 7.2812);
joint10.rotation.set(deg(41.9256), deg(-28.3938), deg(-66.875));
ring.add(joint10);
const spoke1 = new THREE.Mesh(cylinderGeo4, metalMat);
spoke1.name = 'spoke1';
spoke1.position.set(0.8343, 0, 5.2674);
spoke1.rotation.set(deg(88.5807), deg(-8.8883), deg(-9.1103));
root.add(spoke1);
const cylinder68 = new THREE.Mesh(cylinderGeo5, accentMat);
cylinder68.position.set(0.704, 0, 4.4446);
cylinder68.rotation.set(deg(88.5807), deg(-8.8883), deg(-9.1103));
root.add(cylinder68);
const spoke2 = new THREE.Mesh(cylinderGeo4, metalMat);
spoke2.name = 'spoke2';
spoke2.position.set(5.2674, 0, -0.8343);
spoke2.rotation.set(deg(-9.1103), deg(8.8883), deg(-88.5807));
root.add(spoke2);
const cylinder70 = new THREE.Mesh(cylinderGeo5, accentMat);
cylinder70.position.set(4.4446, 0, -0.704);
cylinder70.rotation.set(deg(-9.1103), deg(8.8883), deg(-88.5807));
root.add(cylinder70);
const spoke3 = new THREE.Mesh(cylinderGeo4, metalMat);
spoke3.name = 'spoke3';
spoke3.position.set(-0.8343, 0, -5.2674);
spoke3.rotation.set(deg(-88.5807), deg(-8.8883), deg(9.1103));
root.add(spoke3);
const cylinder72 = new THREE.Mesh(cylinderGeo5, accentMat);
cylinder72.position.set(-0.704, 0, -4.4446);
cylinder72.rotation.set(deg(-88.5807), deg(-8.8883), deg(9.1103));
root.add(cylinder72);
const spoke4 = new THREE.Mesh(cylinderGeo4, metalMat);
spoke4.name = 'spoke4';
spoke4.position.set(-5.2674, 0, 0.8343);
spoke4.rotation.set(deg(9.1103), deg(8.8883), deg(88.5807));
root.add(spoke4);
const cylinder74 = new THREE.Mesh(cylinderGeo5, accentMat);
cylinder74.position.set(-4.4446, 0, 0.704);
cylinder74.rotation.set(deg(9.1103), deg(8.8883), deg(88.5807));
root.add(cylinder74);
const hubDrum = new THREE.Mesh(new THREE.CylinderGeometry(2, 2, 1.4, 12), hullMat);
hubDrum.name = 'hubDrum';
root.add(hubDrum);
const hubRing = new THREE.Mesh(new THREE.TorusGeometry(2.05, 0.18, 4, 12), trimMat);
hubRing.name = 'hubRing';
hubRing.rotation.set(deg(90), 0, 0);
root.add(hubRing);
const hubBottom = new THREE.Mesh(new THREE.CylinderGeometry(2, 1.3, 0.8, 12), hullMat);
hubBottom.name = 'hubBottom';
hubBottom.position.set(0, -1.1, 0);
root.add(hubBottom);
const dockBottom = new THREE.Mesh(cylinderGeo6, trimMat);
dockBottom.name = 'dockBottom';
dockBottom.position.set(0, -2, 0);
root.add(dockBottom);
const dockLightBottom = new THREE.Mesh(cylinderGeo7, windowMat);
dockLightBottom.name = 'dockLightBottom';
dockLightBottom.position.set(0, -2.52, 0);
root.add(dockLightBottom);
const hubTop = new THREE.Mesh(new THREE.CylinderGeometry(1.3, 2, 0.8, 12), hullMat);
hubTop.name = 'hubTop';
hubTop.position.set(0, 1.1, 0);
root.add(hubTop);
const dockTop = new THREE.Mesh(cylinderGeo6, trimMat);
dockTop.name = 'dockTop';
dockTop.position.set(0, 2, 0);
root.add(dockTop);
const dockLightTop = new THREE.Mesh(cylinderGeo7, windowMat);
dockLightTop.name = 'dockLightTop';
dockLightTop.position.set(0, 2.52, 0);
root.add(dockLightTop);
const box83 = new THREE.Mesh(boxGeo3, windowMat);
box83.position.set(0, 0.3, 2.01);
root.add(box83);
const box84 = new THREE.Mesh(boxGeo3, windowMat);
box84.position.set(1.7407, 0.3, 1.005);
box84.rotation.set(0, deg(60), 0);
root.add(box84);
const box85 = new THREE.Mesh(boxGeo3, windowMat);
box85.position.set(1.7407, 0.3, -1.005);
box85.rotation.set(0, deg(120), 0);
root.add(box85);
const box86 = new THREE.Mesh(boxGeo3, windowMat);
box86.position.set(0, 0.3, -2.01);
box86.rotation.set(0, deg(180), 0);
root.add(box86);
const box87 = new THREE.Mesh(boxGeo3, windowMat);
box87.position.set(-1.7407, 0.3, -1.005);
box87.rotation.set(0, deg(240), 0);
root.add(box87);
const box88 = new THREE.Mesh(boxGeo3, windowMat);
box88.position.set(-1.7407, 0.3, 1.005);
box88.rotation.set(0, deg(300), 0);
root.add(box88);
const trussTop = new THREE.Group();
trussTop.name = 'trussTop';
root.add(trussTop);
const mast = new THREE.Mesh(cylinderGeo8, metalMat);
mast.name = 'mast';
mast.position.set(0, 5.6, 0);
trussTop.add(mast);
const cylinder91 = new THREE.Mesh(cylinderGeo9, accentMat);
cylinder91.position.set(0, 3.4, 0);
trussTop.add(cylinder91);
const cylinder92 = new THREE.Mesh(cylinderGeo9, accentMat);
cylinder92.position.set(0, 5.2, 0);
trussTop.add(cylinder92);
const cylinder93 = new THREE.Mesh(cylinderGeo9, accentMat);
cylinder93.position.set(0, 7, 0);
trussTop.add(cylinder93);
const solarWing = new THREE.Group();
solarWing.name = 'solarWing';
solarWing.position.set(0, 4.3, 0);
solarWing.rotation.set(0, deg(180), 0);
trussTop.add(solarWing);
const wingArm = new THREE.Mesh(boxGeo4, metalMat);
wingArm.name = 'wingArm';
wingArm.position.set(0, 0, 0.65);
solarWing.add(wingArm);
const wingPanel = new THREE.Group();
wingPanel.name = 'wingPanel';
wingPanel.position.set(0, 0, 2.3);
wingPanel.rotation.set(0, 0, deg(65));
solarWing.add(wingPanel);
const panel = new THREE.Mesh(boxGeo5, panelBackMat);
panel.name = 'panel';
wingPanel.add(panel);
const box98 = new THREE.Mesh(boxGeo6, cellMat);
box98.position.set(-1.4, 0, 0);
wingPanel.add(box98);
const box99 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel.add(box99);
const box100 = new THREE.Mesh(boxGeo6, cellMat);
box100.position.set(1.4, 0, 0);
wingPanel.add(box100);
const box101 = new THREE.Mesh(boxGeo7, metalMat);
box101.position.set(0, 0, -0.88);
wingPanel.add(box101);
const solarWing2 = new THREE.Group();
solarWing2.name = 'solarWing';
solarWing2.position.set(0, 4.3, 0);
trussTop.add(solarWing2);
const wingArm2 = new THREE.Mesh(boxGeo4, metalMat);
wingArm2.name = 'wingArm';
wingArm2.position.set(0, 0, 0.65);
solarWing2.add(wingArm2);
const wingPanel2 = new THREE.Group();
wingPanel2.name = 'wingPanel';
wingPanel2.position.set(0, 0, 2.3);
wingPanel2.rotation.set(0, 0, deg(65));
solarWing2.add(wingPanel2);
const panel2 = new THREE.Mesh(boxGeo5, panelBackMat);
panel2.name = 'panel';
wingPanel2.add(panel2);
const box106 = new THREE.Mesh(boxGeo6, cellMat);
box106.position.set(-1.4, 0, 0);
wingPanel2.add(box106);
const box107 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel2.add(box107);
const box108 = new THREE.Mesh(boxGeo6, cellMat);
box108.position.set(1.4, 0, 0);
wingPanel2.add(box108);
const box109 = new THREE.Mesh(boxGeo7, metalMat);
box109.position.set(0, 0, -0.88);
wingPanel2.add(box109);
const solarWing3 = new THREE.Group();
solarWing3.name = 'solarWing';
solarWing3.position.set(0, 6.6, 0);
solarWing3.rotation.set(0, deg(180), 0);
trussTop.add(solarWing3);
const wingArm3 = new THREE.Mesh(boxGeo4, metalMat);
wingArm3.name = 'wingArm';
wingArm3.position.set(0, 0, 0.65);
solarWing3.add(wingArm3);
const wingPanel3 = new THREE.Group();
wingPanel3.name = 'wingPanel';
wingPanel3.position.set(0, 0, 2.3);
wingPanel3.rotation.set(0, 0, deg(65));
solarWing3.add(wingPanel3);
const panel3 = new THREE.Mesh(boxGeo5, panelBackMat);
panel3.name = 'panel';
wingPanel3.add(panel3);
const box114 = new THREE.Mesh(boxGeo6, cellMat);
box114.position.set(-1.4, 0, 0);
wingPanel3.add(box114);
const box115 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel3.add(box115);
const box116 = new THREE.Mesh(boxGeo6, cellMat);
box116.position.set(1.4, 0, 0);
wingPanel3.add(box116);
const box117 = new THREE.Mesh(boxGeo7, metalMat);
box117.position.set(0, 0, -0.88);
wingPanel3.add(box117);
const solarWing4 = new THREE.Group();
solarWing4.name = 'solarWing';
solarWing4.position.set(0, 6.6, 0);
trussTop.add(solarWing4);
const wingArm4 = new THREE.Mesh(boxGeo4, metalMat);
wingArm4.name = 'wingArm';
wingArm4.position.set(0, 0, 0.65);
solarWing4.add(wingArm4);
const wingPanel4 = new THREE.Group();
wingPanel4.name = 'wingPanel';
wingPanel4.position.set(0, 0, 2.3);
wingPanel4.rotation.set(0, 0, deg(65));
solarWing4.add(wingPanel4);
const panel4 = new THREE.Mesh(boxGeo5, panelBackMat);
panel4.name = 'panel';
wingPanel4.add(panel4);
const box122 = new THREE.Mesh(boxGeo6, cellMat);
box122.position.set(-1.4, 0, 0);
wingPanel4.add(box122);
const box123 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel4.add(box123);
const box124 = new THREE.Mesh(boxGeo6, cellMat);
box124.position.set(1.4, 0, 0);
wingPanel4.add(box124);
const box125 = new THREE.Mesh(boxGeo7, metalMat);
box125.position.set(0, 0, -0.88);
wingPanel4.add(box125);
const trussBottom = new THREE.Group();
trussBottom.name = 'trussBottom';
trussBottom.rotation.set(0, deg(90), 0);
root.add(trussBottom);
const mast2 = new THREE.Mesh(cylinderGeo8, metalMat);
mast2.name = 'mast';
mast2.position.set(0, -5.6, 0);
trussBottom.add(mast2);
const cylinder128 = new THREE.Mesh(cylinderGeo9, accentMat);
cylinder128.position.set(0, -3.4, 0);
trussBottom.add(cylinder128);
const cylinder129 = new THREE.Mesh(cylinderGeo9, accentMat);
cylinder129.position.set(0, -5.2, 0);
trussBottom.add(cylinder129);
const cylinder130 = new THREE.Mesh(cylinderGeo9, accentMat);
cylinder130.position.set(0, -7, 0);
trussBottom.add(cylinder130);
const solarWing5 = new THREE.Group();
solarWing5.name = 'solarWing';
solarWing5.position.set(0, -4.3, 0);
solarWing5.rotation.set(0, deg(180), 0);
trussBottom.add(solarWing5);
const wingArm5 = new THREE.Mesh(boxGeo4, metalMat);
wingArm5.name = 'wingArm';
wingArm5.position.set(0, 0, 0.65);
solarWing5.add(wingArm5);
const wingPanel5 = new THREE.Group();
wingPanel5.name = 'wingPanel';
wingPanel5.position.set(0, 0, 2.3);
wingPanel5.rotation.set(0, 0, deg(65));
solarWing5.add(wingPanel5);
const panel5 = new THREE.Mesh(boxGeo5, panelBackMat);
panel5.name = 'panel';
wingPanel5.add(panel5);
const box135 = new THREE.Mesh(boxGeo6, cellMat);
box135.position.set(-1.4, 0, 0);
wingPanel5.add(box135);
const box136 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel5.add(box136);
const box137 = new THREE.Mesh(boxGeo6, cellMat);
box137.position.set(1.4, 0, 0);
wingPanel5.add(box137);
const box138 = new THREE.Mesh(boxGeo7, metalMat);
box138.position.set(0, 0, -0.88);
wingPanel5.add(box138);
const solarWing6 = new THREE.Group();
solarWing6.name = 'solarWing';
solarWing6.position.set(0, -4.3, 0);
trussBottom.add(solarWing6);
const wingArm6 = new THREE.Mesh(boxGeo4, metalMat);
wingArm6.name = 'wingArm';
wingArm6.position.set(0, 0, 0.65);
solarWing6.add(wingArm6);
const wingPanel6 = new THREE.Group();
wingPanel6.name = 'wingPanel';
wingPanel6.position.set(0, 0, 2.3);
wingPanel6.rotation.set(0, 0, deg(65));
solarWing6.add(wingPanel6);
const panel6 = new THREE.Mesh(boxGeo5, panelBackMat);
panel6.name = 'panel';
wingPanel6.add(panel6);
const box143 = new THREE.Mesh(boxGeo6, cellMat);
box143.position.set(-1.4, 0, 0);
wingPanel6.add(box143);
const box144 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel6.add(box144);
const box145 = new THREE.Mesh(boxGeo6, cellMat);
box145.position.set(1.4, 0, 0);
wingPanel6.add(box145);
const box146 = new THREE.Mesh(boxGeo7, metalMat);
box146.position.set(0, 0, -0.88);
wingPanel6.add(box146);
const solarWing7 = new THREE.Group();
solarWing7.name = 'solarWing';
solarWing7.position.set(0, -6.6, 0);
solarWing7.rotation.set(0, deg(180), 0);
trussBottom.add(solarWing7);
const wingArm7 = new THREE.Mesh(boxGeo4, metalMat);
wingArm7.name = 'wingArm';
wingArm7.position.set(0, 0, 0.65);
solarWing7.add(wingArm7);
const wingPanel7 = new THREE.Group();
wingPanel7.name = 'wingPanel';
wingPanel7.position.set(0, 0, 2.3);
wingPanel7.rotation.set(0, 0, deg(65));
solarWing7.add(wingPanel7);
const panel7 = new THREE.Mesh(boxGeo5, panelBackMat);
panel7.name = 'panel';
wingPanel7.add(panel7);
const box151 = new THREE.Mesh(boxGeo6, cellMat);
box151.position.set(-1.4, 0, 0);
wingPanel7.add(box151);
const box152 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel7.add(box152);
const box153 = new THREE.Mesh(boxGeo6, cellMat);
box153.position.set(1.4, 0, 0);
wingPanel7.add(box153);
const box154 = new THREE.Mesh(boxGeo7, metalMat);
box154.position.set(0, 0, -0.88);
wingPanel7.add(box154);
const solarWing8 = new THREE.Group();
solarWing8.name = 'solarWing';
solarWing8.position.set(0, -6.6, 0);
trussBottom.add(solarWing8);
const wingArm8 = new THREE.Mesh(boxGeo4, metalMat);
wingArm8.name = 'wingArm';
wingArm8.position.set(0, 0, 0.65);
solarWing8.add(wingArm8);
const wingPanel8 = new THREE.Group();
wingPanel8.name = 'wingPanel';
wingPanel8.position.set(0, 0, 2.3);
wingPanel8.rotation.set(0, 0, deg(65));
solarWing8.add(wingPanel8);
const panel8 = new THREE.Mesh(boxGeo5, panelBackMat);
panel8.name = 'panel';
wingPanel8.add(panel8);
const box159 = new THREE.Mesh(boxGeo6, cellMat);
box159.position.set(-1.4, 0, 0);
wingPanel8.add(box159);
const box160 = new THREE.Mesh(boxGeo6, cellMat);
wingPanel8.add(box160);
const box161 = new THREE.Mesh(boxGeo6, cellMat);
box161.position.set(1.4, 0, 0);
wingPanel8.add(box161);
const box162 = new THREE.Mesh(boxGeo7, metalMat);
box162.position.set(0, 0, -0.88);
wingPanel8.add(box162);
const commsDish = new THREE.Group();
commsDish.name = 'commsDish';
commsDish.position.set(0, 8.86, 0);
root.add(commsDish);
const dish = new THREE.Mesh(lathe([[0.001, 0], [0.4, 0.0667], [0.8, 0.2667], [1.2, 0.6]], 10), dishMat);
dish.name = 'dish';
commsDish.add(dish);
const feed = new THREE.Mesh(new THREE.CylinderGeometry(0.04, 0.04, 0.6, 4), metalMat);
feed.name = 'feed';
feed.position.set(0, 0.3, 0);
commsDish.add(feed);
const beaconTop = new THREE.Mesh(sphereGeo, redMat);
beaconTop.name = 'beaconTop';
beaconTop.position.set(0, 0.66, 0);
commsDish.add(beaconTop);
const thruster = new THREE.Mesh(new THREE.CylinderGeometry(0.5, 0.25, 0.6, 8), trimMat);
thruster.name = 'thruster';
thruster.position.set(0, -9.1, 0);
root.add(thruster);
const beaconBottom = new THREE.Mesh(sphereGeo, greenMat);
beaconBottom.name = 'beaconBottom';
beaconBottom.position.set(0, -9.5, 0);
root.add(beaconBottom);
root.traverse((o) => {
if (o.isMesh) {
o.castShadow = true;
o.receiveShadow = true;
}
});
return root;
}
export default createSpaceStation;
Ratings & comments
0 comments
No comments yet. Share how you used this model or what could be better.
Related models
Same category or similar tags









