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

// Extrude a 2D outline along Z (centered). bevel = [thickness, size, segments].
function extrude(outline, depth, holes = [], bevel = null) {
  const shape = new THREE.Shape(outline.map(([x, y]) => new THREE.Vector2(x, y)));
  for (const hole of holes) shape.holes.push(new THREE.Path(hole.map(([x, y]) => new THREE.Vector2(x, y))));
  const options = bevel
    ? { depth, bevelEnabled: true, bevelThickness: bevel[0], bevelSize: bevel[1], bevelSegments: bevel[2] }
    : { depth, bevelEnabled: false };
  return new THREE.ExtrudeGeometry(shape, options).translate(0, 0, -depth / 2);
}

// 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 createJeep() {
  const root = new THREE.Group();
  root.name = 'Jeep';

  // Materials
  const paintMat = new THREE.MeshStandardMaterial({ name: 'paint', color: 0x5e7a3c, roughness: 0.6, metalness: 0.1, flatShading: true });
  const trimMat = new THREE.MeshStandardMaterial({ name: 'trim', color: 0x232427, roughness: 0.85, flatShading: true });
  const metalMat = new THREE.MeshStandardMaterial({ name: 'metal', color: 0x4a4d52, roughness: 0.5, metalness: 0.5, flatShading: true });
  const steelMat = new THREE.MeshStandardMaterial({ name: 'steel', color: 0x9aa0a6, roughness: 0.4, metalness: 0.55, flatShading: true });
  const seatMat = new THREE.MeshStandardMaterial({ name: 'seat', color: 0x3b3029, roughness: 0.9, flatShading: true });
  const glassMat = new THREE.MeshStandardMaterial({ name: 'glass', color: 0x2a3644, roughness: 0.2, metalness: 0.3, flatShading: true });
  const headlightMat = new THREE.MeshStandardMaterial({ name: 'headlight', color: 0xfff4d6, roughness: 0.3, emissive: 0xffe2a0, emissiveIntensity: 0.9, flatShading: true });
  const taillightMat = new THREE.MeshStandardMaterial({ name: 'taillight', color: 0xd81e28, roughness: 0.3, emissive: 0xff2020, emissiveIntensity: 0.7, flatShading: true });

  // Shared geometries
  const extrudeGeo = extrude([[-1.85, 0.55], [-1.6854, 0.55], [-1.6197, 0.7017], [-1.5082, 0.8237], [-1.363, 0.9027], [-1.2, 0.93], [-1.037, 0.9027], [-0.8918, 0.8237], [-0.7803, 0.7017], [-0.7146, 0.55], [0.62, 0.55], [0.62, 1.2], [0.5, 1.2], [0.44, 1.06], [0.32, 0.96], [-0.32, 0.96], [-0.46, 1.06], [-0.54, 1.2], [-1.85, 1.2]], 0.05, [], [0.015, 0.015, 1]);
  const torusGeo = new THREE.TorusGeometry(0.52, 0.055, 4, 8, 2.6759);
  const extrudeGeo2 = extrude([[0.58, 1.04], [1.52, 1.04], [1.98, 0.8], [1.98, 0.86], [1.54, 1.1], [0.58, 1.1]], 0.36, [], [0.01, 0.01, 1]);
  const boxGeo = new THREE.BoxGeometry(0.16, 0.06, 1.2);
  const boxGeo2 = new THREE.BoxGeometry(0.09, 0.15, 0.03);
  const boxGeo3 = new THREE.BoxGeometry(0.03, 0.06, 0.03);
  const boxGeo4 = new THREE.BoxGeometry(0.05, 0.26, 0.02);
  const cylinderGeo = new THREE.CylinderGeometry(0.1, 0.1, 0.04, 10);
  const cylinderGeo2 = new THREE.CylinderGeometry(0.08, 0.08, 0.02, 10);
  const boxGeo5 = new THREE.BoxGeometry(0.08, 0.05, 0.03);
  const torusGeo2 = new THREE.TorusGeometry(0.045, 0.014, 3, 6);
  const cylinderGeo3 = new THREE.CylinderGeometry(0.05, 0.05, 1.36, 6);
  const sphereGeo = new THREE.SphereGeometry(0.13, 6, 4);
  const boxGeo6 = new THREE.BoxGeometry(0.06, 0.46, 0.05);
  const boxGeo7 = new THREE.BoxGeometry(0.12, 0.08, 0.03);
  const boxGeo8 = new THREE.BoxGeometry(0.46, 0.14, 0.46);
  const boxGeo9 = new THREE.BoxGeometry(0.12, 0.13, 0.4);
  const boxGeo10 = new THREE.BoxGeometry(0.44, 0.62, 0.12);
  const cylinderGeo4 = new THREE.CylinderGeometry(0.035, 0.035, 1.2207, 6);
  const cylinderGeo5 = new THREE.CylinderGeometry(0.035, 0.03, 1.0206, 6);
  const cylinderGeo6 = new THREE.CylinderGeometry(0.065, 0.055, 0.1, 8);
  const circleGeo = new THREE.CircleGeometry(0.055, 8);
  const cylinderGeo7 = new THREE.CylinderGeometry(0.1042, 0.124, 0.05, 8);
  const cylinderGeo8 = new THREE.CylinderGeometry(0.0496, 0.0645, 0.04, 6);
  const latheGeo = lathe([[0.248, -0.114], [0.248, -0.15], [0.3538, -0.15], [0.4, -0.084], [0.4, 0.084], [0.3538, 0.15], [0.248, 0.15], [0.248, 0.114]], 12, 0, Math.PI * 2);
  const cylinderGeo9 = new THREE.CylinderGeometry(0.248, 0.248, 0.228, 12);
  const boxGeo11 = new THREE.BoxGeometry(0.168, 0.038, 0.0898);

  // Parts
  const body = new THREE.Group();
  body.name = 'body';
  root.add(body);
  const tubSideL = new THREE.Mesh(extrudeGeo, paintMat);
  tubSideL.name = 'tubSideL';
  tubSideL.position.set(0.715, 0, 0);
  tubSideL.rotation.set(0, deg(-90), 0);
  body.add(tubSideL);
  const flareL = new THREE.Mesh(torusGeo, trimMat);
  flareL.name = 'flareL';
  flareL.position.set(0.76, 0.43, -1.2);
  flareL.rotation.set(deg(13.3424), deg(90), 0);
  body.add(flareL);
  const fenderL = new THREE.Mesh(extrudeGeo2, paintMat);
  fenderL.name = 'fenderL';
  fenderL.position.set(0.8, 0, 0);
  fenderL.rotation.set(0, deg(-90), 0);
  body.add(fenderL);
  const stepL = new THREE.Mesh(boxGeo, trimMat);
  stepL.name = 'stepL';
  stepL.position.set(0.8, 0.56, 0.02);
  body.add(stepL);
  const taillightL = new THREE.Mesh(boxGeo2, taillightMat);
  taillightL.name = 'taillightL';
  taillightL.position.set(0.6, 1, -1.885);
  body.add(taillightL);
  const box7 = new THREE.Mesh(boxGeo3, trimMat);
  box7.position.set(0.63, 1.08, 1.5);
  body.add(box7);
  const tubSideR = new THREE.Mesh(extrudeGeo, paintMat);
  tubSideR.name = 'tubSideR';
  tubSideR.position.set(-0.715, 0, 0);
  tubSideR.rotation.set(0, deg(-90), 0);
  body.add(tubSideR);
  const flareR = new THREE.Mesh(torusGeo, trimMat);
  flareR.name = 'flareR';
  flareR.position.set(-0.76, 0.43, -1.2);
  flareR.rotation.set(deg(13.3424), deg(90), 0);
  body.add(flareR);
  const fenderR = new THREE.Mesh(extrudeGeo2, paintMat);
  fenderR.name = 'fenderR';
  fenderR.position.set(-0.8, 0, 0);
  fenderR.rotation.set(0, deg(-90), 0);
  body.add(fenderR);
  const stepR = new THREE.Mesh(boxGeo, trimMat);
  stepR.name = 'stepR';
  stepR.position.set(-0.8, 0.56, 0.02);
  body.add(stepR);
  const taillightR = new THREE.Mesh(boxGeo2, taillightMat);
  taillightR.name = 'taillightR';
  taillightR.position.set(-0.6, 1, -1.885);
  body.add(taillightR);
  const box13 = new THREE.Mesh(boxGeo3, trimMat);
  box13.position.set(-0.63, 1.08, 1.5);
  body.add(box13);
  const floor = new THREE.Mesh(new THREE.BoxGeometry(1.44, 0.06, 2.46), trimMat);
  floor.name = 'floor';
  floor.position.set(0, 0.59, -0.615);
  body.add(floor);
  const tailgate = new THREE.Mesh(new THREE.BoxGeometry(1.47, 0.65, 0.06), paintMat);
  tailgate.name = 'tailgate';
  tailgate.position.set(0, 0.875, -1.84);
  body.add(tailgate);
  const cowl = new THREE.Mesh(new THREE.BoxGeometry(1.44, 0.18, 0.14), paintMat);
  cowl.name = 'cowl';
  cowl.position.set(0, 1.14, 0.58);
  body.add(cowl);
  const dashboard = new THREE.Mesh(new THREE.BoxGeometry(1.3, 0.12, 0.22), trimMat);
  dashboard.name = 'dashboard';
  dashboard.position.set(0, 1.06, 0.45);
  body.add(dashboard);
  const firewall = new THREE.Mesh(new THREE.BoxGeometry(1.3, 0.5, 0.05), trimMat);
  firewall.name = 'firewall';
  firewall.position.set(0, 0.8, 0.56);
  body.add(firewall);
  const hood = new THREE.Mesh(new THREE.BoxGeometry(1.24, 0.5, 1.3), paintMat);
  hood.name = 'hood';
  hood.position.set(0, 0.89, 1.27);
  body.add(hood);
  const hoodPanel = new THREE.Mesh(new THREE.BoxGeometry(1.12, 0.02, 1), paintMat);
  hoodPanel.name = 'hoodPanel';
  hoodPanel.position.set(0, 1.15, 1.25);
  body.add(hoodPanel);
  const grille = new THREE.Mesh(new THREE.BoxGeometry(1.22, 0.5, 0.04), paintMat);
  grille.name = 'grille';
  grille.position.set(0, 0.89, 1.94);
  body.add(grille);
  const grilleSlot1 = new THREE.Mesh(boxGeo4, trimMat);
  grilleSlot1.name = 'grilleSlot1';
  grilleSlot1.position.set(-0.255, 0.86, 1.965);
  body.add(grilleSlot1);
  const grilleSlot2 = new THREE.Mesh(boxGeo4, trimMat);
  grilleSlot2.name = 'grilleSlot2';
  grilleSlot2.position.set(-0.17, 0.86, 1.965);
  body.add(grilleSlot2);
  const grilleSlot3 = new THREE.Mesh(boxGeo4, trimMat);
  grilleSlot3.name = 'grilleSlot3';
  grilleSlot3.position.set(-0.085, 0.86, 1.965);
  body.add(grilleSlot3);
  const grilleSlot4 = new THREE.Mesh(boxGeo4, trimMat);
  grilleSlot4.name = 'grilleSlot4';
  grilleSlot4.position.set(0, 0.86, 1.965);
  body.add(grilleSlot4);
  const grilleSlot5 = new THREE.Mesh(boxGeo4, trimMat);
  grilleSlot5.name = 'grilleSlot5';
  grilleSlot5.position.set(0.085, 0.86, 1.965);
  body.add(grilleSlot5);
  const grilleSlot6 = new THREE.Mesh(boxGeo4, trimMat);
  grilleSlot6.name = 'grilleSlot6';
  grilleSlot6.position.set(0.17, 0.86, 1.965);
  body.add(grilleSlot6);
  const grilleSlot7 = new THREE.Mesh(boxGeo4, trimMat);
  grilleSlot7.name = 'grilleSlot7';
  grilleSlot7.position.set(0.255, 0.86, 1.965);
  body.add(grilleSlot7);
  const cylinder29 = new THREE.Mesh(cylinderGeo, steelMat);
  cylinder29.position.set(0.44, 0.92, 1.97);
  cylinder29.rotation.set(deg(90), 0, 0);
  body.add(cylinder29);
  const headlightL = new THREE.Mesh(cylinderGeo2, headlightMat);
  headlightL.name = 'headlightL';
  headlightL.position.set(0.44, 0.92, 1.995);
  headlightL.rotation.set(deg(90), 0, 0);
  body.add(headlightL);
  const box31 = new THREE.Mesh(boxGeo5, taillightMat);
  box31.position.set(0.44, 0.72, 1.97);
  body.add(box31);
  const cylinder32 = new THREE.Mesh(cylinderGeo, steelMat);
  cylinder32.position.set(-0.44, 0.92, 1.97);
  cylinder32.rotation.set(deg(90), 0, 0);
  body.add(cylinder32);
  const headlightR = new THREE.Mesh(cylinderGeo2, headlightMat);
  headlightR.name = 'headlightR';
  headlightR.position.set(-0.44, 0.92, 1.995);
  headlightR.rotation.set(deg(90), 0, 0);
  body.add(headlightR);
  const box34 = new THREE.Mesh(boxGeo5, taillightMat);
  box34.position.set(-0.44, 0.72, 1.97);
  body.add(box34);
  const bumperFront = new THREE.Mesh(new THREE.BoxGeometry(1.86, 0.16, 0.2), metalMat);
  bumperFront.name = 'bumperFront';
  bumperFront.position.set(0, 0.56, 2.02);
  body.add(bumperFront);
  const torus36 = new THREE.Mesh(torusGeo2, taillightMat);
  torus36.position.set(0.5, 0.5, 2.12);
  body.add(torus36);
  const torus37 = new THREE.Mesh(torusGeo2, taillightMat);
  torus37.position.set(-0.5, 0.5, 2.12);
  body.add(torus37);
  const bumperRear = new THREE.Mesh(new THREE.BoxGeometry(1.6, 0.14, 0.16), metalMat);
  bumperRear.name = 'bumperRear';
  bumperRear.position.set(0, 0.5, -1.95);
  body.add(bumperRear);
  const chassis = new THREE.Mesh(new THREE.BoxGeometry(1, 0.24, 3.7), trimMat);
  chassis.name = 'chassis';
  chassis.position.set(0, 0.5, 0.02);
  body.add(chassis);
  const cylinder40 = new THREE.Mesh(cylinderGeo3, metalMat);
  cylinder40.position.set(0, 0.43, 1.2);
  cylinder40.rotation.set(0, 0, deg(90));
  body.add(cylinder40);
  const sphere41 = new THREE.Mesh(sphereGeo, metalMat);
  sphere41.position.set(0.12, 0.43, 1.2);
  body.add(sphere41);
  const cylinder42 = new THREE.Mesh(cylinderGeo3, metalMat);
  cylinder42.position.set(0, 0.43, -1.2);
  cylinder42.rotation.set(0, 0, deg(90));
  body.add(cylinder42);
  const sphere43 = new THREE.Mesh(sphereGeo, metalMat);
  sphere43.position.set(0.12, 0.43, -1.2);
  body.add(sphere43);
  const windshield = new THREE.Group();
  windshield.name = 'windshield';
  windshield.position.set(0, 1.22, 0.57);
  windshield.rotation.set(deg(-14), 0, 0);
  body.add(windshield);
  const box45 = new THREE.Mesh(boxGeo6, paintMat);
  box45.position.set(0.7, 0.23, 0);
  windshield.add(box45);
  const mirrorL = new THREE.Mesh(boxGeo7, trimMat);
  mirrorL.name = 'mirrorL';
  mirrorL.position.set(0.82, 0.18, 0);
  windshield.add(mirrorL);
  const box47 = new THREE.Mesh(boxGeo6, paintMat);
  box47.position.set(-0.7, 0.23, 0);
  windshield.add(box47);
  const mirrorR = new THREE.Mesh(boxGeo7, trimMat);
  mirrorR.name = 'mirrorR';
  mirrorR.position.set(-0.82, 0.18, 0);
  windshield.add(mirrorR);
  const windshieldTop = new THREE.Mesh(new THREE.BoxGeometry(1.46, 0.06, 0.06), paintMat);
  windshieldTop.name = 'windshieldTop';
  windshieldTop.position.set(0, 0.45, 0);
  windshield.add(windshieldTop);
  const box50 = new THREE.Mesh(new THREE.BoxGeometry(1.46, 0.05, 0.06), paintMat);
  box50.position.set(0, 0.025, 0);
  windshield.add(box50);
  const windshieldGlass = new THREE.Mesh(new THREE.BoxGeometry(1.34, 0.34, 0.02), glassMat);
  windshieldGlass.name = 'windshieldGlass';
  windshieldGlass.position.set(0, 0.23, 0);
  windshield.add(windshieldGlass);
  const seatL = new THREE.Mesh(boxGeo8, seatMat);
  seatL.name = 'seatL';
  seatL.position.set(0.36, 0.82, -0.12);
  body.add(seatL);
  const box53 = new THREE.Mesh(boxGeo9, trimMat);
  box53.position.set(0.36, 0.685, -0.12);
  body.add(box53);
  const box54 = new THREE.Mesh(boxGeo10, seatMat);
  box54.position.set(0.36, 1.07, -0.38);
  box54.rotation.set(deg(-10), 0, 0);
  body.add(box54);
  const seatR = new THREE.Mesh(boxGeo8, seatMat);
  seatR.name = 'seatR';
  seatR.position.set(-0.36, 0.82, -0.12);
  body.add(seatR);
  const box56 = new THREE.Mesh(boxGeo9, trimMat);
  box56.position.set(-0.36, 0.685, -0.12);
  body.add(box56);
  const box57 = new THREE.Mesh(boxGeo10, seatMat);
  box57.position.set(-0.36, 1.07, -0.38);
  box57.rotation.set(deg(-10), 0, 0);
  body.add(box57);
  const rearBench = new THREE.Mesh(new THREE.BoxGeometry(1.24, 0.14, 0.46), seatMat);
  rearBench.name = 'rearBench';
  rearBench.position.set(0, 0.82, -1.32);
  body.add(rearBench);
  const box59 = new THREE.Mesh(new THREE.BoxGeometry(1.24, 0.12, 0.42), trimMat);
  box59.position.set(0, 0.68, -1.32);
  body.add(box59);
  const box60 = new THREE.Mesh(new THREE.BoxGeometry(1.24, 0.5, 0.12), seatMat);
  box60.position.set(0, 1.02, -1.6);
  box60.rotation.set(deg(-8), 0, 0);
  body.add(box60);
  const steeringWheel = new THREE.Mesh(new THREE.TorusGeometry(0.17, 0.022, 3, 10), trimMat);
  steeringWheel.name = 'steeringWheel';
  steeringWheel.position.set(0.36, 1.28, 0.3);
  steeringWheel.rotation.set(deg(25), 0, 0);
  body.add(steeringWheel);
  const cylinder62 = new THREE.Mesh(new THREE.CylinderGeometry(0.025, 0.025, 0.2973, 5), trimMat);
  cylinder62.position.set(0.36, 1.18, 0.41);
  cylinder62.rotation.set(deg(-47.7263), 0, 0);
  body.add(cylinder62);
  const rollBarFront = new THREE.Mesh(tube([[0.66, 1.2, -0.5], [0.66, 1.7, -0.5], [0.6, 1.82, -0.5], [-0.6, 1.82, -0.5], [-0.66, 1.7, -0.5], [-0.66, 1.2, -0.5]], 0.035, 10, 6), trimMat);
  rollBarFront.name = 'rollBarFront';
  body.add(rollBarFront);
  const rollBarRear = new THREE.Mesh(tube([[0.66, 1.2, -1.72], [0.66, 1.66, -1.72], [0.6, 1.78, -1.72], [-0.6, 1.78, -1.72], [-0.66, 1.66, -1.72], [-0.66, 1.2, -1.72]], 0.035, 10, 6), trimMat);
  rollBarRear.name = 'rollBarRear';
  body.add(rollBarRear);
  const cylinder65 = new THREE.Mesh(cylinderGeo4, trimMat);
  cylinder65.position.set(0.62, 1.8, -1.11);
  cylinder65.rotation.set(deg(-91.8779), 0, 0);
  body.add(cylinder65);
  const cylinder66 = new THREE.Mesh(cylinderGeo5, trimMat);
  cylinder66.position.set(0.64, 1.72, 0);
  cylinder66.rotation.set(deg(-78.6179), deg(-1.8401), deg(2.2473));
  body.add(cylinder66);
  const cylinder67 = new THREE.Mesh(cylinderGeo4, trimMat);
  cylinder67.position.set(-0.62, 1.8, -1.11);
  cylinder67.rotation.set(deg(-91.8779), 0, 0);
  body.add(cylinder67);
  const cylinder68 = new THREE.Mesh(cylinderGeo5, trimMat);
  cylinder68.position.set(-0.64, 1.72, 0);
  cylinder68.rotation.set(deg(-78.6179), deg(1.8401), deg(-2.2473));
  body.add(cylinder68);
  const lightBracket = new THREE.Mesh(new THREE.BoxGeometry(0.9, 0.05, 0.06), trimMat);
  lightBracket.name = 'lightBracket';
  lightBracket.position.set(0, 1.86, -0.5);
  body.add(lightBracket);
  const cylinder70 = new THREE.Mesh(cylinderGeo6, trimMat);
  cylinder70.position.set(-0.36, 1.95, -0.48);
  cylinder70.rotation.set(deg(90), 0, 0);
  body.add(cylinder70);
  const spotlight1 = new THREE.Mesh(circleGeo, headlightMat);
  spotlight1.name = 'spotlight1';
  spotlight1.position.set(-0.36, 1.95, -0.428);
  body.add(spotlight1);
  const cylinder72 = new THREE.Mesh(cylinderGeo6, trimMat);
  cylinder72.position.set(-0.12, 1.95, -0.48);
  cylinder72.rotation.set(deg(90), 0, 0);
  body.add(cylinder72);
  const spotlight2 = new THREE.Mesh(circleGeo, headlightMat);
  spotlight2.name = 'spotlight2';
  spotlight2.position.set(-0.12, 1.95, -0.428);
  body.add(spotlight2);
  const cylinder74 = new THREE.Mesh(cylinderGeo6, trimMat);
  cylinder74.position.set(0.12, 1.95, -0.48);
  cylinder74.rotation.set(deg(90), 0, 0);
  body.add(cylinder74);
  const spotlight3 = new THREE.Mesh(circleGeo, headlightMat);
  spotlight3.name = 'spotlight3';
  spotlight3.position.set(0.12, 1.95, -0.428);
  body.add(spotlight3);
  const cylinder76 = new THREE.Mesh(cylinderGeo6, trimMat);
  cylinder76.position.set(0.36, 1.95, -0.48);
  cylinder76.rotation.set(deg(90), 0, 0);
  body.add(cylinder76);
  const spotlight4 = new THREE.Mesh(circleGeo, headlightMat);
  spotlight4.name = 'spotlight4';
  spotlight4.position.set(0.36, 1.95, -0.428);
  body.add(spotlight4);
  const spareMount = new THREE.Mesh(new THREE.BoxGeometry(0.12, 0.12, 0.14), metalMat);
  spareMount.name = 'spareMount';
  spareMount.position.set(0, 1.02, -1.93);
  body.add(spareMount);
  const spareTire = new THREE.Group();
  spareTire.name = 'spareTire';
  spareTire.position.set(0, 1.02, -2.1);
  spareTire.rotation.set(0, deg(90), 0);
  body.add(spareTire);
  const tire = new THREE.Mesh(lathe([[0.248, -0.114], [0.248, -0.15], [0.3538, -0.15], [0.4, -0.084], [0.4, 0.084], [0.3538, 0.15], [0.248, 0.15], [0.248, 0.114]], 10, 0.3142, Math.PI * 2), trimMat);
  tire.name = 'tire';
  tire.rotation.set(0, 0, deg(90));
  spareTire.add(tire);
  const rim = new THREE.Mesh(new THREE.CylinderGeometry(0.248, 0.248, 0.228, 10), steelMat);
  rim.name = 'rim';
  rim.rotation.set(0, 0, deg(90));
  spareTire.add(rim);
  const hub = new THREE.Mesh(cylinderGeo7, trimMat);
  hub.name = 'hub';
  hub.position.set(0.134, 0, 0);
  hub.rotation.set(0, 0, deg(-90));
  spareTire.add(hub);
  const hubCap = new THREE.Mesh(cylinderGeo8, metalMat);
  hubCap.name = 'hubCap';
  hubCap.position.set(0.174, 0, 0);
  hubCap.rotation.set(0, 0, deg(-90));
  spareTire.add(hubCap);
  const wheels = new THREE.Group();
  wheels.name = 'wheels';
  root.add(wheels);
  const wheelFL = new THREE.Group();
  wheelFL.name = 'wheelFL';
  wheelFL.position.set(0.8, 0.43, 1.2);
  wheels.add(wheelFL);
  const tire2 = new THREE.Mesh(latheGeo, trimMat);
  tire2.name = 'tire';
  tire2.rotation.set(0, 0, deg(90));
  wheelFL.add(tire2);
  const rim2 = new THREE.Mesh(cylinderGeo9, steelMat);
  rim2.name = 'rim';
  rim2.rotation.set(0, 0, deg(90));
  wheelFL.add(rim2);
  const hub2 = new THREE.Mesh(cylinderGeo7, trimMat);
  hub2.name = 'hub';
  hub2.position.set(0.134, 0, 0);
  hub2.rotation.set(0, 0, deg(-90));
  wheelFL.add(hub2);
  const hubCap2 = new THREE.Mesh(cylinderGeo8, metalMat);
  hubCap2.name = 'hubCap';
  hubCap2.position.set(0.174, 0, 0);
  hubCap2.rotation.set(0, 0, deg(-90));
  wheelFL.add(hubCap2);
  const box90 = new THREE.Mesh(boxGeo11, trimMat);
  box90.position.set(0.056, -0.411, 0);
  box90.rotation.set(0, 0, deg(180));
  wheelFL.add(box90);
  const box91 = new THREE.Mesh(boxGeo11, trimMat);
  box91.position.set(-0.056, -0.3703, 0.1783);
  box91.rotation.set(deg(154.2857), 0, 0);
  wheelFL.add(box91);
  const box92 = new THREE.Mesh(boxGeo11, trimMat);
  box92.position.set(0.056, -0.2563, 0.3213);
  box92.rotation.set(deg(128.5714), 0, 0);
  wheelFL.add(box92);
  const box93 = new THREE.Mesh(boxGeo11, trimMat);
  box93.position.set(-0.056, -0.0915, 0.4007);
  box93.rotation.set(deg(102.8571), 0, 0);
  wheelFL.add(box93);
  const box94 = new THREE.Mesh(boxGeo11, trimMat);
  box94.position.set(0.056, 0.0915, 0.4007);
  box94.rotation.set(deg(77.1429), 0, 0);
  wheelFL.add(box94);
  const box95 = new THREE.Mesh(boxGeo11, trimMat);
  box95.position.set(-0.056, 0.2563, 0.3213);
  box95.rotation.set(deg(51.4286), 0, 0);
  wheelFL.add(box95);
  const box96 = new THREE.Mesh(boxGeo11, trimMat);
  box96.position.set(0.056, 0.3703, 0.1783);
  box96.rotation.set(deg(25.7143), 0, 0);
  wheelFL.add(box96);
  const box97 = new THREE.Mesh(boxGeo11, trimMat);
  box97.position.set(-0.056, 0.411, 0);
  wheelFL.add(box97);
  const box98 = new THREE.Mesh(boxGeo11, trimMat);
  box98.position.set(0.056, 0.3703, -0.1783);
  box98.rotation.set(deg(-25.7143), 0, 0);
  wheelFL.add(box98);
  const box99 = new THREE.Mesh(boxGeo11, trimMat);
  box99.position.set(-0.056, 0.2563, -0.3213);
  box99.rotation.set(deg(-51.4286), 0, 0);
  wheelFL.add(box99);
  const box100 = new THREE.Mesh(boxGeo11, trimMat);
  box100.position.set(0.056, 0.0915, -0.4007);
  box100.rotation.set(deg(-77.1429), 0, 0);
  wheelFL.add(box100);
  const box101 = new THREE.Mesh(boxGeo11, trimMat);
  box101.position.set(-0.056, -0.0915, -0.4007);
  box101.rotation.set(deg(-102.8571), 0, 0);
  wheelFL.add(box101);
  const box102 = new THREE.Mesh(boxGeo11, trimMat);
  box102.position.set(0.056, -0.2563, -0.3213);
  box102.rotation.set(deg(-128.5714), 0, 0);
  wheelFL.add(box102);
  const box103 = new THREE.Mesh(boxGeo11, trimMat);
  box103.position.set(-0.056, -0.3703, -0.1783);
  box103.rotation.set(deg(-154.2857), 0, 0);
  wheelFL.add(box103);
  const wheelFR = new THREE.Group();
  wheelFR.name = 'wheelFR';
  wheelFR.position.set(-0.8, 0.43, 1.2);
  wheels.add(wheelFR);
  const tire3 = new THREE.Mesh(latheGeo, trimMat);
  tire3.name = 'tire';
  tire3.rotation.set(0, 0, deg(90));
  wheelFR.add(tire3);
  const rim3 = new THREE.Mesh(cylinderGeo9, steelMat);
  rim3.name = 'rim';
  rim3.rotation.set(0, 0, deg(90));
  wheelFR.add(rim3);
  const hub3 = new THREE.Mesh(cylinderGeo7, trimMat);
  hub3.name = 'hub';
  hub3.position.set(-0.134, 0, 0);
  hub3.rotation.set(0, 0, deg(90));
  wheelFR.add(hub3);
  const hubCap3 = new THREE.Mesh(cylinderGeo8, metalMat);
  hubCap3.name = 'hubCap';
  hubCap3.position.set(-0.174, 0, 0);
  hubCap3.rotation.set(0, 0, deg(90));
  wheelFR.add(hubCap3);
  const box109 = new THREE.Mesh(boxGeo11, trimMat);
  box109.position.set(0.056, -0.411, 0);
  box109.rotation.set(0, 0, deg(180));
  wheelFR.add(box109);
  const box110 = new THREE.Mesh(boxGeo11, trimMat);
  box110.position.set(-0.056, -0.3703, 0.1783);
  box110.rotation.set(deg(154.2857), 0, 0);
  wheelFR.add(box110);
  const box111 = new THREE.Mesh(boxGeo11, trimMat);
  box111.position.set(0.056, -0.2563, 0.3213);
  box111.rotation.set(deg(128.5714), 0, 0);
  wheelFR.add(box111);
  const box112 = new THREE.Mesh(boxGeo11, trimMat);
  box112.position.set(-0.056, -0.0915, 0.4007);
  box112.rotation.set(deg(102.8571), 0, 0);
  wheelFR.add(box112);
  const box113 = new THREE.Mesh(boxGeo11, trimMat);
  box113.position.set(0.056, 0.0915, 0.4007);
  box113.rotation.set(deg(77.1429), 0, 0);
  wheelFR.add(box113);
  const box114 = new THREE.Mesh(boxGeo11, trimMat);
  box114.position.set(-0.056, 0.2563, 0.3213);
  box114.rotation.set(deg(51.4286), 0, 0);
  wheelFR.add(box114);
  const box115 = new THREE.Mesh(boxGeo11, trimMat);
  box115.position.set(0.056, 0.3703, 0.1783);
  box115.rotation.set(deg(25.7143), 0, 0);
  wheelFR.add(box115);
  const box116 = new THREE.Mesh(boxGeo11, trimMat);
  box116.position.set(-0.056, 0.411, 0);
  wheelFR.add(box116);
  const box117 = new THREE.Mesh(boxGeo11, trimMat);
  box117.position.set(0.056, 0.3703, -0.1783);
  box117.rotation.set(deg(-25.7143), 0, 0);
  wheelFR.add(box117);
  const box118 = new THREE.Mesh(boxGeo11, trimMat);
  box118.position.set(-0.056, 0.2563, -0.3213);
  box118.rotation.set(deg(-51.4286), 0, 0);
  wheelFR.add(box118);
  const box119 = new THREE.Mesh(boxGeo11, trimMat);
  box119.position.set(0.056, 0.0915, -0.4007);
  box119.rotation.set(deg(-77.1429), 0, 0);
  wheelFR.add(box119);
  const box120 = new THREE.Mesh(boxGeo11, trimMat);
  box120.position.set(-0.056, -0.0915, -0.4007);
  box120.rotation.set(deg(-102.8571), 0, 0);
  wheelFR.add(box120);
  const box121 = new THREE.Mesh(boxGeo11, trimMat);
  box121.position.set(0.056, -0.2563, -0.3213);
  box121.rotation.set(deg(-128.5714), 0, 0);
  wheelFR.add(box121);
  const box122 = new THREE.Mesh(boxGeo11, trimMat);
  box122.position.set(-0.056, -0.3703, -0.1783);
  box122.rotation.set(deg(-154.2857), 0, 0);
  wheelFR.add(box122);
  const wheelRL = new THREE.Group();
  wheelRL.name = 'wheelRL';
  wheelRL.position.set(0.8, 0.43, -1.2);
  wheels.add(wheelRL);
  const tire4 = new THREE.Mesh(latheGeo, trimMat);
  tire4.name = 'tire';
  tire4.rotation.set(0, 0, deg(90));
  wheelRL.add(tire4);
  const rim4 = new THREE.Mesh(cylinderGeo9, steelMat);
  rim4.name = 'rim';
  rim4.rotation.set(0, 0, deg(90));
  wheelRL.add(rim4);
  const hub4 = new THREE.Mesh(cylinderGeo7, trimMat);
  hub4.name = 'hub';
  hub4.position.set(0.134, 0, 0);
  hub4.rotation.set(0, 0, deg(-90));
  wheelRL.add(hub4);
  const hubCap4 = new THREE.Mesh(cylinderGeo8, metalMat);
  hubCap4.name = 'hubCap';
  hubCap4.position.set(0.174, 0, 0);
  hubCap4.rotation.set(0, 0, deg(-90));
  wheelRL.add(hubCap4);
  const box128 = new THREE.Mesh(boxGeo11, trimMat);
  box128.position.set(0.056, -0.411, 0);
  box128.rotation.set(0, 0, deg(180));
  wheelRL.add(box128);
  const box129 = new THREE.Mesh(boxGeo11, trimMat);
  box129.position.set(-0.056, -0.3703, 0.1783);
  box129.rotation.set(deg(154.2857), 0, 0);
  wheelRL.add(box129);
  const box130 = new THREE.Mesh(boxGeo11, trimMat);
  box130.position.set(0.056, -0.2563, 0.3213);
  box130.rotation.set(deg(128.5714), 0, 0);
  wheelRL.add(box130);
  const box131 = new THREE.Mesh(boxGeo11, trimMat);
  box131.position.set(-0.056, -0.0915, 0.4007);
  box131.rotation.set(deg(102.8571), 0, 0);
  wheelRL.add(box131);
  const box132 = new THREE.Mesh(boxGeo11, trimMat);
  box132.position.set(0.056, 0.0915, 0.4007);
  box132.rotation.set(deg(77.1429), 0, 0);
  wheelRL.add(box132);
  const box133 = new THREE.Mesh(boxGeo11, trimMat);
  box133.position.set(-0.056, 0.2563, 0.3213);
  box133.rotation.set(deg(51.4286), 0, 0);
  wheelRL.add(box133);
  const box134 = new THREE.Mesh(boxGeo11, trimMat);
  box134.position.set(0.056, 0.3703, 0.1783);
  box134.rotation.set(deg(25.7143), 0, 0);
  wheelRL.add(box134);
  const box135 = new THREE.Mesh(boxGeo11, trimMat);
  box135.position.set(-0.056, 0.411, 0);
  wheelRL.add(box135);
  const box136 = new THREE.Mesh(boxGeo11, trimMat);
  box136.position.set(0.056, 0.3703, -0.1783);
  box136.rotation.set(deg(-25.7143), 0, 0);
  wheelRL.add(box136);
  const box137 = new THREE.Mesh(boxGeo11, trimMat);
  box137.position.set(-0.056, 0.2563, -0.3213);
  box137.rotation.set(deg(-51.4286), 0, 0);
  wheelRL.add(box137);
  const box138 = new THREE.Mesh(boxGeo11, trimMat);
  box138.position.set(0.056, 0.0915, -0.4007);
  box138.rotation.set(deg(-77.1429), 0, 0);
  wheelRL.add(box138);
  const box139 = new THREE.Mesh(boxGeo11, trimMat);
  box139.position.set(-0.056, -0.0915, -0.4007);
  box139.rotation.set(deg(-102.8571), 0, 0);
  wheelRL.add(box139);
  const box140 = new THREE.Mesh(boxGeo11, trimMat);
  box140.position.set(0.056, -0.2563, -0.3213);
  box140.rotation.set(deg(-128.5714), 0, 0);
  wheelRL.add(box140);
  const box141 = new THREE.Mesh(boxGeo11, trimMat);
  box141.position.set(-0.056, -0.3703, -0.1783);
  box141.rotation.set(deg(-154.2857), 0, 0);
  wheelRL.add(box141);
  const wheelRR = new THREE.Group();
  wheelRR.name = 'wheelRR';
  wheelRR.position.set(-0.8, 0.43, -1.2);
  wheels.add(wheelRR);
  const tire5 = new THREE.Mesh(latheGeo, trimMat);
  tire5.name = 'tire';
  tire5.rotation.set(0, 0, deg(90));
  wheelRR.add(tire5);
  const rim5 = new THREE.Mesh(cylinderGeo9, steelMat);
  rim5.name = 'rim';
  rim5.rotation.set(0, 0, deg(90));
  wheelRR.add(rim5);
  const hub5 = new THREE.Mesh(cylinderGeo7, trimMat);
  hub5.name = 'hub';
  hub5.position.set(-0.134, 0, 0);
  hub5.rotation.set(0, 0, deg(90));
  wheelRR.add(hub5);
  const hubCap5 = new THREE.Mesh(cylinderGeo8, metalMat);
  hubCap5.name = 'hubCap';
  hubCap5.position.set(-0.174, 0, 0);
  hubCap5.rotation.set(0, 0, deg(90));
  wheelRR.add(hubCap5);
  const box147 = new THREE.Mesh(boxGeo11, trimMat);
  box147.position.set(0.056, -0.411, 0);
  box147.rotation.set(0, 0, deg(180));
  wheelRR.add(box147);
  const box148 = new THREE.Mesh(boxGeo11, trimMat);
  box148.position.set(-0.056, -0.3703, 0.1783);
  box148.rotation.set(deg(154.2857), 0, 0);
  wheelRR.add(box148);
  const box149 = new THREE.Mesh(boxGeo11, trimMat);
  box149.position.set(0.056, -0.2563, 0.3213);
  box149.rotation.set(deg(128.5714), 0, 0);
  wheelRR.add(box149);
  const box150 = new THREE.Mesh(boxGeo11, trimMat);
  box150.position.set(-0.056, -0.0915, 0.4007);
  box150.rotation.set(deg(102.8571), 0, 0);
  wheelRR.add(box150);
  const box151 = new THREE.Mesh(boxGeo11, trimMat);
  box151.position.set(0.056, 0.0915, 0.4007);
  box151.rotation.set(deg(77.1429), 0, 0);
  wheelRR.add(box151);
  const box152 = new THREE.Mesh(boxGeo11, trimMat);
  box152.position.set(-0.056, 0.2563, 0.3213);
  box152.rotation.set(deg(51.4286), 0, 0);
  wheelRR.add(box152);
  const box153 = new THREE.Mesh(boxGeo11, trimMat);
  box153.position.set(0.056, 0.3703, 0.1783);
  box153.rotation.set(deg(25.7143), 0, 0);
  wheelRR.add(box153);
  const box154 = new THREE.Mesh(boxGeo11, trimMat);
  box154.position.set(-0.056, 0.411, 0);
  wheelRR.add(box154);
  const box155 = new THREE.Mesh(boxGeo11, trimMat);
  box155.position.set(0.056, 0.3703, -0.1783);
  box155.rotation.set(deg(-25.7143), 0, 0);
  wheelRR.add(box155);
  const box156 = new THREE.Mesh(boxGeo11, trimMat);
  box156.position.set(-0.056, 0.2563, -0.3213);
  box156.rotation.set(deg(-51.4286), 0, 0);
  wheelRR.add(box156);
  const box157 = new THREE.Mesh(boxGeo11, trimMat);
  box157.position.set(0.056, 0.0915, -0.4007);
  box157.rotation.set(deg(-77.1429), 0, 0);
  wheelRR.add(box157);
  const box158 = new THREE.Mesh(boxGeo11, trimMat);
  box158.position.set(-0.056, -0.0915, -0.4007);
  box158.rotation.set(deg(-102.8571), 0, 0);
  wheelRR.add(box158);
  const box159 = new THREE.Mesh(boxGeo11, trimMat);
  box159.position.set(0.056, -0.2563, -0.3213);
  box159.rotation.set(deg(-128.5714), 0, 0);
  wheelRR.add(box159);
  const box160 = new THREE.Mesh(boxGeo11, trimMat);
  box160.position.set(-0.056, -0.3703, -0.1783);
  box160.rotation.set(deg(-154.2857), 0, 0);
  wheelRR.add(box160);

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

export default createJeep;

評価とコメント

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

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

0 件のコメント

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

関連モデル

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