← Commit history

Publish 1.0.20

John Lauer ·d32174f51f · ·parent d773c2b
7 files changed +76−26
README.md+7−2
@@ -58,6 +58,10 @@ 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 |+| mode | performance | lightweight bundles fps 30, dpr 1, seg 48, no AA; performance (alias sexy) is full quality; explicit params override |+| seg | 80 | sphere tessellation 24 to 128 |+| aa | 1 | 0 disables antialiasing |+| dpr | 2 | devicePixelRatio cap, 1 to 3 | | fps | off | cap the render rate for spinner duty (floor 20); rAF yields between frames and stops when hidden | | bg | 0d1117 | hex background, or transparent to composite over the container's background (GL alpha); also settable live by postMessage | | hint | 0 | 1 shows the small click-to-zoom pill in armed contexts; off by default for purity; also flippable live by postMessage |@@ -84,8 +88,9 @@ over 12,800 triangles / 6,561 vertices, all displacement in the vertex shader, and requestAnimationFrame pauses it when hidden so a backgrounded webview costs nothing. Spinner duty at 32x32 on a 240 Hz display, measured: one instance about 1 to 3% of a core, eight concurrent about 9%, eight capped at fps=30 about 2%-total, host page locked at 240 fps throughout; divide by four on 60 Hz; hidden-is exactly zero.+total; the mode presets on the same fleet: performance 8.2% of a core,+lightweight 1.7%, about five times cheaper. Host page locked at 240 fps+throughout; divide by four on 60 Hz; hidden is exactly zero.  Fidelity: tools/build-loader.py extracts the GLSL verbatim from the Babylon lab at build time (one source of truth), reproduces Babylon's left-handed matrices
SKILL.md+18
@@ -88,6 +88,24 @@ Measured, not estimated, on the shipped build: - requestAnimationFrame pauses it completely when the tab is hidden: a   backgrounded webview costs nothing. +## Modes: lightweight vs performance (pick one, done)++Two named presets so neither the developer nor the AI reasons about knobs:++- `loader.html?bg=transparent&mode=lightweight` , spinner fleets, progress+  dialogs, battery: fps 30, dpr 1, seg 48 (4,608 triangles), no antialias.+  Measured on an eight-spinner 32x32 fleet: about 1.7% of one core total.+- `loader.html` , mode=performance is the default (alias mode=sexy), the+  full-quality look for hero surfaces and big canvases: uncapped fps, dpr up+  to 2, seg 80 (12,800 triangles), antialiased. Same fleet: about 8.2%.++Does it matter? For ONE spinner, not really: requestAnimationFrame already+yields between frames and stops when hidden, so either mode is a rounding+error. It matters for fleets, battery, and big surfaces: lightweight is about+five times cheaper, and performance is visibly smoother-edged at hero sizes.+Explicit params always override the mode; fps can also be changed live in+armed contexts via postMessage({adomLoader:{fps:N}}).+ ## Spinner duty (use it as the brand spinner, measured cost)  Safe to use as the spinner everywhere, including a 32x32 corner of a progress
loader.html+19−9
@@ -32,12 +32,21 @@ var OV=Q.get('ov')!=='0', DO_INTRO=Q.get('intro')!=='0';    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)));-/* fps: cap the render rate for spinner duty. rAF already yields the thread-   between frames and stops entirely when hidden; the cap multiplies that-   frugality (fps=30 on a 240 Hz display renders one frame in eight). The-   clock stays real-time; below 20 the dt clamp starts to slow the motion,-   so 20 is the floor. */-var FPSCAP=Math.max(0,P('fps',0)); if(FPSCAP>0&&FPSCAP<20)FPSCAP=20;+/* MODES bundle the quality knobs so nobody has to reason about them:+     mode=lightweight  fps 30, dpr 1, seg 48, no antialias: spinner fleets,+                       dialogs, battery. Looks fine at small sizes.+     mode=performance  (the default, alias mode=sexy) uncapped, dpr up to 2,+                       seg 80, antialias: hero surfaces, big canvases.+   Explicit params always override the mode. rAF still yields between frames+   and stops when hidden in every mode. seg and aa are boot-time; fps can be+   changed live by postMessage in armed contexts. */+var MODE=String((window.__ADOM_LOADER_PARAMS&&window.__ADOM_LOADER_PARAMS.mode)||Q.get('mode')||'').toLowerCase();+if(MODE==='sexy')MODE='performance';+var LIGHT=(MODE==='lightweight'||MODE==='light');+var FPSCAP=Math.max(0,P('fps',LIGHT?30:0)); if(FPSCAP>0&&FPSCAP<20)FPSCAP=20;+var DPRCAP=Math.max(1,Math.min(3,P('dpr',LIGHT?1:2)));+var SEGQ=Math.round(Math.max(24,Math.min(128,P('seg',LIGHT?48:80))));+var AAON=P('aa',LIGHT?0:1)>=1; var lastDraw=0; /* Background contract: bg=HEX paints a solid, bg=transparent leaves the GL    clear at alpha 0 so the CONTAINER's background shows straight through, and@@ -211,7 +220,7 @@ void main(void){ var LOGO_R=[0.29682, 0.31691, 0.33085, 0.34219, 0.3519, 0.36055, 0.36839, 0.37555, 0.38216, 0.3883, 0.39398, 0.39936, 0.40453, 0.40917, 0.41376, 0.41798, 0.422, 0.42584, 0.4294, 0.43293, 0.43608, 0.43927, 0.44211, 0.445, 0.44757, 0.45018, 0.45253, 0.45491, 0.45702, 0.45917, 0.46107, 0.46303, 0.46475, 0.46655, 0.46809, 0.46969, 0.4711, 0.47252, 0.47382, 0.47507, 0.47627, 0.47735, 0.47847, 0.47938, 0.48038, 0.48119, 0.48205, 0.48281, 0.4835, 0.48421, 0.48477, 0.48541, 0.48586, 0.48634, 0.48677, 0.48712, 0.48754, 0.48774, 0.48802, 0.4882, 0.48834, 0.48853, 0.48852, 0.48859, 0.48859, 0.48852, 0.48853, 0.48834, 0.4882, 0.48802, 0.48774, 0.48754, 0.48712, 0.48677, 0.48634, 0.48586, 0.48541, 0.48477, 0.48421, 0.4835, 0.48281, 0.48205, 0.48119, 0.48038, 0.47938, 0.47847, 0.47735, 0.47627, 0.47507, 0.47382, 0.47252, 0.4711, 0.46969, 0.46807, 0.46651, 0.46473, 0.46303, 0.46107, 0.45918, 0.45702, 0.45491, 0.45253, 0.45018, 0.44757, 0.445, 0.44211, 0.43927, 0.43608, 0.43293, 0.4294, 0.42584, 0.422, 0.41798, 0.41376, 0.40917, 0.40453, 0.3993, 0.39391, 0.38829, 0.38214, 0.37552, 0.36839, 0.36056, 0.3519, 0.34209, 0.33073, 0.31683, 0.2966]; var PATHS=[[[0.8046, 0.8046], [0.7789, 0.8291], [0.7525, 0.852], [0.7254, 0.8733], [0.6977, 0.8929], [0.6695, 0.911], [0.6408, 0.9274], [0.6118, 0.9422], [0.5825, 0.9553], [0.5531, 0.9668], [0.5235, 0.9766], [0.4939, 0.9847], [0.4644, 0.9911], [0.435, 0.9957], [0.4059, 0.9987], [0.3771, 1.0], [0.3486, 0.9995], [0.3206, 0.9972], [0.2932, 0.9932], [0.2664, 0.9874], [0.2403, 0.9799], [0.215, 0.9705], [0.1906, 0.9594], [0.1672, 0.9464], [0.1448, 0.9316], [0.1236, 0.9149], [0.1035, 0.8965], [0.0958, 0.8885], [0.0884, 0.8803], [0.0813, 0.8719], [0.0745, 0.8633], [0.0679, 0.8545], [0.0617, 0.8456], [0.0558, 0.8364], [0.0502, 0.8271], [0.0449, 0.8176], [0.0399, 0.8079], [0.0352, 0.7981], [0.0308, 0.7882], [0.0267, 0.7781], [0.0229, 0.7678], [0.0194, 0.7574], [0.0162, 0.7469], [0.0132, 0.7363], [0.0106, 0.7255], [0.0083, 0.7146], [0.0062, 0.7036], [0.0045, 0.6926], [0.003, 0.6814], [0.0018, 0.6701], [0.0009, 0.6587], [0.0003, 0.6473], [0.0, 0.6358], [0.0, 0.6357], [0.0, 0.6356], [0.0, 0.6354], [0.0, 0.6353], [0.0, 0.6352], [0.0, 0.6351], [0.0, 0.635], [0.0, 0.6349], [0.0, 0.6348], [0.0, 0.6346], [0.0, 0.0135], [0.0001, 0.0127], [0.0001, 0.0118], [0.0003, 0.011], [0.0004, 0.0102], [0.0007, 0.0094], [0.0009, 0.0086], [0.0013, 0.0079], [0.0016, 0.0071], [0.002, 0.0064], [0.0025, 0.0058], [0.003, 0.0051], [0.0035, 0.0045], [0.004, 0.0039], [0.0046, 0.0034], [0.0052, 0.0028], [0.0059, 0.0024], [0.0065, 0.0019], [0.0073, 0.0015], [0.008, 0.0012], [0.0087, 0.0008], [0.0095, 0.0006], [0.0103, 0.0003], [0.0111, 0.0002], [0.0119, 0.0], [0.0128, -0.0001], [0.0137, -0.0001], [0.6281, -0.0001], [0.64, 0.0], [0.6517, 0.0005], [0.6635, 0.0012], [0.6751, 0.0022], [0.6866, 0.0036], [0.698, 0.0052], [0.7093, 0.0072], [0.7206, 0.0094], [0.7316, 0.012], [0.7426, 0.0148], [0.7534, 0.018], [0.7641, 0.0215], [0.7747, 0.0253], [0.7851, 0.0295], [0.7954, 0.0339], [0.8055, 0.0386], [0.8154, 0.0437], [0.8252, 0.0491], [0.8348, 0.0548], [0.8442, 0.0608], [0.8534, 0.0671], [0.8624, 0.0737], [0.8712, 0.0807], [0.8799, 0.088], [0.8883, 0.0956], [0.8965, 0.1035], [0.915, 0.1235], [0.9316, 0.1448], [0.9464, 0.1672], [0.9594, 0.1906], [0.9705, 0.215], [0.9799, 0.2403], [0.9874, 0.2664], [0.9932, 0.2932], [0.9972, 0.3206], [0.9995, 0.3486], [1.0, 0.377], [0.9987, 0.4059], [0.9958, 0.435], [0.9911, 0.4644], [0.9847, 0.4939], [0.9766, 0.5235], [0.9668, 0.5531], [0.9553, 0.5825], [0.9422, 0.6118], [0.9274, 0.6408], [0.911, 0.6695], [0.8929, 0.6977], [0.8733, 0.7254], [0.852, 0.7525], [0.8291, 0.7789], [0.8046, 0.8046]], [[-0.8046, -0.8047], [-0.7789, -0.8292], [-0.7525, -0.8521], [-0.7254, -0.8734], [-0.6977, -0.893], [-0.6695, -0.9111], [-0.6408, -0.9275], [-0.6118, -0.9423], [-0.5825, -0.9554], [-0.5531, -0.9669], [-0.5235, -0.9767], [-0.4939, -0.9847], [-0.4644, -0.9912], [-0.435, -0.9958], [-0.4059, -0.9988], [-0.3771, -1.0001], [-0.3486, -0.9996], [-0.3206, -0.9973], [-0.2932, -0.9933], [-0.2664, -0.9875], [-0.2403, -0.98], [-0.215, -0.9706], [-0.1906, -0.9595], [-0.1672, -0.9465], [-0.1448, -0.9317], [-0.1236, -0.915], [-0.1035, -0.8965], [-0.0958, -0.8886], [-0.0884, -0.8804], [-0.0813, -0.872], [-0.0745, -0.8634], [-0.0679, -0.8546], [-0.0617, -0.8456], [-0.0558, -0.8365], [-0.0502, -0.8272], [-0.0449, -0.8177], [-0.0399, -0.808], [-0.0352, -0.7982], [-0.0308, -0.7883], [-0.0267, -0.7782], [-0.0229, -0.7679], [-0.0194, -0.7575], [-0.0162, -0.747], [-0.0132, -0.7364], [-0.0106, -0.7256], [-0.0083, -0.7147], [-0.0062, -0.7037], [-0.0045, -0.6927], [-0.003, -0.6815], [-0.0018, -0.6702], [-0.0009, -0.6588], [-0.0003, -0.6474], [-0.0, -0.6359], [-0.0, -0.6357], [-0.0, -0.6356], [-0.0, -0.6355], [-0.0, -0.6354], [-0.0, -0.6353], [-0.0, -0.6352], [-0.0, -0.6351], [-0.0, -0.635], [-0.0, -0.6349], [-0.0, -0.6347], [-0.0, -0.0136], [-0.0001, -0.0128], [-0.0001, -0.0119], [-0.0003, -0.0111], [-0.0004, -0.0103], [-0.0007, -0.0095], [-0.0009, -0.0087], [-0.0013, -0.008], [-0.0016, -0.0072], [-0.002, -0.0065], [-0.0025, -0.0059], [-0.003, -0.0052], [-0.0035, -0.0046], [-0.004, -0.004], [-0.0046, -0.0034], [-0.0052, -0.0029], [-0.0059, -0.0025], [-0.0065, -0.002], [-0.0073, -0.0016], [-0.008, -0.0012], [-0.0087, -0.0009], [-0.0095, -0.0007], [-0.0103, -0.0004], [-0.0111, -0.0002], [-0.0119, -0.0001], [-0.0128, -0.0], [-0.0137, -0.0], [-0.6281, -0.0], [-0.6399, -0.0001], [-0.6517, -0.0006], [-0.6634, -0.0013], [-0.6751, -0.0023], [-0.6866, -0.0037], [-0.698, -0.0053], [-0.7093, -0.0072], [-0.7205, -0.0095], [-0.7316, -0.0121], [-0.7426, -0.0149], [-0.7534, -0.0181], [-0.7641, -0.0216], [-0.7747, -0.0254], [-0.7851, -0.0295], [-0.7954, -0.034], [-0.8055, -0.0387], [-0.8154, -0.0438], [-0.8252, -0.0492], [-0.8347, -0.0549], [-0.8442, -0.0609], [-0.8534, -0.0672], [-0.8624, -0.0738], [-0.8712, -0.0808], [-0.8798, -0.0881], [-0.8883, -0.0957], [-0.8965, -0.1036], [-0.9149, -0.1236], [-0.9316, -0.1449], [-0.9464, -0.1673], [-0.9593, -0.1907], [-0.9705, -0.2151], [-0.9799, -0.2404], [-0.9874, -0.2665], [-0.9932, -0.2933], [-0.9972, -0.3207], [-0.9995, -0.3487], [-1.0, -0.3771], [-0.9987, -0.406], [-0.9957, -0.4351], [-0.991, -0.4645], [-0.9846, -0.494], [-0.9765, -0.5236], [-0.9668, -0.5532], [-0.9553, -0.5826], [-0.9422, -0.6119], [-0.9274, -0.6409], [-0.911, -0.6695], [-0.8929, -0.6978], [-0.8732, -0.7255], [-0.852, -0.7526], [-0.8291, -0.779], [-0.8046, -0.8047]]]; -var glopt={antialias:true,alpha:true,premultipliedAlpha:true};+var glopt={antialias:AAON,alpha:true,premultipliedAlpha:true}; var glc=document.getElementById('gl'), gl=glc.getContext('webgl2',glopt)||glc.getContext('webgl',glopt); var ovc=document.getElementById('ov'), ox=ovc.getContext('2d'); if(!gl){ document.body.style.background='#0d1117'; throw new Error('no webgl'); }@@ -228,7 +237,7 @@ var U={}; ['uMVP','c','uScale','uFlat','uRot','uPlump','uGap','uEdge','uCorner',   .forEach(function(n){U[n]=gl.getUniformLocation(prog,n);});  /* unit sphere, displaced entirely in the vertex shader */-var SEG=80, verts=[], idx=[];+var SEG=SEGQ, verts=[], idx=[]; for(var i=0;i<=SEG;i++){var th=i/SEG*Math.PI;   for(var j=0;j<=SEG;j++){var ph=j/SEG*2*Math.PI;     verts.push(Math.sin(th)*Math.cos(ph), Math.cos(th), Math.sin(th)*Math.sin(ph));}}@@ -284,7 +293,7 @@ var W=0,H=0,DPR=1,needSize=true;    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);+  var w=glc.clientWidth, h=glc.clientHeight, d=Math.min(DPRCAP,window.devicePixelRatio||1);   if(!needSize && w===W && h===H && d===DPR) return;   needSize=false;   if(w===W && h===H && d===DPR) return;@@ -457,6 +466,7 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT){     var d=e.data&&e.data.adomLoader; if(!d) return;     if(typeof d.hint!=='undefined'){ HINTON=!!d.hint; if(!HINTON) hint.style.opacity='0'; }     if(typeof d.bg==='string'){ applyBg(d.bg); }+    if(typeof d.fps==='number'){ FPSCAP=Math.max(0,d.fps); if(FPSCAP>0&&FPSCAP<20)FPSCAP=20; }     if(typeof d.margin==='number'){       MARGIN=Math.max(0,Math.min(90,d.margin));       HOME=R/(1-MARGIN/100);
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "orbital-lab",   "title": "Orbital Lab",   "type": "app",-  "version": "1.0.19",+  "version": "1.0.20",   "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.19",+  "version": "1.0.20",   "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+28−12
@@ -2680,12 +2680,21 @@ var OV=Q.get(&#x27;ov&#x27;)!==&#x27;0&#x27;, DO_INTRO=Q.get(&#x27;intro&#x27;)!    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(&#x27;margin&#x27;,0)));-/* fps: cap the render rate for spinner duty. rAF already yields the thread-   between frames and stops entirely when hidden; the cap multiplies that-   frugality (fps=30 on a 240 Hz display renders one frame in eight). The-   clock stays real-time; below 20 the dt clamp starts to slow the motion,-   so 20 is the floor. */-var FPSCAP=Math.max(0,P(&#x27;fps&#x27;,0)); if(FPSCAP&gt;0&amp;&amp;FPSCAP&lt;20)FPSCAP=20;+/* MODES bundle the quality knobs so nobody has to reason about them:+     mode=lightweight  fps 30, dpr 1, seg 48, no antialias: spinner fleets,+                       dialogs, battery. Looks fine at small sizes.+     mode=performance  (the default, alias mode=sexy) uncapped, dpr up to 2,+                       seg 80, antialias: hero surfaces, big canvases.+   Explicit params always override the mode. rAF still yields between frames+   and stops when hidden in every mode. seg and aa are boot-time; fps can be+   changed live by postMessage in armed contexts. */+var MODE=String((window.__ADOM_LOADER_PARAMS&amp;&amp;window.__ADOM_LOADER_PARAMS.mode)||Q.get(&#x27;mode&#x27;)||&#x27;&#x27;).toLowerCase();+if(MODE===&#x27;sexy&#x27;)MODE=&#x27;performance&#x27;;+var LIGHT=(MODE===&#x27;lightweight&#x27;||MODE===&#x27;light&#x27;);+var FPSCAP=Math.max(0,P(&#x27;fps&#x27;,LIGHT?30:0)); if(FPSCAP&gt;0&amp;&amp;FPSCAP&lt;20)FPSCAP=20;+var DPRCAP=Math.max(1,Math.min(3,P(&#x27;dpr&#x27;,LIGHT?1:2)));+var SEGQ=Math.round(Math.max(24,Math.min(128,P(&#x27;seg&#x27;,LIGHT?48:80))));+var AAON=P(&#x27;aa&#x27;,LIGHT?0:1)&gt;=1; var lastDraw=0; /* Background contract: bg=HEX paints a solid, bg=transparent leaves the GL    clear at alpha 0 so the CONTAINER&#x27;s background shows straight through, and@@ -2859,7 +2868,7 @@ void main(void){ var LOGO_R=[0.29682, 0.31691, 0.33085, 0.34219, 0.3519, 0.36055, 0.36839, 0.37555, 0.38216, 0.3883, 0.39398, 0.39936, 0.40453, 0.40917, 0.41376, 0.41798, 0.422, 0.42584, 0.4294, 0.43293, 0.43608, 0.43927, 0.44211, 0.445, 0.44757, 0.45018, 0.45253, 0.45491, 0.45702, 0.45917, 0.46107, 0.46303, 0.46475, 0.46655, 0.46809, 0.46969, 0.4711, 0.47252, 0.47382, 0.47507, 0.47627, 0.47735, 0.47847, 0.47938, 0.48038, 0.48119, 0.48205, 0.48281, 0.4835, 0.48421, 0.48477, 0.48541, 0.48586, 0.48634, 0.48677, 0.48712, 0.48754, 0.48774, 0.48802, 0.4882, 0.48834, 0.48853, 0.48852, 0.48859, 0.48859, 0.48852, 0.48853, 0.48834, 0.4882, 0.48802, 0.48774, 0.48754, 0.48712, 0.48677, 0.48634, 0.48586, 0.48541, 0.48477, 0.48421, 0.4835, 0.48281, 0.48205, 0.48119, 0.48038, 0.47938, 0.47847, 0.47735, 0.47627, 0.47507, 0.47382, 0.47252, 0.4711, 0.46969, 0.46807, 0.46651, 0.46473, 0.46303, 0.46107, 0.45918, 0.45702, 0.45491, 0.45253, 0.45018, 0.44757, 0.445, 0.44211, 0.43927, 0.43608, 0.43293, 0.4294, 0.42584, 0.422, 0.41798, 0.41376, 0.40917, 0.40453, 0.3993, 0.39391, 0.38829, 0.38214, 0.37552, 0.36839, 0.36056, 0.3519, 0.34209, 0.33073, 0.31683, 0.2966]; var PATHS=[[[0.8046, 0.8046], [0.7789, 0.8291], [0.7525, 0.852], [0.7254, 0.8733], [0.6977, 0.8929], [0.6695, 0.911], [0.6408, 0.9274], [0.6118, 0.9422], [0.5825, 0.9553], [0.5531, 0.9668], [0.5235, 0.9766], [0.4939, 0.9847], [0.4644, 0.9911], [0.435, 0.9957], [0.4059, 0.9987], [0.3771, 1.0], [0.3486, 0.9995], [0.3206, 0.9972], [0.2932, 0.9932], [0.2664, 0.9874], [0.2403, 0.9799], [0.215, 0.9705], [0.1906, 0.9594], [0.1672, 0.9464], [0.1448, 0.9316], [0.1236, 0.9149], [0.1035, 0.8965], [0.0958, 0.8885], [0.0884, 0.8803], [0.0813, 0.8719], [0.0745, 0.8633], [0.0679, 0.8545], [0.0617, 0.8456], [0.0558, 0.8364], [0.0502, 0.8271], [0.0449, 0.8176], [0.0399, 0.8079], [0.0352, 0.7981], [0.0308, 0.7882], [0.0267, 0.7781], [0.0229, 0.7678], [0.0194, 0.7574], [0.0162, 0.7469], [0.0132, 0.7363], [0.0106, 0.7255], [0.0083, 0.7146], [0.0062, 0.7036], [0.0045, 0.6926], [0.003, 0.6814], [0.0018, 0.6701], [0.0009, 0.6587], [0.0003, 0.6473], [0.0, 0.6358], [0.0, 0.6357], [0.0, 0.6356], [0.0, 0.6354], [0.0, 0.6353], [0.0, 0.6352], [0.0, 0.6351], [0.0, 0.635], [0.0, 0.6349], [0.0, 0.6348], [0.0, 0.6346], [0.0, 0.0135], [0.0001, 0.0127], [0.0001, 0.0118], [0.0003, 0.011], [0.0004, 0.0102], [0.0007, 0.0094], [0.0009, 0.0086], [0.0013, 0.0079], [0.0016, 0.0071], [0.002, 0.0064], [0.0025, 0.0058], [0.003, 0.0051], [0.0035, 0.0045], [0.004, 0.0039], [0.0046, 0.0034], [0.0052, 0.0028], [0.0059, 0.0024], [0.0065, 0.0019], [0.0073, 0.0015], [0.008, 0.0012], [0.0087, 0.0008], [0.0095, 0.0006], [0.0103, 0.0003], [0.0111, 0.0002], [0.0119, 0.0], [0.0128, -0.0001], [0.0137, -0.0001], [0.6281, -0.0001], [0.64, 0.0], [0.6517, 0.0005], [0.6635, 0.0012], [0.6751, 0.0022], [0.6866, 0.0036], [0.698, 0.0052], [0.7093, 0.0072], [0.7206, 0.0094], [0.7316, 0.012], [0.7426, 0.0148], [0.7534, 0.018], [0.7641, 0.0215], [0.7747, 0.0253], [0.7851, 0.0295], [0.7954, 0.0339], [0.8055, 0.0386], [0.8154, 0.0437], [0.8252, 0.0491], [0.8348, 0.0548], [0.8442, 0.0608], [0.8534, 0.0671], [0.8624, 0.0737], [0.8712, 0.0807], [0.8799, 0.088], [0.8883, 0.0956], [0.8965, 0.1035], [0.915, 0.1235], [0.9316, 0.1448], [0.9464, 0.1672], [0.9594, 0.1906], [0.9705, 0.215], [0.9799, 0.2403], [0.9874, 0.2664], [0.9932, 0.2932], [0.9972, 0.3206], [0.9995, 0.3486], [1.0, 0.377], [0.9987, 0.4059], [0.9958, 0.435], [0.9911, 0.4644], [0.9847, 0.4939], [0.9766, 0.5235], [0.9668, 0.5531], [0.9553, 0.5825], [0.9422, 0.6118], [0.9274, 0.6408], [0.911, 0.6695], [0.8929, 0.6977], [0.8733, 0.7254], [0.852, 0.7525], [0.8291, 0.7789], [0.8046, 0.8046]], [[-0.8046, -0.8047], [-0.7789, -0.8292], [-0.7525, -0.8521], [-0.7254, -0.8734], [-0.6977, -0.893], [-0.6695, -0.9111], [-0.6408, -0.9275], [-0.6118, -0.9423], [-0.5825, -0.9554], [-0.5531, -0.9669], [-0.5235, -0.9767], [-0.4939, -0.9847], [-0.4644, -0.9912], [-0.435, -0.9958], [-0.4059, -0.9988], [-0.3771, -1.0001], [-0.3486, -0.9996], [-0.3206, -0.9973], [-0.2932, -0.9933], [-0.2664, -0.9875], [-0.2403, -0.98], [-0.215, -0.9706], [-0.1906, -0.9595], [-0.1672, -0.9465], [-0.1448, -0.9317], [-0.1236, -0.915], [-0.1035, -0.8965], [-0.0958, -0.8886], [-0.0884, -0.8804], [-0.0813, -0.872], [-0.0745, -0.8634], [-0.0679, -0.8546], [-0.0617, -0.8456], [-0.0558, -0.8365], [-0.0502, -0.8272], [-0.0449, -0.8177], [-0.0399, -0.808], [-0.0352, -0.7982], [-0.0308, -0.7883], [-0.0267, -0.7782], [-0.0229, -0.7679], [-0.0194, -0.7575], [-0.0162, -0.747], [-0.0132, -0.7364], [-0.0106, -0.7256], [-0.0083, -0.7147], [-0.0062, -0.7037], [-0.0045, -0.6927], [-0.003, -0.6815], [-0.0018, -0.6702], [-0.0009, -0.6588], [-0.0003, -0.6474], [-0.0, -0.6359], [-0.0, -0.6357], [-0.0, -0.6356], [-0.0, -0.6355], [-0.0, -0.6354], [-0.0, -0.6353], [-0.0, -0.6352], [-0.0, -0.6351], [-0.0, -0.635], [-0.0, -0.6349], [-0.0, -0.6347], [-0.0, -0.0136], [-0.0001, -0.0128], [-0.0001, -0.0119], [-0.0003, -0.0111], [-0.0004, -0.0103], [-0.0007, -0.0095], [-0.0009, -0.0087], [-0.0013, -0.008], [-0.0016, -0.0072], [-0.002, -0.0065], [-0.0025, -0.0059], [-0.003, -0.0052], [-0.0035, -0.0046], [-0.004, -0.004], [-0.0046, -0.0034], [-0.0052, -0.0029], [-0.0059, -0.0025], [-0.0065, -0.002], [-0.0073, -0.0016], [-0.008, -0.0012], [-0.0087, -0.0009], [-0.0095, -0.0007], [-0.0103, -0.0004], [-0.0111, -0.0002], [-0.0119, -0.0001], [-0.0128, -0.0], [-0.0137, -0.0], [-0.6281, -0.0], [-0.6399, -0.0001], [-0.6517, -0.0006], [-0.6634, -0.0013], [-0.6751, -0.0023], [-0.6866, -0.0037], [-0.698, -0.0053], [-0.7093, -0.0072], [-0.7205, -0.0095], [-0.7316, -0.0121], [-0.7426, -0.0149], [-0.7534, -0.0181], [-0.7641, -0.0216], [-0.7747, -0.0254], [-0.7851, -0.0295], [-0.7954, -0.034], [-0.8055, -0.0387], [-0.8154, -0.0438], [-0.8252, -0.0492], [-0.8347, -0.0549], [-0.8442, -0.0609], [-0.8534, -0.0672], [-0.8624, -0.0738], [-0.8712, -0.0808], [-0.8798, -0.0881], [-0.8883, -0.0957], [-0.8965, -0.1036], [-0.9149, -0.1236], [-0.9316, -0.1449], [-0.9464, -0.1673], [-0.9593, -0.1907], [-0.9705, -0.2151], [-0.9799, -0.2404], [-0.9874, -0.2665], [-0.9932, -0.2933], [-0.9972, -0.3207], [-0.9995, -0.3487], [-1.0, -0.3771], [-0.9987, -0.406], [-0.9957, -0.4351], [-0.991, -0.4645], [-0.9846, -0.494], [-0.9765, -0.5236], [-0.9668, -0.5532], [-0.9553, -0.5826], [-0.9422, -0.6119], [-0.9274, -0.6409], [-0.911, -0.6695], [-0.8929, -0.6978], [-0.8732, -0.7255], [-0.852, -0.7526], [-0.8291, -0.779], [-0.8046, -0.8047]]]; -var glopt={antialias:true,alpha:true,premultipliedAlpha:true};+var glopt={antialias:AAON,alpha:true,premultipliedAlpha:true}; var glc=document.getElementById(&#x27;gl&#x27;), gl=glc.getContext(&#x27;webgl2&#x27;,glopt)||glc.getContext(&#x27;webgl&#x27;,glopt); var ovc=document.getElementById(&#x27;ov&#x27;), ox=ovc.getContext(&#x27;2d&#x27;); if(!gl){ document.body.style.background=&#x27;#0d1117&#x27;; throw new Error(&#x27;no webgl&#x27;); }@@ -2876,7 +2885,7 @@ var U={}; [&#x27;uMVP&#x27;,&#x27;c&#x27;,&#x27;uScale&#x27;,&#x27;uFlat&#x27;,&   .forEach(function(n){U[n]=gl.getUniformLocation(prog,n);});  /* unit sphere, displaced entirely in the vertex shader */-var SEG=80, verts=[], idx=[];+var SEG=SEGQ, verts=[], idx=[]; for(var i=0;i&lt;=SEG;i++){var th=i/SEG*Math.PI;   for(var j=0;j&lt;=SEG;j++){var ph=j/SEG*2*Math.PI;     verts.push(Math.sin(th)*Math.cos(ph), Math.cos(th), Math.sin(th)*Math.sin(ph));}}@@ -2932,7 +2941,7 @@ var W=0,H=0,DPR=1,needSize=true;    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);+  var w=glc.clientWidth, h=glc.clientHeight, d=Math.min(DPRCAP,window.devicePixelRatio||1);   if(!needSize &amp;&amp; w===W &amp;&amp; h===H &amp;&amp; d===DPR) return;   needSize=false;   if(w===W &amp;&amp; h===H &amp;&amp; d===DPR) return;@@ -3105,6 +3114,7 @@ if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || window.__ADOM_LOADER_INTERACT     var d=e.data&amp;&amp;e.data.adomLoader; if(!d) return;     if(typeof d.hint!==&#x27;undefined&#x27;){ HINTON=!!d.hint; if(!HINTON) hint.style.opacity=&#x27;0&#x27;; }     if(typeof d.bg===&#x27;string&#x27;){ applyBg(d.bg); }+    if(typeof d.fps===&#x27;number&#x27;){ FPSCAP=Math.max(0,d.fps); if(FPSCAP&gt;0&amp;&amp;FPSCAP&lt;20)FPSCAP=20; }     if(typeof d.margin===&#x27;number&#x27;){       MARGIN=Math.max(0,Math.min(90,d.margin));       HOME=R/(1-MARGIN/100);@@ -3179,7 +3189,7 @@ if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || window.__ADOM_LOADER_INTERACT   </script>   <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 27 KB. It boots instantly, which+     raw WebGL, no Babylon, no CDN, no fonts, no fetch, about 28 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@@ -3208,8 +3218,10 @@ if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || window.__ADOM_LOADER_INTERACT      tab is hidden, so a backgrounded webview costs nothing. Spinner duty, measured at      32x32 on a 240 Hz display: one instance costs about 1 to 3% of a single core, eight      concurrent instances about 9%, and eight instances capped with <code>fps=30</code>-     about 2% total, all while the host page holds a locked 240 fps. On a 60 Hz machine-     divide by four. Hidden, the cost is exactly zero.</p>+     about 2% total, all while the host page holds a locked 240 fps. The mode presets,+     same eight-spinner fleet: <b>performance</b> 8.2% of a core, <b>lightweight</b> 1.7%,+     about five times cheaper. On a 60 Hz machine divide by four. Hidden, the cost is+     exactly zero.</p>   <h3>Fidelity guarantees</h3>   <p>The loader is not a re-implementation of the look. <code>tools/build-loader.py</code>      extracts the GLSL <b>verbatim</b> from the Babylon lab at build time (one source of@@ -3285,6 +3297,10 @@ if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || 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>mode</td><td>performance</td><td><b>lightweight</b> bundles fps 30, dpr 1, seg 48, no antialias for spinner fleets and dialogs; <b>performance</b> (alias <b>sexy</b>) is the full-quality default. Explicit params override the mode</td></tr>+    <tr><td>seg</td><td>80</td><td>sphere tessellation, 24 to 128 (80 is 12,800 triangles, 48 is 4,608)</td></tr>+    <tr><td>aa</td><td>1</td><td>0 disables antialiasing</td></tr>+    <tr><td>dpr</td><td>2</td><td>devicePixelRatio cap for the backing store, 1 to 3</td></tr>     <tr><td>fps</td><td>off</td><td>cap the render rate for spinner duty (floor 20). rAF already yields between frames and stops when hidden; fps=30 renders one frame in eight on a 240 Hz display</td></tr>     <tr><td>bg</td><td>0d1117</td><td>hex background, or <b>transparent</b> to composite over the container's own background (GL context runs with alpha). Also settable live by postMessage</td></tr>     <tr><td>hint</td><td>0</td><td>1 shows the small "click to zoom" pill in armed contexts. Off by default: production stays pure. Armed contexts can also flip it live by postMessage</td></tr>
spin-measure.html+2−1
@@ -18,7 +18,8 @@ var grid=document.getElementById('grid'); for(var i=0;i<N;i++){   var c=document.createElement('div'); c.className='cell';   var f=document.createElement('iframe');-  f.src='loader.html?bg=transparent&intro=0'+(FPS?('&fps='+FPS):'');+  var M=new URLSearchParams(location.search).get('mode');+  f.src='loader.html?bg=transparent&intro=0'+(FPS?('&fps='+FPS):'')+(M?('&mode='+M):'');   c.appendChild(f); grid.appendChild(c); } </script>