삼각형 1.3천개4.05 × 10.9 × 4.72 m
코드에서 사용하기
에디터에서 리믹스watchtower.js · 531줄
독립형 ES 모듈이에요 — three에만 의존해요. 팩토리 함수를 호출하고 그룹을 씬에 추가하세요.
/**
* Wooden Watchtower — Codels 3D model library
* License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
* Triangles: 1,300 · Size (W × H × D): 4.05 × 10.90 × 4.71 m
*
* Usage:
* import { createWatchtower } from './watchtower.js';
*
* const model = createWatchtower();
* model.position.set(0, 0, 0);
* scene.add(model);
*/
import * as THREE from 'three';
const deg = THREE.MathUtils.degToRad;
export function createWatchtower() {
const root = new THREE.Group();
root.name = 'Watchtower';
// Materials
const woodMat = new THREE.MeshStandardMaterial({ name: 'wood', color: 0x8d643c, roughness: 0.9, flatShading: true });
const darkMat = new THREE.MeshStandardMaterial({ name: 'dark', color: 0x5c4029, roughness: 0.95, flatShading: true });
const thatchMat = new THREE.MeshStandardMaterial({ name: 'thatch', color: 0xa8834a, roughness: 1, flatShading: true });
const stoneMat = new THREE.MeshStandardMaterial({ name: 'stone', color: 0x86827b, roughness: 0.95, flatShading: true });
// Shared geometries
const boxGeo = new THREE.BoxGeometry(0.55, 0.28, 0.55);
const boxGeo2 = new THREE.BoxGeometry(0.24, 7.7392, 0.24);
const boxGeo3 = new THREE.BoxGeometry(0.12, 4.0408, 0.12);
const boxGeo4 = new THREE.BoxGeometry(0.12, 3.7787, 0.12);
const boxGeo5 = new THREE.BoxGeometry(0.14, 3.7048, 0.14);
const boxGeo6 = new THREE.BoxGeometry(0.14, 3.3477, 0.14);
const boxGeo7 = new THREE.BoxGeometry(0.1, 1.2593, 0.1);
const boxGeo8 = new THREE.BoxGeometry(0.16, 1.2593, 0.05);
const boxGeo9 = new THREE.BoxGeometry(0.11, 1.05, 0.11);
const boxGeo10 = new THREE.BoxGeometry(0.1, 3.3342, 0.1);
const boxGeo11 = new THREE.BoxGeometry(0.16, 3.3342, 0.05);
const boxGeo12 = new THREE.BoxGeometry(0.08, 6.4566, 0.08);
const boxGeo13 = new THREE.BoxGeometry(0.62, 0.05, 0.06);
const boxGeo14 = new THREE.BoxGeometry(0.16, 2.6523, 0.16);
// Parts
const footing = new THREE.Mesh(boxGeo, stoneMat);
footing.name = 'footing';
footing.position.set(-1.75, 0.14, -1.75);
root.add(footing);
const leg = new THREE.Mesh(boxGeo2, woodMat);
leg.name = 'leg';
leg.position.set(-1.475, 4.05, -1.475);
leg.rotation.set(0, deg(135), deg(5.7682));
root.add(leg);
const footing2 = new THREE.Mesh(boxGeo, stoneMat);
footing2.name = 'footing';
footing2.position.set(-1.75, 0.14, 1.75);
root.add(footing2);
const leg2 = new THREE.Mesh(boxGeo2, woodMat);
leg2.name = 'leg';
leg2.position.set(-1.475, 4.05, 1.475);
leg2.rotation.set(0, deg(-135), deg(5.7682));
root.add(leg2);
const footing3 = new THREE.Mesh(boxGeo, stoneMat);
footing3.name = 'footing';
footing3.position.set(1.75, 0.14, -1.75);
root.add(footing3);
const leg3 = new THREE.Mesh(boxGeo2, woodMat);
leg3.name = 'leg';
leg3.position.set(1.475, 4.05, -1.475);
leg3.rotation.set(0, deg(45), deg(5.7682));
root.add(leg3);
const footing4 = new THREE.Mesh(boxGeo, stoneMat);
footing4.name = 'footing';
footing4.position.set(1.75, 0.14, 1.75);
root.add(footing4);
const leg4 = new THREE.Mesh(boxGeo2, woodMat);
leg4.name = 'leg';
leg4.position.set(1.475, 4.05, 1.475);
leg4.rotation.set(0, deg(-45), deg(5.7682));
root.add(leg4);
const brace = new THREE.Mesh(boxGeo3, darkMat);
brace.name = 'brace';
brace.position.set(-0.0827, 1.6875, 1.7625);
brace.rotation.set(0, deg(-177.1009), deg(54.0026));
root.add(brace);
const brace2 = new THREE.Mesh(boxGeo3, darkMat);
brace2.name = 'brace';
brace2.position.set(0.0827, 1.6875, 1.7625);
brace2.rotation.set(0, deg(-2.8991), deg(54.0026));
root.add(brace2);
const brace3 = new THREE.Mesh(boxGeo4, darkMat);
brace3.name = 'brace';
brace3.position.set(-0.0827, 4.0625, 1.5972);
brace3.rotation.set(0, deg(-176.7748), deg(51.0583));
root.add(brace3);
const brace4 = new THREE.Mesh(boxGeo4, darkMat);
brace4.name = 'brace';
brace4.position.set(0.0827, 4.0625, 1.5972);
brace4.rotation.set(0, deg(-3.2252), deg(51.0583));
root.add(brace4);
const girt = new THREE.Mesh(boxGeo5, woodMat);
girt.name = 'girt';
girt.position.set(0, 0.5, 1.8452);
girt.rotation.set(0, deg(180), deg(90));
root.add(girt);
const girt2 = new THREE.Mesh(boxGeo6, woodMat);
girt2.name = 'girt';
girt2.position.set(0, 2.875, 1.6798);
girt2.rotation.set(0, deg(180), deg(90));
root.add(girt2);
const brace5 = new THREE.Mesh(boxGeo3, darkMat);
brace5.name = 'brace';
brace5.position.set(1.7625, 1.6875, 0.0827);
brace5.rotation.set(0, deg(-87.1009), deg(54.0026));
root.add(brace5);
const brace6 = new THREE.Mesh(boxGeo3, darkMat);
brace6.name = 'brace';
brace6.position.set(1.7625, 1.6875, -0.0827);
brace6.rotation.set(0, deg(87.1009), deg(54.0026));
root.add(brace6);
const brace7 = new THREE.Mesh(boxGeo4, darkMat);
brace7.name = 'brace';
brace7.position.set(1.5972, 4.0625, 0.0827);
brace7.rotation.set(0, deg(-86.7748), deg(51.0583));
root.add(brace7);
const brace8 = new THREE.Mesh(boxGeo4, darkMat);
brace8.name = 'brace';
brace8.position.set(1.5972, 4.0625, -0.0827);
brace8.rotation.set(0, deg(86.7748), deg(51.0583));
root.add(brace8);
const girt3 = new THREE.Mesh(boxGeo5, woodMat);
girt3.name = 'girt';
girt3.position.set(1.8452, 0.5, 0);
girt3.rotation.set(0, deg(-90), deg(90));
root.add(girt3);
const girt4 = new THREE.Mesh(boxGeo6, woodMat);
girt4.name = 'girt';
girt4.position.set(1.6798, 2.875, 0);
girt4.rotation.set(0, deg(-90), deg(90));
root.add(girt4);
const brace9 = new THREE.Mesh(boxGeo3, darkMat);
brace9.name = 'brace';
brace9.position.set(0.0827, 1.6875, -1.7625);
brace9.rotation.set(0, deg(2.8991), deg(54.0026));
root.add(brace9);
const brace10 = new THREE.Mesh(boxGeo3, darkMat);
brace10.name = 'brace';
brace10.position.set(-0.0827, 1.6875, -1.7625);
brace10.rotation.set(0, deg(177.1009), deg(54.0026));
root.add(brace10);
const brace11 = new THREE.Mesh(boxGeo4, darkMat);
brace11.name = 'brace';
brace11.position.set(0.0827, 4.0625, -1.5972);
brace11.rotation.set(0, deg(3.2252), deg(51.0583));
root.add(brace11);
const brace12 = new THREE.Mesh(boxGeo4, darkMat);
brace12.name = 'brace';
brace12.position.set(-0.0827, 4.0625, -1.5972);
brace12.rotation.set(0, deg(176.7748), deg(51.0583));
root.add(brace12);
const girt5 = new THREE.Mesh(boxGeo5, woodMat);
girt5.name = 'girt';
girt5.position.set(0, 0.5, -1.8452);
girt5.rotation.set(0, 0, deg(90));
root.add(girt5);
const girt6 = new THREE.Mesh(boxGeo6, woodMat);
girt6.name = 'girt';
girt6.position.set(0, 2.875, -1.6798);
girt6.rotation.set(0, 0, deg(90));
root.add(girt6);
const brace13 = new THREE.Mesh(boxGeo3, darkMat);
brace13.name = 'brace';
brace13.position.set(-1.7625, 1.6875, -0.0827);
brace13.rotation.set(0, deg(92.8991), deg(54.0026));
root.add(brace13);
const brace14 = new THREE.Mesh(boxGeo3, darkMat);
brace14.name = 'brace';
brace14.position.set(-1.7625, 1.6875, 0.0827);
brace14.rotation.set(0, deg(-92.8991), deg(54.0026));
root.add(brace14);
const brace15 = new THREE.Mesh(boxGeo4, darkMat);
brace15.name = 'brace';
brace15.position.set(-1.5972, 4.0625, -0.0827);
brace15.rotation.set(0, deg(93.2252), deg(51.0583));
root.add(brace15);
const brace16 = new THREE.Mesh(boxGeo4, darkMat);
brace16.name = 'brace';
brace16.position.set(-1.5972, 4.0625, 0.0827);
brace16.rotation.set(0, deg(-93.2252), deg(51.0583));
root.add(brace16);
const girt7 = new THREE.Mesh(boxGeo5, woodMat);
girt7.name = 'girt';
girt7.position.set(-1.8452, 0.5, 0);
girt7.rotation.set(0, deg(90), deg(90));
root.add(girt7);
const girt8 = new THREE.Mesh(boxGeo6, woodMat);
girt8.name = 'girt';
girt8.position.set(-1.6798, 2.875, 0);
girt8.rotation.set(0, deg(90), deg(90));
root.add(girt8);
const joists = new THREE.Mesh(new THREE.BoxGeometry(3.2342, 0.2, 3.2342), darkMat);
joists.name = 'joists';
joists.position.set(0, 5.3, 0);
root.add(joists);
const plank = new THREE.Mesh(new THREE.BoxGeometry(3.4532, 0.08, 0.3516), woodMat);
plank.name = 'plank';
plank.position.set(0.0164, 5.44, -1.5263);
root.add(plank);
const plank2 = new THREE.Mesh(new THREE.BoxGeometry(3.4062, 0.08, 0.3516), darkMat);
plank2.name = 'plank';
plank2.position.set(0.0074, 5.44, -1.1447);
root.add(plank2);
const plank3 = new THREE.Mesh(new THREE.BoxGeometry(3.3927, 0.08, 0.3516), woodMat);
plank3.name = 'plank';
plank3.position.set(0.0055, 5.44, -0.7632);
root.add(plank3);
const plank4 = new THREE.Mesh(new THREE.BoxGeometry(3.4562, 0.08, 0.3516), woodMat);
plank4.name = 'plank';
plank4.position.set(-0.0025, 5.44, -0.3816);
root.add(plank4);
const plank5 = new THREE.Mesh(new THREE.BoxGeometry(3.4747, 0.08, 0.3516), darkMat);
plank5.name = 'plank';
plank5.position.set(-0.0162, 5.44, 0);
root.add(plank5);
const plank6 = new THREE.Mesh(new THREE.BoxGeometry(3.4622, 0.08, 0.3516), woodMat);
plank6.name = 'plank';
plank6.position.set(0.0144, 5.44, 0.3816);
root.add(plank6);
const plank7 = new THREE.Mesh(new THREE.BoxGeometry(3.4502, 0.08, 0.3516), woodMat);
plank7.name = 'plank';
plank7.position.set(-0.0292, 5.44, 0.7632);
root.add(plank7);
const plank8 = new THREE.Mesh(new THREE.BoxGeometry(3.4307, 0.08, 0.3516), darkMat);
plank8.name = 'plank';
plank8.position.set(-0.012, 5.44, 1.1447);
root.add(plank8);
const plank9 = new THREE.Mesh(new THREE.BoxGeometry(3.4738, 0.08, 0.3516), woodMat);
plank9.name = 'plank';
plank9.position.set(-0.0127, 5.44, 1.5263);
root.add(plank9);
const topRail = new THREE.Mesh(boxGeo7, woodMat);
topRail.name = 'topRail';
topRail.position.set(-1.0374, 6.48, 1.6671);
topRail.rotation.set(0, deg(180), deg(90));
root.add(topRail);
const board = new THREE.Mesh(boxGeo8, woodMat);
board.name = 'board';
board.position.set(-1.0374, 5.68, 1.6671);
board.rotation.set(0, deg(180), deg(90));
root.add(board);
const board2 = new THREE.Mesh(boxGeo8, darkMat);
board2.name = 'board';
board2.position.set(-1.0374, 5.85, 1.6671);
board2.rotation.set(0, deg(180), deg(90));
root.add(board2);
const board3 = new THREE.Mesh(boxGeo8, woodMat);
board3.name = 'board';
board3.position.set(-1.0374, 6.02, 1.6671);
board3.rotation.set(0, deg(180), deg(90));
root.add(board3);
const railPost = new THREE.Mesh(boxGeo9, woodMat);
railPost.name = 'railPost';
railPost.position.set(-1.6671, 6.005, 1.6671);
root.add(railPost);
const railPost2 = new THREE.Mesh(boxGeo9, woodMat);
railPost2.name = 'railPost';
railPost2.position.set(-0.4078, 6.005, 1.6671);
root.add(railPost2);
const topRail2 = new THREE.Mesh(boxGeo7, woodMat);
topRail2.name = 'topRail';
topRail2.position.set(1.0374, 6.48, 1.6671);
topRail2.rotation.set(0, deg(180), deg(90));
root.add(topRail2);
const board4 = new THREE.Mesh(boxGeo8, woodMat);
board4.name = 'board';
board4.position.set(1.0374, 5.68, 1.6671);
board4.rotation.set(0, deg(180), deg(90));
root.add(board4);
const board5 = new THREE.Mesh(boxGeo8, darkMat);
board5.name = 'board';
board5.position.set(1.0374, 5.85, 1.6671);
board5.rotation.set(0, deg(180), deg(90));
root.add(board5);
const board6 = new THREE.Mesh(boxGeo8, woodMat);
board6.name = 'board';
board6.position.set(1.0374, 6.02, 1.6671);
board6.rotation.set(0, deg(180), deg(90));
root.add(board6);
const railPost3 = new THREE.Mesh(boxGeo9, woodMat);
railPost3.name = 'railPost';
railPost3.position.set(0.4078, 6.005, 1.6671);
root.add(railPost3);
const railPost4 = new THREE.Mesh(boxGeo9, woodMat);
railPost4.name = 'railPost';
railPost4.position.set(1.6671, 6.005, 1.6671);
root.add(railPost4);
const topRail3 = new THREE.Mesh(boxGeo10, woodMat);
topRail3.name = 'topRail';
topRail3.position.set(1.6671, 6.48, 0);
topRail3.rotation.set(0, deg(-90), deg(90));
root.add(topRail3);
const board7 = new THREE.Mesh(boxGeo11, woodMat);
board7.name = 'board';
board7.position.set(1.6671, 5.68, 0);
board7.rotation.set(0, deg(-90), deg(90));
root.add(board7);
const board8 = new THREE.Mesh(boxGeo11, darkMat);
board8.name = 'board';
board8.position.set(1.6671, 5.85, 0);
board8.rotation.set(0, deg(-90), deg(90));
root.add(board8);
const board9 = new THREE.Mesh(boxGeo11, woodMat);
board9.name = 'board';
board9.position.set(1.6671, 6.02, 0);
board9.rotation.set(0, deg(-90), deg(90));
root.add(board9);
const railPost5 = new THREE.Mesh(boxGeo9, woodMat);
railPost5.name = 'railPost';
railPost5.position.set(1.6671, 6.005, 1.6671);
root.add(railPost5);
const railPost6 = new THREE.Mesh(boxGeo9, woodMat);
railPost6.name = 'railPost';
railPost6.position.set(1.6671, 6.005, 0.5557);
root.add(railPost6);
const railPost7 = new THREE.Mesh(boxGeo9, woodMat);
railPost7.name = 'railPost';
railPost7.position.set(1.6671, 6.005, -0.5557);
root.add(railPost7);
const railPost8 = new THREE.Mesh(boxGeo9, woodMat);
railPost8.name = 'railPost';
railPost8.position.set(1.6671, 6.005, -1.6671);
root.add(railPost8);
const topRail4 = new THREE.Mesh(boxGeo10, woodMat);
topRail4.name = 'topRail';
topRail4.position.set(0, 6.48, -1.6671);
topRail4.rotation.set(0, 0, deg(90));
root.add(topRail4);
const board10 = new THREE.Mesh(boxGeo11, woodMat);
board10.name = 'board';
board10.position.set(0, 5.68, -1.6671);
board10.rotation.set(0, 0, deg(90));
root.add(board10);
const board11 = new THREE.Mesh(boxGeo11, darkMat);
board11.name = 'board';
board11.position.set(0, 5.85, -1.6671);
board11.rotation.set(0, 0, deg(90));
root.add(board11);
const board12 = new THREE.Mesh(boxGeo11, woodMat);
board12.name = 'board';
board12.position.set(0, 6.02, -1.6671);
board12.rotation.set(0, 0, deg(90));
root.add(board12);
const railPost9 = new THREE.Mesh(boxGeo9, woodMat);
railPost9.name = 'railPost';
railPost9.position.set(1.6671, 6.005, -1.6671);
root.add(railPost9);
const railPost10 = new THREE.Mesh(boxGeo9, woodMat);
railPost10.name = 'railPost';
railPost10.position.set(0.5557, 6.005, -1.6671);
root.add(railPost10);
const railPost11 = new THREE.Mesh(boxGeo9, woodMat);
railPost11.name = 'railPost';
railPost11.position.set(-0.5557, 6.005, -1.6671);
root.add(railPost11);
const railPost12 = new THREE.Mesh(boxGeo9, woodMat);
railPost12.name = 'railPost';
railPost12.position.set(-1.6671, 6.005, -1.6671);
root.add(railPost12);
const topRail5 = new THREE.Mesh(boxGeo10, woodMat);
topRail5.name = 'topRail';
topRail5.position.set(-1.6671, 6.48, 0);
topRail5.rotation.set(0, deg(90), deg(90));
root.add(topRail5);
const board13 = new THREE.Mesh(boxGeo11, woodMat);
board13.name = 'board';
board13.position.set(-1.6671, 5.68, 0);
board13.rotation.set(0, deg(90), deg(90));
root.add(board13);
const board14 = new THREE.Mesh(boxGeo11, darkMat);
board14.name = 'board';
board14.position.set(-1.6671, 5.85, 0);
board14.rotation.set(0, deg(90), deg(90));
root.add(board14);
const board15 = new THREE.Mesh(boxGeo11, woodMat);
board15.name = 'board';
board15.position.set(-1.6671, 6.02, 0);
board15.rotation.set(0, deg(90), deg(90));
root.add(board15);
const railPost13 = new THREE.Mesh(boxGeo9, woodMat);
railPost13.name = 'railPost';
railPost13.position.set(-1.6671, 6.005, -1.6671);
root.add(railPost13);
const railPost14 = new THREE.Mesh(boxGeo9, woodMat);
railPost14.name = 'railPost';
railPost14.position.set(-1.6671, 6.005, -0.5557);
root.add(railPost14);
const railPost15 = new THREE.Mesh(boxGeo9, woodMat);
railPost15.name = 'railPost';
railPost15.position.set(-1.6671, 6.005, 0.5557);
root.add(railPost15);
const railPost16 = new THREE.Mesh(boxGeo9, woodMat);
railPost16.name = 'railPost';
railPost16.position.set(-1.6671, 6.005, 1.6671);
root.add(railPost16);
const ladderRail = new THREE.Mesh(boxGeo12, woodMat);
ladderRail.name = 'ladderRail';
ladderRail.position.set(-0.28, 3.2, 2.2235);
ladderRail.rotation.set(0, deg(-90), deg(7.5909));
root.add(ladderRail);
const ladderRail2 = new THREE.Mesh(boxGeo12, woodMat);
ladderRail2.name = 'ladderRail';
ladderRail2.position.set(0.28, 3.2, 2.2235);
ladderRail2.rotation.set(0, deg(-90), deg(7.5909));
root.add(ladderRail2);
const rung = new THREE.Mesh(boxGeo13, darkMat);
rung.name = 'rung';
rung.position.set(0, 0.32, 2.6074);
root.add(rung);
const rung2 = new THREE.Mesh(boxGeo13, darkMat);
rung2.name = 'rung';
rung2.position.set(0, 0.64, 2.5647);
root.add(rung2);
const rung3 = new THREE.Mesh(boxGeo13, darkMat);
rung3.name = 'rung';
rung3.position.set(0, 0.96, 2.5221);
root.add(rung3);
const rung4 = new THREE.Mesh(boxGeo13, darkMat);
rung4.name = 'rung';
rung4.position.set(0, 1.28, 2.4794);
root.add(rung4);
const rung5 = new THREE.Mesh(boxGeo13, darkMat);
rung5.name = 'rung';
rung5.position.set(0, 1.6, 2.4368);
root.add(rung5);
const rung6 = new THREE.Mesh(boxGeo13, darkMat);
rung6.name = 'rung';
rung6.position.set(0, 1.92, 2.3941);
root.add(rung6);
const rung7 = new THREE.Mesh(boxGeo13, darkMat);
rung7.name = 'rung';
rung7.position.set(0, 2.24, 2.3515);
root.add(rung7);
const rung8 = new THREE.Mesh(boxGeo13, darkMat);
rung8.name = 'rung';
rung8.position.set(0, 2.56, 2.3088);
root.add(rung8);
const rung9 = new THREE.Mesh(boxGeo13, darkMat);
rung9.name = 'rung';
rung9.position.set(0, 2.88, 2.2662);
root.add(rung9);
const rung10 = new THREE.Mesh(boxGeo13, darkMat);
rung10.name = 'rung';
rung10.position.set(0, 3.2, 2.2235);
root.add(rung10);
const rung11 = new THREE.Mesh(boxGeo13, darkMat);
rung11.name = 'rung';
rung11.position.set(0, 3.52, 2.1809);
root.add(rung11);
const rung12 = new THREE.Mesh(boxGeo13, darkMat);
rung12.name = 'rung';
rung12.position.set(0, 3.84, 2.1383);
root.add(rung12);
const rung13 = new THREE.Mesh(boxGeo13, darkMat);
rung13.name = 'rung';
rung13.position.set(0, 4.16, 2.0956);
root.add(rung13);
const rung14 = new THREE.Mesh(boxGeo13, darkMat);
rung14.name = 'rung';
rung14.position.set(0, 4.48, 2.053);
root.add(rung14);
const rung15 = new THREE.Mesh(boxGeo13, darkMat);
rung15.name = 'rung';
rung15.position.set(0, 4.8, 2.0103);
root.add(rung15);
const rung16 = new THREE.Mesh(boxGeo13, darkMat);
rung16.name = 'rung';
rung16.position.set(0, 5.12, 1.9677);
root.add(rung16);
const rung17 = new THREE.Mesh(boxGeo13, darkMat);
rung17.name = 'rung';
rung17.position.set(0, 5.44, 1.925);
root.add(rung17);
const topPlate = new THREE.Mesh(boxGeo14, darkMat);
topPlate.name = 'topPlate';
topPlate.position.set(0, 7.82, 1.3356);
topPlate.rotation.set(0, deg(180), deg(90));
root.add(topPlate);
const topPlate2 = new THREE.Mesh(boxGeo14, darkMat);
topPlate2.name = 'topPlate';
topPlate2.position.set(1.3356, 7.82, 0);
topPlate2.rotation.set(0, deg(-90), deg(90));
root.add(topPlate2);
const topPlate3 = new THREE.Mesh(boxGeo14, darkMat);
topPlate3.name = 'topPlate';
topPlate3.position.set(0, 7.82, -1.3356);
topPlate3.rotation.set(0, 0, deg(90));
root.add(topPlate3);
const topPlate4 = new THREE.Mesh(boxGeo14, darkMat);
topPlate4.name = 'topPlate';
topPlate4.position.set(-1.3356, 7.82, 0);
topPlate4.rotation.set(0, deg(90), deg(90));
root.add(topPlate4);
const roof = new THREE.Mesh(new THREE.CylinderGeometry(0.02, 2.6446, 2.1, 4), thatchMat);
roof.name = 'roof';
roof.position.set(0, 8.95, 0);
roof.rotation.set(0, deg(45), 0);
root.add(roof);
const roofEdge = new THREE.Mesh(new THREE.CylinderGeometry(2.5917, 2.7046, 0.18, 4), thatchMat);
roofEdge.name = 'roofEdge';
roofEdge.position.set(0, 7.87, 0);
roofEdge.rotation.set(0, deg(45), 0);
root.add(roofEdge);
const roofPole = new THREE.Mesh(new THREE.CylinderGeometry(0.05, 0.05, 1, 5), darkMat);
roofPole.name = 'roofPole';
roofPole.position.set(0, 10.3, 0);
root.add(roofPole);
const roofKnob = new THREE.Mesh(new THREE.SphereGeometry(0.1, 6, 4), darkMat);
roofKnob.name = 'roofKnob';
roofKnob.position.set(0, 10.8, 0);
root.add(roofKnob);
root.traverse((o) => {
if (o.isMesh) {
o.castShadow = true;
o.receiveShadow = true;
}
});
return root;
}
export default createWatchtower;
평점 및 댓글
댓글 0개
아직 댓글이 없어요. 이 모델을 어떻게 사용했는지, 어떤 점이 더 나아질 수 있을지 공유해 주세요.
관련 모델
같은 카테고리 또는 비슷한 태그









