Codels
1,1 тыс. треуг.7,59 × 4,59 × 10,1 m

Использовать в коде

Ремикс в редакторе
Самодостаточный ES-модуль — зависит только от three. Вызовите фабрику и добавьте группу в сцену.
/**
 * Garage — Codels 3D model library
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 1,144 · Size (W × H × D): 7.59 × 4.59 × 10.08 m
 *
 * Usage:
 *   import { createGarage } from './garage.js';
 *   
 *   const model = createGarage();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

const deg = THREE.MathUtils.degToRad;

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

  // Materials
  const wallMat = new THREE.MeshStandardMaterial({ name: 'wall', color: 0xe4d8c4, roughness: 0.95, flatShading: true });
  const concreteMat = new THREE.MeshStandardMaterial({ name: 'concrete', color: 0xb9b5ad, roughness: 0.95, flatShading: true });
  const roofMat = new THREE.MeshStandardMaterial({ name: 'roof', color: 0x585e66, roughness: 0.85, flatShading: true });
  const trimMat = new THREE.MeshStandardMaterial({ name: 'trim', color: 0xf3f1ea, roughness: 0.8, flatShading: true });
  const doorMat = new THREE.MeshStandardMaterial({ name: 'door', color: 0x8ea3b1, roughness: 0.6, metalness: 0.15, flatShading: true });
  const glassMat = new THREE.MeshStandardMaterial({ name: 'glass', color: 0xa8cddd, roughness: 0.2, metalness: 0.1, flatShading: true });
  const darkMat = new THREE.MeshStandardMaterial({ name: 'dark', color: 0x2b2d31, roughness: 0.8, flatShading: true });

  // Shared geometries
  const boxGeo = new THREE.BoxGeometry(0.2, 2.65, 6);
  const boxGeo2 = new THREE.BoxGeometry(0.575, 2.15, 0.2);
  const extrudeGeo = extrude([[-3.3, 0], [3.3, 0], [0, 1.4493]], 0.2);
  const boxGeo3 = new THREE.BoxGeometry(0.26, 0.3, 6.2);
  const boxGeo4 = new THREE.BoxGeometry(0.14, 2.65, 0.14);
  const boxGeo5 = new THREE.BoxGeometry(2.74, 0.12, 0.1);
  const boxGeo6 = new THREE.BoxGeometry(0.1, 2.15, 0.1);
  const boxGeo7 = new THREE.BoxGeometry(2.8, 0.34, 0.32);
  const boxGeo8 = new THREE.BoxGeometry(2.5, 2.15, 0.06);
  const boxGeo9 = new THREE.BoxGeometry(2.46, 0.025, 0.02);
  const boxGeo10 = new THREE.BoxGeometry(0.3, 0.05, 0.05);
  const boxGeo11 = new THREE.BoxGeometry(0.05, 0.8, 0.06);
  const boxGeo12 = new THREE.BoxGeometry(1.2, 0.06, 0.16);
  const boxGeo13 = new THREE.BoxGeometry(1.26, 0.96, 0.06);
  const boxGeo14 = new THREE.BoxGeometry(1.1, 0.8, 0.04);
  const boxGeo15 = new THREE.BoxGeometry(1.4, 0.06, 0.16);
  const boxGeo16 = new THREE.BoxGeometry(3.9923, 0.1, 7);
  const boxGeo17 = new THREE.BoxGeometry(1.058, 0.06, 7.02);
  const boxGeo18 = new THREE.BoxGeometry(3.9098, 0.16, 0.06);
  const boxGeo19 = new THREE.BoxGeometry(0.14, 0.14, 7);
  const cylinderGeo = new THREE.CylinderGeometry(0.05, 0.05, 2.5576, 6);

  // Parts
  const slab = new THREE.Mesh(new THREE.BoxGeometry(6.9, 0.15, 6.7), concreteMat);
  slab.name = 'slab';
  slab.position.set(0, 0.075, 0);
  root.add(slab);
  const apron = new THREE.Mesh(new THREE.BoxGeometry(7, 0.04, 3.2), concreteMat);
  apron.name = 'apron';
  apron.position.set(0, 0.02, 4.95);
  root.add(apron);
  const backWall = new THREE.Mesh(new THREE.BoxGeometry(6.6, 2.65, 0.2), wallMat);
  backWall.name = 'backWall';
  backWall.position.set(0, 1.475, -3.1);
  root.add(backWall);
  const sideWall = new THREE.Mesh(boxGeo, wallMat);
  sideWall.name = 'sideWall';
  sideWall.position.set(-3.2, 1.475, 0);
  root.add(sideWall);
  const sideWall2 = new THREE.Mesh(boxGeo, wallMat);
  sideWall2.name = 'sideWall';
  sideWall2.position.set(3.2, 1.475, 0);
  root.add(sideWall2);
  const frontPier = new THREE.Mesh(boxGeo2, wallMat);
  frontPier.name = 'frontPier';
  frontPier.position.set(-3.0125, 1.225, 3.1);
  root.add(frontPier);
  const frontPier2 = new THREE.Mesh(boxGeo2, wallMat);
  frontPier2.name = 'frontPier';
  frontPier2.position.set(3.0125, 1.225, 3.1);
  root.add(frontPier2);
  const frontPier3 = new THREE.Mesh(new THREE.BoxGeometry(0.45, 2.15, 0.2), wallMat);
  frontPier3.name = 'frontPier';
  frontPier3.position.set(0, 1.225, 3.1);
  root.add(frontPier3);
  const header = new THREE.Mesh(new THREE.BoxGeometry(6.6, 0.5, 0.2), wallMat);
  header.name = 'header';
  header.position.set(0, 2.55, 3.1);
  root.add(header);
  const gable = new THREE.Mesh(extrudeGeo, wallMat);
  gable.name = 'gable';
  gable.position.set(0, 2.8, -3.1);
  root.add(gable);
  const gable2 = new THREE.Mesh(extrudeGeo, wallMat);
  gable2.name = 'gable';
  gable2.position.set(0, 2.8, 3.1);
  root.add(gable2);
  const plinth = new THREE.Mesh(new THREE.BoxGeometry(6.66, 0.3, 0.26), concreteMat);
  plinth.name = 'plinth';
  plinth.position.set(0, 0.3, -3.1);
  root.add(plinth);
  const plinth2 = new THREE.Mesh(boxGeo3, concreteMat);
  plinth2.name = 'plinth';
  plinth2.position.set(-3.2, 0.3, 0.1);
  root.add(plinth2);
  const plinth3 = new THREE.Mesh(boxGeo3, concreteMat);
  plinth3.name = 'plinth';
  plinth3.position.set(3.2, 0.3, 0.1);
  root.add(plinth3);
  const cornerBoard = new THREE.Mesh(boxGeo4, trimMat);
  cornerBoard.name = 'cornerBoard';
  cornerBoard.position.set(-3.26, 1.475, -3.16);
  root.add(cornerBoard);
  const cornerBoard2 = new THREE.Mesh(boxGeo4, trimMat);
  cornerBoard2.name = 'cornerBoard';
  cornerBoard2.position.set(-3.26, 1.475, 3.16);
  root.add(cornerBoard2);
  const cornerBoard3 = new THREE.Mesh(boxGeo4, trimMat);
  cornerBoard3.name = 'cornerBoard';
  cornerBoard3.position.set(3.26, 1.475, -3.16);
  root.add(cornerBoard3);
  const cornerBoard4 = new THREE.Mesh(boxGeo4, trimMat);
  cornerBoard4.name = 'cornerBoard';
  cornerBoard4.position.set(3.26, 1.475, 3.16);
  root.add(cornerBoard4);
  const doorHead = new THREE.Mesh(boxGeo5, trimMat);
  doorHead.name = 'doorHead';
  doorHead.position.set(-1.475, 2.36, 3.23);
  root.add(doorHead);
  const doorJamb = new THREE.Mesh(boxGeo6, trimMat);
  doorJamb.name = 'doorJamb';
  doorJamb.position.set(-2.775, 1.225, 3.23);
  root.add(doorJamb);
  const doorJamb2 = new THREE.Mesh(boxGeo6, trimMat);
  doorJamb2.name = 'doorJamb';
  doorJamb2.position.set(-0.175, 1.225, 3.23);
  root.add(doorJamb2);
  const rollerHousing = new THREE.Mesh(boxGeo7, doorMat);
  rollerHousing.name = 'rollerHousing';
  rollerHousing.position.set(-1.475, 2.59, 3.34);
  root.add(rollerHousing);
  const rollerDoor = new THREE.Mesh(boxGeo8, doorMat);
  rollerDoor.name = 'rollerDoor';
  rollerDoor.position.set(-1.475, 1.225, 3.18);
  root.add(rollerDoor);
  const doorSlat = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat.name = 'doorSlat';
  doorSlat.position.set(-1.475, 0.3455, 3.22);
  root.add(doorSlat);
  const doorSlat2 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat2.name = 'doorSlat';
  doorSlat2.position.set(-1.475, 0.5409, 3.22);
  root.add(doorSlat2);
  const doorSlat3 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat3.name = 'doorSlat';
  doorSlat3.position.set(-1.475, 0.7364, 3.22);
  root.add(doorSlat3);
  const doorSlat4 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat4.name = 'doorSlat';
  doorSlat4.position.set(-1.475, 0.9318, 3.22);
  root.add(doorSlat4);
  const doorSlat5 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat5.name = 'doorSlat';
  doorSlat5.position.set(-1.475, 1.1273, 3.22);
  root.add(doorSlat5);
  const doorSlat6 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat6.name = 'doorSlat';
  doorSlat6.position.set(-1.475, 1.3227, 3.22);
  root.add(doorSlat6);
  const doorSlat7 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat7.name = 'doorSlat';
  doorSlat7.position.set(-1.475, 1.5182, 3.22);
  root.add(doorSlat7);
  const doorSlat8 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat8.name = 'doorSlat';
  doorSlat8.position.set(-1.475, 1.7136, 3.22);
  root.add(doorSlat8);
  const doorSlat9 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat9.name = 'doorSlat';
  doorSlat9.position.set(-1.475, 1.9091, 3.22);
  root.add(doorSlat9);
  const doorSlat10 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat10.name = 'doorSlat';
  doorSlat10.position.set(-1.475, 2.1045, 3.22);
  root.add(doorSlat10);
  const doorHandle = new THREE.Mesh(boxGeo10, darkMat);
  doorHandle.name = 'doorHandle';
  doorHandle.position.set(-1.475, 0.5, 3.24);
  root.add(doorHandle);
  const doorHead2 = new THREE.Mesh(boxGeo5, trimMat);
  doorHead2.name = 'doorHead';
  doorHead2.position.set(1.475, 2.36, 3.23);
  root.add(doorHead2);
  const doorJamb3 = new THREE.Mesh(boxGeo6, trimMat);
  doorJamb3.name = 'doorJamb';
  doorJamb3.position.set(0.175, 1.225, 3.23);
  root.add(doorJamb3);
  const doorJamb4 = new THREE.Mesh(boxGeo6, trimMat);
  doorJamb4.name = 'doorJamb';
  doorJamb4.position.set(2.775, 1.225, 3.23);
  root.add(doorJamb4);
  const rollerHousing2 = new THREE.Mesh(boxGeo7, doorMat);
  rollerHousing2.name = 'rollerHousing';
  rollerHousing2.position.set(1.475, 2.59, 3.34);
  root.add(rollerHousing2);
  const rollerDoor2 = new THREE.Mesh(boxGeo8, doorMat);
  rollerDoor2.name = 'rollerDoor';
  rollerDoor2.position.set(1.475, 1.225, 3.18);
  root.add(rollerDoor2);
  const doorSlat11 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat11.name = 'doorSlat';
  doorSlat11.position.set(1.475, 0.3455, 3.22);
  root.add(doorSlat11);
  const doorSlat12 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat12.name = 'doorSlat';
  doorSlat12.position.set(1.475, 0.5409, 3.22);
  root.add(doorSlat12);
  const doorSlat13 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat13.name = 'doorSlat';
  doorSlat13.position.set(1.475, 0.7364, 3.22);
  root.add(doorSlat13);
  const doorSlat14 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat14.name = 'doorSlat';
  doorSlat14.position.set(1.475, 0.9318, 3.22);
  root.add(doorSlat14);
  const doorSlat15 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat15.name = 'doorSlat';
  doorSlat15.position.set(1.475, 1.1273, 3.22);
  root.add(doorSlat15);
  const doorSlat16 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat16.name = 'doorSlat';
  doorSlat16.position.set(1.475, 1.3227, 3.22);
  root.add(doorSlat16);
  const doorSlat17 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat17.name = 'doorSlat';
  doorSlat17.position.set(1.475, 1.5182, 3.22);
  root.add(doorSlat17);
  const doorSlat18 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat18.name = 'doorSlat';
  doorSlat18.position.set(1.475, 1.7136, 3.22);
  root.add(doorSlat18);
  const doorSlat19 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat19.name = 'doorSlat';
  doorSlat19.position.set(1.475, 1.9091, 3.22);
  root.add(doorSlat19);
  const doorSlat20 = new THREE.Mesh(boxGeo9, darkMat);
  doorSlat20.name = 'doorSlat';
  doorSlat20.position.set(1.475, 2.1045, 3.22);
  root.add(doorSlat20);
  const doorHandle2 = new THREE.Mesh(boxGeo10, darkMat);
  doorHandle2.name = 'doorHandle';
  doorHandle2.position.set(1.475, 0.5, 3.24);
  root.add(doorHandle2);
  const wallLamp = new THREE.Mesh(new THREE.BoxGeometry(0.25, 0.32, 0.2), darkMat);
  wallLamp.name = 'wallLamp';
  wallLamp.position.set(0, 2.7, 3.32);
  root.add(wallLamp);
  const lampGlass = new THREE.Mesh(new THREE.BoxGeometry(0.17, 0.2, 0.05), glassMat);
  lampGlass.name = 'lampGlass';
  lampGlass.position.set(0, 2.7, 3.43);
  root.add(lampGlass);
  const rightSide = new THREE.Group();
  rightSide.name = 'rightSide';
  rightSide.position.set(3.3, 0.15, 0);
  rightSide.rotation.set(0, deg(90), 0);
  root.add(rightSide);
  const sideDoorFrame = new THREE.Mesh(new THREE.BoxGeometry(1.05, 2.12, 0.08), trimMat);
  sideDoorFrame.name = 'sideDoorFrame';
  sideDoorFrame.position.set(1.4, 1.06, 0.04);
  rightSide.add(sideDoorFrame);
  const sideDoor = new THREE.Mesh(new THREE.BoxGeometry(0.9, 2.02, 0.06), doorMat);
  sideDoor.name = 'sideDoor';
  sideDoor.position.set(1.4, 1.01, 0.08);
  rightSide.add(sideDoor);
  const sideDoorGlass = new THREE.Mesh(new THREE.BoxGeometry(0.5, 0.5, 0.02), glassMat);
  sideDoorGlass.name = 'sideDoorGlass';
  sideDoorGlass.position.set(1.4, 1.55, 0.115);
  rightSide.add(sideDoorGlass);
  const sideDoorKnob = new THREE.Mesh(new THREE.SphereGeometry(0.04, 6, 4), darkMat);
  sideDoorKnob.name = 'sideDoorKnob';
  sideDoorKnob.position.set(1.73, 1, 0.14);
  rightSide.add(sideDoorKnob);
  const sideStep = new THREE.Mesh(new THREE.BoxGeometry(1.3, 0.12, 0.6), concreteMat);
  sideStep.name = 'sideStep';
  sideStep.position.set(1.4, -0.09, 0.3);
  rightSide.add(sideStep);
  const windowFrame = new THREE.Mesh(new THREE.BoxGeometry(1.06, 0.96, 0.06), trimMat);
  windowFrame.name = 'windowFrame';
  windowFrame.position.set(-1.3, 1.5, 0.03);
  rightSide.add(windowFrame);
  const windowGlass = new THREE.Mesh(new THREE.BoxGeometry(0.9, 0.8, 0.04), glassMat);
  windowGlass.name = 'windowGlass';
  windowGlass.position.set(-1.3, 1.5, 0.06);
  rightSide.add(windowGlass);
  const windowMullion = new THREE.Mesh(boxGeo11, trimMat);
  windowMullion.name = 'windowMullion';
  windowMullion.position.set(-1.3, 1.5, 0.07);
  rightSide.add(windowMullion);
  const windowSill = new THREE.Mesh(boxGeo12, trimMat);
  windowSill.name = 'windowSill';
  windowSill.position.set(-1.3, 1, 0.08);
  rightSide.add(windowSill);
  const leftSide = new THREE.Group();
  leftSide.name = 'leftSide';
  leftSide.position.set(-3.3, 0.15, 0);
  leftSide.rotation.set(0, deg(-90), 0);
  root.add(leftSide);
  const windowFrame2 = new THREE.Mesh(boxGeo13, trimMat);
  windowFrame2.name = 'windowFrame';
  windowFrame2.position.set(0.9, 1.5, 0.03);
  leftSide.add(windowFrame2);
  const windowGlass2 = new THREE.Mesh(boxGeo14, glassMat);
  windowGlass2.name = 'windowGlass';
  windowGlass2.position.set(0.9, 1.5, 0.06);
  leftSide.add(windowGlass2);
  const windowMullion2 = new THREE.Mesh(boxGeo11, trimMat);
  windowMullion2.name = 'windowMullion';
  windowMullion2.position.set(0.9, 1.5, 0.07);
  leftSide.add(windowMullion2);
  const windowSill2 = new THREE.Mesh(boxGeo15, trimMat);
  windowSill2.name = 'windowSill';
  windowSill2.position.set(0.9, 1, 0.08);
  leftSide.add(windowSill2);
  const windowFrame3 = new THREE.Mesh(boxGeo13, trimMat);
  windowFrame3.name = 'windowFrame';
  windowFrame3.position.set(-1.5, 1.5, 0.03);
  leftSide.add(windowFrame3);
  const windowGlass3 = new THREE.Mesh(boxGeo14, glassMat);
  windowGlass3.name = 'windowGlass';
  windowGlass3.position.set(-1.5, 1.5, 0.06);
  leftSide.add(windowGlass3);
  const windowMullion3 = new THREE.Mesh(boxGeo11, trimMat);
  windowMullion3.name = 'windowMullion';
  windowMullion3.position.set(-1.5, 1.5, 0.07);
  leftSide.add(windowMullion3);
  const windowSill3 = new THREE.Mesh(boxGeo15, trimMat);
  windowSill3.name = 'windowSill';
  windowSill3.position.set(-1.5, 1, 0.08);
  leftSide.add(windowSill3);
  const backSide = new THREE.Group();
  backSide.name = 'backSide';
  backSide.position.set(0, 0.15, -3.2);
  backSide.rotation.set(0, deg(180), 0);
  root.add(backSide);
  const windowFrame4 = new THREE.Mesh(new THREE.BoxGeometry(1.06, 0.86, 0.06), trimMat);
  windowFrame4.name = 'windowFrame';
  windowFrame4.position.set(0, 1.55, 0.03);
  backSide.add(windowFrame4);
  const windowGlass4 = new THREE.Mesh(new THREE.BoxGeometry(0.9, 0.7, 0.04), glassMat);
  windowGlass4.name = 'windowGlass';
  windowGlass4.position.set(0, 1.55, 0.06);
  backSide.add(windowGlass4);
  const windowMullion4 = new THREE.Mesh(new THREE.BoxGeometry(0.05, 0.7, 0.06), trimMat);
  windowMullion4.name = 'windowMullion';
  windowMullion4.position.set(0, 1.55, 0.07);
  backSide.add(windowMullion4);
  const windowSill4 = new THREE.Mesh(boxGeo12, trimMat);
  windowSill4.name = 'windowSill';
  windowSill4.position.set(0, 1.1, 0.08);
  backSide.add(windowSill4);
  const roofSlab = new THREE.Mesh(boxGeo16, roofMat);
  roofSlab.name = 'roofSlab';
  roofSlab.position.set(-1.8165, 3.5152, 0);
  roofSlab.rotation.set(0, 0, deg(24));
  root.add(roofSlab);
  const roofSlab2 = new THREE.Mesh(boxGeo16, roofMat);
  roofSlab2.name = 'roofSlab';
  roofSlab2.position.set(1.8165, 3.5152, 0);
  roofSlab2.rotation.set(0, 0, deg(-24));
  root.add(roofSlab2);
  const shingles = new THREE.Mesh(boxGeo17, roofMat);
  shingles.name = 'shingles';
  shingles.position.set(-0.4814, 4.1972, 0);
  shingles.rotation.set(0, 0, deg(29));
  root.add(shingles);
  const shingles2 = new THREE.Mesh(boxGeo17, roofMat);
  shingles2.name = 'shingles';
  shingles2.position.set(0.4814, 4.1972, 0);
  shingles2.rotation.set(0, 0, deg(-29));
  root.add(shingles2);
  const shingles3 = new THREE.Mesh(boxGeo17, roofMat);
  shingles3.name = 'shingles';
  shingles3.position.set(-1.3931, 3.7913, 0);
  shingles3.rotation.set(0, 0, deg(29));
  root.add(shingles3);
  const shingles4 = new THREE.Mesh(boxGeo17, roofMat);
  shingles4.name = 'shingles';
  shingles4.position.set(1.3931, 3.7913, 0);
  shingles4.rotation.set(0, 0, deg(-29));
  root.add(shingles4);
  const shingles5 = new THREE.Mesh(boxGeo17, roofMat);
  shingles5.name = 'shingles';
  shingles5.position.set(-2.3049, 3.3853, 0);
  shingles5.rotation.set(0, 0, deg(29));
  root.add(shingles5);
  const shingles6 = new THREE.Mesh(boxGeo17, roofMat);
  shingles6.name = 'shingles';
  shingles6.position.set(2.3049, 3.3853, 0);
  shingles6.rotation.set(0, 0, deg(-29));
  root.add(shingles6);
  const shingles7 = new THREE.Mesh(boxGeo17, roofMat);
  shingles7.name = 'shingles';
  shingles7.position.set(-3.2167, 2.9794, 0);
  shingles7.rotation.set(0, 0, deg(29));
  root.add(shingles7);
  const shingles8 = new THREE.Mesh(boxGeo17, roofMat);
  shingles8.name = 'shingles';
  shingles8.position.set(3.2167, 2.9794, 0);
  shingles8.rotation.set(0, 0, deg(-29));
  root.add(shingles8);
  const ridge = new THREE.Mesh(new THREE.BoxGeometry(0.2, 0.2, 7.06), darkMat);
  ridge.name = 'ridge';
  ridge.position.set(0, 4.4444, 0);
  ridge.rotation.set(0, 0, deg(45));
  root.add(ridge);
  const fascia = new THREE.Mesh(boxGeo18, trimMat);
  fascia.name = 'fascia';
  fascia.position.set(-1.7859, 3.4341, -3.47);
  fascia.rotation.set(0, 0, deg(24));
  root.add(fascia);
  const fascia2 = new THREE.Mesh(boxGeo18, trimMat);
  fascia2.name = 'fascia';
  fascia2.position.set(-1.7859, 3.4341, 3.47);
  fascia2.rotation.set(0, 0, deg(24));
  root.add(fascia2);
  const gutter = new THREE.Mesh(boxGeo19, trimMat);
  gutter.name = 'gutter';
  gutter.position.set(-3.6197, 2.6076, 0);
  root.add(gutter);
  const downspout = new THREE.Mesh(cylinderGeo, trimMat);
  downspout.name = 'downspout';
  downspout.position.set(-3.4, 1.2788, -2.95);
  root.add(downspout);
  const fascia3 = new THREE.Mesh(boxGeo18, trimMat);
  fascia3.name = 'fascia';
  fascia3.position.set(1.7859, 3.4341, -3.47);
  fascia3.rotation.set(0, 0, deg(-24));
  root.add(fascia3);
  const fascia4 = new THREE.Mesh(boxGeo18, trimMat);
  fascia4.name = 'fascia';
  fascia4.position.set(1.7859, 3.4341, 3.47);
  fascia4.rotation.set(0, 0, deg(-24));
  root.add(fascia4);
  const gutter2 = new THREE.Mesh(boxGeo19, trimMat);
  gutter2.name = 'gutter';
  gutter2.position.set(3.6197, 2.6076, 0);
  root.add(gutter2);
  const downspout2 = new THREE.Mesh(cylinderGeo, trimMat);
  downspout2.name = 'downspout';
  downspout2.position.set(3.4, 1.2788, -2.95);
  root.add(downspout2);

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

export default createGarage;

Оценки и комментарии

—
Оценок пока нет — будьте первым.
5
0
4
0
3
0
2
0
1
0

Войдите, чтобы ставить оценки и оставлять комментарии.

0 комментариев

Комментариев пока нет. Расскажите, как вы использовали эту модель или что можно улучшить.

Похожие модели

Та же категория или похожие теги