comments: point the app.js mentions in tests, engine, HTML and CSS at their ui/ owners (#22)

filteredTriangles is in ui/remove.js, the MATERIAL tunables and section
state in ui/settings.js, the draw interaction and syncDrawControls in
ui/walls.js, and the shading colours in ui/part.js. Comments only; the
dated notes in docs/ are left as written.
This commit is contained in:
matthewtrahan authored and Matthew Trahan committed 2026-09-25 17:49:43 -05:00
1 parent 515dfa287b
commit 012513a677
6 files changed
+11 -11

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ function build() {
return fins.buildFins(topo, res, rot, { mode: 'auto', bedPad: true, tines: true });
}
/** Flatten one fin's triRanges into a vertex list (mirrors app.js filteredTriangles
/** Flatten one fin's triRanges into a vertex list (mirrors ui/remove.js filteredTriangles
* for a single record). */
function finVerts(triangles, fin) {
const out = [];
@@ -71,7 +71,7 @@ Deno.test('per-fin: filtering out one fin excludes exactly its triangles and no
const k = Math.min(1, b.fins.length - 1);
const removed = b.fins[k];
const removedSet = new Set([removed.id]);
// Replicate app.js filteredTriangles: walk records, skip removed, keep the rest.
// Replicate ui/remove.js filteredTriangles: walk records, skip removed, keep the rest.
const kept = [];
const removedVerts = new Set();
for (let i = 0; i < b.fins.length; i++) {
+1 -1
View File
@@ -1,6 +1,6 @@
// The clearance settings reaching the BUILD, wherever it runs.
//
// app.js sets FIN / PROP / PAD directly for the PLA/PETG profiles and the Support gap
// ui/settings.js sets FIN / PROP / PAD directly for the PLA/PETG profiles and the Support gap
// and Pad grip fields, but the build runs in a module Worker with its own copy of those
// modules, so none of it arrived: Auto mode always built PLA's numbers while the panel
// said PETG. They now travel with the request as `opts.tunables` and are applied by
+1 -1
View File
@@ -12,7 +12,7 @@
* draws is straight in XY by construction; there is nothing left to snap.
*
* Geometry only. The interaction (picking the two endpoints, live preview, undo)
* lives in app.js; this module turns two surface points plus the part's triangles
* lives in ui/walls.js; this module turns two surface points plus the part's triangles
* into a watertight wall, reusing prop.js's proven `sweep` and its three
* line-settling passes verbatim.
*/
+1 -1
View File
@@ -668,7 +668,7 @@ function buildFin(p0, out, span, topo, rot, offset, opts = {}) {
/**
* Apply the page's clearance settings to FIN / PROP / PAD.
*
* WHY THIS IS A PARAMETER AND NOT JUST A MODULE EDIT. app.js sets these objects
* WHY THIS IS A PARAMETER AND NOT JUST A MODULE EDIT. ui/settings.js sets these objects
* directly (applyMaterial for the PLA/PETG profiles, the Support gap and Pad grip
* fields) and that works for anything it builds itself. But the real build runs in
* finworker.js, a module Worker with its OWN instance of fins.js and prop.js: module
+5 -5
View File
@@ -154,7 +154,7 @@
<aside id="fin-opts" hidden>
<!-- Grouped into collapsible sections (issue #41): the flat list ran past the
bottom of a laptop screen and every feature lengthened it. Each section is a
plain <details>; app.js remembers which are open (localStorage, optional) and
plain <details>; ui/settings.js remembers which are open (localStorage, optional) and
fills the .sec-sum line so a collapsed section still says what's set. A
feature switch (Tines) lives in its section's header, so a disabled feature
costs one line. Fields that don't apply in the current mode stay hidden, as
@@ -165,7 +165,7 @@
were tuned for, so it needs more clearance everywhere. PLA is the default and
keeps today's tight grip; PETG widens the support gap + fin-tine standoff,
halves the tine bite, thins the bed pad, and turns the pad's tack into a gap.
Applied in app.js (applyMaterial), which also re-syncs the tunables below. -->
Applied in ui/settings.js (applyMaterial), which also re-syncs the tunables below. -->
<label class="fld row" id="material-fld" title="The filament you'll print in. PETG fuses to supports much harder than PLA, so PETG loosens the gaps, shrinks the tine bite, and gives the bed pad a gap instead of a bite. PLA keeps the tighter grip.">
Material
<select id="material">
@@ -315,8 +315,8 @@
<input type="range" id="coverage" min="0" max="100" step="5" value="50">
</label>
<!-- Suggest + Draw mix: place extra walls by hand where auto-placement missed.
Shown only in Suggest mode (toggled in app.js). Per-fin removal (Auto only,
shown via app.js syncRemoveUI): arm a click-to-remove mode, hover lights a
Shown only in Suggest mode (toggled in ui/settings.js). Per-fin removal (Auto only,
shown via ui/remove.js syncRemoveUI): arm a click-to-remove mode, hover lights a
fin red, click drops just that one; Restore all brings every one back. -->
<button class="btn sm" id="augment-toggle" hidden
title="Place extra breakaway walls by hand, on top of the auto-placed ones.">+ Add walls by hand</button>
@@ -332,7 +332,7 @@
<!-- Draw controls: shown while placing by hand, outside the sections so the
hint and Undo can never be collapsed away mid-draw. Hint text is set per
mode in app.js (syncDrawControls). -->
mode in ui/walls.js (syncDrawControls). -->
<div id="draw-controls" hidden>
<p class="draw-hint" id="draw-hint">Click an <strong>overhang face</strong> — it lights
up green when a fin can go there — to stand a support fin against it.</p>
+1 -1
View File
@@ -250,7 +250,7 @@ html, body {
margin: 9px 0;
}
/* legend swatches, keyed to the shading colours in app.js */
/* legend swatches, keyed to the shading colours in ui/part.js */
.sw {
display: inline-block;
width: 8px; height: 8px;