Codels
2.5K tris25.0 × 8.82 × 22.0 m

Use it in code

Remix in the editor
Self-contained ES module — only depends on three. Call the factory and add the group to your scene.
/**
 * Gas Station — Codels 3D model library
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 2,468 · Size (W × H × D): 25.00 × 8.82 × 22.00 m
 *
 * Usage:
 *   import { createGasStation } from './gas-station.js';
 *   
 *   const model = createGasStation();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

const deg = THREE.MathUtils.degToRad;

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

  // Materials
  const whiteMat = new THREE.MeshStandardMaterial({ name: 'white', color: 0xeeede8, roughness: 0.7, flatShading: true });
  const brandMat = new THREE.MeshStandardMaterial({ name: 'brand', color: 0xd6402f, roughness: 0.6, flatShading: true });
  const accentMat = new THREE.MeshStandardMaterial({ name: 'accent', color: 0xf2c23a, roughness: 0.6, flatShading: true });
  const concreteMat = new THREE.MeshStandardMaterial({ name: 'concrete', color: 0xb7b3ab, roughness: 0.95, flatShading: true });
  const asphaltMat = new THREE.MeshStandardMaterial({ name: 'asphalt', color: 0x4a4e54, roughness: 0.95, flatShading: true });
  const darkMat = new THREE.MeshStandardMaterial({ name: 'dark', color: 0x2b2f35, roughness: 0.7, flatShading: true });
  const glassMat = new THREE.MeshStandardMaterial({ name: 'glass', color: 0x94bfd3, roughness: 0.2, metalness: 0.1, flatShading: true });
  const metalMat = new THREE.MeshStandardMaterial({ name: 'metal', color: 0x9aa0a6, roughness: 0.5, metalness: 0.3, flatShading: true });
  const lightMat = new THREE.MeshStandardMaterial({ name: 'light', color: 0xfff6dc, roughness: 0.8, emissive: 0xffefc2, flatShading: true });
  const digitMat = new THREE.MeshStandardMaterial({ name: 'digit', color: 0x9dffb0, roughness: 0.8, emissive: 0x5cff7a, emissiveIntensity: 1.1, flatShading: true });

  // Shared geometries
  const boxGeo = new THREE.BoxGeometry(0.12, 0.01, 4.4);
  const boxGeo2 = new THREE.BoxGeometry(0.25, 0.01, 2.2);
  const boxGeo3 = new THREE.BoxGeometry(1.4, 0.2, 6.2);
  const boxGeo4 = new THREE.BoxGeometry(1.3, 0.04, 6.1);
  const boxGeo5 = new THREE.BoxGeometry(0.5, 4.56, 0.5);
  const boxGeo6 = new THREE.BoxGeometry(0.56, 1, 0.56);
  const boxGeo7 = new THREE.BoxGeometry(1.25, 0.12, 0.7);
  const boxGeo8 = new THREE.BoxGeometry(1, 1.55, 0.5);
  const boxGeo9 = new THREE.BoxGeometry(1.06, 0.36, 0.56);
  const boxGeo10 = new THREE.BoxGeometry(0.56, 0.36, 0.02);
  const boxGeo11 = new THREE.BoxGeometry(0.42, 0.1, 0.02);
  const boxGeo12 = new THREE.BoxGeometry(0.12, 0.24, 0.08);
  const tubeGeo = tube([[0.44, 1.5, -0.2], [0.6, 0.85, -0.34], [0.5, 0.45, -0.38], [0.32, 0.86, -0.32]], 0.03, 7, 4);
  const tubeGeo2 = tube([[0.44, 1.5, 0.2], [0.6, 0.85, 0.34], [0.5, 0.45, 0.38], [0.32, 0.86, 0.32]], 0.03, 7, 4);
  const cylinderGeo = new THREE.CylinderGeometry(0.11, 0.11, 0.95, 8);
  const cylinderGeo2 = new THREE.CylinderGeometry(0.12, 0.12, 0.12, 8);
  const cylinderGeo3 = new THREE.CylinderGeometry(0.25, 0.22, 0.75, 8);
  const boxGeo13 = new THREE.BoxGeometry(1.7, 0.05, 1.3);
  const boxGeo14 = new THREE.BoxGeometry(0.5, 0.18, 0.04);
  const boxGeo15 = new THREE.BoxGeometry(0.08, 2.2, 0.1);
  const boxGeo16 = new THREE.BoxGeometry(0.32, 0.42, 0.04);
  const boxGeo17 = new THREE.BoxGeometry(0.42, 0.42, 0.04);
  const boxGeo18 = new THREE.BoxGeometry(1.15, 0.56, 0.08);
  const boxGeo19 = new THREE.BoxGeometry(0.22, 0.4, 0.04);
  const boxGeo20 = new THREE.BoxGeometry(0.16, 0.34, 0.03);

  // Parts
  const forecourt = new THREE.Mesh(new THREE.BoxGeometry(25, 0.12, 22), asphaltMat);
  forecourt.name = 'forecourt';
  forecourt.position.set(0, 0.06, 0);
  root.add(forecourt);
  const apron = new THREE.Mesh(new THREE.BoxGeometry(18.4, 0.03, 11.1), concreteMat);
  apron.name = 'apron';
  apron.position.set(0, 0.135, 2.6);
  root.add(apron);
  const kioskSidewalk = new THREE.Mesh(new THREE.BoxGeometry(11.4, 0.15, 1.8), concreteMat);
  kioskSidewalk.name = 'kioskSidewalk';
  kioskSidewalk.position.set(-1, 0.195, -3.6);
  root.add(kioskSidewalk);
  const frontCurb = new THREE.Mesh(new THREE.BoxGeometry(25, 0.2, 0.3), concreteMat);
  frontCurb.name = 'frontCurb';
  frontCurb.position.set(0, 0.1, 10.85);
  root.add(frontCurb);
  const parkingLine = new THREE.Mesh(boxGeo, whiteMat);
  parkingLine.name = 'parkingLine';
  parkingLine.position.set(11.5, 0.125, -8);
  root.add(parkingLine);
  const parkingLine2 = new THREE.Mesh(boxGeo, whiteMat);
  parkingLine2.name = 'parkingLine';
  parkingLine2.position.set(8.9, 0.125, -8);
  root.add(parkingLine2);
  const parkingLine3 = new THREE.Mesh(boxGeo, whiteMat);
  parkingLine3.name = 'parkingLine';
  parkingLine3.position.set(6.3, 0.125, -8);
  root.add(parkingLine3);
  const parkingLine4 = new THREE.Mesh(boxGeo, whiteMat);
  parkingLine4.name = 'parkingLine';
  parkingLine4.position.set(3.7, 0.125, -8);
  root.add(parkingLine4);
  const laneArrow = new THREE.Mesh(boxGeo2, whiteMat);
  laneArrow.name = 'laneArrow';
  laneArrow.position.set(-10.3, 0.125, 6.5);
  root.add(laneArrow);
  const laneArrow2 = new THREE.Mesh(boxGeo2, whiteMat);
  laneArrow2.name = 'laneArrow';
  laneArrow2.position.set(-10.3, 0.125, 2.9);
  root.add(laneArrow2);
  const laneArrow3 = new THREE.Mesh(boxGeo2, whiteMat);
  laneArrow3.name = 'laneArrow';
  laneArrow3.position.set(-10.3, 0.125, -0.7);
  root.add(laneArrow3);
  const island = new THREE.Group();
  island.name = 'island';
  island.position.set(-3.1, 0.12, 2.6);
  root.add(island);
  const islandCurb = new THREE.Mesh(boxGeo3, accentMat);
  islandCurb.name = 'islandCurb';
  islandCurb.position.set(0, 0.1, 0);
  island.add(islandCurb);
  const islandTop = new THREE.Mesh(boxGeo4, concreteMat);
  islandTop.name = 'islandTop';
  islandTop.position.set(0, 0.22, 0);
  island.add(islandTop);
  const column = new THREE.Mesh(boxGeo5, whiteMat);
  column.name = 'column';
  column.position.set(0, 2.52, 0);
  island.add(column);
  const columnBand = new THREE.Mesh(boxGeo6, brandMat);
  columnBand.name = 'columnBand';
  columnBand.position.set(0, 0.74, 0);
  island.add(columnBand);
  const pump = new THREE.Group();
  pump.name = 'pump';
  pump.position.set(0, 0.24, -1.75);
  pump.rotation.set(0, deg(90), 0);
  island.add(pump);
  const pumpPlinth = new THREE.Mesh(boxGeo7, darkMat);
  pumpPlinth.name = 'pumpPlinth';
  pumpPlinth.position.set(0, 0.06, 0);
  pump.add(pumpPlinth);
  const pumpBody = new THREE.Mesh(boxGeo8, whiteMat);
  pumpBody.name = 'pumpBody';
  pumpBody.position.set(0, 0.895, 0);
  pump.add(pumpBody);
  const pumpHeader = new THREE.Mesh(boxGeo9, brandMat);
  pumpHeader.name = 'pumpHeader';
  pumpHeader.position.set(0, 1.85, 0);
  pump.add(pumpHeader);
  const pumpScreen = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen.name = 'pumpScreen';
  pumpScreen.position.set(0, 1.38, -0.26);
  pump.add(pumpScreen);
  const pumpDigits = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits.name = 'pumpDigits';
  pumpDigits.position.set(0, 1.42, -0.272);
  pump.add(pumpDigits);
  const nozzle = new THREE.Mesh(boxGeo12, accentMat);
  nozzle.name = 'nozzle';
  nozzle.position.set(-0.3, 0.95, -0.28);
  pump.add(nozzle);
  const nozzle2 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle2.name = 'nozzle';
  nozzle2.position.set(0.3, 0.95, -0.28);
  pump.add(nozzle2);
  const hose = new THREE.Mesh(tubeGeo, darkMat);
  hose.name = 'hose';
  pump.add(hose);
  const pumpScreen2 = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen2.name = 'pumpScreen';
  pumpScreen2.position.set(0, 1.38, 0.26);
  pump.add(pumpScreen2);
  const pumpDigits2 = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits2.name = 'pumpDigits';
  pumpDigits2.position.set(0, 1.42, 0.272);
  pump.add(pumpDigits2);
  const nozzle3 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle3.name = 'nozzle';
  nozzle3.position.set(-0.3, 0.95, 0.28);
  pump.add(nozzle3);
  const nozzle4 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle4.name = 'nozzle';
  nozzle4.position.set(0.3, 0.95, 0.28);
  pump.add(nozzle4);
  const hose2 = new THREE.Mesh(tubeGeo2, darkMat);
  hose2.name = 'hose';
  pump.add(hose2);
  const bollard = new THREE.Mesh(cylinderGeo, accentMat);
  bollard.name = 'bollard';
  bollard.position.set(0, 0.715, -2.95);
  island.add(bollard);
  const bollardBand = new THREE.Mesh(cylinderGeo2, darkMat);
  bollardBand.name = 'bollardBand';
  bollardBand.position.set(0, 1.01, -2.95);
  island.add(bollardBand);
  const pump2 = new THREE.Group();
  pump2.name = 'pump';
  pump2.position.set(0, 0.24, 1.75);
  pump2.rotation.set(0, deg(90), 0);
  island.add(pump2);
  const pumpPlinth2 = new THREE.Mesh(boxGeo7, darkMat);
  pumpPlinth2.name = 'pumpPlinth';
  pumpPlinth2.position.set(0, 0.06, 0);
  pump2.add(pumpPlinth2);
  const pumpBody2 = new THREE.Mesh(boxGeo8, whiteMat);
  pumpBody2.name = 'pumpBody';
  pumpBody2.position.set(0, 0.895, 0);
  pump2.add(pumpBody2);
  const pumpHeader2 = new THREE.Mesh(boxGeo9, brandMat);
  pumpHeader2.name = 'pumpHeader';
  pumpHeader2.position.set(0, 1.85, 0);
  pump2.add(pumpHeader2);
  const pumpScreen3 = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen3.name = 'pumpScreen';
  pumpScreen3.position.set(0, 1.38, -0.26);
  pump2.add(pumpScreen3);
  const pumpDigits3 = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits3.name = 'pumpDigits';
  pumpDigits3.position.set(0, 1.42, -0.272);
  pump2.add(pumpDigits3);
  const nozzle5 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle5.name = 'nozzle';
  nozzle5.position.set(-0.3, 0.95, -0.28);
  pump2.add(nozzle5);
  const nozzle6 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle6.name = 'nozzle';
  nozzle6.position.set(0.3, 0.95, -0.28);
  pump2.add(nozzle6);
  const hose3 = new THREE.Mesh(tubeGeo, darkMat);
  hose3.name = 'hose';
  pump2.add(hose3);
  const pumpScreen4 = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen4.name = 'pumpScreen';
  pumpScreen4.position.set(0, 1.38, 0.26);
  pump2.add(pumpScreen4);
  const pumpDigits4 = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits4.name = 'pumpDigits';
  pumpDigits4.position.set(0, 1.42, 0.272);
  pump2.add(pumpDigits4);
  const nozzle7 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle7.name = 'nozzle';
  nozzle7.position.set(-0.3, 0.95, 0.28);
  pump2.add(nozzle7);
  const nozzle8 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle8.name = 'nozzle';
  nozzle8.position.set(0.3, 0.95, 0.28);
  pump2.add(nozzle8);
  const hose4 = new THREE.Mesh(tubeGeo2, darkMat);
  hose4.name = 'hose';
  pump2.add(hose4);
  const bollard2 = new THREE.Mesh(cylinderGeo, accentMat);
  bollard2.name = 'bollard';
  bollard2.position.set(0, 0.715, 2.95);
  island.add(bollard2);
  const bollardBand2 = new THREE.Mesh(cylinderGeo2, darkMat);
  bollardBand2.name = 'bollardBand';
  bollardBand2.position.set(0, 1.01, 2.95);
  island.add(bollardBand2);
  const bin = new THREE.Mesh(cylinderGeo3, darkMat);
  bin.name = 'bin';
  bin.position.set(0.38, 0.615, 0.65);
  island.add(bin);
  const island2 = new THREE.Group();
  island2.name = 'island';
  island2.position.set(3.1, 0.12, 2.6);
  root.add(island2);
  const islandCurb2 = new THREE.Mesh(boxGeo3, accentMat);
  islandCurb2.name = 'islandCurb';
  islandCurb2.position.set(0, 0.1, 0);
  island2.add(islandCurb2);
  const islandTop2 = new THREE.Mesh(boxGeo4, concreteMat);
  islandTop2.name = 'islandTop';
  islandTop2.position.set(0, 0.22, 0);
  island2.add(islandTop2);
  const column2 = new THREE.Mesh(boxGeo5, whiteMat);
  column2.name = 'column';
  column2.position.set(0, 2.52, 0);
  island2.add(column2);
  const columnBand2 = new THREE.Mesh(boxGeo6, brandMat);
  columnBand2.name = 'columnBand';
  columnBand2.position.set(0, 0.74, 0);
  island2.add(columnBand2);
  const pump3 = new THREE.Group();
  pump3.name = 'pump';
  pump3.position.set(0, 0.24, -1.75);
  pump3.rotation.set(0, deg(90), 0);
  island2.add(pump3);
  const pumpPlinth3 = new THREE.Mesh(boxGeo7, darkMat);
  pumpPlinth3.name = 'pumpPlinth';
  pumpPlinth3.position.set(0, 0.06, 0);
  pump3.add(pumpPlinth3);
  const pumpBody3 = new THREE.Mesh(boxGeo8, whiteMat);
  pumpBody3.name = 'pumpBody';
  pumpBody3.position.set(0, 0.895, 0);
  pump3.add(pumpBody3);
  const pumpHeader3 = new THREE.Mesh(boxGeo9, brandMat);
  pumpHeader3.name = 'pumpHeader';
  pumpHeader3.position.set(0, 1.85, 0);
  pump3.add(pumpHeader3);
  const pumpScreen5 = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen5.name = 'pumpScreen';
  pumpScreen5.position.set(0, 1.38, -0.26);
  pump3.add(pumpScreen5);
  const pumpDigits5 = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits5.name = 'pumpDigits';
  pumpDigits5.position.set(0, 1.42, -0.272);
  pump3.add(pumpDigits5);
  const nozzle9 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle9.name = 'nozzle';
  nozzle9.position.set(-0.3, 0.95, -0.28);
  pump3.add(nozzle9);
  const nozzle10 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle10.name = 'nozzle';
  nozzle10.position.set(0.3, 0.95, -0.28);
  pump3.add(nozzle10);
  const hose5 = new THREE.Mesh(tubeGeo, darkMat);
  hose5.name = 'hose';
  pump3.add(hose5);
  const pumpScreen6 = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen6.name = 'pumpScreen';
  pumpScreen6.position.set(0, 1.38, 0.26);
  pump3.add(pumpScreen6);
  const pumpDigits6 = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits6.name = 'pumpDigits';
  pumpDigits6.position.set(0, 1.42, 0.272);
  pump3.add(pumpDigits6);
  const nozzle11 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle11.name = 'nozzle';
  nozzle11.position.set(-0.3, 0.95, 0.28);
  pump3.add(nozzle11);
  const nozzle12 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle12.name = 'nozzle';
  nozzle12.position.set(0.3, 0.95, 0.28);
  pump3.add(nozzle12);
  const hose6 = new THREE.Mesh(tubeGeo2, darkMat);
  hose6.name = 'hose';
  pump3.add(hose6);
  const bollard3 = new THREE.Mesh(cylinderGeo, accentMat);
  bollard3.name = 'bollard';
  bollard3.position.set(0, 0.715, -2.95);
  island2.add(bollard3);
  const bollardBand3 = new THREE.Mesh(cylinderGeo2, darkMat);
  bollardBand3.name = 'bollardBand';
  bollardBand3.position.set(0, 1.01, -2.95);
  island2.add(bollardBand3);
  const pump4 = new THREE.Group();
  pump4.name = 'pump';
  pump4.position.set(0, 0.24, 1.75);
  pump4.rotation.set(0, deg(90), 0);
  island2.add(pump4);
  const pumpPlinth4 = new THREE.Mesh(boxGeo7, darkMat);
  pumpPlinth4.name = 'pumpPlinth';
  pumpPlinth4.position.set(0, 0.06, 0);
  pump4.add(pumpPlinth4);
  const pumpBody4 = new THREE.Mesh(boxGeo8, whiteMat);
  pumpBody4.name = 'pumpBody';
  pumpBody4.position.set(0, 0.895, 0);
  pump4.add(pumpBody4);
  const pumpHeader4 = new THREE.Mesh(boxGeo9, brandMat);
  pumpHeader4.name = 'pumpHeader';
  pumpHeader4.position.set(0, 1.85, 0);
  pump4.add(pumpHeader4);
  const pumpScreen7 = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen7.name = 'pumpScreen';
  pumpScreen7.position.set(0, 1.38, -0.26);
  pump4.add(pumpScreen7);
  const pumpDigits7 = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits7.name = 'pumpDigits';
  pumpDigits7.position.set(0, 1.42, -0.272);
  pump4.add(pumpDigits7);
  const nozzle13 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle13.name = 'nozzle';
  nozzle13.position.set(-0.3, 0.95, -0.28);
  pump4.add(nozzle13);
  const nozzle14 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle14.name = 'nozzle';
  nozzle14.position.set(0.3, 0.95, -0.28);
  pump4.add(nozzle14);
  const hose7 = new THREE.Mesh(tubeGeo, darkMat);
  hose7.name = 'hose';
  pump4.add(hose7);
  const pumpScreen8 = new THREE.Mesh(boxGeo10, darkMat);
  pumpScreen8.name = 'pumpScreen';
  pumpScreen8.position.set(0, 1.38, 0.26);
  pump4.add(pumpScreen8);
  const pumpDigits8 = new THREE.Mesh(boxGeo11, digitMat);
  pumpDigits8.name = 'pumpDigits';
  pumpDigits8.position.set(0, 1.42, 0.272);
  pump4.add(pumpDigits8);
  const nozzle15 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle15.name = 'nozzle';
  nozzle15.position.set(-0.3, 0.95, 0.28);
  pump4.add(nozzle15);
  const nozzle16 = new THREE.Mesh(boxGeo12, accentMat);
  nozzle16.name = 'nozzle';
  nozzle16.position.set(0.3, 0.95, 0.28);
  pump4.add(nozzle16);
  const hose8 = new THREE.Mesh(tubeGeo2, darkMat);
  hose8.name = 'hose';
  pump4.add(hose8);
  const bollard4 = new THREE.Mesh(cylinderGeo, accentMat);
  bollard4.name = 'bollard';
  bollard4.position.set(0, 0.715, 2.95);
  island2.add(bollard4);
  const bollardBand4 = new THREE.Mesh(cylinderGeo2, darkMat);
  bollardBand4.name = 'bollardBand';
  bollardBand4.position.set(0, 1.01, 2.95);
  island2.add(bollardBand4);
  const bin2 = new THREE.Mesh(cylinderGeo3, darkMat);
  bin2.name = 'bin';
  bin2.position.set(0.38, 0.615, 0.65);
  island2.add(bin2);
  const canopy = new THREE.Mesh(new THREE.BoxGeometry(16, 1.1, 9.5), whiteMat);
  canopy.name = 'canopy';
  canopy.position.set(0, 5.47, 2.6);
  root.add(canopy);
  const canopyRoof = new THREE.Mesh(new THREE.BoxGeometry(15.7, 0.04, 9.2), metalMat);
  canopyRoof.name = 'canopyRoof';
  canopyRoof.position.set(0, 6.04, 2.6);
  root.add(canopyRoof);
  const canopyFascia = new THREE.Mesh(new THREE.BoxGeometry(16.1, 0.46, 9.6), brandMat);
  canopyFascia.name = 'canopyFascia';
  canopyFascia.position.set(0, 5.53, 2.6);
  root.add(canopyFascia);
  const canopyStripe = new THREE.Mesh(new THREE.BoxGeometry(16.12, 0.1, 9.62), accentMat);
  canopyStripe.name = 'canopyStripe';
  canopyStripe.position.set(0, 5.17, 2.6);
  root.add(canopyStripe);
  const canopyLight = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight.name = 'canopyLight';
  canopyLight.position.set(-5.4, 4.905, 0.2);
  root.add(canopyLight);
  const canopyLight2 = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight2.name = 'canopyLight';
  canopyLight2.position.set(-5.4, 4.905, 5);
  root.add(canopyLight2);
  const canopyLight3 = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight3.name = 'canopyLight';
  canopyLight3.position.set(-0.8, 4.905, 0.2);
  root.add(canopyLight3);
  const canopyLight4 = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight4.name = 'canopyLight';
  canopyLight4.position.set(-0.8, 4.905, 5);
  root.add(canopyLight4);
  const canopyLight5 = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight5.name = 'canopyLight';
  canopyLight5.position.set(0.8, 4.905, 0.2);
  root.add(canopyLight5);
  const canopyLight6 = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight6.name = 'canopyLight';
  canopyLight6.position.set(0.8, 4.905, 5);
  root.add(canopyLight6);
  const canopyLight7 = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight7.name = 'canopyLight';
  canopyLight7.position.set(5.4, 4.905, 0.2);
  root.add(canopyLight7);
  const canopyLight8 = new THREE.Mesh(boxGeo13, lightMat);
  canopyLight8.name = 'canopyLight';
  canopyLight8.position.set(5.4, 4.905, 5);
  root.add(canopyLight8);
  const canopyLogo = new THREE.Group();
  canopyLogo.name = 'canopyLogo';
  canopyLogo.position.set(0, 5.52, 7.4);
  root.add(canopyLogo);
  const logoRim = new THREE.Mesh(new THREE.CylinderGeometry(0.85, 0.85, 0.1, 14), whiteMat);
  logoRim.name = 'logoRim';
  logoRim.position.set(0, 0, 0.05);
  logoRim.rotation.set(deg(90), 0, 0);
  canopyLogo.add(logoRim);
  const logoDisc = new THREE.Mesh(new THREE.CylinderGeometry(0.68, 0.68, 0.1, 14), accentMat);
  logoDisc.name = 'logoDisc';
  logoDisc.position.set(0, 0, 0.09);
  logoDisc.rotation.set(deg(90), 0, 0);
  canopyLogo.add(logoDisc);
  const logoMark = new THREE.Mesh(boxGeo14, brandMat);
  logoMark.name = 'logoMark';
  logoMark.position.set(0, 0.12, 0.15);
  canopyLogo.add(logoMark);
  const logoMark2 = new THREE.Mesh(boxGeo14, brandMat);
  logoMark2.name = 'logoMark';
  logoMark2.position.set(0, -0.14, 0.15);
  canopyLogo.add(logoMark2);
  const kiosk = new THREE.Group();
  kiosk.name = 'kiosk';
  kiosk.position.set(-1, 0.12, -7);
  root.add(kiosk);
  const kioskBody = new THREE.Mesh(new THREE.BoxGeometry(9, 3.4, 5), whiteMat);
  kioskBody.name = 'kioskBody';
  kioskBody.position.set(0, 1.7, 0);
  kiosk.add(kioskBody);
  const kioskFascia = new THREE.Mesh(new THREE.BoxGeometry(9.2, 0.7, 5.2), brandMat);
  kioskFascia.name = 'kioskFascia';
  kioskFascia.position.set(0, 3.25, 0);
  kiosk.add(kioskFascia);
  const kioskCap = new THREE.Mesh(new THREE.BoxGeometry(9.36, 0.14, 5.36), whiteMat);
  kioskCap.name = 'kioskCap';
  kioskCap.position.set(0, 3.67, 0);
  kiosk.add(kioskCap);
  const kioskRoof = new THREE.Mesh(new THREE.BoxGeometry(9, 0.03, 5), metalMat);
  kioskRoof.name = 'kioskRoof';
  kioskRoof.position.set(0, 3.755, 0);
  kiosk.add(kioskRoof);
  const kioskStripe = new THREE.Mesh(new THREE.BoxGeometry(9.22, 0.08, 5.22), accentMat);
  kioskStripe.name = 'kioskStripe';
  kioskStripe.position.set(0, 2.86, 0);
  kiosk.add(kioskStripe);
  const storefrontFrame = new THREE.Mesh(new THREE.BoxGeometry(6.6, 2.4, 0.08), darkMat);
  storefrontFrame.name = 'storefrontFrame';
  storefrontFrame.position.set(-0.6, 1.5, 2.54);
  kiosk.add(storefrontFrame);
  const storefrontGlass = new THREE.Mesh(new THREE.BoxGeometry(6.4, 2.2, 0.06), glassMat);
  storefrontGlass.name = 'storefrontGlass';
  storefrontGlass.position.set(-0.6, 1.5, 2.57);
  kiosk.add(storefrontGlass);
  const storefrontMullion = new THREE.Mesh(boxGeo15, darkMat);
  storefrontMullion.name = 'storefrontMullion';
  storefrontMullion.position.set(-2.2, 1.5, 2.58);
  kiosk.add(storefrontMullion);
  const storefrontMullion2 = new THREE.Mesh(boxGeo15, darkMat);
  storefrontMullion2.name = 'storefrontMullion';
  storefrontMullion2.position.set(-0.6, 1.5, 2.58);
  kiosk.add(storefrontMullion2);
  const storefrontMullion3 = new THREE.Mesh(boxGeo15, darkMat);
  storefrontMullion3.name = 'storefrontMullion';
  storefrontMullion3.position.set(1, 1.5, 2.58);
  kiosk.add(storefrontMullion3);
  const doorFrame = new THREE.Mesh(new THREE.BoxGeometry(1.6, 2.25, 0.1), darkMat);
  doorFrame.name = 'doorFrame';
  doorFrame.position.set(1.8, 1.425, 2.6);
  kiosk.add(doorFrame);
  const doorGlass = new THREE.Mesh(new THREE.BoxGeometry(1.3, 2.05, 0.04), glassMat);
  doorGlass.name = 'doorGlass';
  doorGlass.position.set(1.8, 1.375, 2.66);
  kiosk.add(doorGlass);
  const doorBar = new THREE.Mesh(new THREE.BoxGeometry(0.6, 0.05, 0.05), metalMat);
  doorBar.name = 'doorBar';
  doorBar.position.set(1.8, 1.2, 2.7);
  kiosk.add(doorBar);
  const signLetter = new THREE.Mesh(boxGeo16, whiteMat);
  signLetter.name = 'signLetter';
  signLetter.position.set(-2.04, 3.25, 2.62);
  kiosk.add(signLetter);
  const signLetter2 = new THREE.Mesh(boxGeo17, whiteMat);
  signLetter2.name = 'signLetter';
  signLetter2.position.set(-1.53, 3.25, 2.62);
  kiosk.add(signLetter2);
  const signLetter3 = new THREE.Mesh(boxGeo16, whiteMat);
  signLetter3.name = 'signLetter';
  signLetter3.position.set(-1.02, 3.25, 2.62);
  kiosk.add(signLetter3);
  const signLetter4 = new THREE.Mesh(boxGeo16, whiteMat);
  signLetter4.name = 'signLetter';
  signLetter4.position.set(-0.56, 3.25, 2.62);
  kiosk.add(signLetter4);
  const signLetter5 = new THREE.Mesh(boxGeo17, whiteMat);
  signLetter5.name = 'signLetter';
  signLetter5.position.set(-0.05, 3.25, 2.62);
  kiosk.add(signLetter5);
  const signLetter6 = new THREE.Mesh(boxGeo16, whiteMat);
  signLetter6.name = 'signLetter';
  signLetter6.position.set(0.46, 3.25, 2.62);
  kiosk.add(signLetter6);
  const iceChest = new THREE.Mesh(new THREE.BoxGeometry(1.6, 1, 0.8), whiteMat);
  iceChest.name = 'iceChest';
  iceChest.position.set(3.4, 0.5, 3);
  kiosk.add(iceChest);
  const iceLabel = new THREE.Mesh(new THREE.BoxGeometry(1.5, 0.3, 0.82), glassMat);
  iceLabel.name = 'iceLabel';
  iceLabel.position.set(3.4, 0.7, 3);
  kiosk.add(iceLabel);
  const airPump = new THREE.Mesh(new THREE.BoxGeometry(0.45, 1.3, 0.35), brandMat);
  airPump.name = 'airPump';
  airPump.position.set(5.1, 0.65, 1.2);
  kiosk.add(airPump);
  const airGauge = new THREE.Mesh(new THREE.CylinderGeometry(0.12, 0.12, 0.1, 10), whiteMat);
  airGauge.name = 'airGauge';
  airGauge.position.set(5.1, 1.05, 1.4);
  airGauge.rotation.set(deg(90), 0, 0);
  kiosk.add(airGauge);
  const acUnit = new THREE.Mesh(new THREE.BoxGeometry(2, 1, 1.4), whiteMat);
  acUnit.name = 'acUnit';
  acUnit.position.set(-2.4, 4.27, -0.8);
  kiosk.add(acUnit);
  const acFan = new THREE.Mesh(new THREE.CylinderGeometry(0.45, 0.45, 0.06, 10), darkMat);
  acFan.name = 'acFan';
  acFan.position.set(-2.4, 4.8, -0.8);
  kiosk.add(acFan);
  const backDoor = new THREE.Mesh(new THREE.BoxGeometry(1, 2.1, 0.06), metalMat);
  backDoor.name = 'backDoor';
  backDoor.position.set(2.6, 1.05, -2.53);
  kiosk.add(backDoor);
  const pricePylon = new THREE.Group();
  pricePylon.name = 'pricePylon';
  pricePylon.position.set(10.7, 0.12, 9);
  pricePylon.rotation.set(0, deg(-20), 0);
  root.add(pricePylon);
  const pylonBase = new THREE.Mesh(new THREE.BoxGeometry(1.8, 0.6, 0.9), concreteMat);
  pylonBase.name = 'pylonBase';
  pylonBase.position.set(0, 0.3, 0);
  pricePylon.add(pylonBase);
  const pylonPost = new THREE.Mesh(new THREE.BoxGeometry(1.3, 6.4, 0.45), whiteMat);
  pylonPost.name = 'pylonPost';
  pylonPost.position.set(0, 3.8, 0);
  pricePylon.add(pylonPost);
  const pylonHead = new THREE.Mesh(new THREE.BoxGeometry(1.8, 1.7, 0.55), brandMat);
  pylonHead.name = 'pylonHead';
  pylonHead.position.set(0, 7.85, 0);
  pricePylon.add(pylonHead);
  const pylonLogo = new THREE.Mesh(new THREE.CylinderGeometry(0.55, 0.55, 0.08, 14), accentMat);
  pylonLogo.name = 'pylonLogo';
  pylonLogo.position.set(0, 7.85, 0.3);
  pylonLogo.rotation.set(deg(90), 0, 0);
  pricePylon.add(pylonLogo);
  const pylonLogoMark = new THREE.Mesh(new THREE.BoxGeometry(0.4, 0.14, 0.04), brandMat);
  pylonLogoMark.name = 'pylonLogoMark';
  pylonLogoMark.position.set(0, 7.85, 0.35);
  pricePylon.add(pylonLogoMark);
  const priceRow = new THREE.Mesh(boxGeo18, darkMat);
  priceRow.name = 'priceRow';
  priceRow.position.set(0, 6.15, 0.25);
  pricePylon.add(priceRow);
  const gradeTag = new THREE.Mesh(boxGeo19, accentMat);
  gradeTag.name = 'gradeTag';
  gradeTag.position.set(-0.4, 6.15, 0.3);
  pricePylon.add(gradeTag);
  const priceDigit = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit.name = 'priceDigit';
  priceDigit.position.set(-0.1, 6.15, 0.3);
  pricePylon.add(priceDigit);
  const priceDigit2 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit2.name = 'priceDigit';
  priceDigit2.position.set(0.12, 6.15, 0.3);
  pricePylon.add(priceDigit2);
  const priceDigit3 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit3.name = 'priceDigit';
  priceDigit3.position.set(0.34, 6.15, 0.3);
  pricePylon.add(priceDigit3);
  const priceRow2 = new THREE.Mesh(boxGeo18, darkMat);
  priceRow2.name = 'priceRow';
  priceRow2.position.set(0, 5.43, 0.25);
  pricePylon.add(priceRow2);
  const gradeTag2 = new THREE.Mesh(boxGeo19, brandMat);
  gradeTag2.name = 'gradeTag';
  gradeTag2.position.set(-0.4, 5.43, 0.3);
  pricePylon.add(gradeTag2);
  const priceDigit4 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit4.name = 'priceDigit';
  priceDigit4.position.set(-0.1, 5.43, 0.3);
  pricePylon.add(priceDigit4);
  const priceDigit5 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit5.name = 'priceDigit';
  priceDigit5.position.set(0.12, 5.43, 0.3);
  pricePylon.add(priceDigit5);
  const priceDigit6 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit6.name = 'priceDigit';
  priceDigit6.position.set(0.34, 5.43, 0.3);
  pricePylon.add(priceDigit6);
  const priceRow3 = new THREE.Mesh(boxGeo18, darkMat);
  priceRow3.name = 'priceRow';
  priceRow3.position.set(0, 4.71, 0.25);
  pricePylon.add(priceRow3);
  const gradeTag3 = new THREE.Mesh(boxGeo19, whiteMat);
  gradeTag3.name = 'gradeTag';
  gradeTag3.position.set(-0.4, 4.71, 0.3);
  pricePylon.add(gradeTag3);
  const priceDigit7 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit7.name = 'priceDigit';
  priceDigit7.position.set(-0.1, 4.71, 0.3);
  pricePylon.add(priceDigit7);
  const priceDigit8 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit8.name = 'priceDigit';
  priceDigit8.position.set(0.12, 4.71, 0.3);
  pricePylon.add(priceDigit8);
  const priceDigit9 = new THREE.Mesh(boxGeo20, digitMat);
  priceDigit9.name = 'priceDigit';
  priceDigit9.position.set(0.34, 4.71, 0.3);
  pricePylon.add(priceDigit9);
  const pylonStripe = new THREE.Mesh(new THREE.BoxGeometry(1.6, 0.3, 0.6), accentMat);
  pylonStripe.name = 'pylonStripe';
  pylonStripe.position.set(0, 6.85, 0);
  pricePylon.add(pylonStripe);

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

export default createGasStation;

Ratings & comments

—
No ratings yet — be the first.
5
0
4
0
3
0
2
0
1
0

Sign in to rate and comment.

0 comments

No comments yet. Share how you used this model or what could be better.

Related models

Same category or similar tags