1.8K tris15.5 × 7.30 × 15.0 m
Use it in code
Remix in the editormodern-house.js · 705 lines
Self-contained ES module — only depends on three. Call the factory and add the group to your scene.
/**
* Modern House — Codels 3D model library
* License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
* Triangles: 1,792 · Size (W × H × D): 15.48 × 7.30 × 14.95 m
*
* Usage:
* import { createModernHouse } from './modern-house.js';
*
* const model = createModernHouse();
* model.position.set(0, 0, 0);
* scene.add(model);
*/
import * as THREE from 'three';
const deg = THREE.MathUtils.degToRad;
// 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;
}
export function createModernHouse() {
const root = new THREE.Group();
root.name = 'ModernHouse';
// Materials
const wallMat = new THREE.MeshStandardMaterial({ name: 'wall', color: 0xefedea, roughness: 0.9, flatShading: true });
const woodMat = new THREE.MeshStandardMaterial({ name: 'wood', color: 0xb27a4a, roughness: 0.85, flatShading: true });
const woodDarkMat = new THREE.MeshStandardMaterial({ name: 'woodDark', color: 0x744f30, roughness: 0.9, flatShading: true });
const frameMat = new THREE.MeshStandardMaterial({ name: 'frame', color: 0x2e3237, roughness: 0.6, metalness: 0.2, flatShading: true });
const glassMat = new THREE.MeshStandardMaterial({ name: 'glass', color: 0x9fc6d8, roughness: 0.15, metalness: 0.15, flatShading: true });
const railGlassMat = new THREE.MeshStandardMaterial({ name: 'railGlass', color: 0xd4ebf3, roughness: 0.1, transparent: true, opacity: 0.35, side: THREE.DoubleSide });
const stoneMat = new THREE.MeshStandardMaterial({ name: 'stone', color: 0xd6d1c7, roughness: 0.95, flatShading: true });
const waterMat = new THREE.MeshStandardMaterial({ name: 'water', color: 0x4cb2d6, roughness: 0.1, metalness: 0.1, emissive: 0x1d6f91, emissiveIntensity: 0.25, flatShading: true });
const leafMat = new THREE.MeshStandardMaterial({ name: 'leaf', color: 0x5f8f4c, roughness: 0.9, flatShading: true });
const solarMat = new THREE.MeshStandardMaterial({ name: 'solar', color: 0x27324a, roughness: 0.3, metalness: 0.4, flatShading: true });
// Shared geometries
const boxGeo = new THREE.BoxGeometry(0.04, 3, 0.03);
const boxGeo2 = new THREE.BoxGeometry(0.04, 0.8, 0.03);
const boxGeo3 = new THREE.BoxGeometry(0.04, 0.6, 0.03);
const boxGeo4 = new THREE.BoxGeometry(0.03, 3, 0.04);
const boxGeo5 = new THREE.BoxGeometry(0.06, 2.6, 0.07);
const boxGeo6 = new THREE.BoxGeometry(0.06, 1.4, 0.07);
const boxGeo7 = new THREE.BoxGeometry(0.06, 1, 0.07);
const boxGeo8 = new THREE.BoxGeometry(0.08, 0.3, 0.8);
const boxGeo9 = new THREE.BoxGeometry(2, 0.06, 1.1);
const boxGeo10 = new THREE.BoxGeometry(2.04, 0.03, 0.04);
const boxGeo11 = new THREE.BoxGeometry(0.1, 0.38, 0.1);
const boxGeo12 = new THREE.BoxGeometry(0.03, 0.01, 3);
const boxGeo13 = new THREE.BoxGeometry(0.06, 0.6, 0.06);
// Parts
const modernHouse = new THREE.Group();
modernHouse.name = 'modernHouse';
modernHouse.position.set(0, 0, -2.6);
root.add(modernHouse);
const plinth = new THREE.Mesh(new THREE.BoxGeometry(12.2, 0.2, 8.2), stoneMat);
plinth.name = 'plinth';
plinth.position.set(-0.5, 0.1, 0);
modernHouse.add(plinth);
const groundVolume = new THREE.Mesh(new THREE.BoxGeometry(12, 3.1, 8), wallMat);
groundVolume.name = 'groundVolume';
groundVolume.position.set(-0.5, 1.75, 0);
modernHouse.add(groundVolume);
const groundRoof = new THREE.Mesh(new THREE.BoxGeometry(12.3, 0.25, 8.3), frameMat);
groundRoof.name = 'groundRoof';
groundRoof.position.set(-0.5, 3.425, 0);
modernHouse.add(groundRoof);
const upperVolume = new THREE.Mesh(new THREE.BoxGeometry(7.5, 3, 8.5), wallMat);
upperVolume.name = 'upperVolume';
upperVolume.position.set(3.25, 5.05, 0.75);
modernHouse.add(upperVolume);
const upperRoof = new THREE.Mesh(new THREE.BoxGeometry(7.8, 0.3, 8.8), frameMat);
upperRoof.name = 'upperRoof';
upperRoof.position.set(3.25, 6.7, 0.75);
modernHouse.add(upperRoof);
const roofGravel = new THREE.Mesh(new THREE.BoxGeometry(7.3, 0.03, 8.3), stoneMat);
roofGravel.name = 'roofGravel';
roofGravel.position.set(3.25, 6.865, 0.75);
modernHouse.add(roofGravel);
const soffit = new THREE.Mesh(new THREE.BoxGeometry(1.5, 0.04, 8.5), woodMat);
soffit.name = 'soffit';
soffit.position.set(6.33, 3.53, 0.75);
modernHouse.add(soffit);
const steelColumn = new THREE.Mesh(new THREE.BoxGeometry(0.12, 3.51, 0.12), frameMat);
steelColumn.name = 'steelColumn';
steelColumn.position.set(6.8, 1.755, 4.8);
modernHouse.add(steelColumn);
const claddingFront = new THREE.Mesh(new THREE.BoxGeometry(7.52, 3, 0.06), woodMat);
claddingFront.name = 'claddingFront';
claddingFront.position.set(3.25, 5.05, 5.03);
modernHouse.add(claddingFront);
const claddingSide = new THREE.Mesh(new THREE.BoxGeometry(0.06, 3, 8.52), woodMat);
claddingSide.name = 'claddingSide';
claddingSide.position.set(7.03, 5.05, 0.75);
modernHouse.add(claddingSide);
const groove = new THREE.Mesh(boxGeo, woodDarkMat);
groove.name = 'groove';
groove.position.set(-0.2, 5.05, 5.07);
modernHouse.add(groove);
const groove2 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove2.name = 'groove';
groove2.position.set(0.16, 3.95, 5.07);
modernHouse.add(groove2);
const groove3 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove3.name = 'groove';
groove3.position.set(0.16, 6.25, 5.07);
modernHouse.add(groove3);
const groove4 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove4.name = 'groove';
groove4.position.set(0.52, 3.95, 5.07);
modernHouse.add(groove4);
const groove5 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove5.name = 'groove';
groove5.position.set(0.52, 6.25, 5.07);
modernHouse.add(groove5);
const groove6 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove6.name = 'groove';
groove6.position.set(0.88, 3.95, 5.07);
modernHouse.add(groove6);
const groove7 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove7.name = 'groove';
groove7.position.set(0.88, 6.25, 5.07);
modernHouse.add(groove7);
const groove8 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove8.name = 'groove';
groove8.position.set(1.24, 3.95, 5.07);
modernHouse.add(groove8);
const groove9 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove9.name = 'groove';
groove9.position.set(1.24, 6.25, 5.07);
modernHouse.add(groove9);
const groove10 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove10.name = 'groove';
groove10.position.set(1.6, 3.95, 5.07);
modernHouse.add(groove10);
const groove11 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove11.name = 'groove';
groove11.position.set(1.6, 6.25, 5.07);
modernHouse.add(groove11);
const groove12 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove12.name = 'groove';
groove12.position.set(1.96, 3.95, 5.07);
modernHouse.add(groove12);
const groove13 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove13.name = 'groove';
groove13.position.set(1.96, 6.25, 5.07);
modernHouse.add(groove13);
const groove14 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove14.name = 'groove';
groove14.position.set(2.32, 3.95, 5.07);
modernHouse.add(groove14);
const groove15 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove15.name = 'groove';
groove15.position.set(2.32, 6.25, 5.07);
modernHouse.add(groove15);
const groove16 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove16.name = 'groove';
groove16.position.set(2.68, 3.95, 5.07);
modernHouse.add(groove16);
const groove17 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove17.name = 'groove';
groove17.position.set(2.68, 6.25, 5.07);
modernHouse.add(groove17);
const groove18 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove18.name = 'groove';
groove18.position.set(3.04, 3.95, 5.07);
modernHouse.add(groove18);
const groove19 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove19.name = 'groove';
groove19.position.set(3.04, 6.25, 5.07);
modernHouse.add(groove19);
const groove20 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove20.name = 'groove';
groove20.position.set(3.4, 3.95, 5.07);
modernHouse.add(groove20);
const groove21 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove21.name = 'groove';
groove21.position.set(3.4, 6.25, 5.07);
modernHouse.add(groove21);
const groove22 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove22.name = 'groove';
groove22.position.set(3.76, 3.95, 5.07);
modernHouse.add(groove22);
const groove23 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove23.name = 'groove';
groove23.position.set(3.76, 6.25, 5.07);
modernHouse.add(groove23);
const groove24 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove24.name = 'groove';
groove24.position.set(4.12, 3.95, 5.07);
modernHouse.add(groove24);
const groove25 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove25.name = 'groove';
groove25.position.set(4.12, 6.25, 5.07);
modernHouse.add(groove25);
const groove26 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove26.name = 'groove';
groove26.position.set(4.48, 3.95, 5.07);
modernHouse.add(groove26);
const groove27 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove27.name = 'groove';
groove27.position.set(4.48, 6.25, 5.07);
modernHouse.add(groove27);
const groove28 = new THREE.Mesh(boxGeo2, woodDarkMat);
groove28.name = 'groove';
groove28.position.set(4.84, 3.95, 5.07);
modernHouse.add(groove28);
const groove29 = new THREE.Mesh(boxGeo3, woodDarkMat);
groove29.name = 'groove';
groove29.position.set(4.84, 6.25, 5.07);
modernHouse.add(groove29);
const groove30 = new THREE.Mesh(boxGeo, woodDarkMat);
groove30.name = 'groove';
groove30.position.set(5.2, 5.05, 5.07);
modernHouse.add(groove30);
const groove31 = new THREE.Mesh(boxGeo, woodDarkMat);
groove31.name = 'groove';
groove31.position.set(5.56, 5.05, 5.07);
modernHouse.add(groove31);
const groove32 = new THREE.Mesh(boxGeo, woodDarkMat);
groove32.name = 'groove';
groove32.position.set(5.92, 5.05, 5.07);
modernHouse.add(groove32);
const groove33 = new THREE.Mesh(boxGeo, woodDarkMat);
groove33.name = 'groove';
groove33.position.set(6.28, 5.05, 5.07);
modernHouse.add(groove33);
const groove34 = new THREE.Mesh(boxGeo, woodDarkMat);
groove34.name = 'groove';
groove34.position.set(6.64, 5.05, 5.07);
modernHouse.add(groove34);
const groove35 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove35.name = 'groove';
groove35.position.set(7.07, 5.05, -3.2);
modernHouse.add(groove35);
const groove36 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove36.name = 'groove';
groove36.position.set(7.07, 5.05, -2.84);
modernHouse.add(groove36);
const groove37 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove37.name = 'groove';
groove37.position.set(7.07, 5.05, -2.48);
modernHouse.add(groove37);
const groove38 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove38.name = 'groove';
groove38.position.set(7.07, 5.05, -2.12);
modernHouse.add(groove38);
const groove39 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove39.name = 'groove';
groove39.position.set(7.07, 5.05, -1.76);
modernHouse.add(groove39);
const groove40 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove40.name = 'groove';
groove40.position.set(7.07, 5.05, -1.4);
modernHouse.add(groove40);
const groove41 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove41.name = 'groove';
groove41.position.set(7.07, 5.05, -1.04);
modernHouse.add(groove41);
const groove42 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove42.name = 'groove';
groove42.position.set(7.07, 5.05, -0.68);
modernHouse.add(groove42);
const groove43 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove43.name = 'groove';
groove43.position.set(7.07, 5.05, -0.32);
modernHouse.add(groove43);
const groove44 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove44.name = 'groove';
groove44.position.set(7.07, 5.05, 0.04);
modernHouse.add(groove44);
const groove45 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove45.name = 'groove';
groove45.position.set(7.07, 5.05, 0.4);
modernHouse.add(groove45);
const groove46 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove46.name = 'groove';
groove46.position.set(7.07, 5.05, 3.64);
modernHouse.add(groove46);
const groove47 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove47.name = 'groove';
groove47.position.set(7.07, 5.05, 4);
modernHouse.add(groove47);
const groove48 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove48.name = 'groove';
groove48.position.set(7.07, 5.05, 4.36);
modernHouse.add(groove48);
const groove49 = new THREE.Mesh(boxGeo4, woodDarkMat);
groove49.name = 'groove';
groove49.position.set(7.07, 5.05, 4.72);
modernHouse.add(groove49);
const groundFront = new THREE.Group();
groundFront.name = 'groundFront';
groundFront.position.set(0, 0, 4);
modernHouse.add(groundFront);
const glazingFrame = new THREE.Mesh(new THREE.BoxGeometry(5.34, 2.74, 0.08), frameMat);
glazingFrame.name = 'glazingFrame';
glazingFrame.position.set(-3.4, 1.55, 0.04);
groundFront.add(glazingFrame);
const glazing = new THREE.Mesh(new THREE.BoxGeometry(5.2, 2.6, 0.04), glassMat);
glazing.name = 'glazing';
glazing.position.set(-3.4, 1.55, 0.09);
groundFront.add(glazing);
const glazingMullion = new THREE.Mesh(boxGeo5, frameMat);
glazingMullion.name = 'glazingMullion';
glazingMullion.position.set(-4.7, 1.55, 0.1);
groundFront.add(glazingMullion);
const glazingMullion2 = new THREE.Mesh(boxGeo5, frameMat);
glazingMullion2.name = 'glazingMullion';
glazingMullion2.position.set(-3.4, 1.55, 0.1);
groundFront.add(glazingMullion2);
const glazingMullion3 = new THREE.Mesh(boxGeo5, frameMat);
glazingMullion3.name = 'glazingMullion';
glazingMullion3.position.set(-2.1, 1.55, 0.1);
groundFront.add(glazingMullion3);
const frontDoor = new THREE.Mesh(new THREE.BoxGeometry(1.1, 2.4, 0.08), woodDarkMat);
frontDoor.name = 'frontDoor';
frontDoor.position.set(2.6, 1.4, 0.05);
groundFront.add(frontDoor);
const doorPull = new THREE.Mesh(new THREE.BoxGeometry(0.05, 0.9, 0.05), frameMat);
doorPull.name = 'doorPull';
doorPull.position.set(2.95, 1.35, 0.12);
groundFront.add(doorPull);
const glazingFrame2 = new THREE.Mesh(new THREE.BoxGeometry(0.59, 2.44, 0.08), frameMat);
glazingFrame2.name = 'glazingFrame';
glazingFrame2.position.set(1.65, 1.45, 0.04);
groundFront.add(glazingFrame2);
const glazing2 = new THREE.Mesh(new THREE.BoxGeometry(0.45, 2.3, 0.04), glassMat);
glazing2.name = 'glazing';
glazing2.position.set(1.65, 1.45, 0.09);
groundFront.add(glazing2);
const glazingFrame3 = new THREE.Mesh(new THREE.BoxGeometry(1.54, 0.64, 0.08), frameMat);
glazingFrame3.name = 'glazingFrame';
glazingFrame3.position.set(4.4, 2.4, 0.04);
groundFront.add(glazingFrame3);
const glazing3 = new THREE.Mesh(new THREE.BoxGeometry(1.4, 0.5, 0.04), glassMat);
glazing3.name = 'glazing';
glazing3.position.set(4.4, 2.4, 0.09);
groundFront.add(glazing3);
const wallLamp = new THREE.Mesh(new THREE.BoxGeometry(0.32, 0.18, 0.12), frameMat);
wallLamp.name = 'wallLamp';
wallLamp.position.set(3.6, 2.4, 0.06);
groundFront.add(wallLamp);
const upperFront = new THREE.Group();
upperFront.name = 'upperFront';
upperFront.position.set(0, 0, 5.06);
modernHouse.add(upperFront);
const glazingFrame4 = new THREE.Mesh(new THREE.BoxGeometry(4.84, 1.54, 0.08), frameMat);
glazingFrame4.name = 'glazingFrame';
glazingFrame4.position.set(2.55, 5.15, 0.04);
upperFront.add(glazingFrame4);
const glazing4 = new THREE.Mesh(new THREE.BoxGeometry(4.7, 1.4, 0.04), glassMat);
glazing4.name = 'glazing';
glazing4.position.set(2.55, 5.15, 0.09);
upperFront.add(glazing4);
const glazingMullion4 = new THREE.Mesh(boxGeo6, frameMat);
glazingMullion4.name = 'glazingMullion';
glazingMullion4.position.set(1.375, 5.15, 0.1);
upperFront.add(glazingMullion4);
const glazingMullion5 = new THREE.Mesh(boxGeo6, frameMat);
glazingMullion5.name = 'glazingMullion';
glazingMullion5.position.set(2.55, 5.15, 0.1);
upperFront.add(glazingMullion5);
const glazingMullion6 = new THREE.Mesh(boxGeo6, frameMat);
glazingMullion6.name = 'glazingMullion';
glazingMullion6.position.set(3.725, 5.15, 0.1);
upperFront.add(glazingMullion6);
const upperSide = new THREE.Group();
upperSide.name = 'upperSide';
upperSide.position.set(7.06, 0, 0);
upperSide.rotation.set(0, deg(90), 0);
modernHouse.add(upperSide);
const glazingFrame5 = new THREE.Mesh(new THREE.BoxGeometry(2.74, 2.04, 0.08), frameMat);
glazingFrame5.name = 'glazingFrame';
glazingFrame5.position.set(-2, 5, 0.04);
upperSide.add(glazingFrame5);
const glazing5 = new THREE.Mesh(new THREE.BoxGeometry(2.6, 1.9, 0.04), glassMat);
glazing5.name = 'glazing';
glazing5.position.set(-2, 5, 0.09);
upperSide.add(glazing5);
const glazingMullion7 = new THREE.Mesh(new THREE.BoxGeometry(0.06, 1.9, 0.07), frameMat);
glazingMullion7.name = 'glazingMullion';
glazingMullion7.position.set(-2, 5, 0.1);
upperSide.add(glazingMullion7);
const upperTerraceDoor = new THREE.Group();
upperTerraceDoor.name = 'upperTerraceDoor';
upperTerraceDoor.position.set(-0.5, 0, 0);
upperTerraceDoor.rotation.set(0, deg(-90), 0);
modernHouse.add(upperTerraceDoor);
const glazingFrame6 = new THREE.Mesh(new THREE.BoxGeometry(1.94, 2.44, 0.08), frameMat);
glazingFrame6.name = 'glazingFrame';
glazingFrame6.position.set(-1.6, 4.75, 0.04);
upperTerraceDoor.add(glazingFrame6);
const glazing6 = new THREE.Mesh(new THREE.BoxGeometry(1.8, 2.3, 0.04), glassMat);
glazing6.name = 'glazing';
glazing6.position.set(-1.6, 4.75, 0.09);
upperTerraceDoor.add(glazing6);
const glazingMullion8 = new THREE.Mesh(new THREE.BoxGeometry(0.06, 2.3, 0.07), frameMat);
glazingMullion8.name = 'glazingMullion';
glazingMullion8.position.set(-1.6, 4.75, 0.1);
upperTerraceDoor.add(glazingMullion8);
const groundLeft = new THREE.Group();
groundLeft.name = 'groundLeft';
groundLeft.position.set(-6.5, 0, 0);
groundLeft.rotation.set(0, deg(-90), 0);
modernHouse.add(groundLeft);
const glazingFrame7 = new THREE.Mesh(new THREE.BoxGeometry(3.34, 1.14, 0.08), frameMat);
glazingFrame7.name = 'glazingFrame';
glazingFrame7.position.set(0.5, 2.1, 0.04);
groundLeft.add(glazingFrame7);
const glazing7 = new THREE.Mesh(new THREE.BoxGeometry(3.2, 1, 0.04), glassMat);
glazing7.name = 'glazing';
glazing7.position.set(0.5, 2.1, 0.09);
groundLeft.add(glazing7);
const glazingMullion9 = new THREE.Mesh(boxGeo7, frameMat);
glazingMullion9.name = 'glazingMullion';
glazingMullion9.position.set(-0.0333, 2.1, 0.1);
groundLeft.add(glazingMullion9);
const glazingMullion10 = new THREE.Mesh(boxGeo7, frameMat);
glazingMullion10.name = 'glazingMullion';
glazingMullion10.position.set(1.0333, 2.1, 0.1);
groundLeft.add(glazingMullion10);
const groundBack = new THREE.Group();
groundBack.name = 'groundBack';
groundBack.position.set(0, 0, -4);
groundBack.rotation.set(0, deg(180), 0);
modernHouse.add(groundBack);
const glazingFrame8 = new THREE.Mesh(new THREE.BoxGeometry(2.54, 1.14, 0.08), frameMat);
glazingFrame8.name = 'glazingFrame';
glazingFrame8.position.set(2.5, 2.1, 0.04);
groundBack.add(glazingFrame8);
const glazing8 = new THREE.Mesh(new THREE.BoxGeometry(2.4, 1, 0.04), glassMat);
glazing8.name = 'glazing';
glazing8.position.set(2.5, 2.1, 0.09);
groundBack.add(glazing8);
const glazingMullion11 = new THREE.Mesh(boxGeo7, frameMat);
glazingMullion11.name = 'glazingMullion';
glazingMullion11.position.set(2.5, 2.1, 0.1);
groundBack.add(glazingMullion11);
const glazingFrame9 = new THREE.Mesh(new THREE.BoxGeometry(1.14, 1.74, 0.08), frameMat);
glazingFrame9.name = 'glazingFrame';
glazingFrame9.position.set(-2.5, 1.8, 0.04);
groundBack.add(glazingFrame9);
const glazing9 = new THREE.Mesh(new THREE.BoxGeometry(1, 1.6, 0.04), glassMat);
glazing9.name = 'glazing';
glazing9.position.set(-2.5, 1.8, 0.09);
groundBack.add(glazing9);
const upperBack = new THREE.Group();
upperBack.name = 'upperBack';
upperBack.position.set(3.25, 0, -3.5);
upperBack.rotation.set(0, deg(180), 0);
modernHouse.add(upperBack);
const glazingFrame10 = new THREE.Mesh(new THREE.BoxGeometry(4.14, 1.14, 0.08), frameMat);
glazingFrame10.name = 'glazingFrame';
glazingFrame10.position.set(0, 5.05, 0.04);
upperBack.add(glazingFrame10);
const glazing10 = new THREE.Mesh(new THREE.BoxGeometry(4, 1, 0.04), glassMat);
glazing10.name = 'glazing';
glazing10.position.set(0, 5.05, 0.09);
upperBack.add(glazing10);
const glazingMullion12 = new THREE.Mesh(boxGeo7, frameMat);
glazingMullion12.name = 'glazingMullion';
glazingMullion12.position.set(-0.6667, 5.05, 0.1);
upperBack.add(glazingMullion12);
const glazingMullion13 = new THREE.Mesh(boxGeo7, frameMat);
glazingMullion13.name = 'glazingMullion';
glazingMullion13.position.set(0.6667, 5.05, 0.1);
upperBack.add(glazingMullion13);
const groundRight = new THREE.Group();
groundRight.name = 'groundRight';
groundRight.position.set(5.5, 0, 0);
groundRight.rotation.set(0, deg(90), 0);
modernHouse.add(groundRight);
const glazingFrame11 = new THREE.Mesh(new THREE.BoxGeometry(1.34, 1.14, 0.08), frameMat);
glazingFrame11.name = 'glazingFrame';
glazingFrame11.position.set(1.2, 2.1, 0.04);
groundRight.add(glazingFrame11);
const glazing11 = new THREE.Mesh(new THREE.BoxGeometry(1.2, 1, 0.04), glassMat);
glazing11.name = 'glazing';
glazing11.position.set(1.2, 2.1, 0.09);
groundRight.add(glazing11);
const roofDeck = new THREE.Mesh(new THREE.BoxGeometry(5.85, 0.05, 8), woodMat);
roofDeck.name = 'roofDeck';
roofDeck.position.set(-3.475, 3.575, 0);
modernHouse.add(roofDeck);
const balustrade = new THREE.Mesh(new THREE.BoxGeometry(5.85, 1, 0.03), railGlassMat);
balustrade.name = 'balustrade';
balustrade.position.set(-3.475, 4.1, 4.05);
modernHouse.add(balustrade);
const balustrade2 = new THREE.Mesh(new THREE.BoxGeometry(0.03, 1, 8.1), railGlassMat);
balustrade2.name = 'balustrade';
balustrade2.position.set(-6.55, 4.1, 0);
modernHouse.add(balustrade2);
const handrail = new THREE.Mesh(new THREE.BoxGeometry(5.95, 0.05, 0.06), frameMat);
handrail.name = 'handrail';
handrail.position.set(-3.475, 4.625, 4.05);
modernHouse.add(handrail);
const handrail2 = new THREE.Mesh(new THREE.BoxGeometry(0.06, 0.05, 8.1), frameMat);
handrail2.name = 'handrail';
handrail2.position.set(-6.55, 4.625, 0);
modernHouse.add(handrail2);
const roofPlanter = new THREE.Mesh(new THREE.BoxGeometry(2.2, 0.5, 0.6), stoneMat);
roofPlanter.name = 'roofPlanter';
roofPlanter.position.set(-5, 3.8, -3.5);
modernHouse.add(roofPlanter);
const roofShrub = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(0.38, 0), 0.05, 20), leafMat);
roofShrub.name = 'roofShrub';
roofShrub.position.set(-5.65, 4.3, -3.5);
modernHouse.add(roofShrub);
const roofShrub2 = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(0.38, 0), 0.05, 21), leafMat);
roofShrub2.name = 'roofShrub';
roofShrub2.position.set(-5, 4.3, -3.5);
modernHouse.add(roofShrub2);
const roofShrub3 = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(0.38, 0), 0.05, 22), leafMat);
roofShrub3.name = 'roofShrub';
roofShrub3.position.set(-4.35, 4.3, -3.5);
modernHouse.add(roofShrub3);
const loungerBase = new THREE.Mesh(new THREE.BoxGeometry(1.6, 0.05, 0.9), frameMat);
loungerBase.name = 'loungerBase';
loungerBase.position.set(-3.8, 3.875, 1.4);
modernHouse.add(loungerBase);
const loungerLeg = new THREE.Mesh(boxGeo8, frameMat);
loungerLeg.name = 'loungerLeg';
loungerLeg.position.set(-4.5, 3.7, 1.4);
modernHouse.add(loungerLeg);
const loungerLeg2 = new THREE.Mesh(boxGeo8, frameMat);
loungerLeg2.name = 'loungerLeg';
loungerLeg2.position.set(-3.1, 3.7, 1.4);
modernHouse.add(loungerLeg2);
const loungerPad = new THREE.Mesh(new THREE.BoxGeometry(1.6, 0.08, 0.85), wallMat);
loungerPad.name = 'loungerPad';
loungerPad.position.set(-3.8, 3.94, 1.4);
modernHouse.add(loungerPad);
const solarPanel = new THREE.Group();
solarPanel.name = 'solarPanel';
solarPanel.position.set(0.95, 7.1, -0.85);
solarPanel.rotation.set(deg(18), 0, 0);
modernHouse.add(solarPanel);
const pvPanel = new THREE.Mesh(boxGeo9, solarMat);
pvPanel.name = 'pvPanel';
solarPanel.add(pvPanel);
const pvFrame = new THREE.Mesh(boxGeo10, frameMat);
pvFrame.name = 'pvFrame';
pvFrame.position.set(0, 0.04, 0);
solarPanel.add(pvFrame);
const pvStand = new THREE.Mesh(boxGeo11, frameMat);
pvStand.name = 'pvStand';
pvStand.position.set(0.95, 7.04, -1.25);
modernHouse.add(pvStand);
const solarPanel2 = new THREE.Group();
solarPanel2.name = 'solarPanel';
solarPanel2.position.set(3.25, 7.1, -0.85);
solarPanel2.rotation.set(deg(18), 0, 0);
modernHouse.add(solarPanel2);
const pvPanel2 = new THREE.Mesh(boxGeo9, solarMat);
pvPanel2.name = 'pvPanel';
solarPanel2.add(pvPanel2);
const pvFrame2 = new THREE.Mesh(boxGeo10, frameMat);
pvFrame2.name = 'pvFrame';
pvFrame2.position.set(0, 0.04, 0);
solarPanel2.add(pvFrame2);
const pvStand2 = new THREE.Mesh(boxGeo11, frameMat);
pvStand2.name = 'pvStand';
pvStand2.position.set(3.25, 7.04, -1.25);
modernHouse.add(pvStand2);
const solarPanel3 = new THREE.Group();
solarPanel3.name = 'solarPanel';
solarPanel3.position.set(5.55, 7.1, -0.85);
solarPanel3.rotation.set(deg(18), 0, 0);
modernHouse.add(solarPanel3);
const pvPanel3 = new THREE.Mesh(boxGeo9, solarMat);
pvPanel3.name = 'pvPanel';
solarPanel3.add(pvPanel3);
const pvFrame3 = new THREE.Mesh(boxGeo10, frameMat);
pvFrame3.name = 'pvFrame';
pvFrame3.position.set(0, 0.04, 0);
solarPanel3.add(pvFrame3);
const pvStand3 = new THREE.Mesh(boxGeo11, frameMat);
pvStand3.name = 'pvStand';
pvStand3.position.set(5.55, 7.04, -1.25);
modernHouse.add(pvStand3);
const terraceDeck = new THREE.Mesh(new THREE.BoxGeometry(7.2, 0.3, 3), woodMat);
terraceDeck.name = 'terraceDeck';
terraceDeck.position.set(-3, 0.15, 5.5);
modernHouse.add(terraceDeck);
const deckLine = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine.name = 'deckLine';
deckLine.position.set(-6.2, 0.305, 5.5);
modernHouse.add(deckLine);
const deckLine2 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine2.name = 'deckLine';
deckLine2.position.set(-5.4, 0.305, 5.5);
modernHouse.add(deckLine2);
const deckLine3 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine3.name = 'deckLine';
deckLine3.position.set(-4.6, 0.305, 5.5);
modernHouse.add(deckLine3);
const deckLine4 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine4.name = 'deckLine';
deckLine4.position.set(-3.8, 0.305, 5.5);
modernHouse.add(deckLine4);
const deckLine5 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine5.name = 'deckLine';
deckLine5.position.set(-3, 0.305, 5.5);
modernHouse.add(deckLine5);
const deckLine6 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine6.name = 'deckLine';
deckLine6.position.set(-2.2, 0.305, 5.5);
modernHouse.add(deckLine6);
const deckLine7 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine7.name = 'deckLine';
deckLine7.position.set(-1.4, 0.305, 5.5);
modernHouse.add(deckLine7);
const deckLine8 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine8.name = 'deckLine';
deckLine8.position.set(-0.6, 0.305, 5.5);
modernHouse.add(deckLine8);
const deckLine9 = new THREE.Mesh(boxGeo12, woodDarkMat);
deckLine9.name = 'deckLine';
deckLine9.position.set(0.2, 0.305, 5.5);
modernHouse.add(deckLine9);
const terraceStep = new THREE.Mesh(new THREE.BoxGeometry(0.45, 0.15, 1.6), woodMat);
terraceStep.name = 'terraceStep';
terraceStep.position.set(0.82, 0.075, 6);
modernHouse.add(terraceStep);
const entrancePath = new THREE.Mesh(new THREE.BoxGeometry(1.6, 0.12, 2.6), stoneMat);
entrancePath.name = 'entrancePath';
entrancePath.position.set(2.6, 0.06, 5.3);
modernHouse.add(entrancePath);
const planter = new THREE.Mesh(new THREE.BoxGeometry(0.6, 0.55, 2.2), stoneMat);
planter.name = 'planter';
planter.position.set(4.1, 0.275, 5.5);
modernHouse.add(planter);
const shrub = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(0.4176, 0), 0.05, 30), leafMat);
shrub.name = 'shrub';
shrub.position.set(4.1, 0.75, 4.75);
modernHouse.add(shrub);
const shrub2 = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(0.3631, 0), 0.05, 31), leafMat);
shrub2.name = 'shrub';
shrub2.position.set(4.1, 0.75, 5.45);
modernHouse.add(shrub2);
const shrub3 = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(0.3965, 0), 0.05, 32), leafMat);
shrub3.name = 'shrub';
shrub3.position.set(4.1, 0.75, 6.15);
modernHouse.add(shrub3);
const treeTrunk = new THREE.Mesh(new THREE.CylinderGeometry(0.08, 0.1, 2.4, 6), woodDarkMat);
treeTrunk.name = 'treeTrunk';
treeTrunk.position.set(-7.4, 1.2, 2.6);
modernHouse.add(treeTrunk);
const treeCrown = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(1, 0), 0.1, 41), leafMat);
treeCrown.name = 'treeCrown';
treeCrown.position.set(-7.4, 2.9, 2.6);
modernHouse.add(treeCrown);
const treeCrown2 = new THREE.Mesh(jitter(new THREE.IcosahedronGeometry(0.7, 0), 0.08, 42), leafMat);
treeCrown2.name = 'treeCrown';
treeCrown2.position.set(-7.1, 3.6, 2.4);
modernHouse.add(treeCrown2);
const poolCoping = new THREE.Mesh(new THREE.BoxGeometry(7.2, 0.3, 3.6), stoneMat);
poolCoping.name = 'poolCoping';
poolCoping.position.set(-3, 0.15, 9);
modernHouse.add(poolCoping);
const poolWater = new THREE.Mesh(new THREE.BoxGeometry(6.4, 0.06, 2.8), waterMat);
poolWater.name = 'poolWater';
poolWater.position.set(-3, 0.29, 9);
modernHouse.add(poolWater);
const poolLadder = new THREE.Mesh(boxGeo13, frameMat);
poolLadder.name = 'poolLadder';
poolLadder.position.set(-0.62, 0.6, 7.65);
modernHouse.add(poolLadder);
const poolLadder2 = new THREE.Mesh(boxGeo13, frameMat);
poolLadder2.name = 'poolLadder';
poolLadder2.position.set(-0.18, 0.6, 7.65);
modernHouse.add(poolLadder2);
const poolLadderTop = new THREE.Mesh(new THREE.BoxGeometry(0.5, 0.05, 0.05), frameMat);
poolLadderTop.name = 'poolLadderTop';
poolLadderTop.position.set(-0.4, 0.88, 7.65);
modernHouse.add(poolLadderTop);
root.traverse((o) => {
if (o.isMesh) {
o.castShadow = true;
o.receiveShadow = true;
}
});
return root;
}
export default createModernHouse;
Ratings & comments
0 comments
No comments yet. Share how you used this model or what could be better.
Related models
Same category or similar tags









