Skip to content

Single place to convert your 2D floor plans to 3d model (no LLM)

Python

Review page: fewer, clearer groups in the side panel

23f20056393b6d2c6e5264
diff --git a/web/edit.html b/web/edit.html
index 3904af6..6e97f4b 100644
--- a/web/edit.html
+++ b/web/edit.html
@@ -14,19 +14,38 @@
main { flex: 1; display: flex; min-height: 0; }
#stage { flex: 1; position: relative; background: #fff; overflow: hidden; cursor: crosshair; touch-action: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; }
- aside { width: 300px; border-left: 1px solid var(--line); background: var(--panel); padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
- aside h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
- .tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
- .tools button { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 6px; padding: 6px; cursor: pointer; font-size: 13px; }
- .tools button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
+ aside { width: 300px; border-left: 1px solid var(--line); background: var(--panel); overflow: auto; display: flex; flex-direction: column; }
+ aside > section { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
+ aside > section:last-child { border-bottom: 0; }
+ aside h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
+ .head { display: flex; justify-content: space-between; align-items: center; }
+ .link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 13px; }
+ .link:hover { text-decoration: underline; }
+ .tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 8px; background: var(--bg); }
+ .tools button { border: 0; background: transparent; color: var(--ink); border-radius: 6px; padding: 7px 2px; cursor: pointer; font-size: 13px; }
+ .tools button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
+ .tools button.on { background: var(--panel); color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
+ #hint { font-size: 12.5px; margin: 0; line-height: 1.4; }
+ #props:empty { display: none; }
+ #props { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
+ #props h3 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 14px; }
+ details summary { cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; list-style: none; }
+ details summary::-webkit-details-marker { display: none; }
+ details summary::before { content: "▸"; display: inline-block; width: 14px; transition: transform .15s; }
+ details[open] summary::before { transform: rotate(90deg); }
+ details > div { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
+ #buildbox { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
+ #buildbox p { margin: 0; }
+ .legend { position: absolute; left: 10px; bottom: 10px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line);
+ border-radius: 8px; padding: 4px 10px; pointer-events: none; }
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
select, input[type=text], input[type=number] { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
- .sw { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0; }
+ .sw { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
#wc { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; cursor: pointer; }
.legend span { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; font-size: 12px; }
.legend i { width: 12px; height: 8px; display: inline-block; border-radius: 2px; }
- #bfun { color: var(--accent); font-weight: 600; margin: 10px 0 0; display: flex; align-items: center; }
+ #bfun { color: var(--accent); font-weight: 600; display: flex; align-items: center; }
#bfun[hidden] { display: none; }
#bhead { display: flex; justify-content: space-between; align-items: baseline; }
#beta { font-weight: 400; font-size: 13px; text-transform: none; letter-spacing: 0; }
@@ -35,7 +54,7 @@
#bspin path { stroke-dasharray: 100; animation: drawhouse 2.6s ease-in-out infinite; } /* drawn, held, wiped away */
@keyframes drawhouse { 0% { stroke-dashoffset: 100; } 55%, 72% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce) { #bspin path { animation: none; } }
- .note { font-size: 13px; margin: 6px 0 0; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
+ .note { font-size: 13px; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
#wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); flex-direction: column; gap: 10px; padding: 16px; text-align: center; }
@media (max-width: 760px) { main { flex-direction: column; } aside { width: auto; max-height: 45vh; border-left: 0; border-top: 1px solid var(--line); } }
</style>
@@ -47,6 +66,7 @@
<div class="tabs" id="tabs"></div>
<span class="muted" id="scale"></span>
<span style="flex:1"></span>
+ <button class="btn ghost" id="qty" type="button" title="Floor areas, wall paint and tiles, doors, windows and furniture">Quantities</button>
<select id="quality" title="Quality">
<option value="draft">Draft (fast)</option>
<option value="high" selected>High quality</option>
@@ -55,38 +75,40 @@
</header>
<main>
<div id="stage"><canvas id="cv"></canvas>
+ <div class="legend">
+ <span><i style="background:#e53935"></i>wall</span><span><i style="background:#d81bd8"></i>low wall</span>
+ <span><i style="background:#2e9d3a"></i>door</span><span><i style="background:#1e6fe0"></i>window</span>
+ <span><i style="background:#f2b400"></i>opening</span><span><i style="background:#8a5a2b"></i>stairs</span>
+ </div>
<div id="wait"><b id="wmsg">Reading the drawing…</b><div class="bar" style="width:260px"><i id="wbar"></i></div><a href="/" id="back" hidden>Upload another file</a></div>
</div>
<aside>
- <div>
- <h3>Tools</h3>
- <div class="tools" id="tools">
- <button data-t="select" class="on">Select / pan</button>
- <button data-t="wall">Draw wall</button>
- <button data-t="door">Add door</button>
- <button data-t="window">Add window</button>
- <button data-t="scale">Set scale</button>
- <button data-t="furniture">Furniture</button>
- <button id="undo">Undo</button>
+ <section id="buildbox" hidden>
+ <h3 id="bhead" class="head">3D build<span id="beta"></span></h3>
+ <div class="bar"><i id="bbar"></i></div>
+ <p id="bfun" hidden><svg id="bspin" viewBox="0 0 24 24" aria-hidden="true"><path pathLength="100" d="M3 11 12 3l9 8M5 9.5V21h14V9.5M10 21v-6h4v6"/></svg><span id="bword"></span></p>
+ <p id="belapsed" class="muted" style="font-size:13px"></p>
+ <p id="bmsg" class="muted" style="font-size:13px"></p>
+ <p id="bold" class="note" hidden>Built before the latest fixes. Press <b>Build 3D</b> to update this house.</p>
+ <a class="btn" id="open" hidden style="text-align:center;text-decoration:none">Open walkthrough</a>
+ </section>
+ <section>
+ <div class="head"><h3>Fix the plan</h3><button class="link" id="undo" title="Undo (Ctrl+Z)">↶ Undo</button></div>
+ <div class="tools" id="tools" role="toolbar">
+ <button data-t="select" class="on" title="Select a wall, opening or room, drag to pan">Select</button>
+ <button data-t="wall" title="Draw a wall">Wall</button>
+ <button data-t="door" title="Add a door">Door</button>
+ <button data-t="window" title="Add a window">Window</button>
+ <button data-t="scale" title="Set the scale from a known distance">Scale</button>
+ <button data-t="furniture" title="Move, turn, delete or add furniture">Furniture</button>
</div>
- <p class="muted" style="font-size:12px;margin:6px 0 0" id="hint">Click a wall, opening or room to edit it, or another floor plan to switch to it. Drag to pan, scroll to zoom.</p>
- </div>
- <div id="props"></div>
- <div>
- <h3>Furniture</h3>
- <label title="Untick to build empty rooms: walls, floors, doors, windows and lights only"><input type="checkbox" id="furn" checked> Furnish the rooms</label>
- <div class="row" style="margin-top:8px"><span>Theme</span><select id="theme" style="width:170px" title="The furniture, decor, colours and floors the house is built with"></select></div>
- <button class="btn ghost" id="models" type="button" style="margin-top:8px;width:100%">See and make themes</button>
- <button class="btn ghost" id="qty" type="button" style="margin-top:8px;width:100%" title="Floor areas, wall paint and tiles, doors, windows and furniture">Quantities</button>
- </div>
- <div>
- <h3>Floor</h3>
- <div class="row"><span>Name</span><input type="text" id="fname" style="width:150px"></div>
- <div class="row" style="margin-top:6px"><span>Ceiling height (ft)</span><input type="number" id="fh" min="8" max="14" step="0.5" style="width:70px"></div>
- </div>
- <div>
- <h3>Wall paint</h3>
- <div class="row" id="paint" style="margin-top:6px">
+ <p class="muted" id="hint">Click a wall, opening or room to edit it, or another floor plan to switch to it. Drag to pan, scroll to zoom.</p>
+ <div id="props"></div>
+ </section>
+ <section>
+ <h3>Look</h3>
+ <div class="row"><span>Theme</span><select id="theme" style="width:170px" title="The furniture, decor, colours and floors the house is built with"></select></div>
+ <div class="row" id="paint" title="Wall paint">
<button class="sw" data-c="#efe7da" title="Warm white" aria-label="Warm white"></button>
<button class="sw" data-c="#dcdcd8" title="Light grey" aria-label="Light grey"></button>
<button class="sw" data-c="#c3cdb4" title="Sage" aria-label="Sage"></button>
@@ -94,21 +116,18 @@
<button class="sw" data-c="#cddbe6" title="Pale blue" aria-label="Pale blue"></button>
<input type="color" id="wc" title="Any colour" aria-label="Wall colour">
</div>
- </div>
- <div class="legend">
- <span><i style="background:#e53935"></i>wall</span><span><i style="background:#d81bd8"></i>low wall</span>
- <span><i style="background:#2e9d3a"></i>door</span><span><i style="background:#1e6fe0"></i>window</span>
- <span><i style="background:#f2b400"></i>opening</span><span><i style="background:#8a5a2b"></i>stairs</span>
- </div>
- <div id="buildbox" hidden>
- <h3 id="bhead">3D build<span id="beta"></span></h3>
- <div class="bar"><i id="bbar"></i></div>
- <p id="bfun" hidden><svg id="bspin" viewBox="0 0 24 24" aria-hidden="true"><path pathLength="100" d="M3 11 12 3l9 8M5 9.5V21h14V9.5M10 21v-6h4v6"/></svg><span id="bword"></span></p>
- <p id="belapsed" class="muted" style="font-size:13px;margin:4px 0 0"></p>
- <p id="bmsg" class="muted" style="font-size:13px;margin-top:4px"></p>
- <p id="bold" class="note" hidden>Built before the latest fixes. Press <b>Build 3D</b> to update this house.</p>
- <a class="btn" id="open" hidden>Open walkthrough</a>
- </div>
+ <label title="Untick to build empty rooms: walls, floors, doors, windows and lights only" style="font-size:14px"><input type="checkbox" id="furn" checked> Furnish the rooms</label>
+ <button class="link" id="models" type="button" style="align-self:flex-start">See and make themes →</button>
+ </section>
+ <section>
+ <details>
+ <summary>Floor settings</summary>
+ <div>
+ <div class="row"><span>Name</span><input type="text" id="fname" style="width:150px"></div>
+ <div class="row"><span>Ceiling height (ft)</span><input type="number" id="fh" min="8" max="14" step="0.5" style="width:70px"></div>
+ </div>
+ </details>
+ </section>
</aside>
</main>
<dialog id="modelsdlg" style="width:min(1000px,94vw);height:86vh;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--bg)">
diff --git a/web/edit.js b/web/edit.js
index b2bd083..935f1a9 100644
--- a/web/edit.js
+++ b/web/edit.js
@@ -290,7 +290,7 @@ function ui() {
if (ready()) P.appendChild(addBox());
draw(); return;
}
- if (!sel) { P.innerHTML = `<h3>Selection</h3><p class="muted" style="font-size:13px">${f.walls.length} walls, ${f.openings.length} openings, ${f.rooms.length} rooms</p>`; draw(); return; }
+ if (!sel) { P.innerHTML = `<p class="muted" style="font-size:13px;margin:0">This floor: ${f.walls.length} walls, ${f.openings.length} openings, ${f.rooms.length} rooms</p>`; draw(); return; }
const h = document.createElement('div');
if (sel.kind === 'wall') {
const w = f.walls[sel.i];