Codels
2760 ポリゴン7.36 × 5.44 × 7.36 m
自己完結型の ES モジュールで、依存先は three のみです。ファクトリー関数を呼び出し、返された group をシーンに追加してください。
/**
 * Fusion Reactor — Codels 3D model library
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 2,760 · Size (W × H × D): 7.36 × 5.44 × 7.36 m
 *
 * Usage:
 *   import { createReactor } from './reactor.js';
 *   
 *   const model = createReactor();
 *   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);
}

// Tube along a smooth curve through the given points.
function tube(path, radius, tubularSegments, radialSegments, closed = false) {
  const curve = new THREE.CatmullRomCurve3(path.map(([x, y, z]) => new THREE.Vector3(x, y, z)), closed);
  return new THREE.TubeGeometry(curve, tubularSegments, radius, radialSegments, closed);
}

export function createReactor() {
  const root = new THREE.Group();
  root.name = 'Reactor';

  // Materials
  const shellMat = new THREE.MeshStandardMaterial({ name: 'shell', color: 0xd0d6de, roughness: 0.45, metalness: 0.3, flatShading: true });
  const darkMat = new THREE.MeshStandardMaterial({ name: 'dark', color: 0x2f343c, roughness: 0.6, metalness: 0.4, flatShading: true });
  const metalMat = new THREE.MeshStandardMaterial({ name: 'metal', color: 0x7d858f, roughness: 0.4, metalness: 0.6, flatShading: true });
  const hazardMat = new THREE.MeshStandardMaterial({ name: 'hazard', color: 0xf2b630, roughness: 0.55, metalness: 0.2, flatShading: true });
  const coreMat = new THREE.MeshStandardMaterial({ name: 'core', color: 0xa9f1ff, roughness: 0.3, emissive: 0x6fe8ff, emissiveIntensity: 1.5, flatShading: true });
  const fieldMat = new THREE.MeshStandardMaterial({ name: 'field', color: 0x3fe0ff, roughness: 0.2, emissive: 0x3fe0ff, emissiveIntensity: 0.8, transparent: true, opacity: 0.4, flatShading: true });
  const glowMat = new THREE.MeshStandardMaterial({ name: 'glow', color: 0x3fe0ff, roughness: 0.4, emissive: 0x3fe0ff, emissiveIntensity: 1.3, flatShading: true });
  const warnMat = new THREE.MeshStandardMaterial({ name: 'warn', color: 0xff8a3a, roughness: 0.4, emissive: 0xff7a26, emissiveIntensity: 1.2, flatShading: true });

  // Shared geometries
  const boxGeo = new THREE.BoxGeometry(0.24, 0.08, 0.04);
  const boxGeo2 = new THREE.BoxGeometry(0.2, 0.2, 0.22);
  const boxGeo3 = new THREE.BoxGeometry(0.5, 3.85, 0.42);
  const boxGeo4 = new THREE.BoxGeometry(0.56, 0.5, 0.48);
  const boxGeo5 = new THREE.BoxGeometry(0.12, 2.55, 0.05);
  const boxGeo6 = new THREE.BoxGeometry(0.36, 0.12, 0.05);
  const boxGeo7 = new THREE.BoxGeometry(0.3, 0.3, 1.45);
  const cylinderGeo = new THREE.CylinderGeometry(0.3, 0.3, 0.1, 8);
  const boxGeo8 = new THREE.BoxGeometry(0.9, 0.6, 0.7);
  const boxGeo9 = new THREE.BoxGeometry(0.7, 0.08, 0.04);
  const cylinderGeo2 = new THREE.CylinderGeometry(0.26, 0.26, 0.12, 8);

  // Parts
  const plinth = new THREE.Mesh(new THREE.CylinderGeometry(2.75, 2.95, 0.4, 8), darkMat);
  plinth.name = 'plinth';
  plinth.position.set(0, 0.2, 0);
  plinth.rotation.set(0, deg(22.5), 0);
  root.add(plinth);
  const plinthStep = new THREE.Mesh(new THREE.CylinderGeometry(2.35, 2.55, 0.3, 8), shellMat);
  plinthStep.name = 'plinthStep';
  plinthStep.position.set(0, 0.55, 0);
  plinthStep.rotation.set(0, deg(22.5), 0);
  root.add(plinthStep);
  const hazardBand = new THREE.Mesh(new THREE.CylinderGeometry(2.5, 2.5, 0.14, 16), darkMat);
  hazardBand.name = 'hazardBand';
  hazardBand.position.set(0, 0.54, 0);
  root.add(hazardBand);
  const hazard1 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, 0, 0.3927), hazardMat);
  hazard1.name = 'hazard1';
  hazard1.position.set(0, 0.54, 0);
  root.add(hazard1);
  const hazard2 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, Math.PI / 4, 0.3927), hazardMat);
  hazard2.name = 'hazard2';
  hazard2.position.set(0, 0.54, 0);
  root.add(hazard2);
  const hazard3 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, Math.PI / 2, 0.3927), hazardMat);
  hazard3.name = 'hazard3';
  hazard3.position.set(0, 0.54, 0);
  root.add(hazard3);
  const hazard4 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, Math.PI * 0.75, 0.3927), hazardMat);
  hazard4.name = 'hazard4';
  hazard4.position.set(0, 0.54, 0);
  root.add(hazard4);
  const hazard5 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, Math.PI, 0.3927), hazardMat);
  hazard5.name = 'hazard5';
  hazard5.position.set(0, 0.54, 0);
  root.add(hazard5);
  const hazard6 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, Math.PI * 1.25, 0.3927), hazardMat);
  hazard6.name = 'hazard6';
  hazard6.position.set(0, 0.54, 0);
  root.add(hazard6);
  const hazard7 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, Math.PI * 1.5, 0.3927), hazardMat);
  hazard7.name = 'hazard7';
  hazard7.position.set(0, 0.54, 0);
  root.add(hazard7);
  const hazard8 = new THREE.Mesh(new THREE.CylinderGeometry(2.52, 2.52, 0.14, 1, 1, false, Math.PI * 1.75, 0.3927), hazardMat);
  hazard8.name = 'hazard8';
  hazard8.position.set(0, 0.54, 0);
  root.add(hazard8);
  const vessel = new THREE.Mesh(lathe([[0, 0.7], [1.05, 0.7], [1.45, 1.15], [1.55, 1.65], [1.35, 1.75], [0.95, 1.55], [0, 1.55]], 12), shellMat);
  vessel.name = 'vessel';
  vessel.rotation.set(0, deg(15), 0);
  root.add(vessel);
  const vesselBand = new THREE.Mesh(new THREE.CylinderGeometry(1.58, 1.58, 0.14, 12), darkMat);
  vesselBand.name = 'vesselBand';
  vesselBand.position.set(0, 1.45, 0);
  vesselBand.rotation.set(0, deg(15), 0);
  root.add(vesselBand);
  const vesselLight1 = new THREE.Mesh(boxGeo, glowMat);
  vesselLight1.name = 'vesselLight1';
  vesselLight1.position.set(0.8, 1.45, 1.3856);
  vesselLight1.rotation.set(0, deg(30), 0);
  root.add(vesselLight1);
  const vesselLight2 = new THREE.Mesh(boxGeo, glowMat);
  vesselLight2.name = 'vesselLight2';
  vesselLight2.position.set(1.6, 1.45, 0);
  vesselLight2.rotation.set(0, deg(90), 0);
  root.add(vesselLight2);
  const vesselLight3 = new THREE.Mesh(boxGeo, glowMat);
  vesselLight3.name = 'vesselLight3';
  vesselLight3.position.set(0.8, 1.45, -1.3856);
  vesselLight3.rotation.set(0, deg(150), 0);
  root.add(vesselLight3);
  const vesselLight4 = new THREE.Mesh(boxGeo, glowMat);
  vesselLight4.name = 'vesselLight4';
  vesselLight4.position.set(-0.8, 1.45, -1.3856);
  vesselLight4.rotation.set(0, deg(210), 0);
  root.add(vesselLight4);
  const vesselLight5 = new THREE.Mesh(boxGeo, glowMat);
  vesselLight5.name = 'vesselLight5';
  vesselLight5.position.set(-1.6, 1.45, 0);
  vesselLight5.rotation.set(0, deg(270), 0);
  root.add(vesselLight5);
  const vesselLight6 = new THREE.Mesh(boxGeo, glowMat);
  vesselLight6.name = 'vesselLight6';
  vesselLight6.position.set(-0.8, 1.45, 1.3856);
  vesselLight6.rotation.set(0, deg(330), 0);
  root.add(vesselLight6);
  const coreSocket = new THREE.Mesh(new THREE.CylinderGeometry(0.45, 0.6, 0.5, 8), metalMat);
  coreSocket.name = 'coreSocket';
  coreSocket.position.set(0, 1.75, 0);
  root.add(coreSocket);
  const socketGlow = new THREE.Mesh(new THREE.CylinderGeometry(0.38, 0.38, 0.1, 8), glowMat);
  socketGlow.name = 'socketGlow';
  socketGlow.position.set(0, 2, 0);
  root.add(socketGlow);
  const plasmaCore = new THREE.Mesh(new THREE.IcosahedronGeometry(0.78, 1), coreMat);
  plasmaCore.name = 'plasmaCore';
  plasmaCore.position.set(0, 2.9, 0);
  root.add(plasmaCore);
  const containmentField = new THREE.Mesh(new THREE.IcosahedronGeometry(1, 1), fieldMat);
  containmentField.name = 'containmentField';
  containmentField.position.set(0, 2.9, 0);
  containmentField.rotation.set(0, deg(20), 0);
  root.add(containmentField);
  const cageRing1 = new THREE.Group();
  cageRing1.name = 'cageRing1';
  cageRing1.position.set(0, 2.9, 0);
  cageRing1.rotation.set(deg(90), 0, 0);
  root.add(cageRing1);
  const ring = new THREE.Mesh(new THREE.TorusGeometry(1.48, 0.08, 4, 24), darkMat);
  ring.name = 'ring';
  cageRing1.add(ring);
  const node1 = new THREE.Mesh(boxGeo2, glowMat);
  node1.name = 'node1';
  node1.position.set(1.0465, 1.0465, 0);
  node1.rotation.set(0, 0, deg(45));
  cageRing1.add(node1);
  const node2 = new THREE.Mesh(boxGeo2, glowMat);
  node2.name = 'node2';
  node2.position.set(-1.0465, 1.0465, 0);
  node2.rotation.set(0, 0, deg(135));
  cageRing1.add(node2);
  const node3 = new THREE.Mesh(boxGeo2, glowMat);
  node3.name = 'node3';
  node3.position.set(-1.0465, -1.0465, 0);
  node3.rotation.set(0, 0, deg(225));
  cageRing1.add(node3);
  const node4 = new THREE.Mesh(boxGeo2, glowMat);
  node4.name = 'node4';
  node4.position.set(1.0465, -1.0465, 0);
  node4.rotation.set(0, 0, deg(315));
  cageRing1.add(node4);
  const cageRing2 = new THREE.Group();
  cageRing2.name = 'cageRing2';
  cageRing2.position.set(0, 2.9, 0);
  cageRing2.rotation.set(deg(30), 0, deg(60));
  root.add(cageRing2);
  const ring2 = new THREE.Mesh(new THREE.TorusGeometry(1.36, 0.08, 4, 24), darkMat);
  ring2.name = 'ring';
  cageRing2.add(ring2);
  const node12 = new THREE.Mesh(boxGeo2, glowMat);
  node12.name = 'node1';
  node12.position.set(0.9617, 0.9617, 0);
  node12.rotation.set(0, 0, deg(45));
  cageRing2.add(node12);
  const node22 = new THREE.Mesh(boxGeo2, glowMat);
  node22.name = 'node2';
  node22.position.set(-0.9617, 0.9617, 0);
  node22.rotation.set(0, 0, deg(135));
  cageRing2.add(node22);
  const node32 = new THREE.Mesh(boxGeo2, glowMat);
  node32.name = 'node3';
  node32.position.set(-0.9617, -0.9617, 0);
  node32.rotation.set(0, 0, deg(225));
  cageRing2.add(node32);
  const node42 = new THREE.Mesh(boxGeo2, glowMat);
  node42.name = 'node4';
  node42.position.set(0.9617, -0.9617, 0);
  node42.rotation.set(0, 0, deg(315));
  cageRing2.add(node42);
  const cageRing3 = new THREE.Group();
  cageRing3.name = 'cageRing3';
  cageRing3.position.set(0, 2.9, 0);
  cageRing3.rotation.set(deg(-30), 0, deg(-60));
  root.add(cageRing3);
  const ring3 = new THREE.Mesh(new THREE.TorusGeometry(1.24, 0.08, 4, 24), darkMat);
  ring3.name = 'ring';
  cageRing3.add(ring3);
  const node13 = new THREE.Mesh(boxGeo2, glowMat);
  node13.name = 'node1';
  node13.position.set(0.8768, 0.8768, 0);
  node13.rotation.set(0, 0, deg(45));
  cageRing3.add(node13);
  const node23 = new THREE.Mesh(boxGeo2, glowMat);
  node23.name = 'node2';
  node23.position.set(-0.8768, 0.8768, 0);
  node23.rotation.set(0, 0, deg(135));
  cageRing3.add(node23);
  const node33 = new THREE.Mesh(boxGeo2, glowMat);
  node33.name = 'node3';
  node33.position.set(-0.8768, -0.8768, 0);
  node33.rotation.set(0, 0, deg(225));
  cageRing3.add(node33);
  const node43 = new THREE.Mesh(boxGeo2, glowMat);
  node43.name = 'node4';
  node43.position.set(0.8768, -0.8768, 0);
  node43.rotation.set(0, 0, deg(315));
  cageRing3.add(node43);
  const pillar1 = new THREE.Group();
  pillar1.name = 'pillar1';
  pillar1.position.set(1.4496, 0, 1.4496);
  pillar1.rotation.set(0, deg(45), 0);
  root.add(pillar1);
  const column = new THREE.Mesh(boxGeo3, shellMat);
  column.name = 'column';
  column.position.set(0, 2.625, 0);
  pillar1.add(column);
  const foot = new THREE.Mesh(boxGeo4, darkMat);
  foot.name = 'foot';
  foot.position.set(0, 0.95, 0);
  pillar1.add(foot);
  const innerStrip = new THREE.Mesh(boxGeo5, glowMat);
  innerStrip.name = 'innerStrip';
  innerStrip.position.set(0, 2.675, -0.22);
  pillar1.add(innerStrip);
  const warnLight = new THREE.Mesh(boxGeo6, warnMat);
  warnLight.name = 'warnLight';
  warnLight.position.set(0, 1.05, 0.22);
  pillar1.add(warnLight);
  const arm = new THREE.Mesh(boxGeo7, darkMat);
  arm.name = 'arm';
  arm.position.set(0, 4.45, -0.725);
  pillar1.add(arm);
  const pillar2 = new THREE.Group();
  pillar2.name = 'pillar2';
  pillar2.position.set(1.4496, 0, -1.4496);
  pillar2.rotation.set(0, deg(135), 0);
  root.add(pillar2);
  const column2 = new THREE.Mesh(boxGeo3, shellMat);
  column2.name = 'column';
  column2.position.set(0, 2.625, 0);
  pillar2.add(column2);
  const foot2 = new THREE.Mesh(boxGeo4, darkMat);
  foot2.name = 'foot';
  foot2.position.set(0, 0.95, 0);
  pillar2.add(foot2);
  const innerStrip2 = new THREE.Mesh(boxGeo5, glowMat);
  innerStrip2.name = 'innerStrip';
  innerStrip2.position.set(0, 2.675, -0.22);
  pillar2.add(innerStrip2);
  const warnLight2 = new THREE.Mesh(boxGeo6, warnMat);
  warnLight2.name = 'warnLight';
  warnLight2.position.set(0, 1.05, 0.22);
  pillar2.add(warnLight2);
  const arm2 = new THREE.Mesh(boxGeo7, darkMat);
  arm2.name = 'arm';
  arm2.position.set(0, 4.45, -0.725);
  pillar2.add(arm2);
  const pillar3 = new THREE.Group();
  pillar3.name = 'pillar3';
  pillar3.position.set(-1.4496, 0, -1.4496);
  pillar3.rotation.set(0, deg(225), 0);
  root.add(pillar3);
  const column3 = new THREE.Mesh(boxGeo3, shellMat);
  column3.name = 'column';
  column3.position.set(0, 2.625, 0);
  pillar3.add(column3);
  const foot3 = new THREE.Mesh(boxGeo4, darkMat);
  foot3.name = 'foot';
  foot3.position.set(0, 0.95, 0);
  pillar3.add(foot3);
  const innerStrip3 = new THREE.Mesh(boxGeo5, glowMat);
  innerStrip3.name = 'innerStrip';
  innerStrip3.position.set(0, 2.675, -0.22);
  pillar3.add(innerStrip3);
  const warnLight3 = new THREE.Mesh(boxGeo6, warnMat);
  warnLight3.name = 'warnLight';
  warnLight3.position.set(0, 1.05, 0.22);
  pillar3.add(warnLight3);
  const arm3 = new THREE.Mesh(boxGeo7, darkMat);
  arm3.name = 'arm';
  arm3.position.set(0, 4.45, -0.725);
  pillar3.add(arm3);
  const pillar4 = new THREE.Group();
  pillar4.name = 'pillar4';
  pillar4.position.set(-1.4496, 0, 1.4496);
  pillar4.rotation.set(0, deg(315), 0);
  root.add(pillar4);
  const column4 = new THREE.Mesh(boxGeo3, shellMat);
  column4.name = 'column';
  column4.position.set(0, 2.625, 0);
  pillar4.add(column4);
  const foot4 = new THREE.Mesh(boxGeo4, darkMat);
  foot4.name = 'foot';
  foot4.position.set(0, 0.95, 0);
  pillar4.add(foot4);
  const innerStrip4 = new THREE.Mesh(boxGeo5, glowMat);
  innerStrip4.name = 'innerStrip';
  innerStrip4.position.set(0, 2.675, -0.22);
  pillar4.add(innerStrip4);
  const warnLight4 = new THREE.Mesh(boxGeo6, warnMat);
  warnLight4.name = 'warnLight';
  warnLight4.position.set(0, 1.05, 0.22);
  pillar4.add(warnLight4);
  const arm4 = new THREE.Mesh(boxGeo7, darkMat);
  arm4.name = 'arm';
  arm4.position.set(0, 4.45, -0.725);
  pillar4.add(arm4);
  const emitterCap = new THREE.Mesh(lathe([[0, 3.95], [0.55, 3.95], [0.95, 4.1], [1.15, 4.45], [1, 4.8], [0.5, 4.95], [0, 4.95]], 12), shellMat);
  emitterCap.name = 'emitterCap';
  emitterCap.rotation.set(0, deg(15), 0);
  root.add(emitterCap);
  const capBand = new THREE.Mesh(new THREE.CylinderGeometry(1.17, 1.17, 0.12, 12), darkMat);
  capBand.name = 'capBand';
  capBand.position.set(0, 4.45, 0);
  capBand.rotation.set(0, deg(15), 0);
  root.add(capBand);
  const emitterNozzle = new THREE.Mesh(new THREE.CylinderGeometry(0.3, 0.45, 0.3, 8), metalMat);
  emitterNozzle.name = 'emitterNozzle';
  emitterNozzle.position.set(0, 3.85, 0);
  root.add(emitterNozzle);
  const emitterGlow = new THREE.Mesh(new THREE.CylinderGeometry(0.24, 0.24, 0.06, 8), glowMat);
  emitterGlow.name = 'emitterGlow';
  emitterGlow.position.set(0, 3.69, 0);
  root.add(emitterGlow);
  const ventStack = new THREE.Mesh(new THREE.CylinderGeometry(0.35, 0.45, 0.45, 8), darkMat);
  ventStack.name = 'ventStack';
  ventStack.position.set(0, 5.155, 0);
  root.add(ventStack);
  const ventLight = new THREE.Mesh(new THREE.CylinderGeometry(0.3, 0.3, 0.06, 8), warnMat);
  ventLight.name = 'ventLight';
  ventLight.position.set(0, 5.41, 0);
  root.add(ventLight);
  const coolantPipe1 = new THREE.Mesh(tube([[0, 1.2, 1.2], [0, 1.35, 1.9], [0, 1.3, 2.75], [0, 0.95, 3.25], [0, 0.7, 3.3]], 0.2, 10, 6), metalMat);
  coolantPipe1.name = 'coolantPipe1';
  root.add(coolantPipe1);
  const pipeFlange1 = new THREE.Mesh(cylinderGeo, darkMat);
  pipeFlange1.name = 'pipeFlange1';
  pipeFlange1.position.set(0, 1.34, 1.75);
  pipeFlange1.rotation.set(deg(90), deg(90), 0);
  root.add(pipeFlange1);
  const pump1 = new THREE.Group();
  pump1.name = 'pump1';
  pump1.position.set(0, 0, 3.3);
  root.add(pump1);
  const pumpBody = new THREE.Mesh(boxGeo8, shellMat);
  pumpBody.name = 'pumpBody';
  pumpBody.position.set(0, 0.3, 0);
  pump1.add(pumpBody);
  const pumpLight = new THREE.Mesh(boxGeo9, glowMat);
  pumpLight.name = 'pumpLight';
  pumpLight.position.set(0, 0.42, 0.36);
  pump1.add(pumpLight);
  const pumpCap = new THREE.Mesh(cylinderGeo2, darkMat);
  pumpCap.name = 'pumpCap';
  pumpCap.position.set(0, 0.66, 0);
  pump1.add(pumpCap);
  const coolantPipe2 = new THREE.Mesh(tube([[1.2, 1.2, 0], [1.9, 1.35, 0], [2.75, 1.3, 0], [3.25, 0.95, 0], [3.3, 0.7, 0]], 0.2, 10, 6), metalMat);
  coolantPipe2.name = 'coolantPipe2';
  root.add(coolantPipe2);
  const pipeFlange2 = new THREE.Mesh(cylinderGeo, darkMat);
  pipeFlange2.name = 'pipeFlange2';
  pipeFlange2.position.set(1.75, 1.34, 0);
  pipeFlange2.rotation.set(deg(-180), 0, deg(-90));
  root.add(pipeFlange2);
  const pump2 = new THREE.Group();
  pump2.name = 'pump2';
  pump2.position.set(3.3, 0, 0);
  pump2.rotation.set(0, deg(90), 0);
  root.add(pump2);
  const pumpBody2 = new THREE.Mesh(boxGeo8, shellMat);
  pumpBody2.name = 'pumpBody';
  pumpBody2.position.set(0, 0.3, 0);
  pump2.add(pumpBody2);
  const pumpLight2 = new THREE.Mesh(boxGeo9, glowMat);
  pumpLight2.name = 'pumpLight';
  pumpLight2.position.set(0, 0.42, 0.36);
  pump2.add(pumpLight2);
  const pumpCap2 = new THREE.Mesh(cylinderGeo2, darkMat);
  pumpCap2.name = 'pumpCap';
  pumpCap2.position.set(0, 0.66, 0);
  pump2.add(pumpCap2);
  const coolantPipe3 = new THREE.Mesh(tube([[0, 1.2, -1.2], [0, 1.35, -1.9], [0, 1.3, -2.75], [0, 0.95, -3.25], [0, 0.7, -3.3]], 0.2, 10, 6), metalMat);
  coolantPipe3.name = 'coolantPipe3';
  root.add(coolantPipe3);
  const pipeFlange3 = new THREE.Mesh(cylinderGeo, darkMat);
  pipeFlange3.name = 'pipeFlange3';
  pipeFlange3.position.set(0, 1.34, -1.75);
  pipeFlange3.rotation.set(deg(-90), deg(-90), 0);
  root.add(pipeFlange3);
  const pump3 = new THREE.Group();
  pump3.name = 'pump3';
  pump3.position.set(0, 0, -3.3);
  pump3.rotation.set(0, deg(180), 0);
  root.add(pump3);
  const pumpBody3 = new THREE.Mesh(boxGeo8, shellMat);
  pumpBody3.name = 'pumpBody';
  pumpBody3.position.set(0, 0.3, 0);
  pump3.add(pumpBody3);
  const pumpLight3 = new THREE.Mesh(boxGeo9, glowMat);
  pumpLight3.name = 'pumpLight';
  pumpLight3.position.set(0, 0.42, 0.36);
  pump3.add(pumpLight3);
  const pumpCap3 = new THREE.Mesh(cylinderGeo2, darkMat);
  pumpCap3.name = 'pumpCap';
  pumpCap3.position.set(0, 0.66, 0);
  pump3.add(pumpCap3);
  const coolantPipe4 = new THREE.Mesh(tube([[-1.2, 1.2, 0], [-1.9, 1.35, 0], [-2.75, 1.3, 0], [-3.25, 0.95, 0], [-3.3, 0.7, 0]], 0.2, 10, 6), metalMat);
  coolantPipe4.name = 'coolantPipe4';
  root.add(coolantPipe4);
  const pipeFlange4 = new THREE.Mesh(cylinderGeo, darkMat);
  pipeFlange4.name = 'pipeFlange4';
  pipeFlange4.position.set(-1.75, 1.34, 0);
  pipeFlange4.rotation.set(0, 0, deg(90));
  root.add(pipeFlange4);
  const pump4 = new THREE.Group();
  pump4.name = 'pump4';
  pump4.position.set(-3.3, 0, 0);
  pump4.rotation.set(0, deg(270), 0);
  root.add(pump4);
  const pumpBody4 = new THREE.Mesh(boxGeo8, shellMat);
  pumpBody4.name = 'pumpBody';
  pumpBody4.position.set(0, 0.3, 0);
  pump4.add(pumpBody4);
  const pumpLight4 = new THREE.Mesh(boxGeo9, glowMat);
  pumpLight4.name = 'pumpLight';
  pumpLight4.position.set(0, 0.42, 0.36);
  pump4.add(pumpLight4);
  const pumpCap4 = new THREE.Mesh(cylinderGeo2, darkMat);
  pumpCap4.name = 'pumpCap';
  pumpCap4.position.set(0, 0.66, 0);
  pump4.add(pumpCap4);

  root.traverse((o) => {
    if (o.isMesh) {
      o.castShadow = true;
      o.receiveShadow = true;
    }
  });
  return root;
}

export default createReactor;

評価とコメント

—
まだ評価はありません。最初の評価をしてみましょう。
5
0
4
0
3
0
2
0
1
0

評価やコメントをするにはログインしてください。

0 件のコメント

まだコメントはありません。このモデルの使い方や改善できる点を共有しましょう。

関連モデル

同じカテゴリまたは似たタグ