by adom
The Adom logomark is a hydrogen 2p orbital: psi = (2p_x + 2p_y)/sqrt(2). A live Babylon.js lab that proves it (all 16 real spherical harmonics, the alignment cheat, and the directed loop), plus loader.html: the same animation as one dependency-free WebGL file for webview load screens.
← Commit history
Publish 1.0.14
7 files changed
+279−34
README.md+36@@ -58,6 +58,7 @@ state is rolled at every epoch. | tlead | 1.5 | seconds before the epoch the dark lobe fades to teal | | ov | 1 | 0 makes the cheat its own act after the steer | | intro | 1 | 0 skips the teal logo intro |+| margin | 0 | percent of the container left empty around the mark (80 = small and centered, 20 = nearly fills); zoom-out caps at 40% past the margined framing | | interact | 0 | 1 arms click-to-zoom (previews and demos, never load screens) | ## Why raw WebGL, and not Babylon or three.js@@ -87,6 +88,41 @@ measured curve: a Babylon-style decaying inertia integral plus the lab's 6% and 5% springs at 240 fps cadence, frame-rate independent, zoom toward the cursor, glide home before every logo. +## The mouse: arming, zoom to cursor, springiness++Inert by default (a load screen must never eat input); `?interact=1` arms it:+one click captures the wheel (teal ring + glow), click-away or blur releases.++Zoom to cursor solves the world point under the pointer, `w = n*r/m + pan`,+applies the radius step, then re-solves pan so that point stays pinned:+`pan' = w - n*r'/m`. Measured drift across a six-notch corner zoom: 0.002+world units.++Three exponential systems, frame-rate independent via `pow(k, dt*240)`:++| system | per frame | feel |+|---|---|---|+| inertia integral | notch deposits `vel += r*0.085`; consumed by `vel*(1-0.8^(dt*240))` | notches glide, not step |+| radius spring | `r += (4.4-r)*(1-0.94^(dt*240))` | zoom breathes back home |+| centering pull | `pan -= pan*(1-0.95^(dt*240))` | the mark re-centers |++Tuned by measurement: identical 12-notch bursts driven at both viewers in+instrumented pup windows; lab dips to 3.995 / home in ~200 ms, loader 3.990 /+~250 ms. The epoch override glides any user pose to the calibrated home before+every logo, locks the wheel through the sit, and hands control back from home+the instant the sit ends.++## Resizing++The loader treats size as live input: window resize plus a ResizeObserver,+canvases re-backed at devicePixelRatio (capped 2), FOV axis picked by the+limiting dimension. Proven across 300x620, 1100x300, 420x420, 180x140,+1300x700, 900x560 with the GL buffer tracking the container 1:1, including+continuous mid-animation resizes; re-backing is coalesced into the render loop+(events mark dirty, the size applies and draws in the same frame), so drags+repaint clean every frame with no blank flashes. Run `resize-proof.html` from the repo to+torture-test it in your own container.+ ## The three tuned cuts The settings the loop was tuned to, saved live while dialing it in. All three ship in
SKILL.md+40−1@@ -36,7 +36,27 @@ cheat fades in; st (0) dead-still hold; logo (100) flat-mark peak opacity in percent; llead (1) logo fade lead seconds; tlead (1.5) teal-unification lead; ov (1) 0 makes the cheat its own act; intro (1) 0 skips the teal intro; interact (0) 1 arms click-to-zoom, for previews and demos only, never for real-load screens, which must stay input-transparent.+load screens, which must stay input-transparent; margin (0) percent of the+container left empty around the mark, 80 sits it small in the middle, 20+nearly fills, zoom-in still reaches the screen and zoom-out caps at 40%+past the margined framing.++## Setting the margin (size inside the container)++`margin` is how an embedder controls how much of the container the mark+occupies; the loader always FILLS its container, margin just sizes the anim+down inside it. Implemented as camera distance, so perspective, the overlay+match and the epoch glide stay exact at every value.++- Big hero surface (a 1920x1080 webview, anim as a quiet centerpiece):+ `loader.html?margin=80` , the mark sits small in the middle.+- Content page (about page, side panel): `loader.html?margin=20` , nearly fills.+- Load screen default: `loader.html` (margin 0, the classic framing).++Zoom contract at any margin: zoom IN can bring the object right up to the+screen; zoom OUT is capped at 40% past the margined epoch framing+(radius <= home x 1.4); the spring always breathes back to the margined home,+and every logo lands on the exact margined framing. ## The numbers (why it is safe in a load path) @@ -75,6 +95,25 @@ readbacks for the fit measurement); the loader is that lab distilled. cursor, and a glide home before every logo so the mark never shows distorted. +## Mouse control and resizing (the contract embedders rely on)++- Inert by default: a load screen never eats input. `?interact=1` arms+ click-to-capture (teal ring + glow); click-away or blur releases.+- Zoom to cursor: the world point under the pointer is re-solved every notch+ so it stays pinned (measured drift 0.002 world units over six notches).+- Springiness: an inertia integral (notch deposits `vel += r*0.085`, consumed+ by `1-0.8^(dt*240)`), a radius spring (`1-0.94^(dt*240)` toward 4.4) and a+ centering pull (`1-0.95^(dt*240)`), all frame-rate independent; tuned by+ driving identical 12-notch bursts at both viewers (lab dip 3.995/~200 ms,+ loader 3.990/~250 ms). Before every logo the framing glides home, the wheel+ locks through the sit, and control returns from home when the sit ends.+- Resizing: size is live input. Window resize + ResizeObserver, canvases+ re-backed at devicePixelRatio (cap 2), FOV axis picked by the limiting+ dimension; verified 1:1 GL-buffer tracking across portrait, landscape,+ square, tiny and huge containers, including continuous resizes; re-backing coalesces into the render+ loop (applied and drawn in the same frame) so drags never flash blank.+ `resize-proof.html` in the repo is the drag-to-resize torture rig.+ ## Rebuilding python3 tools/build-loader.py # loader.html from orbital-lab.html
loader.html+35−15@@ -27,6 +27,11 @@ var PT=P('pt',4.5), DT=P('dt',3), CT=P('ct',0.3), ST=P('st',0); var LOGO_PK=Math.max(0,Math.min(1,P('logo',100)/100)); var LLEAD=Math.abs(P('llead',1)), TLEAD=Math.abs(P('tlead',1.5)); var OV=Q.get('ov')!=='0', DO_INTRO=Q.get('intro')!=='0';+/* margin: percent of the container left EMPTY around the mark. 0 is the+ classic framing; 80 sits the anim small in the middle of a big window.+ Implemented as camera distance, so perspective, the overlay match and the+ epoch glide all stay exact at any margin. */+var MARGIN=Math.max(0,Math.min(90,P('margin',0))); var BG=[0.051,0.067,0.090]; var VS=`precision highp float;@@ -223,7 +228,7 @@ gl.uniform3fv(U.cPos,C_POS); /* Babylon LEFT-HANDED camera, reproduced exactly: eye (0,0,-4.4) looking +Z, fov 0.8 fixed on the LIMITING axis so the mark keeps its fraction of any canvas shape (the lab's fitFraming rule). */-var R=4.4, CAMR=R, PANX=0, PANY=0, FOV=0.8, ZN=0.1, ZF=100;+var R=4.4, HOME=R/(1-MARGIN/100), CAMR=HOME, PANX=0, PANY=0, FOV=0.8, ZN=0.1, ZF=Math.max(100,HOME*3); /* Babylon's ACTUAL zoom model, tuned against the lab's measured curve: each notch deposits a decaying velocity integral (inertia 0.9) that is consumed frame by frame straight into the radius, while the lab's springs pull@@ -248,16 +253,29 @@ function setMVP2(w,h,r,px,py){ ])); } -var W=0,H=0,DPR=1;-function resize(){- DPR=Math.min(2,window.devicePixelRatio||1);- W=glc.clientWidth; H=glc.clientHeight;- glc.width=W*DPR; glc.height=H*DPR;- ovc.width=W*DPR; ovc.height=H*DPR;+var W=0,H=0,DPR=1,needSize=true;+/* Resize events only mark dirty. Re-backing a canvas CLEARS it, and doing+ that on every event mid-drag leaves blank frames until the next rAF: the+ jerk. Instead the size is applied at the TOP of the frame and the frame+ draws immediately at the new size, so a continuous drag repaints clean+ every single frame with at most one reallocation per frame. */+function resize(){ needSize=true; }+function applySize(){+ var w=glc.clientWidth, h=glc.clientHeight, d=Math.min(2,window.devicePixelRatio||1);+ if(!needSize && w===W && h===H && d===DPR) return;+ needSize=false;+ if(w===W && h===H && d===DPR) return;+ W=w; H=h; DPR=d;+ glc.width=w*d; glc.height=h*d;+ ovc.width=w*d; ovc.height=h*d; gl.viewport(0,0,glc.width,glc.height);- setMVP2(W,H); }-window.addEventListener('resize',resize); resize();+window.addEventListener('resize',resize);+/* Containers resize without warning in webviews; the window resize event+ covers iframe viewport changes, and the ResizeObserver is the belt for+ any host that reflows the document instead. */+if(window.ResizeObserver) new ResizeObserver(resize).observe(document.documentElement);+resize(); /* ---- the directed loop, distilled ---- */ var L=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3];@@ -275,6 +293,7 @@ var INTRO={dark:0.9,logoIn:1.4,hold:0.5,reveal:1.2}; var inIntro=DO_INTRO, introT=0, t=DO_INTRO?0:eE, tEvo=0, rolled=false, last=performance.now(); function frame(now){+ applySize(); var dt=Math.min(0.05,(now-last)/1000); last=now; tEvo+=dt; var k,cheat,fill,teal,pinned=false,drawMesh=true; if(inIntro){@@ -312,24 +331,25 @@ function frame(now){ and play resumes from the calibrated framing. */ var RET=Math.max(0.6, LLEAD+0.2, Math.min(1.2,DT)); camK = (t>eS-RET&&t<eS) ? smooth((t-(eS-RET))/RET) : 0;- if(t>=eS&&t<=eE+0.001){ CAMR=R; PANX=0; PANY=0; velR=0; camK=1; }+ if(t>=eS&&t<=eE+0.001){ CAMR=HOME; PANX=0; PANY=0; velR=0; camK=1; } // consume the wheel's decaying integral, zooming toward the cursor if(Math.abs(velR)>0.0001){ var stepK=1-Math.pow(0.8, dt*240); var step=velR*stepK; velR-=step; var m2=proj(W,H); var wx=lastNX*CAMR/m2.m0+PANX, wy=lastNY*CAMR/m2.m5+PANY;- var r2=Math.max(2.4,Math.min(9,CAMR-step));+ /* zoom in to the screen freely; zoom out capped 40% past the epoch framing */+ var r2=Math.max(2.4,Math.min(HOME*1.4,CAMR-step)); PANX=wx-lastNX*r2/m2.m0; PANY=wy-lastNY*r2/m2.m5; CAMR=r2; } /* The lab's springs, verbatim: radius 6% and pan 5% per frame at the lab's 240fps cadence, frame-rate independent. */ var spr=1-Math.pow(0.94, dt*240), sprT=1-Math.pow(0.95, dt*240);- CAMR+=(R-CAMR)*spr; PANX-=PANX*sprT; PANY-=PANY*sprT;+ CAMR+=(HOME-CAMR)*spr; PANX-=PANX*sprT; PANY-=PANY*sprT; window.__lock = (t>eS-RET && t<=eE);- effR=CAMR+(R-CAMR)*camK; effPX=PANX*(1-camK); effPY=PANY*(1-camK);- } else { effR=R; effPX=0; effPY=0; }+ effR=CAMR+(HOME-CAMR)*camK; effPX=PANX*(1-camK); effPY=PANY*(1-camK);+ } else { effR=HOME; effPX=0; effPY=0; } setMVP2(W,H,effR,effPX,effPY); window.__cam={r:+effR.toFixed(3),x:+effPX.toFixed(3),y:+effPY.toFixed(3),k:+camK.toFixed(2)}; @@ -406,7 +426,7 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT){ if(window.__lock) return; // the epoch owns the framing lastNX=2*e.clientX/W-1; lastNY=1-2*e.clientY/H; velR+=CAMR*NOTCH*(-e.deltaY/100); // wheel up = zoom in = radius shrinks- velR=Math.max(-3,Math.min(3,velR));+ velR=Math.max(-HOME*0.75,Math.min(HOME*0.75,velR)); },{passive:false}); } </script>
package.json+1−1@@ -2,7 +2,7 @@ "slug": "orbital-lab", "title": "Orbital Lab", "type": "app",- "version": "1.0.13",+ "version": "1.0.14", "description": "The Adom logomark is a hydrogen 2p orbital: psi = (2p_x + 2p_y)/sqrt(2). A live Babylon.js lab that proves it (all 16 real spherical harmonics, the alignment cheat, and the directed loop), plus loader.html: the same animation as one dependency-free WebGL file for webview load screens.", "tags": [ "brand",
page.json+1−1@@ -2,7 +2,7 @@ "slug": "orbital-lab", "title": "Orbital Lab", "type": "app",- "version": "1.0.13",+ "version": "1.0.14", "description": "The Adom logomark is a hydrogen 2p orbital: psi = (2p_x + 2p_y)/sqrt(2). A live Babylon.js lab that proves it (all 16 real spherical harmonics, the alignment cheat, and the directed loop), plus loader.html: the same animation as one dependency-free WebGL file for webview load screens.", "tags": [ "brand",
readme.html+80−16@@ -2637,6 +2637,11 @@ var PT=P('pt',4.5), DT=P('dt',3), CT=P('ct',0.3), var LOGO_PK=Math.max(0,Math.min(1,P('logo',100)/100)); var LLEAD=Math.abs(P('llead',1)), TLEAD=Math.abs(P('tlead',1.5)); var OV=Q.get('ov')!=='0', DO_INTRO=Q.get('intro')!=='0';+/* margin: percent of the container left EMPTY around the mark. 0 is the+ classic framing; 80 sits the anim small in the middle of a big window.+ Implemented as camera distance, so perspective, the overlay match and the+ epoch glide all stay exact at any margin. */+var MARGIN=Math.max(0,Math.min(90,P('margin',0))); var BG=[0.051,0.067,0.090]; var VS=`precision highp float;@@ -2833,7 +2838,7 @@ gl.uniform3fv(U.cPos,C_POS); /* Babylon LEFT-HANDED camera, reproduced exactly: eye (0,0,-4.4) looking +Z, fov 0.8 fixed on the LIMITING axis so the mark keeps its fraction of any canvas shape (the lab's fitFraming rule). */-var R=4.4, CAMR=R, PANX=0, PANY=0, FOV=0.8, ZN=0.1, ZF=100;+var R=4.4, HOME=R/(1-MARGIN/100), CAMR=HOME, PANX=0, PANY=0, FOV=0.8, ZN=0.1, ZF=Math.max(100,HOME*3); /* Babylon's ACTUAL zoom model, tuned against the lab's measured curve: each notch deposits a decaying velocity integral (inertia 0.9) that is consumed frame by frame straight into the radius, while the lab's springs pull@@ -2858,16 +2863,29 @@ function setMVP2(w,h,r,px,py){ ])); } -var W=0,H=0,DPR=1;-function resize(){- DPR=Math.min(2,window.devicePixelRatio||1);- W=glc.clientWidth; H=glc.clientHeight;- glc.width=W*DPR; glc.height=H*DPR;- ovc.width=W*DPR; ovc.height=H*DPR;+var W=0,H=0,DPR=1,needSize=true;+/* Resize events only mark dirty. Re-backing a canvas CLEARS it, and doing+ that on every event mid-drag leaves blank frames until the next rAF: the+ jerk. Instead the size is applied at the TOP of the frame and the frame+ draws immediately at the new size, so a continuous drag repaints clean+ every single frame with at most one reallocation per frame. */+function resize(){ needSize=true; }+function applySize(){+ var w=glc.clientWidth, h=glc.clientHeight, d=Math.min(2,window.devicePixelRatio||1);+ if(!needSize && w===W && h===H && d===DPR) return;+ needSize=false;+ if(w===W && h===H && d===DPR) return;+ W=w; H=h; DPR=d;+ glc.width=w*d; glc.height=h*d;+ ovc.width=w*d; ovc.height=h*d; gl.viewport(0,0,glc.width,glc.height);- setMVP2(W,H); }-window.addEventListener('resize',resize); resize();+window.addEventListener('resize',resize);+/* Containers resize without warning in webviews; the window resize event+ covers iframe viewport changes, and the ResizeObserver is the belt for+ any host that reflows the document instead. */+if(window.ResizeObserver) new ResizeObserver(resize).observe(document.documentElement);+resize(); /* ---- the directed loop, distilled ---- */ var L=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3];@@ -2885,6 +2903,7 @@ var INTRO={dark:0.9,logoIn:1.4,hold:0.5,reveal:1.2}; var inIntro=DO_INTRO, introT=0, t=DO_INTRO?0:eE, tEvo=0, rolled=false, last=performance.now(); function frame(now){+ applySize(); var dt=Math.min(0.05,(now-last)/1000); last=now; tEvo+=dt; var k,cheat,fill,teal,pinned=false,drawMesh=true; if(inIntro){@@ -2922,24 +2941,25 @@ function frame(now){ and play resumes from the calibrated framing. */ var RET=Math.max(0.6, LLEAD+0.2, Math.min(1.2,DT)); camK = (t>eS-RET&&t<eS) ? smooth((t-(eS-RET))/RET) : 0;- if(t>=eS&&t<=eE+0.001){ CAMR=R; PANX=0; PANY=0; velR=0; camK=1; }+ if(t>=eS&&t<=eE+0.001){ CAMR=HOME; PANX=0; PANY=0; velR=0; camK=1; } // consume the wheel's decaying integral, zooming toward the cursor if(Math.abs(velR)>0.0001){ var stepK=1-Math.pow(0.8, dt*240); var step=velR*stepK; velR-=step; var m2=proj(W,H); var wx=lastNX*CAMR/m2.m0+PANX, wy=lastNY*CAMR/m2.m5+PANY;- var r2=Math.max(2.4,Math.min(9,CAMR-step));+ /* zoom in to the screen freely; zoom out capped 40% past the epoch framing */+ var r2=Math.max(2.4,Math.min(HOME*1.4,CAMR-step)); PANX=wx-lastNX*r2/m2.m0; PANY=wy-lastNY*r2/m2.m5; CAMR=r2; } /* The lab's springs, verbatim: radius 6% and pan 5% per frame at the lab's 240fps cadence, frame-rate independent. */ var spr=1-Math.pow(0.94, dt*240), sprT=1-Math.pow(0.95, dt*240);- CAMR+=(R-CAMR)*spr; PANX-=PANX*sprT; PANY-=PANY*sprT;+ CAMR+=(HOME-CAMR)*spr; PANX-=PANX*sprT; PANY-=PANY*sprT; window.__lock = (t>eS-RET && t<=eE);- effR=CAMR+(R-CAMR)*camK; effPX=PANX*(1-camK); effPY=PANY*(1-camK);- } else { effR=R; effPX=0; effPY=0; }+ effR=CAMR+(HOME-CAMR)*camK; effPX=PANX*(1-camK); effPY=PANY*(1-camK);+ } else { effR=HOME; effPX=0; effPY=0; } setMVP2(W,H,effR,effPX,effPY); window.__cam={r:+effR.toFixed(3),x:+effPX.toFixed(3),y:+effPY.toFixed(3),k:+camK.toFixed(2)}; @@ -3016,7 +3036,7 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT if(window.__lock) return; // the epoch owns the framing lastNX=2*e.clientX/W-1; lastNY=1-2*e.clientY/H; velR+=CAMR*NOTCH*(-e.deltaY/100); // wheel up = zoom in = radius shrinks- velR=Math.max(-3,Math.min(3,velR));+ velR=Math.max(-HOME*0.75,Math.min(HOME*0.75,velR)); },{passive:false}); } </script>@@ -3029,7 +3049,7 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT page. Everything below explains how to ship it.</p> <h2 style="margin-top:30px">Ship it as a webview loader</h2> <p><b>loader.html</b> on this page is the animation above distilled to ONE dependency-free file:- raw WebGL, no Babylon, no CDN, no fonts, no fetch, about 24 KB. It boots instantly, which+ raw WebGL, no Babylon, no CDN, no fonts, no fetch, about 25 KB. It boots instantly, which is the point: it plays while your webview's real content is still loading. Under 10 KB gzipped, zero requests, one draw call over 12,800 vertex-shader-displaced triangles, and about 0.06 ms of JS per frame, so the CPU stays asleep. The wheel is tuned against the@@ -3068,6 +3088,49 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT 6% radius and 5% centering springs at its 240 fps cadence made frame-rate independent, zoom toward the cursor, and a glide home before every logo so the mark always lands undistorted.</p>+ <h3>The mouse: arming, zoom to cursor, and the springiness algorithm</h3>+ <p><b>Arming.</b> A load screen must never eat input, so the loader is inert by default:+ clicks and wheel pass straight through to your page. <code>?interact=1</code> arms it+ (the preview above is armed): one click captures the wheel, a teal ring with a glow+ says so, and clicking anywhere else or leaving the frame releases it.</p>+ <p><b>Zoom to cursor.</b> Every notch records the cursor in normalized device coordinates.+ The world point under it is solved from the camera, <code>w = n·r/m + pan</code>,+ the radius step is applied, and the pan is re-solved so that exact world point stays+ pinned under the cursor: <code>pan' = w − n·r'/m</code>. Measured drift of+ the pinned point across a six-notch corner zoom: 0.002 world units.</p>+ <p><b>The springiness.</b> Three exponential systems, all frame-rate independent via+ <code>pow(k, dt·240)</code> so a 60 Hz laptop feels identical to a 240 Hz monitor:</p>+ <table>+ <tr><th>system</th><th>rule, per frame</th><th>feel</th></tr>+ <tr><td>inertia integral</td><td>each notch deposits <code>vel += r·0.085</code>;+ consumed by <code>step = vel·(1−0.8^(dt·240))</code></td>+ <td>notches stack and glide instead of stepping</td></tr>+ <tr><td>radius spring</td><td><code>r += (4.4−r)·(1−0.94^(dt·240))</code></td>+ <td>zoom always breathes back home</td></tr>+ <tr><td>centering pull</td><td><code>pan −= pan·(1−0.95^(dt·240))</code></td>+ <td>the mark drifts back to center</td></tr>+ </table>+ <p><b>Tuned by measurement, not by copying constants.</b> The obvious approach, lifting+ Babylon's <code>wheelDeltaPercentage</code>, nets to zero against the spring. So both+ viewers were driven with the identical 12-notch wheel burst in instrumented pup windows+ and the loader was tuned until the response curves matched: the lab dips to radius+ 3.995 and springs home in about 200 ms; the loader dips to 3.990 and springs home in+ about 250 ms, one sample bucket apart.</p>+ <p><b>The epoch override.</b> Whatever you have zoomed or panned, a glide window of+ <code>max(0.6s, llead+0.2s, min(1.2s, dt))</code> eases the framing to the calibrated+ home pose, arriving exactly at epoch-start, the wheel is locked through the sit so the+ mark always lands undistorted, and home becomes the new state afterwards: the wheel+ frees the instant the sit ends and play resumes from the calibrated framing.</p>+ <h3>Resizing: it fills whatever it is given</h3>+ <p>Webviews get resized constantly, so the loader treats size as live input: it listens to+ window resize AND a ResizeObserver on the document, re-backs both canvases at+ devicePixelRatio (capped 2), and picks its FOV axis by the LIMITING dimension, so+ portrait, landscape, square, tiny or huge, the mark keeps its fraction of the container+ with no letterboxing and no stretching. Proven across 300x620, 1100x300, 420x420,+ 180x140, 1300x700 and 900x560: the GL buffer tracked the container 1:1 at every step,+ including mid-animation continuous resizes, and re-backing is coalesced into the render loop (events only mark dirty, the new size is applied and DRAWN in the same frame), so a continuous drag repaints clean every frame with no blank flashes. The repo ships+ <code>resize-proof.html</code>, a drag-to-resize torture rig around the real loader,+ so you can prove it in your own container shape.</p> <h3>Embed</h3> <pre><iframe src="loader.html" style="position:absolute;inset:0;width:100%;height:100%;border:0;background:#0d1117">@@ -3088,6 +3151,7 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT <tr><td>ov</td><td>1</td><td>0 makes the cheat its own act after the steer</td></tr> <tr><td>intro</td><td>1</td><td>0 skips the teal logo intro</td></tr> <tr><td>interact</td><td>0</td><td>1 arms click-to-zoom (for previews and demos, never load screens)</td></tr>+ <tr><td>margin</td><td>0</td><td>percent of the container left empty around the mark: 80 sits it small in the middle of a big window, 20 nearly fills. Zoom-in still brings it to the screen; zoom-out caps at 40% past the margined framing</td></tr> </table> <h3>The three tuned cuts</h3> <p>These are the settings the loop was actually tuned to, saved live while dialing it in.
resize-proof.htmladded+86@@ -0,0 +1,86 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8">+<title>loader resize proof</title>+<style>+ :root{--bg:#0d1117;--surface:#161b22;--border:#30363d;--text:#e6edf3;--text-2:#8b949e;--accent:#00b8b0}+ body{margin:0;background:var(--bg);color:var(--text);font-family:'Satoshi',system-ui,sans-serif;padding:18px}+ h1{font-size:16px;margin:0 0 4px}+ p{font-size:12.5px;color:var(--text-2);margin:0 0 12px;max-width:720px;line-height:1.6}+ .acts{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}+ button{font-family:inherit;font-weight:500;font-size:12px;padding:7px 13px;border-radius:999px;cursor:pointer;+ background:#21262d;border:1px solid var(--border);color:var(--text)}+ button:hover{border-color:var(--accent)}+ #box{overflow:hidden;position:relative;width:760px;height:475px;min-width:120px;min-height:80px;+ border:1px dashed var(--border);border-radius:10px;transition:width .35s ease,height .35s ease;background:#0d1117}+ /* custom handle ABOVE the iframe: the native resize grip sat underneath it,+ so drags fought the loader for the pointer and felt broken */+ #grip{position:absolute;right:-2px;bottom:-2px;width:22px;height:22px;cursor:nwse-resize;z-index:5;+ border-right:3px solid var(--accent);border-bottom:3px solid var(--accent);border-radius:0 0 8px 0}+ #box.notrans{transition:none}+ #box iframe{position:absolute;inset:0;width:100%;height:100%;border:0}+ #ro{font-family:ui-monospace,monospace;font-size:11px;color:var(--accent);margin-top:8px}+</style>+</head>+<body>+<h1>loader.html resize proof</h1>+<p>The dashed box is a live container around the real loader. Drag its lower-right corner+ yourself, run the presets, or run the tour. The loader must fill whatever it is given:+ portrait, landscape, square, tiny, huge, and it must keep the mark framed by its+ limiting axis the whole time. Grab the OS window edge too, the page reflows with it.</p>+<div class="acts">+ <button data-s="300,620">Tall</button>+ <button data-s="1100,300">Wide</button>+ <button data-s="420,420">Square</button>+ <button data-s="180,140">Tiny</button>+ <button data-s="1300,700">Huge</button>+ <button data-s="760,475">Reset</button>+ <button id="tour">Tour (animated)</button>+ <span style="width:14px"></span>+ <button data-m="0">margin 0%</button>+ <button data-m="40">margin 40%</button>+ <button data-m="80">margin 80%</button>+</div>+<div id="box"><iframe src="loader.html?interact=1"></iframe><div id="grip" title="drag to resize"></div></div>+<div id="ro">container: …</div>+<script>+var box=document.getElementById('box'), ro=document.getElementById('ro');+document.querySelectorAll('button[data-s]').forEach(function(b){+ b.addEventListener('click',function(){+ var s=b.getAttribute('data-s').split(',');+ box.style.width=s[0]+'px'; box.style.height=s[1]+'px';+ });+});+document.getElementById('tour').addEventListener('click',function(){+ var steps=[[300,620],[1100,300],[420,420],[180,140],[1300,700],[760,475]], i=0;+ (function next(){ if(i>=steps.length) return;+ box.style.width=steps[i][0]+'px'; box.style.height=steps[i][1]+'px';+ i++; setTimeout(next,1100); })();+});+document.querySelectorAll('button[data-m]').forEach(function(b){+ b.addEventListener('click',function(){+ box.querySelector('iframe').src='loader.html?interact=1&margin='+b.getAttribute('data-m');+ });+});+var grip=document.getElementById('grip'), drag=null;+grip.addEventListener('pointerdown',function(e){+ e.preventDefault(); grip.setPointerCapture(e.pointerId);+ box.classList.add('notrans');+ drag={x:e.clientX,y:e.clientY,w:box.clientWidth,h:box.clientHeight};+});+grip.addEventListener('pointermove',function(e){+ if(!drag) return;+ box.style.width=Math.max(120,drag.w+e.clientX-drag.x)+'px';+ box.style.height=Math.max(80,drag.h+e.clientY-drag.y)+'px';+});+grip.addEventListener('pointerup',function(){ drag=null; box.classList.remove('notrans'); });+setInterval(function(){+ var f=box.querySelector('iframe'), w=f.contentWindow;+ ro.textContent='container: '+box.clientWidth+'x'+box.clientHeight++ ' · loader viewport: '+(w&&w.W?w.W+'x'+w.H:'…')++ ' · gl buffer: '+(w&&w.gl?w.gl.drawingBufferWidth+'x'+w.gl.drawingBufferHeight:'…');+},250);+</script>+</body>+</html>