421 lines
30 KiB
JavaScript
421 lines
30 KiB
JavaScript
// Здание Гильдии рыбаков: двухэтажный дом. Низ каменный на фундаменте, верх фахверковый с выносом,
|
||
// крутая черепичная крыша, слуховое окно, наружная каменная труба. Нижний этаж проходимый: зал 24×16.
|
||
// Лицо в −Z, центр X/Z в нуле, низ на Y=0. node tools/bbshop/guild.js <scratch> [renderPrefix]
|
||
const path = require('path');
|
||
const { Model, fish, barrel, crate, lantern } = require('./lib');
|
||
const m = new Model('lobby_guild_hall');
|
||
const C = (k, rgb) => m.color(k, rgb);
|
||
C('stone', [150, 146, 140]); C('stoneLight', [178, 174, 166]); C('stoneDark', [112, 108, 104]); C('stoneDeep', [86, 82, 80]);
|
||
C('plaster', [232, 222, 198]); C('plasterShade', [214, 202, 176]); C('timber', [74, 48, 32]); C('timber2', [92, 60, 38]);
|
||
C('wood', [150, 98, 58]); C('wood2', [128, 82, 48]); C('woodLight', [184, 136, 88]); C('floor', [124, 86, 54]); C('floor2', [108, 74, 46]);
|
||
C('roof', [64, 70, 84]); C('roof2', [54, 58, 72]); C('roof3', [76, 82, 96]); C('iron', [56, 56, 62]); C('brass', [204, 158, 66]); C('gold', [228, 184, 74]);
|
||
C('glow', [255, 206, 120]); C('fire', [255, 140, 50]); C('fireCore', [255, 220, 120]); C('blue', [44, 82, 150]); C('blueDark', [30, 56, 108]); C('cream', [238, 226, 196]);
|
||
C('shutter', [66, 92, 118]); C('signFace', [44, 30, 26]); C('rug', [140, 46, 42]); C('rugBorder', [214, 168, 80]); C('leaf', [76, 140, 62]); C('leaf2', [56, 110, 48]);
|
||
C('red', [204, 64, 60]); C('yellow', [242, 202, 76]); C('purple', [172, 108, 210]); C('white', [244, 240, 230]); C('rope', [196, 168, 116]); C('book1', [130, 40, 40]); C('book2', [40, 90, 70]);
|
||
C('fishSilver', [168, 184, 196]); C('fishBelly', [228, 232, 222]); C('fishFin', [118, 138, 150]); C('fishEye', [24, 24, 30]); C('candle', [240, 232, 210]);
|
||
|
||
const box = (...a) => m.box(...a);
|
||
const G = name => m.group(name);
|
||
// ---------- размеры
|
||
const GX = 13, GZ = 9, T = 1.0, F0 = 1.0, F1 = 9.0; // нижний этаж: наружные ±13 × ±9, пол 1.0, верх 9.0
|
||
const UX = 13.8, UZ = 9.8, U0 = 9.6, U1 = 16.3; // верхний этаж с выносом
|
||
const RIDGE = 24.5, SLOPE = (RIDGE - U1) / UZ, ANG = Math.atan(SLOPE) * 180 / Math.PI; // крыша
|
||
const DOOR = 2.2, DOORH = 4.6; // проём: прямоугольник до 4.6 + полукруг r 2.2
|
||
|
||
// грань стены: n — ось нормали, s — знак наружу, p — плоскость, u — ось вдоль стены
|
||
const FACE = {
|
||
gf: { n: 2, s: -1, p: -GZ, u: 0 }, gb: { n: 2, s: 1, p: GZ, u: 0 }, gl: { n: 0, s: -1, p: -GX, u: 2 }, gr: { n: 0, s: 1, p: GX, u: 2 },
|
||
uf: { n: 2, s: -1, p: -UZ, u: 0 }, ub: { n: 2, s: 1, p: UZ, u: 0 }, ul: { n: 0, s: -1, p: -UX, u: 2 }, ur: { n: 0, s: 1, p: UX, u: 2 },
|
||
};
|
||
function fb(name, col, f, u0, u1, y0, y1, d0, d1, o = {}) {
|
||
const lo = [0, 0, 0], hi = [0, 0, 0];
|
||
lo[f.u] = Math.min(u0, u1); hi[f.u] = Math.max(u0, u1); lo[1] = y0; hi[1] = y1;
|
||
const a = f.p + f.s * d0, b = f.p + f.s * d1; lo[f.n] = Math.min(a, b); hi[f.n] = Math.max(a, b);
|
||
return box(name, col, lo, hi, o);
|
||
}
|
||
// диагональ на грани (из (u0,y0) в (u1,y1)), толщина t, вынос d
|
||
function brace(name, col, f, u0, y0, u1, y1, t, d0, d1) {
|
||
const cu = (u0 + u1) / 2, cy = (y0 + y1) / 2, len = Math.hypot(u1 - u0, y1 - y0);
|
||
const cn = f.p + f.s * (d0 + d1) / 2, hn = Math.abs(d1 - d0) / 2;
|
||
if (f.u === 0) { const ang = Math.atan2(y1 - y0, u1 - u0) * 180 / Math.PI; box(name, col, [cu - len / 2, cy - t / 2, cn - hn], [cu + len / 2, cy + t / 2, cn + hn], { rot: [0, 0, ang], pivot: [cu, cy, cn] }); }
|
||
else { const ang = Math.atan2(-(y1 - y0), u1 - u0) * 180 / Math.PI; box(name, col, [cn - hn, cy - t / 2, cu - len / 2], [cn + hn, cy + t / 2, cu + len / 2], { rot: [ang, 0, 0], pivot: [cn, cy, cu] }); }
|
||
}
|
||
// окно: стекло-свечение (WindowGlow), рама, переплёт, подоконник, перемычка, ставни, ящик с цветами
|
||
function windowAt(f, uc, yc, w, h, o = {}) {
|
||
const u0 = uc - w / 2, u1 = uc + w / 2, y0 = yc - h / 2, y1 = yc + h / 2, fr = o.frame || 'timber';
|
||
fb('Window_Glow', 'glow', f, u0, u1, y0, y1, 0, 0.04, { group: 'WindowGlow' });
|
||
if (o.inner) fb('Window_GlowIn', 'glow', f, u0, u1, y0, y1, -o.inner - 0.04, -o.inner, { group: 'WindowGlow' });
|
||
fb('WinFrameT', fr, f, u0 - 0.15, u1 + 0.15, y1, y1 + 0.18, 0, 0.16); fb('WinFrameB', fr, f, u0 - 0.15, u1 + 0.15, y0 - 0.18, y0, 0, 0.16);
|
||
fb('WinFrameL', fr, f, u0 - 0.15, u0, y0, y1, 0, 0.16); fb('WinFrameR', fr, f, u1, u1 + 0.15, y0, y1, 0, 0.16);
|
||
fb('WinMullionV', fr, f, uc - 0.05, uc + 0.05, y0, y1, 0, 0.1); fb('WinMullionH', fr, f, u0, u1, yc + h * 0.12 - 0.05, yc + h * 0.12 + 0.05, 0, 0.1);
|
||
for (const q of [0.25, 0.75]) fb('WinCame', fr, f, u0 + w * q - 0.025, u0 + w * q + 0.025, y0, y1, 0, 0.07);
|
||
fb('WinSill', o.sill || 'stoneLight', f, u0 - 0.3, u1 + 0.3, y0 - 0.35, y0 - 0.15, 0, 0.32);
|
||
fb('WinLintel', o.lintel || 'stoneLight', f, u0 - 0.35, u1 + 0.35, y1 + 0.18, y1 + 0.5, 0, 0.18);
|
||
if (o.shutters) for (const sgn of [-1, 1]) {
|
||
const a = sgn < 0 ? u0 - 0.15 - w * 0.5 : u1 + 0.15, b = a + w * 0.5;
|
||
fb('Shutter', 'shutter', f, a, b, y0, y1, 0, 0.1);
|
||
for (const yy of [y0 + 0.3, y1 - 0.4]) fb('ShutterStrap', 'iron', f, a + 0.05, b - 0.05, yy, yy + 0.1, 0.1, 0.13);
|
||
}
|
||
if (o.flowers) {
|
||
const by = y0 - 0.35;
|
||
fb('FlowerBox', 'wood2', f, u0 - 0.15, u1 + 0.15, by - 0.45, by, 0.05, 0.6);
|
||
fb('FlowerBoxRim', 'timber', f, u0 - 0.2, u1 + 0.2, by - 0.05, by + 0.03, 0.02, 0.64);
|
||
const n = Math.max(3, Math.round(w / 0.45));
|
||
for (let i = 0; i < n; i++) {
|
||
const uu = u0 + (i + 0.5) * w / n;
|
||
fb('FlowerLeaves', i % 2 ? 'leaf' : 'leaf2', f, uu - 0.22, uu + 0.22, by, by + 0.3 + (i % 2) * 0.08, 0.15, 0.5);
|
||
fb('Flower', ['red', 'yellow', 'purple', 'white'][i % 4], f, uu - 0.1, uu + 0.1, by + 0.32 + (i % 3) * 0.06, by + 0.48 + (i % 3) * 0.06, 0.24, 0.42);
|
||
}
|
||
}
|
||
}
|
||
// якорь с рыбой (плоско, в плоскости XY, лицом в −Z на глубине z)
|
||
function anchor(nm, cx, cy, z, s, col, fishCols) {
|
||
const zt = [z - 0.04, z + 0.04];
|
||
box(nm + '_Shank', col, [cx - 0.07 * s, cy - 0.85 * s, zt[0]], [cx + 0.07 * s, cy + 0.75 * s, zt[1]]);
|
||
box(nm + '_Stock', col, [cx - 0.5 * s, cy + 0.52 * s, zt[0]], [cx + 0.5 * s, cy + 0.64 * s, zt[1]]);
|
||
box(nm + '_RingT', col, [cx - 0.17 * s, cy + 0.94 * s, zt[0]], [cx + 0.17 * s, cy + 1.02 * s, zt[1]]);
|
||
for (const sg of [-1, 1]) box(nm + '_RingS', col, [cx + sg * 0.17 * s - 0.04 * s, cy + 0.75 * s, zt[0]], [cx + sg * 0.17 * s + 0.04 * s, cy + 1.02 * s, zt[1]]);
|
||
for (const sg of [-1, 1]) {
|
||
const px = cx, py = cy - 0.8 * s;
|
||
box(nm + '_Arm', col, [px, py - 0.06 * s, zt[0]], [px + sg * 0.62 * s, py + 0.06 * s, zt[1]], { rot: [0, 0, sg * 38], pivot: [px, py, z] });
|
||
const ex = px + sg * 0.62 * s * Math.cos(38 * Math.PI / 180), ey = py + 0.62 * s * Math.sin(38 * Math.PI / 180);
|
||
box(nm + '_Fluke', col, [ex - 0.13 * s, ey - 0.13 * s, zt[0]], [ex + 0.13 * s, ey + 0.13 * s, zt[1]], { rot: [0, 0, 45], pivot: [ex, ey, z] });
|
||
}
|
||
box(nm + '_Crown', col, [cx - 0.12 * s, cy - 0.95 * s, zt[0]], [cx + 0.12 * s, cy - 0.78 * s, zt[1]]);
|
||
if (fishCols) fish(m, nm + 'Fish', [cx, cy - 0.05 * s, z - 0.06], 1.5 * s, { a: 'x', w: 'y', t: 'z', dir: -1, ...fishCols });
|
||
}
|
||
|
||
// ================= Фундамент и пол =================
|
||
G('Foundation');
|
||
box('Slab', 'stoneDeep', [-GX - 0.4, 0, -GZ - 0.4], [GX + 0.4, 0.85, GZ + 0.4]);
|
||
{ // крупные камни по периметру
|
||
let k = 0;
|
||
for (const f of [FACE.gf, FACE.gb, FACE.gl, FACE.gr]) {
|
||
const len = f.u === 0 ? GX + 0.4 : GZ + 0.4;
|
||
for (let u = -len; u < len - 0.01; k++) {
|
||
const w = [1.6, 2.2, 1.3, 1.9, 2.5][k % 5], u1 = Math.min(len, u + w);
|
||
fb('FoundStone', k % 2 ? 'stoneDark' : 'stone', f, u, u1 - 0.06, 0.05, 0.95, 0.38, 0.55);
|
||
u = u1;
|
||
}
|
||
}
|
||
}
|
||
for (let i = 0; i < 8; i++) { const z = -GZ + T + i * 2.0; box('FloorPlank_' + i, i % 2 ? 'floor2' : 'floor', [-GX + T, 0.85, z], [GX - T, F0, z + 1.98]); }
|
||
|
||
// ================= Каменный нижний этаж =================
|
||
G('StoneFloor');
|
||
// задняя и боковые стены
|
||
box('Wall_Back', 'stone', [-GX, F0, GZ - T], [GX, F1, GZ]);
|
||
box('Wall_Left', 'stone', [-GX, F0, -GZ], [-GX + T, F1, GZ]);
|
||
box('Wall_Right', 'stone', [GX - T, F0, -GZ], [GX, F1, GZ]);
|
||
// фасад с арочным проёмом
|
||
box('Wall_FrontL', 'stone', [-GX, F0, -GZ], [-DOOR, F1, -GZ + T]);
|
||
box('Wall_FrontR', 'stone', [DOOR, F0, -GZ], [GX, F1, -GZ + T]);
|
||
box('Wall_OverDoor', 'stone', [-DOOR, F0 + DOORH + DOOR, -GZ], [DOOR, F1, -GZ + T]);
|
||
for (let y = F0 + DOORH; y < F0 + DOORH + DOOR - 0.01; y += 0.25) {
|
||
const dy = Math.min(DOOR, y + 0.25 - (F0 + DOORH)), x = Math.sqrt(Math.max(0, DOOR * DOOR - dy * dy));
|
||
for (const s of [-1, 1]) box('Spandrel', 'stone', [s < 0 ? -DOOR : x, y, -GZ], [s < 0 ? -x : DOOR, y + 0.26, -GZ + T]);
|
||
}
|
||
// кладка: тёмные швы-пояса, угловые камни
|
||
for (const f of [FACE.gf, FACE.gb, FACE.gl, FACE.gr]) {
|
||
const len = f.u === 0 ? GX : GZ;
|
||
for (const y of [2.6, 4.4, 6.2, 8.0]) {
|
||
if (f === FACE.gf) { fb('Course', 'stoneDark', f, -len, -DOOR - 0.9, y, y + 0.1, 0, 0.03); fb('Course', 'stoneDark', f, DOOR + 0.9, len, y, y + 0.1, 0, 0.03); }
|
||
else fb('Course', 'stoneDark', f, -len, len, y, y + 0.1, 0, 0.03);
|
||
}
|
||
for (let i = 0; i < 7; i++) {
|
||
const y0 = F0 + i * 1.14, wq = i % 2 ? 0.7 : 1.2;
|
||
for (const e of [-1, 1]) fb('Quoin', 'stoneLight', f, e < 0 ? -len : len - wq, e < 0 ? -len + wq : len, y0 + 0.04, y0 + 1.1, 0, 0.08);
|
||
}
|
||
}
|
||
// арка двери: клинчатые камни, косяки
|
||
for (let i = 0; i < 9; i++) {
|
||
const ang = (i + 0.5) * 20, col = i === 4 ? 'stoneLight' : i % 2 ? 'stone' : 'stoneLight';
|
||
box('ArchStone_' + i, col, [DOOR, F0 + DOORH - 0.38, -GZ - 0.18], [DOOR + 0.85 + (i === 4 ? 0.3 : 0), F0 + DOORH + 0.38, -GZ + 0.05], { rot: [0, 0, ang], pivot: [0, F0 + DOORH, -GZ] });
|
||
}
|
||
for (let i = 0; i < 4; i++) for (const s of [-1, 1]) {
|
||
const y0 = F0 + i * 1.15, w = i % 2 ? 0.55 : 0.85;
|
||
box('Jamb', i % 2 ? 'stone' : 'stoneLight', [s < 0 ? -DOOR - w : DOOR, y0 + 0.03, -GZ - 0.18], [s < 0 ? -DOOR : DOOR + w, y0 + 1.12, -GZ + 0.05]);
|
||
}
|
||
|
||
// ================= Двери: двустворчатые, открыты внутрь (тонкие — без коллизии) =================
|
||
G('Door');
|
||
for (const s of [-1, 1]) {
|
||
const hx = s * DOOR, ang = s < 0 ? -72 : 72, o = { rot: [0, ang, 0], pivot: [hx, 0, -GZ + 0.3] };
|
||
const x0 = Math.min(hx, hx - s * DOOR), x1 = Math.max(hx, hx - s * DOOR);
|
||
for (let k = 0; k < 4; k++) { const a = x0 + k * DOOR / 4; box('DoorPlank', k % 2 ? 'wood2' : 'wood', [a + 0.01, F0, -GZ + 0.18], [a + DOOR / 4 - 0.01, F0 + DOORH + 0.9, -GZ + 0.42], o); }
|
||
for (const y of [F0 + 0.8, F0 + 2.6, F0 + 4.4]) box('DoorStrap', 'iron', [x0 + 0.05, y, -GZ + 0.14], [x1 - 0.05, y + 0.18, -GZ + 0.18], o);
|
||
box('DoorFrameEdge', 'iron', [s < 0 ? x1 - 0.12 : x0, F0, -GZ + 0.14], [s < 0 ? x1 : x0 + 0.12, F0 + DOORH + 0.9, -GZ + 0.18], o);
|
||
box('DoorCarve', 'timber', [x0 + 0.45, F0 + 1.3, -GZ + 0.15], [x1 - 0.45, F0 + 2.3, -GZ + 0.18], o);
|
||
box('DoorRing', 'brass', [s < 0 ? x1 - 0.45 : x0 + 0.25, F0 + 2.4, -GZ + 0.1], [s < 0 ? x1 - 0.25 : x0 + 0.45, F0 + 2.75, -GZ + 0.15], o);
|
||
}
|
||
|
||
// ================= Крыльцо =================
|
||
G('Porch');
|
||
box('Step1', 'stone', [-3.6, 0, -GZ - 2.3], [3.6, 0.35, -GZ - 0.3]);
|
||
box('Step2', 'stoneLight', [-3.3, 0.35, -GZ - 1.6], [3.3, 0.68, -GZ - 0.3]);
|
||
box('Landing', 'stone', [-3.0, 0.68, -GZ - 0.9], [3.0, F0, -GZ + T]);
|
||
for (const s of [-1, 1]) box('StepCheek', 'stoneDark', [s * 3.6 - (s < 0 ? 0 : 0.35), 0, -GZ - 2.3], [s * 3.6 + (s < 0 ? 0.35 : 0), 0.85, -GZ - 0.3]);
|
||
|
||
|
||
// ================= Перекрытие с выносом и фахверковый второй этаж =================
|
||
G('Jetty');
|
||
box('FloorBand', 'timber', [-UX - 0.1, F1, -UZ - 0.1], [UX + 0.1, U0, UZ + 0.1]);
|
||
for (let x = -12.6; x <= 12.7; x += 1.4) {
|
||
box('JoistF', 'timber2', [x - 0.2, F1 - 0.4, -UZ], [x + 0.2, F1, -GZ]);
|
||
box('JoistB', 'timber2', [x - 0.2, F1 - 0.4, GZ], [x + 0.2, F1, UZ]);
|
||
}
|
||
for (let z = -8.4; z <= 8.5; z += 1.4) for (const s of [-1, 1]) box('JoistS', 'timber2', [s < 0 ? -UX : GX, F1 - 0.4, z - 0.2], [s < 0 ? -GX : UX, F1, z + 0.2]);
|
||
G('UpperFloor');
|
||
box('UpperWall', 'plaster', [-UX, U0, -UZ], [UX, U1, UZ]);
|
||
G('Timber');
|
||
const UWIN = { uf: [[-11.6, 1.8], [-7.6, 1.8], [7.6, 1.8], [11.6, 1.8], [0, 2.4]], ub: [[-9, 1.8], [-3, 1.8], [3, 1.8], [9, 1.8]], ul: [[-5, 1.8], [4.5, 1.8]], ur: [[-5, 1.8], [6, 1.8]] };
|
||
const STUDS = { uf: [-13.7, -9.6, -5.4, -2.2, 2.2, 5.4, 9.6, 13.7], ub: [-13.7, -6, 0, 6, 13.7], ul: [-9.7, -2, 1.8, 9.7], ur: [-9.7, -2, 3.5, 9.7] };
|
||
for (const key of ['uf', 'ub', 'ul', 'ur']) {
|
||
const f = FACE[key], len = f.u === 0 ? UX : UZ;
|
||
fb('Sill', 'timber', f, -len, len, U0, U0 + 0.4, 0, 0.12);
|
||
fb('TopPlate', 'timber', f, -len, len, U1 - 0.45, U1, 0, 0.12);
|
||
for (const u of STUDS[key]) fb('Stud', 'timber', f, u - 0.17, u + 0.17, U0 + 0.4, U1 - 0.45, 0, 0.12);
|
||
// средний ригель между стойками, кроме проёмов окон
|
||
const st = STUDS[key];
|
||
for (let i = 0; i < st.length - 1; i++) {
|
||
const a = st[i] + 0.17, b = st[i + 1] - 0.17;
|
||
const hasWin = UWIN[key].some(([c, w]) => c + w / 2 > a && c - w / 2 < b);
|
||
if (!hasWin) {
|
||
fb('Rail', 'timber', f, a, b, 12.75, 13.05, 0, 0.1);
|
||
// косые подкосы в глухих панелях
|
||
brace('Brace', 'timber', f, a + 0.1, U0 + 0.4, b - 0.1, 12.75, 0.28, 0, 0.1);
|
||
brace('Brace', 'timber', f, a + 0.1, U1 - 0.45, b - 0.1, 13.05, 0.28, 0, 0.1);
|
||
}
|
||
}
|
||
for (const [c, w] of UWIN[key]) if (!(key === 'uf' && c === 0)) windowAt(f, c, 13.2, w, 2.2, { frame: 'timber', sill: 'timber2', lintel: 'timber', flowers: key === 'uf' });
|
||
}
|
||
// дверь на балкон
|
||
fb('BalconyDoor', 'wood2', FACE.uf, -1.1, 1.1, U0 + 0.35, 12.9, 0, 0.08);
|
||
fb('BalconyDoorMid', 'timber', FACE.uf, -0.05, 0.05, U0 + 0.35, 12.9, 0.08, 0.12);
|
||
fb('BalconyDoorGlow', 'glow', FACE.uf, -0.8, 0.8, 11.6, 12.6, 0.08, 0.1, { group: 'WindowGlow' });
|
||
fb('BalconyDoorTop', 'timber', FACE.uf, -1.3, 1.3, 12.9, 13.2, 0, 0.14);
|
||
|
||
// ================= Балкон =================
|
||
G('Balcony');
|
||
const BZ = -UZ - 2.0;
|
||
box('BalconyFloor', 'wood', [-4.5, U0, BZ], [4.5, U0 + 0.3, -UZ]);
|
||
box('BalconyEdge', 'timber', [-4.6, U0 - 0.2, BZ - 0.1], [4.6, U0 + 0.05, BZ + 0.15]);
|
||
for (const x of [-4.0, 4.0]) {
|
||
const a = [F1 - 1.6, -GZ], b = [U0, BZ + 0.3], cy = (a[0] + b[0]) / 2, cz = (a[1] + b[1]) / 2, len = Math.hypot(b[0] - a[0], b[1] - a[1]);
|
||
box('BalconyBracket', 'timber', [x - 0.15, cy - 0.15, cz - len / 2], [x + 0.15, cy + 0.15, cz + len / 2], { rot: [Math.atan2(-(b[0] - a[0]), b[1] - a[1]) * 180 / Math.PI, 0, 0], pivot: [x, cy, cz] });
|
||
}
|
||
for (let x = -4.4; x <= 4.41; x += 0.88) if (false) box('Baluster', 'woodLight', [x - 0.07, U0 + 0.3, BZ + 0.05], [x + 0.07, U0 + 1.35, BZ + 0.19]);
|
||
for (let z = BZ + 0.6; z < -UZ; z += 0.6) for (const s of [-1, 1]) box('BalusterSide', 'woodLight', [s * 4.4 - 0.07, U0 + 0.3, z - 0.07], [s * 4.4 + 0.07, U0 + 1.35, z + 0.07]);
|
||
box('RailFront', 'timber', [-4.55, U0 + 1.35, BZ], [4.55, U0 + 1.55, BZ + 0.25]);
|
||
for (const s of [-1, 1]) box('RailSide', 'timber', [s * 4.45 - 0.1, U0 + 1.35, BZ], [s * 4.45 + 0.1, U0 + 1.55, -UZ]);
|
||
for (const s of [-1, 1]) box('RailPost', 'timber', [s * 4.45 - 0.15, U0, BZ - 0.02], [s * 4.45 + 0.15, U0 + 1.75, BZ + 0.28]);
|
||
// ================= Вывеска над дверью — передняя стенка балкона (пустая; SurfaceGui на Sign_Face) =================
|
||
G('Sign');
|
||
box('Sign_Back', 'timber', [-4.45, U0 + 0.3, BZ + 0.02], [4.45, U0 + 1.35, BZ + 0.2]);
|
||
box('Sign_Face', 'signFace', [-4.1, U0 + 0.38, BZ - 0.1], [4.1, U0 + 1.27, BZ + 0.02]);
|
||
for (const [a, b, c0, d0] of [[-4.45, 4.45, U0 + 1.27, U0 + 1.35], [-4.45, 4.45, U0 + 0.3, U0 + 0.38], [-4.45, -4.1, U0 + 0.38, U0 + 1.27], [4.1, 4.45, U0 + 0.38, U0 + 1.27]]) box('SignTrim', 'brass', [a, c0, BZ - 0.14], [b, d0, BZ + 0.02]);
|
||
// герб над балконной дверью: синий щит с якорем и рыбой
|
||
G('Crest');
|
||
const CRZ = -UZ - 0.14;
|
||
box('CrestBoard', 'blue', [-1.1, 13.4, CRZ - 0.12], [1.1, 15.0, CRZ]);
|
||
box('CrestBoardTip', 'blue', [-0.7, 13.2, CRZ - 0.12], [0.7, 13.4, CRZ]);
|
||
for (const [a, b, c0, d0] of [[-1.2, 1.2, 15.0, 15.14], [-1.2, -1.1, 13.3, 15.0], [1.1, 1.2, 13.3, 15.0]]) box('CrestTrim', 'gold', [a, c0, CRZ - 0.15], [b, d0, CRZ]);
|
||
anchor('CrestAnchor', 0, 14.2, CRZ - 0.2, 0.68, 'gold', { body: 'fishSilver', belly: 'fishBelly', fin: 'fishFin' });
|
||
|
||
// ================= Знамёна гильдии под выносом =================
|
||
G('Banners');
|
||
for (const s of [-1, 1]) {
|
||
const x = s * 9.8, z = -GZ - 0.5;
|
||
box('BannerRod', 'iron', [x - 0.85, F1 - 0.55, z - 0.05], [x + 0.85, F1 - 0.45, z + 0.05]);
|
||
for (const e of [-1, 1]) box('BannerRope', 'rope', [x + e * 0.75 - 0.02, F1 - 0.45, z - 0.02], [x + e * 0.75 + 0.02, F1, z + 0.02]);
|
||
box('BannerCloth', 'blue', [x - 0.7, 5.0, z - 0.03], [x + 0.7, F1 - 0.5, z + 0.03]);
|
||
box('BannerTailL', 'blue', [x - 0.7, 4.3, z - 0.03], [x - 0.08, 5.0, z + 0.03]);
|
||
box('BannerTailR', 'blue', [x + 0.08, 4.3, z - 0.03], [x + 0.7, 5.0, z + 0.03]);
|
||
for (const e of [-1, 1]) box('BannerBorder', 'cream', [x + e * 0.62 - 0.06, 4.3, z - 0.05], [x + e * 0.62 + 0.06, F1 - 0.5, z - 0.03]);
|
||
box('BannerBorderT', 'cream', [x - 0.7, F1 - 0.75, z - 0.05], [x + 0.7, F1 - 0.62, z - 0.03]);
|
||
anchor('BannerAnchor', x, 6.6, z - 0.08, 0.7, 'cream');
|
||
}
|
||
|
||
// ================= Окна нижнего этажа =================
|
||
G('Windows');
|
||
for (const u of [-11.4, -7.8, 7.8, 11.4]) windowAt(FACE.gf, u, 4.6, 1.9, 2.6, { inner: T, flowers: true });
|
||
for (const u of [-8, -2.5, 2.5, 8]) windowAt(FACE.gb, u, 4.6, 1.9, 2.6, { inner: T });
|
||
for (const u of [-5, 5]) windowAt(FACE.gl, u, 4.6, 1.9, 2.6, { inner: T, shutters: true, flowers: true });
|
||
windowAt(FACE.gr, -5, 4.6, 1.9, 2.6, { inner: T, shutters: true, flowers: true });
|
||
windowAt(FACE.gr, 6.2, 4.6, 1.9, 2.6, { inner: T });
|
||
|
||
// ================= Крыша =================
|
||
G('Roof');
|
||
const LS = Math.hypot(UZ + 1.4, (UZ + 1.4) * SLOPE); // длина ската с карнизом
|
||
for (const s of [-1, 1]) {
|
||
const o = { rot: [s * ANG, 0, 0], pivot: [0, RIDGE, 0] };
|
||
box('RoofDeck', 'timber', [-UX - 1.3, RIDGE - 0.35, s < 0 ? -LS : 0], [UX + 1.3, RIDGE, s < 0 ? 0 : LS], o);
|
||
for (let k = 0; k < Math.ceil(LS / 0.9); k++) {
|
||
const a = k * 0.9, b = Math.min(LS, a + 0.95), col = ['roof', 'roof2', 'roof3'][k % 3];
|
||
box('Shingles', col, [-UX - 1.35, RIDGE + 0.02 - k * 0.0, s < 0 ? -b : a], [UX + 1.35, RIDGE + 0.2, s < 0 ? -a : b], o);
|
||
for (let x = -UX - 1.0 + (k % 2) * 0.9; x < UX + 1.0; x += 1.8) box('ShingleGap', 'roof2', [x, RIDGE + 0.2, s < 0 ? -b + 0.1 : a + 0.1], [x + 0.08, RIDGE + 0.23, s < 0 ? -a : b - 0.1], o);
|
||
}
|
||
for (const e of [-1, 1]) box('BargeBoard', 'timber', [e * (UX + 1.35) - 0.12, RIDGE - 0.55, s < 0 ? -LS : 0], [e * (UX + 1.35) + 0.12, RIDGE + 0.25, s < 0 ? 0 : LS], o);
|
||
box('Fascia', 'timber', [-UX - 1.35, RIDGE - 0.6, s < 0 ? -LS : LS - 0.15], [UX + 1.35, RIDGE + 0.2, s < 0 ? -LS + 0.15 : LS], o);
|
||
}
|
||
box('RidgeCap', 'roof2', [-UX - 1.4, RIDGE - 0.1, -0.35], [UX + 1.4, RIDGE + 0.45, 0.35]);
|
||
for (const e of [-1, 1]) box('RidgeFinial', 'timber', [e * (UX + 1.35) - 0.15, RIDGE + 0.2, -0.15], [e * (UX + 1.35) + 0.15, RIDGE + 1.0, 0.15]);
|
||
// фронтоны (боковые треугольники)
|
||
G('Gables');
|
||
for (const e of [-1, 1]) {
|
||
for (let y = U1; y < RIDGE - 0.2; y += 0.5) {
|
||
const zw = (RIDGE - (y + 0.5)) / SLOPE;
|
||
box('Gable', 'plaster', [e < 0 ? -UX : UX - 0.5, y, -zw], [e < 0 ? -UX + 0.5 : UX, y + 0.51, zw]);
|
||
}
|
||
const f = e < 0 ? FACE.ul : FACE.ur, xo = e < 0 ? -UX : UX;
|
||
fb('GableKing', 'timber', f, -0.18, 0.18, U1, RIDGE - 0.3, 0, 0.12);
|
||
fb('GableCollar', 'timber', f, -(RIDGE - 19.6) / SLOPE, (RIDGE - 19.6) / SLOPE, 19.3, 19.6, 0, 0.12);
|
||
brace('GableBrace', 'timber', f, -5.5, U1 + 0.1, -0.2, 19.3, 0.28, 0, 0.12);
|
||
brace('GableBrace', 'timber', f, 5.5, U1 + 0.1, 0.2, 19.3, 0.28, 0, 0.12);
|
||
windowAt(f, -2.2, 17.8, 1.2, 1.6, { frame: 'timber', sill: 'timber2', lintel: 'timber' });
|
||
windowAt(f, 2.2, 17.8, 1.2, 1.6, { frame: 'timber', sill: 'timber2', lintel: 'timber' });
|
||
}
|
||
// слуховое окно на переднем скате
|
||
G('Dormer');
|
||
const DZ0 = -8.0, DZ1 = -2.0, DW = 2.3, DY1 = 19.6, DR = 21.6;
|
||
box('DormerWall', 'plaster', [-DW, U1 - 0.3, DZ0], [DW, DY1, DZ1]);
|
||
for (let y = DY1; y < DR - 0.2; y += 0.4) { const xw = (DR - (y + 0.4)) / Math.tan(40 * Math.PI / 180); box('DormerGable', 'plaster', [-xw, y, DZ0], [xw, y + 0.41, DZ1]); }
|
||
const DF = { n: 2, s: -1, p: DZ0, u: 0 };
|
||
windowAt(DF, 0, 18.1, 1.6, 1.9, { frame: 'timber', sill: 'timber2', lintel: 'timber', flowers: true });
|
||
for (const s of [-1, 1]) {
|
||
fb('DormerPost', 'timber', DF, s * DW - 0.15, s * DW + 0.15, U1 - 0.3, DY1, 0, 0.12);
|
||
const o = { rot: [0, 0, s * -40], pivot: [0, DR, 0] };
|
||
box('DormerRoof', 'roof', [s < 0 ? -3.5 : 0, DR - 0.3, DZ0 - 0.5], [s < 0 ? 0 : 3.5, DR, DZ1 + 0.5], o);
|
||
for (let k = 0; k < 4; k++) box('DormerShingle', ['roof2', 'roof3'][k % 2], [s < 0 ? -0.9 * (k + 1) : 0.9 * k, DR, DZ0 - 0.55], [s < 0 ? -0.9 * k : 0.9 * (k + 1), DR + 0.15, DZ1 + 0.5], o);
|
||
}
|
||
box('DormerRidge', 'roof2', [-0.25, DR - 0.1, DZ0 - 0.55], [0.25, DR + 0.25, DZ1 + 0.5]);
|
||
|
||
// ================= Каменная труба (на правом фронтоне) =================
|
||
G('Chimney');
|
||
box('ChimneyBase', 'stone', [GX, 0, 0.6], [UX + 1.9, F1, 3.8]);
|
||
box('ChimneyShaft', 'stone', [UX, F1, 1.0], [UX + 1.6, 26.0, 3.4]);
|
||
for (let y = 1.0; y < 26; y += 1.2) box('ChimneyCourse', y % 2.4 < 1.2 ? 'stoneDark' : 'stoneLight', [UX - 0.02 + (y < F1 ? -0.2 : 0), y, (y < F1 ? 0.58 : 0.98)], [UX + (y < F1 ? 1.92 : 1.62), y + 0.12, (y < F1 ? 3.82 : 3.42)]);
|
||
box('ChimneyCap', 'stoneDark', [UX - 0.2, 26.0, 0.8], [UX + 1.8, 26.4, 3.6]);
|
||
box('ChimneyTop', 'stoneDeep', [UX + 0.25, 26.4, 1.25], [UX + 1.35, 26.9, 3.15]);
|
||
|
||
// ================= Фонари у двери =================
|
||
G('Lantern_L'); lantern(m, 'L', -3.15, 5.4, -GZ - 0.35, -1, { iron: 'iron', glow: 'glow', brass: 'brass' });
|
||
G('Lantern_R'); lantern(m, 'R', 3.15, 5.4, -GZ - 0.35, 1, { iron: 'iron', glow: 'glow', brass: 'brass' });
|
||
|
||
// ================= Доска заказов (слева от крыльца, пустая поверхность OrderBoard_Face) =================
|
||
G('OrderBoard');
|
||
{
|
||
const x0 = -6.9, x1 = -4.6, z = -GZ - 1.4;
|
||
for (const x of [x0 - 0.1, x1 + 0.1]) box('OBPost', 'timber', [x - 0.13, 0, z - 0.13], [x + 0.13, 4.3, z + 0.13]);
|
||
box('OrderBoard_Face', 'woodLight', [x0, 1.5, z - 0.08], [x1, 3.7, z + 0.06]);
|
||
for (const [a, b] of [[1.4, 1.5], [3.7, 3.8]]) box('OBTrim', 'timber', [x0 - 0.1, a, z - 0.1], [x1 + 0.1, b, z + 0.08]);
|
||
for (const s of [-1, 1]) box('OBRoof', 'roof', [x0 - 0.45, 4.25, s < 0 ? z - 0.8 : z], [x1 + 0.45, 4.37, s < 0 ? z : z + 0.8], { rot: [s * 30, 0, 0], pivot: [0, 4.6, z] });
|
||
box('OBRidge', 'roof2', [x0 - 0.5, 4.5, z - 0.12], [x1 + 0.5, 4.68, z + 0.12]);
|
||
}
|
||
|
||
// ================= Бочки и ящики у стены, сети и вёсла на левой стене =================
|
||
G('Props');
|
||
barrel(m, 'BarrelA', 5.0, -GZ - 0.85, 0.85, 1.5, 0.6, 'wood', 'wood2', 'iron', 'timber');
|
||
barrel(m, 'BarrelB', 6.4, -GZ - 0.75, 0.85, 1.2, 0.5, 'wood2', 'timber', 'iron', 'wood');
|
||
crate(m, 'CrateA', 9.3, 0.85, -GZ - 1.7, 10.9, 2.2, -GZ - 0.2, 'wood', 'timber');
|
||
crate(m, 'CrateB', 9.5, 2.2, -GZ - 1.45, 10.6, 3.1, -GZ - 0.4, 'wood2', 'timber', true);
|
||
crate(m, 'CrateC', -12.8, 0.85, -GZ - 1.6, -11.2, 2.1, -GZ - 0.2, 'wood', 'timber');
|
||
G('WallNets');
|
||
{
|
||
const f = FACE.gl;
|
||
for (let u = -2.2; u <= 2.21; u += 0.45) fb('NetV', 'rope', f, u - 0.03, u + 0.03, 2.4, 7.4 - Math.abs(u) * 0.25, 0.02, 0.07);
|
||
for (let y = 2.6; y < 7.0; y += 0.45) fb('NetH', 'rope', f, -2.2, 2.2, y - 0.03, y + 0.03, 0.02, 0.07);
|
||
for (const u of [-2.4, 0, 2.4]) fb('NetPeg', 'timber', f, u - 0.1, u + 0.1, 7.3, 7.6, 0, 0.3);
|
||
for (let i = 0; i < 4; i++) fb('NetFloat', i % 2 ? 'cream' : 'red', f, -1.6 + i * 1.05 - 0.12, -1.6 + i * 1.05 + 0.12, 7.0, 7.3, 0.05, 0.2);
|
||
// скрещённые вёсла
|
||
for (const sg of [-1, 1]) {
|
||
const cx = -GX - 0.25, cy = 5.0, cz = 6.2;
|
||
box('OarShaft', 'woodLight', [cx - 0.05, cy - 0.05, cz - 2.0], [cx + 0.05, cy + 0.05, cz + 1.4], { rot: [sg * 40, 0, 0], pivot: [cx, cy, cz] });
|
||
box('OarBlade', 'woodLight', [cx - 0.04, cy - 0.22, cz + 1.4], [cx + 0.04, cy + 0.22, cz + 2.3], { rot: [sg * 40, 0, 0], pivot: [cx, cy, cz] });
|
||
}
|
||
}
|
||
|
||
// ================= Интерьер зала =================
|
||
const IX = GX - T, IZ = GZ - T; // внутренние грани: x ±12, z ±8
|
||
G('Interior');
|
||
for (let x = -9; x <= 9; x += 3) box('CeilingBeam', 'timber', [x - 0.25, F1 - 0.55, -IZ], [x + 0.25, F1, IZ]);
|
||
box('CeilingBoards', 'wood2', [-IX, F1 - 0.08, -IZ], [IX, F1, IZ]);
|
||
box('Wainscot', 'wood2', [-IX, F0, IZ - 0.12], [IX, 2.6, IZ]);
|
||
// ковёр
|
||
box('Rug', 'rug', [-4, F0, -5], [4, F0 + 0.04, 3]);
|
||
for (const [a, b, c, d] of [[-4, 4, -5, -4.6], [-4, 4, 2.6, 3], [-4, -3.6, -5, 3], [3.6, 4, -5, 3]]) box('RugBorder', 'rugBorder', [a, F0 + 0.04, c], [b, F0 + 0.06, d]);
|
||
box('RugCenter', 'blue', [-1.4, F0 + 0.04, -2.4], [1.4, F0 + 0.06, 0.4]);
|
||
// стол-кафедра главы
|
||
box('Desk_Top', 'wood', [-2.6, 2.25, 3.6], [2.6, 2.45, 5.0]);
|
||
box('Desk_Front', 'timber2', [-2.5, F0, 3.6], [2.5, 2.25, 3.8]);
|
||
for (const s of [-1, 1]) box('Desk_Side', 'timber2', [s * 2.5 - (s < 0 ? 0 : 0.25), F0, 3.6], [s * 2.5 + (s < 0 ? 0.25 : 0), 2.25, 5.0]);
|
||
box('Desk_Carve', 'brass', [-1.0, 1.5, 3.55], [1.0, 1.9, 3.6]);
|
||
box('Lectern', 'timber2', [-0.5, 2.45, 4.3], [0.5, 2.75, 4.9], { rot: [-20, 0, 0], pivot: [0, 2.45, 4.6] });
|
||
box('Book', 'book1', [-0.42, 2.75, 4.25], [0.42, 2.83, 4.85], { rot: [-20, 0, 0], pivot: [0, 2.45, 4.6] });
|
||
box('BookPages', 'cream', [-0.38, 2.83, 4.3], [0.38, 2.86, 4.8], { rot: [-20, 0, 0], pivot: [0, 2.45, 4.6] });
|
||
box('Inkpot', 'iron', [1.5, 2.45, 4.1], [1.75, 2.65, 4.35]);
|
||
box('Quill', 'white', [1.6, 2.65, 4.2], [1.64, 3.05, 4.24], { rot: [0, 0, -15], pivot: [1.62, 2.65, 4.22] });
|
||
box('Candle_Glow', 'candle', [-1.9, 2.45, 4.2], [-1.75, 2.85, 4.35]);
|
||
box('Chair_Seat', 'wood', [-0.7, 2.0, 5.6], [0.7, 2.15, 6.8]);
|
||
box('Chair_Back', 'timber2', [-0.7, 2.15, 6.65], [0.7, 4.0, 6.85]);
|
||
for (const [x, z] of [[-0.6, 5.7], [0.6, 5.7], [-0.6, 6.7], [0.6, 6.7]]) box('Chair_Leg', 'timber2', [x - 0.08, F0, z - 0.08], [x + 0.08, 2.0, z + 0.08]);
|
||
G('ElderSpot');
|
||
box('ElderSpot', 'rugBorder', [-0.5, F0, 5.0], [0.5, F0 + 0.05, 6.0]);
|
||
G('Interior');
|
||
// полки на задней стене
|
||
for (let k = 0; k < 4; k++) {
|
||
const y = 2.0 + k * 1.3;
|
||
box('Shelf', 'wood', [-11.5, y, IZ - 0.9], [-6.0, y + 0.12, IZ]);
|
||
for (let i = 0; i < 7; i++) {
|
||
const x = -11.2 + i * 0.75 + (k % 2) * 0.2;
|
||
if ((i + k) % 4 === 3) box('ShelfJar', 'stoneLight', [x - 0.2, y + 0.12, IZ - 0.6], [x + 0.2, y + 0.6, IZ - 0.2]);
|
||
else box('ShelfBook', ['book1', 'book2', 'woodLight', 'blue'][(i + k) % 4], [x - 0.12, y + 0.12, IZ - 0.75], [x + 0.12, y + 0.85 - (i % 3) * 0.1, IZ - 0.15]);
|
||
}
|
||
}
|
||
for (const x of [-11.6, -5.9]) box('ShelfSide', 'timber2', [x - 0.1, F0, IZ - 0.95], [x + 0.1, 7.1, IZ]);
|
||
// трофейная рыба на табличке
|
||
box('TrophyPlaque', 'timber2', [5.6, 4.6, IZ - 0.15], [10.4, 6.6, IZ]);
|
||
box('TrophyPlaqueTrim', 'brass', [5.5, 4.5, IZ - 0.1], [10.5, 6.7, IZ - 0.02]);
|
||
fish(m, 'TrophyFish', [8.0, 5.6, IZ - 0.35], 4.0, { a: 'x', w: 'y', t: 'z', dir: -1, body: 'fishSilver', belly: 'fishBelly', fin: 'fishFin' });
|
||
// длинный стол со скамьями
|
||
box('Table_Top', 'wood', [-10.5, 2.3, -4.2], [-5.5, 2.5, -1.8]);
|
||
for (const [x, z] of [[-10.2, -3.9], [-5.8, -3.9], [-10.2, -2.1], [-5.8, -2.1]]) box('Table_Leg', 'timber2', [x - 0.12, F0, z - 0.12], [x + 0.12, 2.3, z + 0.12]);
|
||
for (const z of [-5.1, -0.9]) { box('Bench', 'wood2', [-10.3, 1.75, z - 0.35], [-5.7, 1.9, z + 0.35]); for (const x of [-10, -6]) box('BenchLeg', 'timber2', [x - 0.1, F0, z - 0.25], [x + 0.1, 1.75, z + 0.25]); }
|
||
box('Mug', 'woodLight', [-8.6, 2.5, -3.3], [-8.3, 2.85, -3.0]);
|
||
box('Map', 'cream', [-7.6, 2.5, -3.6], [-6.4, 2.52, -2.6]);
|
||
// камин у правой стены
|
||
G('Fireplace');
|
||
box('Hearth', 'stoneDark', [IX - 1.6, F0, 0.4], [IX, F0 + 0.2, 4.0]);
|
||
box('FireSurround', 'stone', [IX - 0.9, F0, 0.6], [IX, 5.6, 3.8]);
|
||
box('FireOpening', 'stoneDeep', [IX - 0.95, F0 + 0.2, 1.3], [IX - 0.1, 3.4, 3.1]);
|
||
box('Mantel', 'timber', [IX - 1.3, 4.0, 0.4], [IX, 4.3, 4.0]);
|
||
box('Logs', 'wood2', [IX - 0.85, F0 + 0.2, 1.6], [IX - 0.3, F0 + 0.5, 2.8]);
|
||
G('FireGlow');
|
||
box('Fire_Glow', 'fire', [IX - 0.8, F0 + 0.5, 1.7], [IX - 0.35, 2.4, 2.7]);
|
||
box('FireCore_Glow', 'fireCore', [IX - 0.7, F0 + 0.5, 1.95], [IX - 0.45, 1.9, 2.45]);
|
||
G('Fireplace');
|
||
box('MantelCandle_Glow', 'candle', [IX - 0.8, 4.3, 0.8], [IX - 0.6, 4.75, 1.0]);
|
||
box('MantelCandle2_Glow', 'candle', [IX - 0.8, 4.3, 3.2], [IX - 0.6, 4.65, 3.4]);
|
||
box('MantelJar', 'stoneLight', [IX - 0.85, 4.3, 1.8], [IX - 0.45, 4.9, 2.4]);
|
||
// люстра-колесо
|
||
G('Chandelier');
|
||
const CY = 6.8, CZ = -1.2;
|
||
for (const r of [0, 90]) box('ChWheel', 'timber', [-1.4, CY, CZ - 0.08], [1.4, CY + 0.16, CZ + 0.08], { rot: [0, r, 0], pivot: [0, CY, CZ] });
|
||
for (const r of [45, 135]) box('ChWheel', 'timber', [-1.4, CY, CZ - 0.08], [1.4, CY + 0.16, CZ + 0.08], { rot: [0, r, 0], pivot: [0, CY, CZ] });
|
||
box('ChChain', 'iron', [-0.03, CY + 0.16, CZ - 0.03], [0.03, F1 - 0.55, CZ + 0.03]);
|
||
for (let k = 0; k < 8; k++) { const a = k * Math.PI / 4, x = Math.cos(a) * 1.35, z = CZ + Math.sin(a) * 1.35; box('ChCandle_Glow', 'candle', [x - 0.07, CY + 0.16, z - 0.07], [x + 0.07, CY + 0.5, z + 0.07]); }
|
||
|
||
m.write(path.resolve(__dirname, '../../assets/props'), process.argv[2]);
|
||
|
||
// ---------- снимки своим рендером
|
||
if (process.argv[3]) {
|
||
const { render } = require('./render');
|
||
const pre = process.argv[3];
|
||
render([{ model: m }], pre + 'front.png', { yaw: 0, pitch: 6, width: 1600, height: 1200 });
|
||
render([{ model: m }], pre + '34.png', { yaw: 35, pitch: 20, width: 1600, height: 1200 });
|
||
const keep = new Set(['Foundation', 'StoneFloor', 'Door', 'Porch', 'Interior', 'ElderSpot', 'Fireplace', 'FireGlow', 'Chandelier', 'Windows', 'WindowGlow', 'Props', 'OrderBoard', 'Lantern_L', 'Lantern_R', 'WallNets', 'Sign']);
|
||
const cut = { cubes: m.cubes.filter(c => keep.has(c.group) && !(c.group === 'Interior' && /Ceiling/.test(c.name)) && Math.max(c.from[1], c.to[1]) < F1 + 0.01), colors: m.colors, colorIdx: m.colorIdx };
|
||
render([{ model: cut }], pre + 'hall.png', { yaw: 20, pitch: 62, width: 1600, height: 1200 });
|
||
console.log('renders:', pre + '{front,34,hall}.png');
|
||
}
|