SharpMeow commited on
Commit
0acdbf1
·
verified ·
1 Parent(s): edfcef2

Set lateral wander default and reset to2x

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.js +10 -4
  3. index.html +2 -2
README.md CHANGED
@@ -37,7 +37,7 @@ scans.
37
  Finder amber, its polished lines lime); click a maker in the key to hide its lines, or untick one line on a scan card, and the view link
38
  keeps it (`off=`). Scan names follow a traffic light from the automatic CT end check: green when both Center
39
  Finder ends passed, yellow for caution (a CT recap, an end it could not judge, or a 2.4 µm scan it was never
40
- tuned on), red when an end was flagged. The slider exaggerates side-to-side drift (default 3x).
41
  - **X-ray**: one scan. A radiograph (or maximum intensity) render of the whole scan at about 0.3 mm per voxel
42
  (0.15 to 0.23 mm on a 2.4 µm scan, with fewer heights),
43
  the lines inside it, and an axial slice at 70 to 80 µm per pixel with every line's crossing marked. The slice
 
37
  Finder amber, its polished lines lime); click a maker in the key to hide its lines, or untick one line on a scan card, and the view link
38
  keeps it (`off=`). Scan names follow a traffic light from the automatic CT end check: green when both Center
39
  Finder ends passed, yellow for caution (a CT recap, an end it could not judge, or a 2.4 µm scan it was never
40
+ tuned on), red when an end was flagged. The slider exaggerates side-to-side drift (default 2x). Reset returns it to 2x; an explicit `?ex=` link can select another value. This display setting does not change the published line coordinates.
41
  - **X-ray**: one scan. A radiograph (or maximum intensity) render of the whole scan at about 0.3 mm per voxel
42
  (0.15 to 0.23 mm on a 2.4 µm scan, with fewer heights),
43
  the lines inside it, and an axial slice at 70 to 80 µm per pixel with every line's crossing marked. The slice
app.js CHANGED
@@ -21,11 +21,12 @@ const hexOf = (l) => SRC_HEX[l.source] || '#89f0ff';
21
  const COARSE = matchMedia('(pointer: coarse)').matches;
22
  // the Array view's opening camera: high enough that its three rows (people, Center Finder, not on the prize page) stand apart
23
  const ARRAY_CAM = [-620, 760, 2300];
 
24
  const $ = (id) => document.getElementById(id);
25
 
26
  // ---------- state ----------
27
  const S = {
28
- data: null, las: null, mode: 'array', sel: null, hot: null, ex: 3, z: null,
29
  ct: true, render: 'xray', gain: 44, sheets: true, needles: true, ct2: false, ori: false, blend: 70,
30
  outside: false, // draw the end runs that lie outside the scroll in the CT (hidden by default; URL outside=1)
31
  dirty: true, status: '',
@@ -856,7 +857,12 @@ $('c-close').addEventListener('click', () => setMode('array'));
856
  $('b-about').addEventListener('click', () => { markSeen(); openGuide(); });
857
  $('b-connect').addEventListener('click', () => { markSeen(); openGuide('connect'); });
858
  let exQueued = false;
859
- $('ex').addEventListener('input', (e) => { S.ex = +e.target.value; $('ex-v').textContent = S.ex; if (!exQueued) { exQueued = true; requestAnimationFrame(() => { exQueued = false; buildArray(); }); } syncURLSoon(); });
 
 
 
 
 
860
  $('t-ct').addEventListener('change', (e) => { S.ct = e.target.checked; applyVolUniforms(); });
861
  function setOutside(on) { S.outside = on === undefined ? !S.outside : !!on; $('t-outside').checked = S.outside; linesChanged(); return { outside: S.outside }; }
862
  $('t-outside').addEventListener('change', (e) => setOutside(e.target.checked));
@@ -1002,7 +1008,7 @@ $('s-turn').addEventListener('change', (e) => { SET.turn = e.target.checked; app
1002
  $('t-turn').addEventListener('change', (e) => { SET.turn = e.target.checked; applySettings(); });
1003
  $('i-hide').addEventListener('click', () => { SET.inset = false; applySettings(); });
1004
  $('i-show').addEventListener('click', () => { SET.inset = true; applySettings(); });
1005
- $('s-reset').addEventListener('click', () => { Object.assign(SET, SET_DEFAULT); applySettings(); });
1006
 
1007
  // first visit
1008
  function seen() { try { return localStorage.getItem('umbilici.seen') === '1'; } catch { return true; } }
@@ -1054,7 +1060,7 @@ function syncURLSoon() { clearTimeout(urlT); urlT = setTimeout(syncURL, 300); }
1054
  function syncURL() {
1055
  const q = new URLSearchParams();
1056
  if (S.mode !== 'array') { q.set('mode', S.mode); q.set('scan', S.sel.scroll); q.set('z', Math.round(S.z)); }
1057
- if (S.ex !== 3) q.set('ex', S.ex);
1058
  const off = [...OFF.src, ...OFF.line]; if (off.length) q.set('off', off.join(','));
1059
  if (S.outside) q.set('outside', '1');
1060
  history.replaceState(null, '', q.toString() ? `?${q}` : location.pathname);
 
21
  const COARSE = matchMedia('(pointer: coarse)').matches;
22
  // the Array view's opening camera: high enough that its three rows (people, Center Finder, not on the prize page) stand apart
23
  const ARRAY_CAM = [-620, 760, 2300];
24
+ const DEFAULT_EX = 2;
25
  const $ = (id) => document.getElementById(id);
26
 
27
  // ---------- state ----------
28
  const S = {
29
+ data: null, las: null, mode: 'array', sel: null, hot: null, ex: DEFAULT_EX, z: null,
30
  ct: true, render: 'xray', gain: 44, sheets: true, needles: true, ct2: false, ori: false, blend: 70,
31
  outside: false, // draw the end runs that lie outside the scroll in the CT (hidden by default; URL outside=1)
32
  dirty: true, status: '',
 
857
  $('b-about').addEventListener('click', () => { markSeen(); openGuide(); });
858
  $('b-connect').addEventListener('click', () => { markSeen(); openGuide('connect'); });
859
  let exQueued = false;
860
+ function setEx(value) {
861
+ S.ex = value; $('ex').value = S.ex; $('ex-v').textContent = S.ex;
862
+ if (!exQueued) { exQueued = true; requestAnimationFrame(() => { exQueued = false; buildArray(); }); }
863
+ syncURLSoon();
864
+ }
865
+ $('ex').addEventListener('input', (e) => setEx(+e.target.value));
866
  $('t-ct').addEventListener('change', (e) => { S.ct = e.target.checked; applyVolUniforms(); });
867
  function setOutside(on) { S.outside = on === undefined ? !S.outside : !!on; $('t-outside').checked = S.outside; linesChanged(); return { outside: S.outside }; }
868
  $('t-outside').addEventListener('change', (e) => setOutside(e.target.checked));
 
1008
  $('t-turn').addEventListener('change', (e) => { SET.turn = e.target.checked; applySettings(); });
1009
  $('i-hide').addEventListener('click', () => { SET.inset = false; applySettings(); });
1010
  $('i-show').addEventListener('click', () => { SET.inset = true; applySettings(); });
1011
+ $('s-reset').addEventListener('click', () => { Object.assign(SET, SET_DEFAULT); setEx(DEFAULT_EX); applySettings(); });
1012
 
1013
  // first visit
1014
  function seen() { try { return localStorage.getItem('umbilici.seen') === '1'; } catch { return true; } }
 
1060
  function syncURL() {
1061
  const q = new URLSearchParams();
1062
  if (S.mode !== 'array') { q.set('mode', S.mode); q.set('scan', S.sel.scroll); q.set('z', Math.round(S.z)); }
1063
+ if (S.ex !== DEFAULT_EX) q.set('ex', S.ex);
1064
  const off = [...OFF.src, ...OFF.line]; if (off.length) q.set('off', off.join(','));
1065
  if (S.outside) q.set('outside', '1');
1066
  history.replaceState(null, '', q.toString() ? `?${q}` : location.pathname);
index.html CHANGED
@@ -176,7 +176,7 @@
176
 
177
  <div class="hud bl mono small">
178
  <div class="ctl" id="ctl-array">
179
- <label>lateral wander &times;<b id="ex-v">3</b> <input type="range" id="ex" min="1" max="20" value="3"></label>
180
  <span class="dim">exaggerates side-to-side drift so the shapes show; heights are true</span>
181
  </div>
182
  <div class="ctl" id="ctl-scan" hidden>
@@ -459,6 +459,6 @@ Page source and build scripts: https://huggingface.co/spaces/SharpMeow/umbilici/
459
  <div class="tbl-wrap"><table class="tbl" id="tbl"></table></div>
460
  </dialog>
461
 
462
- <script type="module" src="app.js?v=14"></script>
463
  </body>
464
  </html>
 
176
 
177
  <div class="hud bl mono small">
178
  <div class="ctl" id="ctl-array">
179
+ <label>lateral wander &times;<b id="ex-v">2</b> <input type="range" id="ex" min="1" max="20" value="2"></label>
180
  <span class="dim">exaggerates side-to-side drift so the shapes show; heights are true</span>
181
  </div>
182
  <div class="ctl" id="ctl-scan" hidden>
 
459
  <div class="tbl-wrap"><table class="tbl" id="tbl"></table></div>
460
  </dialog>
461
 
462
+ <script type="module" src="app.js?v=14.2"></script>
463
  </body>
464
  </html>