Fix teeth vertex slider driving the lip vertex count
opts() declared `verts` twice - once from the lip slider and again from the teeth slider. Duplicate keys in an object literal are silent in JS and the last one wins, so the teeth vertex control was quietly setting the lip vertex budget while the lip control did nothing at all. Renamed to teethVerts, with interior.js reading it under that name. selftest now parses the opts() literal and fails on duplicate keys, verified to catch this exact case. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
d18791e6ad
commit
f9b8ec8617
3 changed files with 16 additions and 3 deletions
|
|
@ -47,7 +47,7 @@ const opts = () => ({
|
|||
tongueReject: +el('tongueReject').value / 100,
|
||||
blobGrow: +el('blobGrow').value,
|
||||
topBias: +el('topBias').value / 100,
|
||||
verts: +el('teethVerts').value,
|
||||
teethVerts: +el('teethVerts').value,
|
||||
smoothWin: +el('smoothWin').value,
|
||||
contourSmooth: +el('contourSmooth').value,
|
||||
apertureThresh: +el('apertureThresh').value / 1000,
|
||||
|
|
@ -146,7 +146,7 @@ function measureAll(images, dense, o) {
|
|||
// Extraction keys on every knob that changes the pixels examined, so the cache
|
||||
// is keyed on exactly those and a change to anything else stays instant.
|
||||
const extractKey = (o) =>
|
||||
[o.cavityErode, o.tongueReject, o.blobGrow, o.topBias, o.verts].join('|');
|
||||
[o.cavityErode, o.tongueReject, o.blobGrow, o.topBias, o.teethVerts].join('|');
|
||||
|
||||
/* ---------- build ---------- */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue