Codels
1416 ポリゴン5.19 × 5.61 × 1.21 m
自己完結型の ES モジュールで、依存先は three のみです。ファクトリー関数を呼び出し、返された group をシーンに追加してください。
/**
 * Stone Archway — Codels 3D model library
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 1,416 · Size (W × H × D): 5.19 × 5.61 × 1.21 m
 *
 * Usage:
 *   import { createStoneArch } from './stone-arch.js';
 *   
 *   const model = createStoneArch();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

// Deterministic vertex displacement (organic low-poly look).
function jitter(geometry, amount, seed) {
  const pos = geometry.attributes.position;
  const h = (a, b, c, s) => {
    let x = Math.imul(a, 73856093) ^ Math.imul(b, 19349663) ^ Math.imul(c, 83492791) ^ Math.imul(s, 2654435761);
    x = Math.imul(x ^ (x >>> 16), 2246822507);
    x = Math.imul(x ^ (x >>> 13), 3266489909);
    return ((x ^ (x >>> 16)) >>> 0) / 4294967295 - 0.5;
  };
  for (let i = 0; i < pos.count; i++) {
    const x = pos.getX(i), y = pos.getY(i), z = pos.getZ(i);
    const qx = Math.round(x * 1000), qy = Math.round(y * 1000), qz = Math.round(z * 1000);
    pos.setXYZ(i, x + h(qx, qy, qz, seed) * 2 * amount, y + h(qx, qy, qz, seed + 1) * 2 * amount, z + h(qx, qy, qz, seed + 2) * 2 * amount);
  }
  pos.needsUpdate = true;
  geometry.computeVertexNormals();
  return geometry;
}

// 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);
}

export function createStoneArch() {
  const root = new THREE.Group();
  root.name = 'StoneArch';

  // Materials
  const stoneMat = new THREE.MeshStandardMaterial({ name: 'stone', color: 0x90877a, roughness: 0.95, flatShading: true });
  const stone2Mat = new THREE.MeshStandardMaterial({ name: 'stone2', color: 0x736c62, roughness: 0.95, flatShading: true });
  const darkMat = new THREE.MeshStandardMaterial({ name: 'dark', color: 0x4f4a43, roughness: 1, flatShading: true });

  // Shared geometries
  const boxGeo = new THREE.BoxGeometry(1.006, 1.9, 0.92);
  const boxGeo2 = new THREE.BoxGeometry(1.0864, 0.08, 1.18);

  // Parts
  const plinth = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.286, 0.4, 1.2), 0.01, 1), stone2Mat);
  plinth.name = 'plinth';
  plinth.position.set(-1.943, 0.21, 0);
  root.add(plinth);
  const pierBlock = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.066, 0.4325, 1), 0.018, 2), stone2Mat);
  pierBlock.name = 'pierBlock';
  pierBlock.position.set(-1.943, 0.6313, 0);
  root.add(pierBlock);
  const pierBlock2 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3991, 0.4325, 1), 0.018, 3), stoneMat);
  pierBlock2.name = 'pierBlock';
  pierBlock2.position.set(-2.2715, 1.0938, 0);
  root.add(pierBlock2);
  const pierBlock3 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6269, 0.4325, 1), 0.018, 4), stone2Mat);
  pierBlock3.name = 'pierBlock';
  pierBlock3.position.set(-1.7285, 1.0938, 0);
  root.add(pierBlock3);
  const pierBlock4 = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.066, 0.4325, 1), 0.018, 5), stone2Mat);
  pierBlock4.name = 'pierBlock';
  pierBlock4.position.set(-1.943, 1.5563, 0);
  root.add(pierBlock4);
  const pierBlock5 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4313, 0.4325, 1), 0.018, 6), stoneMat);
  pierBlock5.name = 'pierBlock';
  pierBlock5.position.set(-2.2553, 2.0188, 0);
  root.add(pierBlock5);
  const pierBlock6 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5947, 0.4325, 1), 0.018, 7), stone2Mat);
  pierBlock6.name = 'pierBlock';
  pierBlock6.position.set(-1.7123, 2.0188, 0);
  root.add(pierBlock6);
  const impost = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.246, 0.15, 1.14), 0.01, 8), stone2Mat);
  impost.name = 'impost';
  impost.position.set(-1.943, 2.325, 0);
  root.add(impost);
  const plinth2 = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.286, 0.4, 1.2), 0.01, 9), stone2Mat);
  plinth2.name = 'plinth';
  plinth2.position.set(1.943, 0.21, 0);
  root.add(plinth2);
  const pierBlock7 = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.066, 0.4325, 1), 0.018, 10), stone2Mat);
  pierBlock7.name = 'pierBlock';
  pierBlock7.position.set(1.943, 0.6313, 0);
  root.add(pierBlock7);
  const pierBlock8 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4628, 0.4325, 1), 0.018, 11), stoneMat);
  pierBlock8.name = 'pierBlock';
  pierBlock8.position.set(1.6464, 1.0938, 0);
  root.add(pierBlock8);
  const pierBlock9 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5632, 0.4325, 1), 0.018, 12), stone2Mat);
  pierBlock9.name = 'pierBlock';
  pierBlock9.position.set(2.1894, 1.0938, 0);
  root.add(pierBlock9);
  const pierBlock10 = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.066, 0.4325, 1), 0.018, 13), stone2Mat);
  pierBlock10.name = 'pierBlock';
  pierBlock10.position.set(1.943, 1.5563, 0);
  root.add(pierBlock10);
  const pierBlock11 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4551, 0.4325, 1), 0.018, 14), stoneMat);
  pierBlock11.name = 'pierBlock';
  pierBlock11.position.set(1.6425, 2.0188, 0);
  root.add(pierBlock11);
  const pierBlock12 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5709, 0.4325, 1), 0.018, 15), stone2Mat);
  pierBlock12.name = 'pierBlock';
  pierBlock12.position.set(2.1855, 2.0188, 0);
  root.add(pierBlock12);
  const impost2 = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.246, 0.15, 1.14), 0.01, 16), stone2Mat);
  impost2.name = 'impost';
  impost2.position.set(1.943, 2.325, 0);
  root.add(impost2);
  const pierCore = new THREE.Mesh(boxGeo, darkMat);
  pierCore.name = 'pierCore';
  pierCore.position.set(-1.943, 1.35, 0);
  root.add(pierCore);
  const pierCore2 = new THREE.Mesh(boxGeo, darkMat);
  pierCore2.name = 'pierCore';
  pierCore2.position.set(1.943, 1.35, 0);
  root.add(pierCore2);
  const spandrel = new THREE.Mesh(extrude([[-2.486, 2.4], [-1.984, 2.4], [-1.9343, 2.8415], [-1.7875, 3.2608], [-1.5512, 3.637], [-1.237, 3.9512], [-0.8608, 4.1875], [-0.4415, 4.3343], [0, 4.384], [0.4415, 4.3343], [0.8608, 4.1875], [1.237, 3.9512], [1.5512, 3.637], [1.7875, 3.2608], [1.9343, 2.8415], [1.984, 2.4], [2.486, 2.4], [2.486, 4.754], [-2.486, 4.754]], 0.92), darkMat);
  spandrel.name = 'spandrel';
  root.add(spandrel);
  const endStone = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 17), stone2Mat);
  endStone.name = 'endStone';
  endStone.position.set(-2.456, 2.5646, 0);
  root.add(endStone);
  const endStone2 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 18), stone2Mat);
  endStone2.name = 'endStone';
  endStone2.position.set(2.456, 2.5646, 0);
  root.add(endStone2);
  const faceStone = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4121, 0.2593, 0.07), 0.01, 19), stoneMat);
  faceStone.name = 'faceStone';
  faceStone.position.set(-2.265, 2.5646, -0.465);
  root.add(faceStone);
  const faceStone2 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4121, 0.2593, 0.07), 0.01, 20), stoneMat);
  faceStone2.name = 'faceStone';
  faceStone2.position.set(-2.265, 2.5646, 0.465);
  root.add(faceStone2);
  const faceStone3 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4121, 0.2593, 0.07), 0.01, 21), stoneMat);
  faceStone3.name = 'faceStone';
  faceStone3.position.set(2.265, 2.5646, -0.465);
  root.add(faceStone3);
  const faceStone4 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4121, 0.2593, 0.07), 0.01, 22), stoneMat);
  faceStone4.name = 'faceStone';
  faceStone4.position.set(2.265, 2.5646, 0.465);
  root.add(faceStone4);
  const endStone3 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 23), stoneMat);
  endStone3.name = 'endStone';
  endStone3.position.set(-2.456, 2.8539, 0);
  root.add(endStone3);
  const endStone4 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 24), stoneMat);
  endStone4.name = 'endStone';
  endStone4.position.set(2.456, 2.8539, 0);
  root.add(endStone4);
  const faceStone5 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4355, 0.2593, 0.07), 0.01, 25), stone2Mat);
  faceStone5.name = 'faceStone';
  faceStone5.position.set(-2.2532, 2.8539, -0.465);
  root.add(faceStone5);
  const faceStone6 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4355, 0.2593, 0.07), 0.01, 26), stone2Mat);
  faceStone6.name = 'faceStone';
  faceStone6.position.set(-2.2532, 2.8539, 0.465);
  root.add(faceStone6);
  const faceStone7 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3307, 0.2593, 0.07), 0.01, 27), stone2Mat);
  faceStone7.name = 'faceStone';
  faceStone7.position.set(2.3057, 2.8539, -0.465);
  root.add(faceStone7);
  const faceStone8 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3307, 0.2593, 0.07), 0.01, 28), stone2Mat);
  faceStone8.name = 'faceStone';
  faceStone8.position.set(2.3057, 2.8539, 0.465);
  root.add(faceStone8);
  const endStone5 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 29), stone2Mat);
  endStone5.name = 'endStone';
  endStone5.position.set(-2.456, 3.1431, 0);
  root.add(endStone5);
  const endStone6 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 30), stone2Mat);
  endStone6.name = 'endStone';
  endStone6.position.set(2.456, 3.1431, 0);
  root.add(endStone6);
  const faceStone9 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5016, 0.2593, 0.07), 0.01, 31), stone2Mat);
  faceStone9.name = 'faceStone';
  faceStone9.position.set(-2.2202, 3.1431, -0.465);
  root.add(faceStone9);
  const faceStone10 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5016, 0.2593, 0.07), 0.01, 32), stone2Mat);
  faceStone10.name = 'faceStone';
  faceStone10.position.set(-2.2202, 3.1431, 0.465);
  root.add(faceStone10);
  const faceStone11 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5016, 0.2593, 0.07), 0.01, 33), stoneMat);
  faceStone11.name = 'faceStone';
  faceStone11.position.set(2.2202, 3.1431, -0.465);
  root.add(faceStone11);
  const faceStone12 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5016, 0.2593, 0.07), 0.01, 34), stoneMat);
  faceStone12.name = 'faceStone';
  faceStone12.position.set(2.2202, 3.1431, 0.465);
  root.add(faceStone12);
  const endStone7 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 35), stoneMat);
  endStone7.name = 'endStone';
  endStone7.position.set(-2.456, 3.4324, 0);
  root.add(endStone7);
  const endStone8 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 36), stoneMat);
  endStone8.name = 'endStone';
  endStone8.position.set(2.456, 3.4324, 0);
  root.add(endStone8);
  const faceStone13 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.2864, 0.2593, 0.07), 0.01, 37), stoneMat);
  faceStone13.name = 'faceStone';
  faceStone13.position.set(-2.3278, 3.4324, -0.465);
  root.add(faceStone13);
  const faceStone14 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.2864, 0.2593, 0.07), 0.01, 38), stoneMat);
  faceStone14.name = 'faceStone';
  faceStone14.position.set(-2.3278, 3.4324, 0.465);
  root.add(faceStone14);
  const faceStone15 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.2984, 0.2593, 0.07), 0.01, 39), stone2Mat);
  faceStone15.name = 'faceStone';
  faceStone15.position.set(-2.0054, 3.4324, -0.465);
  root.add(faceStone15);
  const faceStone16 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.2984, 0.2593, 0.07), 0.01, 40), stone2Mat);
  faceStone16.name = 'faceStone';
  faceStone16.position.set(-2.0054, 3.4324, 0.465);
  root.add(faceStone16);
  const faceStone17 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.1217, 0.2593, 0.07), 0.01, 41), stone2Mat);
  faceStone17.name = 'faceStone';
  faceStone17.position.set(1.917, 3.4324, -0.465);
  root.add(faceStone17);
  const faceStone18 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.1217, 0.2593, 0.07), 0.01, 42), stone2Mat);
  faceStone18.name = 'faceStone';
  faceStone18.position.set(1.917, 3.4324, 0.465);
  root.add(faceStone18);
  const faceStone19 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4631, 0.2593, 0.07), 0.01, 43), stoneMat);
  faceStone19.name = 'faceStone';
  faceStone19.position.set(2.2394, 3.4324, -0.465);
  root.add(faceStone19);
  const faceStone20 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4631, 0.2593, 0.07), 0.01, 44), stoneMat);
  faceStone20.name = 'faceStone';
  faceStone20.position.set(2.2394, 3.4324, 0.465);
  root.add(faceStone20);
  const endStone9 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 45), stone2Mat);
  endStone9.name = 'endStone';
  endStone9.position.set(-2.456, 3.7216, 0);
  root.add(endStone9);
  const endStone10 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 46), stone2Mat);
  endStone10.name = 'endStone';
  endStone10.position.set(2.456, 3.7216, 0);
  root.add(endStone10);
  const faceStone21 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5045, 0.2593, 0.07), 0.01, 47), stoneMat);
  faceStone21.name = 'faceStone';
  faceStone21.position.set(-2.2188, 3.7216, -0.465);
  root.add(faceStone21);
  const faceStone22 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5045, 0.2593, 0.07), 0.01, 48), stoneMat);
  faceStone22.name = 'faceStone';
  faceStone22.position.set(-2.2188, 3.7216, 0.465);
  root.add(faceStone22);
  const faceStone23 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.2504, 0.2593, 0.07), 0.01, 49), stoneMat);
  faceStone23.name = 'faceStone';
  faceStone23.position.set(-1.8113, 3.7216, -0.465);
  root.add(faceStone23);
  const faceStone24 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.2504, 0.2593, 0.07), 0.01, 50), stoneMat);
  faceStone24.name = 'faceStone';
  faceStone24.position.set(-1.8113, 3.7216, 0.465);
  root.add(faceStone24);
  const faceStone25 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3815, 0.2593, 0.07), 0.01, 51), stoneMat);
  faceStone25.name = 'faceStone';
  faceStone25.position.set(1.8768, 3.7216, -0.465);
  root.add(faceStone25);
  const faceStone26 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3815, 0.2593, 0.07), 0.01, 52), stoneMat);
  faceStone26.name = 'faceStone';
  faceStone26.position.set(1.8768, 3.7216, 0.465);
  root.add(faceStone26);
  const faceStone27 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3734, 0.2593, 0.07), 0.01, 53), stoneMat);
  faceStone27.name = 'faceStone';
  faceStone27.position.set(2.2843, 3.7216, -0.465);
  root.add(faceStone27);
  const faceStone28 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3734, 0.2593, 0.07), 0.01, 54), stoneMat);
  faceStone28.name = 'faceStone';
  faceStone28.position.set(2.2843, 3.7216, 0.465);
  root.add(faceStone28);
  const endStone11 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 55), stoneMat);
  endStone11.name = 'endStone';
  endStone11.position.set(-2.456, 4.0109, 0);
  root.add(endStone11);
  const endStone12 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 56), stoneMat);
  endStone12.name = 'endStone';
  endStone12.position.set(2.456, 4.0109, 0);
  root.add(endStone12);
  const faceStone29 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4421, 0.2593, 0.07), 0.01, 57), stoneMat);
  faceStone29.name = 'faceStone';
  faceStone29.position.set(-2.25, 4.0109, -0.465);
  root.add(faceStone29);
  const faceStone30 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4421, 0.2593, 0.07), 0.01, 58), stoneMat);
  faceStone30.name = 'faceStone';
  faceStone30.position.set(-2.25, 4.0109, 0.465);
  root.add(faceStone30);
  const faceStone31 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5598, 0.2593, 0.07), 0.01, 59), stoneMat);
  faceStone31.name = 'faceStone';
  faceStone31.position.set(-1.719, 4.0109, -0.465);
  root.add(faceStone31);
  const faceStone32 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5598, 0.2593, 0.07), 0.01, 60), stoneMat);
  faceStone32.name = 'faceStone';
  faceStone32.position.set(-1.719, 4.0109, 0.465);
  root.add(faceStone32);
  const faceStone33 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.9298, 0.2593, 0.07), 0.01, 61), stoneMat);
  faceStone33.name = 'faceStone';
  faceStone33.position.set(2.0061, 4.0109, -0.465);
  root.add(faceStone33);
  const faceStone34 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.9298, 0.2593, 0.07), 0.01, 62), stoneMat);
  faceStone34.name = 'faceStone';
  faceStone34.position.set(2.0061, 4.0109, 0.465);
  root.add(faceStone34);
  const endStone13 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 63), stone2Mat);
  endStone13.name = 'endStone';
  endStone13.position.set(-2.456, 4.3001, 0);
  root.add(endStone13);
  const endStone14 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 64), stone2Mat);
  endStone14.name = 'endStone';
  endStone14.position.set(2.456, 4.3001, 0);
  root.add(endStone14);
  const faceStone35 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5861, 0.2593, 0.07), 0.01, 65), stone2Mat);
  faceStone35.name = 'faceStone';
  faceStone35.position.set(-2.178, 4.3001, -0.465);
  root.add(faceStone35);
  const faceStone36 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.5861, 0.2593, 0.07), 0.01, 66), stone2Mat);
  faceStone36.name = 'faceStone';
  faceStone36.position.set(-2.178, 4.3001, 0.465);
  root.add(faceStone36);
  const faceStone37 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4409, 0.2593, 0.07), 0.01, 67), stoneMat);
  faceStone37.name = 'faceStone';
  faceStone37.position.set(-1.6345, 4.3001, -0.465);
  root.add(faceStone37);
  const faceStone38 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4409, 0.2593, 0.07), 0.01, 68), stoneMat);
  faceStone38.name = 'faceStone';
  faceStone38.position.set(-1.6345, 4.3001, 0.465);
  root.add(faceStone38);
  const faceStone39 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.322, 0.2593, 0.07), 0.01, 69), stoneMat);
  faceStone39.name = 'faceStone';
  faceStone39.position.set(-1.223, 4.3001, -0.465);
  root.add(faceStone39);
  const faceStone40 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.322, 0.2593, 0.07), 0.01, 70), stoneMat);
  faceStone40.name = 'faceStone';
  faceStone40.position.set(-1.223, 4.3001, 0.465);
  root.add(faceStone40);
  const faceStone41 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.7003, 0.2593, 0.07), 0.01, 71), stone2Mat);
  faceStone41.name = 'faceStone';
  faceStone41.position.set(1.4121, 4.3001, -0.465);
  root.add(faceStone41);
  const faceStone42 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.7003, 0.2593, 0.07), 0.01, 72), stone2Mat);
  faceStone42.name = 'faceStone';
  faceStone42.position.set(1.4121, 4.3001, 0.465);
  root.add(faceStone42);
  const faceStone43 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6788, 0.2593, 0.07), 0.01, 73), stone2Mat);
  faceStone43.name = 'faceStone';
  faceStone43.position.set(2.1316, 4.3001, -0.465);
  root.add(faceStone43);
  const faceStone44 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6788, 0.2593, 0.07), 0.01, 74), stone2Mat);
  faceStone44.name = 'faceStone';
  faceStone44.position.set(2.1316, 4.3001, 0.465);
  root.add(faceStone44);
  const endStone15 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 75), stoneMat);
  endStone15.name = 'endStone';
  endStone15.position.set(-2.456, 4.5894, 0);
  root.add(endStone15);
  const endStone16 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.07, 0.2593, 0.96), 0.01, 76), stoneMat);
  endStone16.name = 'endStone';
  endStone16.position.set(2.456, 4.5894, 0);
  root.add(endStone16);
  const faceStone45 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3587, 0.2593, 0.07), 0.01, 77), stoneMat);
  faceStone45.name = 'faceStone';
  faceStone45.position.set(-2.2916, 4.5894, -0.465);
  root.add(faceStone45);
  const faceStone46 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.3587, 0.2593, 0.07), 0.01, 78), stoneMat);
  faceStone46.name = 'faceStone';
  faceStone46.position.set(-2.2916, 4.5894, 0.465);
  root.add(faceStone46);
  const faceStone47 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6905, 0.2593, 0.07), 0.01, 79), stoneMat);
  faceStone47.name = 'faceStone';
  faceStone47.position.set(-1.737, 4.5894, -0.465);
  root.add(faceStone47);
  const faceStone48 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6905, 0.2593, 0.07), 0.01, 80), stoneMat);
  faceStone48.name = 'faceStone';
  faceStone48.position.set(-1.737, 4.5894, 0.465);
  root.add(faceStone48);
  const faceStone49 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6554, 0.2593, 0.07), 0.01, 81), stoneMat);
  faceStone49.name = 'faceStone';
  faceStone49.position.set(-1.034, 4.5894, -0.465);
  root.add(faceStone49);
  const faceStone50 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6554, 0.2593, 0.07), 0.01, 82), stoneMat);
  faceStone50.name = 'faceStone';
  faceStone50.position.set(-1.034, 4.5894, 0.465);
  root.add(faceStone50);
  const faceStone51 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6084, 0.2593, 0.07), 0.01, 83), stone2Mat);
  faceStone51.name = 'faceStone';
  faceStone51.position.set(-0.3721, 4.5894, -0.465);
  root.add(faceStone51);
  const faceStone52 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6084, 0.2593, 0.07), 0.01, 84), stone2Mat);
  faceStone52.name = 'faceStone';
  faceStone52.position.set(-0.3721, 4.5894, 0.465);
  root.add(faceStone52);
  const faceStone53 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.764, 0.2593, 0.07), 0.01, 85), stoneMat);
  faceStone53.name = 'faceStone';
  faceStone53.position.set(0.3441, 4.5894, -0.465);
  root.add(faceStone53);
  const faceStone54 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.764, 0.2593, 0.07), 0.01, 86), stoneMat);
  faceStone54.name = 'faceStone';
  faceStone54.position.set(0.3441, 4.5894, 0.465);
  root.add(faceStone54);
  const faceStone55 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4688, 0.2593, 0.07), 0.01, 87), stone2Mat);
  faceStone55.name = 'faceStone';
  faceStone55.position.set(0.9905, 4.5894, -0.465);
  root.add(faceStone55);
  const faceStone56 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4688, 0.2593, 0.07), 0.01, 88), stone2Mat);
  faceStone56.name = 'faceStone';
  faceStone56.position.set(0.9905, 4.5894, 0.465);
  root.add(faceStone56);
  const faceStone57 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6923, 0.2593, 0.07), 0.01, 89), stoneMat);
  faceStone57.name = 'faceStone';
  faceStone57.position.set(1.601, 4.5894, -0.465);
  root.add(faceStone57);
  const faceStone58 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.6923, 0.2593, 0.07), 0.01, 90), stoneMat);
  faceStone58.name = 'faceStone';
  faceStone58.position.set(1.601, 4.5894, 0.465);
  root.add(faceStone58);
  const faceStone59 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4939, 0.2593, 0.07), 0.01, 91), stone2Mat);
  faceStone59.name = 'faceStone';
  faceStone59.position.set(2.2241, 4.5894, -0.465);
  root.add(faceStone59);
  const faceStone60 = new THREE.Mesh(jitter(new THREE.BoxGeometry(0.4939, 0.2593, 0.07), 0.01, 92), stone2Mat);
  faceStone60.name = 'faceStone';
  faceStone60.position.set(2.2241, 4.5894, 0.465);
  root.add(faceStone60);
  const voussoir = new THREE.Mesh(extrude([[-1.3999, 2.4168], [-1.3479, 2.7783], [-1.9295, 2.9415], [-2.0039, 2.424]], 0.9843), stoneMat);
  voussoir.name = 'voussoir';
  root.add(voussoir);
  const voussoir2 = new THREE.Mesh(extrude([[-1.3385, 2.8105], [-1.1868, 3.1427], [-1.6988, 3.4631], [-1.9159, 2.9876]], 1.0024), stone2Mat);
  voussoir2.name = 'voussoir';
  root.add(voussoir2);
  const voussoir3 = new THREE.Mesh(extrude([[-1.1686, 3.171], [-0.9294, 3.447], [-1.3304, 3.8987], [-1.6727, 3.5036]], 1.0091), stoneMat);
  voussoir3.name = 'voussoir';
  root.add(voussoir3);
  const voussoir4 = new THREE.Mesh(extrude([[-0.904, 3.469], [-0.5968, 3.6664], [-0.8543, 4.2128], [-1.2941, 3.9302]], 0.9802), stone2Mat);
  voussoir4.name = 'voussoir';
  root.add(voussoir4);
  const voussoir5 = new THREE.Mesh(extrude([[-0.5663, 3.6804], [-0.2159, 3.7833], [-0.309, 4.38], [-0.8106, 4.2328]], 1.002), stoneMat);
  voussoir5.name = 'voussoir';
  root.add(voussoir5);
  const keystone = new THREE.Mesh(extrude([[-0.1748, 3.7286], [0.1748, 3.7286], [0.2849, 4.5653], [-0.2849, 4.5653]], 1.16), stoneMat);
  keystone.name = 'keystone';
  root.add(keystone);
  const voussoir6 = new THREE.Mesh(extrude([[0.2159, 3.7833], [0.5663, 3.6804], [0.8106, 4.2328], [0.309, 4.38]], 0.9834), stoneMat);
  voussoir6.name = 'voussoir';
  root.add(voussoir6);
  const voussoir7 = new THREE.Mesh(extrude([[0.5968, 3.6664], [0.904, 3.469], [1.2941, 3.9302], [0.8543, 4.2128]], 0.9896), stone2Mat);
  voussoir7.name = 'voussoir';
  root.add(voussoir7);
  const voussoir8 = new THREE.Mesh(extrude([[0.9294, 3.447], [1.1686, 3.171], [1.6727, 3.5036], [1.3304, 3.8987]], 1.0116), stoneMat);
  voussoir8.name = 'voussoir';
  root.add(voussoir8);
  const voussoir9 = new THREE.Mesh(extrude([[1.1868, 3.1427], [1.3385, 2.8105], [1.9159, 2.9876], [1.6988, 3.4631]], 0.981), stone2Mat);
  voussoir9.name = 'voussoir';
  root.add(voussoir9);
  const voussoir10 = new THREE.Mesh(extrude([[1.3479, 2.7783], [1.3999, 2.4168], [2.0039, 2.424], [1.9295, 2.9415]], 1.0042), stoneMat);
  voussoir10.name = 'voussoir';
  root.add(voussoir10);
  const stringCourse = new THREE.Mesh(jitter(new THREE.BoxGeometry(5.132, 0.18, 1.16), 0.012, 93), stone2Mat);
  stringCourse.name = 'stringCourse';
  stringCourse.position.set(0, 4.844, 0);
  root.add(stringCourse);
  const merlon = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.0064, 0.6, 1.1), 0.015, 94), stoneMat);
  merlon.name = 'merlon';
  merlon.position.set(-2.0528, 5.234, 0);
  root.add(merlon);
  const merlonCap = new THREE.Mesh(boxGeo2, stone2Mat);
  merlonCap.name = 'merlonCap';
  merlonCap.position.set(-2.0528, 5.574, 0);
  root.add(merlonCap);
  const merlon2 = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.0064, 0.6, 1.1), 0.015, 95), stoneMat);
  merlon2.name = 'merlon';
  merlon2.position.set(0, 5.234, 0);
  root.add(merlon2);
  const merlonCap2 = new THREE.Mesh(boxGeo2, stone2Mat);
  merlonCap2.name = 'merlonCap';
  merlonCap2.position.set(0, 5.574, 0);
  root.add(merlonCap2);
  const merlon3 = new THREE.Mesh(jitter(new THREE.BoxGeometry(1.0064, 0.6, 1.1), 0.015, 96), stoneMat);
  merlon3.name = 'merlon';
  merlon3.position.set(2.0528, 5.234, 0);
  root.add(merlon3);
  const merlonCap3 = new THREE.Mesh(boxGeo2, stone2Mat);
  merlonCap3.name = 'merlonCap';
  merlonCap3.position.set(2.0528, 5.574, 0);
  root.add(merlonCap3);

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

export default createStoneArch;

評価とコメント

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

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

0 件のコメント

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

関連モデル

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