From 23dec7b1530ee39fb8d834d8742ef50a898752f5 Mon Sep 17 00:00:00 2001 From: Roman Buryan Date: Mon, 2 Nov 2026 14:10:14 +0300 Subject: [PATCH] =?UTF-8?q?[HOME]=203D:=20=D1=86=D0=B2=D0=B5=D1=82=D0=B0?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=BD=D0=B0=D1=82=20=D0=BF=D0=BE=20=D1=86?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=D0=BD=D0=BE=D0=B9=20=D1=81=D1=85=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=20=D0=B2=D0=BB=D0=B0=D0=B4=D0=B5=D0=BB=D1=8C=D1=86=D0=B0?= =?UTF-8?q?;=20=D1=81=D1=82=D0=B5=D0=BD=D1=8B=20=D0=BF=D0=BE=D0=BB=D1=83?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B7=D1=80=D0=B0=D1=87=D0=BD=D1=8B=D0=B5=20?= =?UTF-8?q?=E2=80=94=20=D0=B2=D0=B8=D0=B4=D0=BD=D0=BE=20=D0=BC=D0=B5=D0=B1?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=20=D0=B8=20=D0=BF=D0=BB=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ops/home/house3d-card.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/ops/home/house3d-card.js b/ops/home/house3d-card.js index b5c472d..750b9f6 100644 --- a/ops/home/house3d-card.js +++ b/ops/home/house3d-card.js @@ -210,12 +210,18 @@ class House3dCard extends HTMLElement { drop.forEach((o) => o.parent && o.parent.remove(o)); const DOLLHOUSE = this._config.dollhouse !== false; const HIDE_INTERIOR = this._config.showInterior === false; + const wallsFaded = true; if (DOLLHOUSE) { model.traverse((o) => { if (!o.isMesh) return; const n = o.name || ""; if (/^(r_north|r_south|tech_roof|porch_roof)$/.test(n) || n.indexOf("ceil_") === 0) { o.visible = false; + } else if (wallsFaded && n.indexOf("ipart_") === 0 && o.material) { + o.material.transparent = true; + o.material.opacity = 0.32; + o.material.depthWrite = false; + o.material.needsUpdate = true; } }); } @@ -394,6 +400,22 @@ class House3dCard extends HTMLElement { if (!saved || typeof saved !== "object" || !Object.keys(saved).length) return false; const X0 = 180, Y0 = 173, SX = 42.0, SY = 41.4, TER = 2.45, LY = 8.60; + const ROOM_STYLE = { + terrasa: { floor: 0xb08a5e, wall: 0x8a6a45 }, + kitchen: { floor: 0x9fb08a, wall: 0xe6e1d6 }, + spalnia: { floor: 0xb08a5e, wall: 0x5c6657 }, + danina_komnata: { floor: 0xb08a5e, wall: 0xe6e1d6 }, + kabinet: { floor: 0xb08a5e, wall: 0x3e4a56 }, + sanuzel: { floor: 0x4a5a63, wall: 0x7fa8bd }, + tualet: { floor: 0x4a5a63, wall: 0x7fa8bd }, + garderob: { floor: 0xb08a5e, wall: 0xe6e1d6 }, + kladovaia: { floor: 0x8d8a80, wall: 0xe6e1d6 }, + koridor: { floor: 0x9aa88f, wall: 0xe6e1d6 }, + prihozhaya: { floor: 0xb08a5e, wall: 0xe6e1d6 }, + tambur: { floor: 0xb08a5e, wall: 0xe6e1d6 }, + postirochnaia: { floor: 0x7fa8bd, wall: 0xe6e1d6 }, + kryltso: { floor: 0xb08a5e, wall: 0x8a6a45 }, + }; const COLORS = { terrasa: 0xb08a5e, kitchen: 0xb08a5e, spalnia: 0x8a7a68, danina_komnata: 0xb08a5e, kabinet: 0xb08a5e, sanuzel: 0x3a3d40, tualet: 0x3a3d40, garderob: 0xb08a5e, @@ -418,7 +440,7 @@ class House3dCard extends HTMLElement { const fg = new T.ExtrudeGeometry(shape, { depth: 0.05, bevelEnabled: false }); fg.rotateX(-Math.PI / 2); const fm = new T.Mesh(fg, new T.MeshStandardMaterial({ - color: COLORS[id] || 0xb08a5e, roughness: 0.65, metalness: 0.0, + color: (ROOM_STYLE[id] || {}).floor || COLORS[id] || 0xb08a5e, roughness: 0.65, metalness: 0.0, transparent: true, opacity: 0.85, side: T.DoubleSide, })); fm.name = "zone_" + id; @@ -433,8 +455,9 @@ class House3dCard extends HTMLElement { if (len < 0.2) continue; const wg = new T.BoxGeometry(len + 0.06, 2.5, 0.06); const wm = new T.Mesh(wg, new T.MeshStandardMaterial({ - color: id === "spalnia" ? 0x5c6657 : id === "kabinet" ? 0x3e4a56 : 0xd8d2c4, + color: (ROOM_STYLE[id] || {}).wall || 0xd8d2c4, roughness: 0.9, metalness: 0.0, side: T.DoubleSide, + transparent: true, opacity: 0.38, depthWrite: false, })); wm.position.set((a.x + b.x) / 2, 0.78 + 1.25, (a.y + b.y) / 2); wm.rotation.y = -Math.atan2(b.y - a.y, b.x - a.x);