← Commit history

Publish 1.1.2

John Lauer ·ff150a6184 · ·parent e804044
4 files changed +780−3
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "orbital-lab",   "title": "Orbital Lab",   "type": "app",-  "version": "1.1.1",+  "version": "1.1.2",   "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.1.1",+  "version": "1.1.2",   "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+755
@@ -2873,6 +2873,761 @@ window.__lab = { push, zeros, HARMONICS, setAnim:v=>{animate=v;} };     <p style="margin:0 0 6px"><b>This is THE Adom loading animation.</b> Use <b>loader.html</b> (1.1.0 and later, take 2: the lobes morph into the logo's leaves) for every loading screen, splash, webview load screen and app launch screen. It is the same orbital as the logo sting in the Adom Video Brand Kit, and Hydrogen ships it.</p>     <p style="margin:0"><b>Deprecated for loaders:</b> loader-take1.html, copies of loader.html from before 1.1.0 vendored into other apps (replace them), and the loading icons in adom/orbital-logo (v9, v9-logo), which never form the logo and whose shader takes over a minute to compile on Windows GPUs.</p>   </div>+  <h2>Color check: is it Adom teal?</h2>+  <p>The Adom brand teal is <b>#00B8B1</b> (0, 184, 177). Four tiles to compare by eye on your own screen (screenshots shift color, so judge it live):</p>+  <div style="display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:960px;margin:12px 0 6px">+    <div><p style="margin:0 0 6px"><b>1. The logo sting as most players show it.</b> dark-intro-16x9.mp4 from the Video Brand Kit. Its file carries no color tags, so YouTube, LinkedIn, browsers and editors assume BT.709 and show the teal bluer and darker, about (0, 165, 178).</p>+      <video src="https://wiki.adom.inc/blob/app/orbital-lab/docs/color-check/logo-sting-untagged.mp4" autoplay muted loop playsinline style="width:100%;aspect-ratio:16/9;background:#0d1117;border:1px solid #30363d;border-radius:8px;display:block"></video></div>+    <div><p style="margin:0 0 6px"><b>2. The brand teal.</b> #00B8B1 as plain CSS, nothing in between.</p>+      <div style="aspect-ratio:16/9;background:#0d1117;border:1px solid #30363d;border-radius:8px;display:flex;align-items:center;justify-content:center"><div style="width:38%;aspect-ratio:1;background:#00b8b1;border-radius:12px"></div></div></div>+    <div><p style="margin:0 0 6px"><b>3. The loader with the brand-teal fix</b> (what Hydrogen ships): the lobes are exactly #00B8B1 where the light hits them, shaded darker where it does not. The dark blue lobes are the orbital's negative half.</p>+      <iframe srcdoc="&lt;!DOCTYPE html&gt;+&lt;html lang=&quot;en&quot;&gt;+&lt;head&gt;+&lt;meta charset=&quot;UTF-8&quot;&gt;+&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;+&lt;title&gt;Adom loader&lt;/title&gt;+&lt;link rel=&quot;icon&quot; href=&quot;data:image/svg+xml,%3Csvg xmlns=&#x27;http://www.w3.org/2000/svg&#x27; viewBox=&#x27;0 0 16 16&#x27;%3E%3Ccircle cx=&#x27;8&#x27; cy=&#x27;8&#x27; r=&#x27;5&#x27; fill=&#x27;%2300b8b0&#x27;/%3E%3C/svg%3E&quot;&gt;+&lt;style&gt;+  html,body{margin:0;height:100%;overflow:hidden;background:#0d1117}+  canvas{position:absolute;inset:0;width:100%;height:100%;display:block}+&lt;/style&gt;+&lt;/head&gt;+&lt;body&gt;+&lt;canvas id=&quot;gl&quot;&gt;&lt;/canvas&gt;+&lt;canvas id=&quot;ov&quot;&gt;&lt;/canvas&gt;+&lt;script&gt;+/* The Adom logomark is a hydrogen 2p orbital: psi = (2p_x + 2p_y)/sqrt(2).+   This file is the wiki page adom/orbital-lab distilled to a loader. */+&#x27;use strict&#x27;;window.__ADOM_LOADER_INTERACT=1;window.__ADOM_LOADER_PARAMS={pt:5,dt:1.5,ct:0.6,st:1,logo:100,llead:0.9,tlead:0.4,bg:&#x27;0d1117&#x27;};+var Q=new URLSearchParams(location.search);+function P(k,d){+  var o=window.__ADOM_LOADER_PARAMS||{};+  if(k in o) return o[k];+  var v=parseFloat(Q.get(k));return isFinite(v)?v:d;+}+var PT=P(&#x27;pt&#x27;,5), DT=P(&#x27;dt&#x27;,1.5), CT=P(&#x27;ct&#x27;,0.6), ST=P(&#x27;st&#x27;,1);+var LOGO_PK=Math.max(0,Math.min(1,P(&#x27;logo&#x27;,100)/100));+var LLEAD=Math.abs(P(&#x27;llead&#x27;,0.9)), TLEAD=Math.abs(P(&#x27;tlead&#x27;,0.4));+var EMERGE=String(P(&#x27;emerge&#x27;,0))===&#x27;1&#x27;;+/* speed: percent playback rate for the ANIMATION clocks (timeline, evolution,+   birth). 100 is real time; 10 is a tenth speed. Camera springs and user+   interaction stay real-time so the feel never goes gluey. */+var SPEED=Math.max(0.05,Math.min(3,Math.abs(P(&#x27;speed&#x27;,100))/100));+/* orbit: automatic camera yaw during PLAY, in degrees per second (0 = off,+   try 12). The angle glides to the nearest whole turn as sculpting begins,+   so every epoch still lands square-on for the logo overlay, and play+   resumes from the equivalent orientation with no unwinding sweep. */+var ORBIT=(P(&#x27;orbit&#x27;,0)||0)*Math.PI/180;+var OV=Q.get(&#x27;ov&#x27;)!==&#x27;0&#x27;, DO_INTRO=Q.get(&#x27;intro&#x27;)!==&#x27;0&#x27;&amp;&amp;!EMERGE;+/* 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. */+/* margin accepts NEGATIVE values for full bleed: -N moves the camera N%+   closer, so -50 doubles the mark and it runs off every edge. Clamped at+   -70 so the surface never crosses the near plane. */+var MARGIN=Math.max(-70,Math.min(90,P(&#x27;margin&#x27;,0)));+function homeFor(m){ return m&lt;0 ? R*(1+m/100) : R/(1-m/100); }+/* 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;);+/* SAFEGUARD (2026-08-04, upstreamed from Hydrogen Desktop): default to a BOUNDED 60fps even+   in performance mode instead of uncapped. An uncapped WebGL surface on a slower/integrated+   GPU pegs the GPU and starves the embedding app&#x27;s UI thread (frozen nav) and delivers frame+   BURSTS that read as &quot;crazy speed&quot;. A hero that genuinely wants uncapped opts out: ?fps=0. */+var FPSCAP=Math.max(0,P(&#x27;fps&#x27;,LIGHT?30:60)); 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+   the mark composites onto whatever surface it sits on (a toolbar, a hero,+   anything). Changeable live by postMessage in armed contexts. */+var BG=[0.051,0.067,0.090], TRANSP=false;+function applyBg(raw){+  raw=String(raw||&#x27;&#x27;).toLowerCase().replace(&#x27;#&#x27;,&#x27;&#x27;);+  TRANSP=(raw===&#x27;transparent&#x27;);+  var ok=/^[0-9a-f]{6}$/.test(raw);+  BG=ok?[parseInt(raw.slice(0,2),16)/255,parseInt(raw.slice(2,4),16)/255,parseInt(raw.slice(4,6),16)/255]+       :[0.051,0.067,0.090];+  var css=TRANSP?&#x27;transparent&#x27;:(ok?(&#x27;#&#x27;+raw):&#x27;#0d1117&#x27;);+  document.documentElement.style.background=css;+  document.body.style.background=css;+}+applyBg((window.__ADOM_LOADER_PARAMS&amp;&amp;window.__ADOM_LOADER_PARAMS.bg)||Q.get(&#x27;bg&#x27;));++var VS=`precision highp float;+attribute vec3 position;+uniform mat4 uMVP;+uniform float c[16];+uniform float uScale;+varying float vPsi;+varying vec3 vN;++float psiOf(vec3 d){+  float x=d.x, y=d.y, z=d.z;+  float s = 0.0;+  s += c[0]  * 0.2820948;+  s += c[1]  * 0.4886025 * y;+  s += c[2]  * 0.4886025 * z;+  s += c[3]  * 0.4886025 * x;+  s += c[4]  * 1.0925484 * x * y;+  s += c[5]  * 1.0925484 * y * z;+  s += c[6]  * 0.3153916 * (3.0*z*z - 1.0);+  s += c[7]  * 1.0925484 * x * z;+  s += c[8]  * 0.5462742 * (x*x - y*y);+  s += c[9]  * 0.5900436 * y * (3.0*x*x - y*y);+  s += c[10] * 2.8906114 * x * y * z;+  s += c[11] * 0.4570458 * y * (5.0*z*z - 1.0);+  s += c[12] * 0.3731763 * z * (5.0*z*z - 3.0);+  s += c[13] * 0.4570458 * x * (5.0*z*z - 1.0);+  s += c[14] * 1.4453057 * z * (x*x - y*y);+  s += c[15] * 0.5900436 * x * (x*x - 3.0*y*y);+  return s;+}++uniform float uFlat, uRot, uPlump, uGap, uEdge, uCorner;+uniform float uLogoR[128];        // the mark&#x27;s measured edge, 0..90 degrees+varying vec2 vQ;                  // in-plane shape position, before the gap: the pixel cut reads it+varying float vFace;              // &gt; 0 where the outward normal faces the camera+varying float vZ;                 // shape-space depth, for the trim&#x27;s perspective++/* TAKE 2: the morph. Instead of cutting the orbital to the mark and fading+   what is cut away, the lobes BECOME the leaves. A pure 2p lobe is a ball of+   radius R0 touching the origin; its cross-section disk is mapped onto the+   leaf, radially from a center m on the leaf&#x27;s axis: the ball&#x27;s center goes+   to m, its rim to the leaf&#x27;s outline, the node at the origin to the leaf&#x27;s+   corner. Heights are kept, so the ball lands on a leaf-shaped lens whose+   silhouette IS the mark, with nothing cut and nothing faded. */+uniform float uMorph;             // 0 the orbital, 1 the leaf solid+uniform float uOrtho;             // 0 the camera&#x27;s perspective, 1 none (the mark is flat)+uniform float uLeafM;             // m&#x27;s distance from the origin along the leaf axis+uniform float uNode;              // psi of one mesh step off the node: that band collapses to the corner+uniform vec4  uLeaf[32];          // distance from m to the outline at 128 angles, -pi..pi++float leafAt(int i){+  int q = i / 4;+  int r = i - q * 4;+  vec4 v = uLeaf[q];+  return r == 0 ? v.x : (r == 1 ? v.y : (r == 2 ? v.z : v.w));+}+float leafR(float beta){+  float u  = (beta + 3.14159265) / 6.28318531 * 127.0;+  float fi = floor(clamp(u, 0.0, 126.0));+  return mix(leafAt(int(fi)), leafAt(int(fi) + 1), clamp(u - fi, 0.0, 1.0));+}+vec3 leafPos(vec3 P, float pp){+  float R0  = 0.2443013;          // the 2p lobe&#x27;s radius: 0.4886 cos(angle) is a ball+  float ax  = radians(uRot) + (pp &gt;= 0.0 ? 0.0 : 3.14159265);+  vec2  a   = vec2(cos(ax), sin(ax));+  vec2  b   = vec2(-a.y, a.x);+  vec2  rel = vec2(dot(P.xy, a), dot(P.xy, b)) - vec2(R0, 0.0);+  float rho = length(rel);+  float be  = rho &gt; 1e-7 ? atan(rel.y, rel.x) : 0.0;+  vec2  l   = vec2(uLeafM, 0.0) + (rho / R0) * leafR(be) * vec2(cos(be), sin(be));+  return vec3(l.x * a + l.y * b, P.z);+}++/* The morph target for ANY direction.++   Honest note on what works and what does not.++   Sliding only the RADIUS toward the mark&#x27;s edge leaves out-of-quadrant+   vertices with a target of zero, so they pile at the node: that was the bead+   and the creases.++   Moving the DIRECTION too seemed like the fix, but both variants failed for+   the same underlying reason: this sphere&#x27;s parameterisation covers the full+   180-degree lobe, and the mark&#x27;s leaf is 90 degrees. Clamping stacks half the+   vertices on the boundary planes (shredding). Remapping 2:1 spreads them, but+   then every vertex including those at the node gets pushed out to the leaf+   edge, so the nodal pinch vanishes and the two lobes fuse into a tube.++   What actually measures best is the simplest thing: keep the physics surface+   exactly as the wavefunction gives it, and cut it to the mark&#x27;s quadrants.+   That scored 95.9% IoU at 0.8% spill and renders clean, because it never+   moves a vertex anywhere the surface was not already. It IS a clip, and that+   is the honest description of the license in the mark. */+vec3 shapedPos(vec3 dir, float ovK){+  float pp = psiOf(dir);+  vec3 physics = dir * abs(pp);+  if (uFlat &lt;= 0.0001) return physics;++  float PI4  = 0.7853981634;+  float axis = radians(uRot);+  float s    = (pp &gt;= 0.0) ? 1.0 : -1.0;+  float lobe = (pp &gt;= 0.0) ? axis : axis + 3.14159265;++  /* The quadrant cut itself is done PER PIXEL in the fragment shader (vQ+     below). Doing it here, by projecting every out-of-quadrant vertex onto+     the cut planes, built a paper-thin sheet of squashed triangles along each+     plane: edge-on it rendered as a hairline at the seam, and while the cut+     ramped in it fanned out into jagged fins. Discarding fragments instead+     gives a mathematically straight edge exactly on the plane, with no+     geometry left behind to catch the light.++     What stays here is only the CORNER rounding, and only its soft excess+     over a hard cut: min(d,0) rounded is 0.5*(d - sqrt(d*d + rc*rc)), and+     subtracting min(d,0) leaves the gentle inward ease near the plane while+     the hard part is left to the pixel cut. */+  vec2  q  = physics.xy;+  float rc = uCorner;+  if (rc &gt; 1e-5) {+    vec2  e1 = vec2(cos(axis - PI4), sin(axis - PI4));+    vec2  e2 = vec2(cos(axis + PI4), sin(axis + PI4));+    float d1 = dot(q, e1) * s;+    q -= e1 * ((0.5 * (d1 - sqrt(d1*d1 + rc*rc)) - min(d1, 0.0)) * s);+    float d2 = dot(q, e2) * s;+    q -= e2 * ((0.5 * (d2 - sqrt(d2*d2 + rc*rc)) - min(d2, 0.0)) * s);+  }++  vec3 clipped = vec3(mix(physics.xy, q, uFlat), physics.z);++  /* OUTER BOUNDARY correction.+     The cut fixes the inner corner but leaves the outer edge as the plain+     circle the physics gives: it overshoots the mark in some directions and+     falls short in others. So for each direction, compare the orbital&#x27;s own+     in-plane radius against the mark&#x27;s measured edge at that same angle and+     scale by the ratio. Points outside the mark are pulled in, points inside+     are pushed out, and the silhouette lands exactly on the vectors.++     Directions past the quadrant (about to be cut away) take the ratio AT the+     quadrant edge rather than none at all. Switching the correction off right+     at the edge kinked every triangle that straddled it, which showed as a+     notch where the flat edge meets the outer curve.++     This scales the in-plane component only, so the solid stays coherent+     out of plane rather than collapsing. */+  if (uEdge &gt; 0.0001) {+    vec2  cq = clipped.xy;+    float cl = length(cq);+    if (cl &gt; 1e-5) {+      float cang = atan(cq.y, cq.x);+      float cda  = atan(sin(cang - lobe), cos(cang - lobe));+      {+        float u = (clamp(cda, -PI4, PI4) + PI4) / (2.0 * PI4) * 127.0;+        float fi = floor(min(u, 126.0));+        float f = u - fi;+        int   i = int(fi);+        int   j = int(fi + 1.0);+        float rEdge = mix(uLogoR[i], uLogoR[j], f);++        // the orbital&#x27;s own equatorial radius in this (quadrant-clamped) direction+        float ea   = lobe + clamp(cda, -PI4, PI4);+        float rPsi = abs(psiOf(vec3(cos(ea), sin(ea), 0.0)));+        /* Aim 6% PAST the mark and let the fragment shader trim the outline+           exactly. Where the vector&#x27;s curve leaves the flat edge it is+           tangent to it, a detail far finer than the sphere&#x27;s vertex+           spacing, so aiming at it directly left a chord there: a sharp+           corner. ovK is 0 for the lighting, so the overshoot only moves+           the silhouette the trim cuts, never the shading. */+        float ov = mix(1.0, 1.06, ovK);+        if (rPsi &gt; 1e-5) {+          float k = min(rEdge / rPsi * ov, 3.0);+          clipped.xy = cq * mix(1.0, k, uEdge);+        }+      }+    }+  }+  return clipped;+}++void main(void){+  vec3 d = normalize(position);+  float p = psiOf(d);+  vPsi = p;++  vec3 shaped = shapedPos(d, 1.0);+  /* The target is the LOGO state&#x27;s own lobe in this direction, never the+     live state&#x27;s: on the way out the next roll&#x27;s small new lobes would be+     mapped through the wrong lobe&#x27;s frame and thrown out as a flat sheet.+     So the leaf solid is a fixed shape and the morph is a plain blend+     between the live orbital and it. */+  if (uMorph &gt; 0.0001) {+    float lp = 0.4886025 * dot(d.xy, vec2(cos(radians(uRot)), sin(radians(uRot))));+    vec3  ball = d * abs(lp);+    /* Triangles that straddle the node join a vertex of one lobe to a vertex+       of the other. On the leaves those land on the two leaves&#x27; flat edges,+       so each spanned the empty quadrant between them: a small chamfered+       bridge across the center all through the morph. Every vertex within+       one mesh step of the node (uNode, set from the tessellation) goes to+       the corner itself, so any triangle crossing between the lobes has no+       area. Pulling a point toward the corner keeps it on its flat edge, so+       the edges stay straight. */+    float nodeK = smoothstep(uNode, 2.0 * uNode, abs(lp));+    shaped = mix(shaped, leafPos(ball, lp) * nodeK, uMorph);+  }+  vQ = shaped.xy;+  vZ = shaped.z;+  vec3 pos = shaped * uScale;+  pos.xy += normalize(vec2(cos(radians(uRot)), sin(radians(uRot))))+            * ((p &gt;= 0.0) ? 1.0 : -1.0) * uGap * uScale * uFlat;++  /* Normals are differenced from the SHAPED radius, not the raw wavefunction.+     Using the raw psi here left the lighting describing a surface that no+     longer existed once the cheat moved it, which showed up as a dark crater+     across the transformed lobe. */+  vec3 t1 = normalize(abs(d.z) &lt; 0.9 ? cross(d, vec3(0.,0.,1.)) : cross(d, vec3(1.,0.,0.)));+  vec3 t2 = cross(d, t1);+  float hh = 0.03;+  vec3 a = normalize(d + t1*hh), b = normalize(d + t2*hh);+  vec3 p0 = shapedPos(d, 0.0) * uScale;+  vec3 pa = shapedPos(a, 0.0) * uScale;+  vec3 pb = shapedPos(b, 0.0) * uScale;+  vec3 nn = cross(pa - p0, pb - p0);+  vN = normalize(dot(nn, d) &lt; 0.0 ? -nn : nn);++  /* Facing, measured rather than read from gl_FrontFacing: the winding is+     opposite between Babylon and the raw WebGL loader. Stepping along the+     outward normal moves toward the camera exactly when the surface faces+     it, so the clip-space depth drops. */+  gl_Position = uMVP * vec4(pos, 1.0);+  vec4 cn = uMVP * vec4(pos + vN * 0.05, 1.0);+  vFace = gl_Position.z / gl_Position.w - cn.z / cn.w;++  /* Perspective goes as the mark arrives: each vertex is placed where an+     orthographic camera with the same scale at the mark&#x27;s plane would put+     it, so the silhouette is the flat outline exactly. Depth is untouched.+     The lighting keeps the orbital&#x27;s own normals (computed above from the+     unmorphed surface), so the map cannot crease the shading. */+  if (uOrtho &gt; 0.0001) {+    float w0 = (uMVP * vec4(0.0, 0.0, 0.0, 1.0)).w;+    gl_Position.xy *= gl_Position.w / mix(gl_Position.w, w0, uOrtho);+  }+}`;+var FS=`precision highp float;+varying float vPsi;+varying vec3 vN;+varying vec2 vQ;+varying float vFace;+varying float vZ;+uniform vec3 cPos, cNeg;+uniform float uFlat, uRot, uShade, uPass, uEdge, uCamD, uPx;+uniform vec4 uProf[12];   // the mark&#x27;s outline: 48 radii, sampled densely at both flat edges++/* The outline radius at x across the leaf (0 and 1 are the flat edges).+   Sampled at smoothstep-spaced angles: near a flat edge the radius grows+   like the square root of the angle, which smoothstep&#x27;s spacing makes+   linear, so plain interpolation stays within about a pixel. Picked out by+   comparison, because GLSL ES 1.00 fragment shaders may not index uniform+   arrays dynamically. */+float outlineAt(float x){+  float sx = clamp(0.5 - sin(asin(clamp(1.0 - 2.0*x, -1.0, 1.0)) / 3.0), 0.0, 1.0);+  float u  = sx * 47.0;+  float fi = floor(min(u, 46.0));+  float a = 0.0, b = 0.0;+  for (int k = 0; k &lt; 12; k++) {+    float q0 = float(k * 4);+    vec4 id = vec4(q0, q0 + 1.0, q0 + 2.0, q0 + 3.0);+    a += dot(uProf[k], vec4(equal(id, vec4(fi))));+    b += dot(uProf[k], vec4(equal(id, vec4(fi + 1.0))));+  }+  return mix(a, b, u - fi);+}++void main(void){+  /* The quadrant cut, per pixel, always at the mark&#x27;s own 45 degree planes.+     Pass 0 (opaque) keeps each lobe&#x27;s quadrant. Pass 1 is the OVERFLOW, the+     part of the round lobe outside the quadrant, drawn translucent at+     1 - uFlat, so as the cheat ramps the excess melts away and leaves the+     leaf. Nothing moves and nothing is squashed: a rotating cut read as+     scissors closing, and squashing vertices onto the planes (the first+     version) left paper-thin sheets that showed as a hairline at the seam. */+  float fade = 1.0;+  if (uFlat &gt; 0.0001) {+    float ql = length(vQ);+    bool inside = true;+    float cov = 1.0;+    if (ql &gt; 1e-6) {+      float ax = radians(uRot) + (vPsi &gt;= 0.0 ? 0.0 : 3.14159265);+      vec2  ad = vec2(cos(ax), sin(ax));+      vec2  qn = vQ / ql;+      inside = dot(qn, ad) &gt;= 0.7071067 - 1e-4;+      /* The outer trim: the exact vector outline, eased in with the edge+         correction (1.3x, beyond any physics radius, down to 1x) so it+         never pops. Measured where this pixel&#x27;s ray meets the mark&#x27;s plane+         (z = 0), so the cut lands on SCREEN: a front-facing point sits+         nearer the camera and perspective enlarges it. uCamD is the camera+         distance in shape units. 1.0248 is the flat overlay&#x27;s own size+         against the true projection (its 0.34 was fitted by eye), so the 3D+         outline and the flat mark are the same curve. cov is the pixel&#x27;s+         coverage over a one pixel ramp (uPx = shape units per pixel), which+         antialiases the trimmed curve the way MSAA does a mesh edge. */+      if (inside &amp;&amp; uEdge &gt; 0.0001) {+        float da  = atan(ad.x*qn.y - ad.y*qn.x, dot(qn, ad));+        float x   = clamp((da + 0.7853981634) / 1.5707963268, 0.0, 1.0);+        float qp  = (uCamD &gt; 0.0) ? ql * uCamD / max(0.05, uCamD + vZ) : ql;+        float lim = outlineAt(x) * 1.0248 * mix(1.3, 1.0, uEdge);+        cov = (uPx &gt; 0.0) ? clamp((lim - qp) / uPx + 0.5, 0.0, 1.0) : step(qp, lim);+      }+    }+    /* Pass 0 (opaque) keeps the fully covered leaf. Pass 1 (blended, front+       surface only) carries the rest: the antialiased rim of the trim, and+       the overflow outside the quadrant melting away at 1 - uFlat. */+    if (uPass &lt; 0.5) { if (!inside || cov &lt; 0.999) discard; }+    else if (inside) { if (cov &gt;= 0.999 || cov &lt;= 0.001) discard; fade = cov; }+    else { if (uFlat &gt;= 0.999) discard; fade = 1.0 - uFlat; }+  } else if (uPass &gt; 0.5) discard;+  vec3 base = vPsi &gt;= 0.0 ? cPos : cNeg;+  vec3 n = normalize(vN);+  /* Looking INTO a cut lobe (free view only; square-on the cut is edge-on)+     shows the far wall from behind. Shade it as the flat cut face instead,+     so the solid reads closed rather than hollow. */+  if (uFlat &gt; 0.0001 &amp;&amp; uPass &lt; 0.5 &amp;&amp; vFace &lt; 0.0) n = vec3(0.0, 0.0, -1.0);+  float lam = 0.75 + 0.25*max(0.0, dot(n, normalize(vec3(-0.4,0.85,-0.55))));+  float rim = pow(1.0 - abs(n.z), 2.5)*0.32;+  /* uShade flattens the surface itself to the brandmark teal. The logo moment+     used to be a separate flat canvas laid over the 3D; whenever the two+     shapes were not identical (fading in while the dive was still arriving,+     lingering while it left) that read as a ghost double image. Fading the+     surface means there is only ever one shape on screen. */+  vec3 lit = base*lam + vec3(0.0,0.72,0.68)*rim;+  gl_FragColor = vec4(mix(lit, vec3(0.0, 0.7216, 0.6902), uShade), fade);+}`;+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 PROF=[0.27485,  0.28587,  0.30119,  0.3168,  0.33233,  0.34751,  0.3623,  0.37662,  0.39025,  0.4033,  0.41541,  0.42673,  0.43684,  0.44607,  0.45439,  0.46153,  0.46783,  0.47326,  0.47775,  0.48137,  0.48427,  0.4864,  0.48773,  0.48841,  0.48841,  0.48773,  0.4864,  0.48427,  0.48137,  0.47775,  0.47326,  0.46781,  0.46153,  0.45439,  0.44607,  0.43684,  0.42673,  0.41541,  0.40329,  0.39022,  0.37661,  0.36231,  0.34745,  0.33216,  0.31673,  0.30103,  0.28552,  0.27309];+var LEAF=[0.28704,  0.27386,  0.26243,  0.25251,  0.24388,  0.23638,  0.22988,  0.22426,  0.21943,  0.21532,  0.21188,  0.20904,  0.20678,  0.20506,  0.20386,  0.20318,  0.20299,  0.2033,  0.20412,  0.20544,  0.20729,  0.20969,  0.21268,  0.21628,  0.22016,  0.22398,  0.22771,  0.23133,  0.2347,  0.23783,  0.24065,  0.24312,  0.24521,  0.24691,  0.24812,  0.24898,  0.24943,  0.24947,  0.24912,  0.24839,  0.24734,  0.246,  0.24444,  0.24269,  0.24079,  0.23877,  0.23668,  0.23459,  0.23252,  0.23047,  0.22847,  0.22649,  0.2246,  0.22286,  0.22128,  0.21984,  0.21845,  0.21725,  0.21624,  0.21541,  0.21465,  0.21412,  0.21383,  0.21357,  0.21357,  0.21383,  0.21412,  0.21465,  0.21541,  0.21624,  0.21725,  0.21845,  0.21984,  0.22128,  0.22286,  0.2246,  0.22649,  0.22847,  0.23047,  0.23252,  0.23459,  0.23668,  0.23877,  0.24079,  0.24269,  0.24444,  0.246,  0.24734,  0.24839,  0.24912,  0.24947,  0.24943,  0.24898,  0.24812,  0.24691,  0.24521,  0.24312,  0.24065,  0.23783,  0.2347,  0.23133,  0.22771,  0.22398,  0.22016,  0.21628,  0.21268,  0.20969,  0.20729,  0.20544,  0.20412,  0.2033,  0.20299,  0.20318,  0.20386,  0.20506,  0.20678,  0.20904,  0.21188,  0.21532,  0.21943,  0.22426,  0.22988,  0.23638,  0.24388,  0.25251,  0.26243,  0.27386,  0.28704];+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: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;); }++function sh(type,src){var s=gl.createShader(type);gl.shaderSource(s,src);gl.compileShader(s);+  if(!gl.getShaderParameter(s,gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(s));return s;}+var prog=gl.createProgram();+gl.attachShader(prog,sh(gl.VERTEX_SHADER,VS));+gl.attachShader(prog,sh(gl.FRAGMENT_SHADER,FS));+gl.linkProgram(prog);+if(!gl.getProgramParameter(prog,gl.LINK_STATUS)) throw new Error(gl.getProgramInfoLog(prog));+gl.useProgram(prog);+var U={}; [&#x27;uMVP&#x27;,&#x27;c&#x27;,&#x27;uScale&#x27;,&#x27;uFlat&#x27;,&#x27;uRot&#x27;,&#x27;uPlump&#x27;,&#x27;uGap&#x27;,&#x27;uEdge&#x27;,&#x27;uCorner&#x27;,&#x27;uLogoR&#x27;,&#x27;cPos&#x27;,&#x27;cNeg&#x27;,&#x27;uShade&#x27;,&#x27;uPass&#x27;,&#x27;uProf&#x27;,&#x27;uCamD&#x27;,&#x27;uPx&#x27;,&#x27;uMorph&#x27;,&#x27;uOrtho&#x27;,&#x27;uLeafM&#x27;,&#x27;uLeaf&#x27;,&#x27;uNode&#x27;]+  .forEach(function(n){U[n]=gl.getUniformLocation(prog,n);});++/* unit sphere, displaced entirely in the vertex shader */+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));}}+for(var r=0;r&lt;SEG;r++)for(var q2=0;q2&lt;SEG;q2++){+  var a=r*(SEG+1)+q2,b=a+SEG+1;+  idx.push(a,b,a+1,b,b+1,a+1);}+var vb=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,vb);+gl.bufferData(gl.ARRAY_BUFFER,new Float32Array(verts),gl.STATIC_DRAW);+var ib=gl.createBuffer();gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,ib);+gl.bufferData(gl.ELEMENT_ARRAY_BUFFER,new Uint16Array(idx),gl.STATIC_DRAW);+var loc=gl.getAttribLocation(prog,&#x27;position&#x27;);+gl.enableVertexAttribArray(loc);gl.vertexAttribPointer(loc,3,gl.FLOAT,false,0,0);+gl.enable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE);+gl.uniform1fv(U.uLogoR,new Float32Array(LOGO_R));+gl.uniform4fv(U.uProf,new Float32Array(PROF));+gl.uniform4fv(U.uLeaf,new Float32Array(LEAF));gl.uniform1f(U.uLeafM,0.28704);+/* one mesh step in psi (the longitude step, 1.5x for the quads&#x27; diagonals):+   that band around the node collapses to the leaves&#x27; corner */+gl.uniform1f(U.uNode,0.4886025*(2*Math.PI/SEG)*1.5);+gl.uniform1f(U.uPlump,0);gl.uniform1f(U.uGap,0);gl.uniform1f(U.uCorner,0);gl.uniform1f(U.uRot,45);++var C_POS=[0x00/255,0xb8/255,0xb1/255], C_NEG=[0x12/255,0x3a/255,0x63/255];+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&#x27;s fitFraming rule). */+var R=4.4, HOME=homeFor(MARGIN), CAMR=HOME, PANX=0, PANY=0, FOV=0.8, ZN=0.1, ZF=Math.max(100,HOME*3);+/* Babylon&#x27;s ACTUAL zoom model, tuned against the lab&#x27;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&#x27;s springs pull+   radius and pan home every frame. NOTCH below is the one tuning constant,+   calibrated so a 12-notch burst matches the lab: dip to ~4.0, home ~200ms+   after release. */+var NOTCH=0.085, velR=0, lastNX=0, lastNY=0;+function proj(w,h){+  var f=1/Math.tan(FOV/2), a=w/h;+  return (a&gt;=1)? {m0:f/a, m5:f} : {m0:f, m5:f*a};+}+function setMVP2(w,h,r,px,py,s){+  r=(r===undefined)?CAMR:r; px=px||0; py=py||0; s=(s===undefined)?1:s;+  var m=proj(w,h);+  var A=ZF/(ZF-ZN), B=-ZN*ZF/(ZF-ZN);+  // view: yaw orbA about Y, model scale s (emerge birth), pan, then+  // z&#x27; = z + r  (eye at -r on z, LH). c=1,sn=0 reduces to the plain matrix.+  var c=Math.cos(orbA), sn=Math.sin(orbA);+  gl.uniformMatrix4fv(U.uMVP,false,new Float32Array([+    m.m0*s*c,0,-A*s*sn,-s*sn,+    0,m.m5*s,0,0,+    m.m0*s*sn,0,A*s*c,s*c,+    -m.m0*px,-m.m5*py,A*r+B,r+  ]));+}++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(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;+  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);+}+window.addEventListener(&#x27;resize&#x27;,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];+var E=L.map(function(l){return -13.6/((l+1)*(l+1));});+var LOGO=new Array(16).fill(0); LOGO[1]=0.7071; LOGO[3]=0.7071;+function smooth(x){x=Math.max(0,Math.min(1,x));return x*x*(3-2*x);}+function lerp(a,b,t){return a+(b-a)*t;}+var gains=null;+function roll(){gains=new Array(16).fill(0);+  var n=2+Math.floor(Math.random()*4);+  for(var j=0;j&lt;n;j++)gains[(Math.random()*16)|0]=0.35+Math.random()*0.65;}+roll();+var eS=PT+DT+(OV?0:CT), eE=eS+ST, CYC=eE+(OV?0:CT)+DT;+var INTRO={dark:0.9,logoIn:1.4,hold:0.5,reveal:1.2};+var inIntro=DO_INTRO, introT=0, t=(DO_INTRO||EMERGE)?0:eE, tEvo=0, rolled=false, last=performance.now();+/* emerge=1 replaces the logo intro: the equation runs from t=0 and the+   surface condenses out of nothing (scale+fade over BIRTH_S seconds) into+   plain play, then the normal pt/dt/ct/st timeline takes over. Keep pt+   comfortably above BIRTH_S so the first epoch never lands mid-birth. */+var BIRTH_S=2.6, birth=EMERGE?0:1, birthT=0;+var orbA=0;   // auto-orbit yaw, radians++function frame(now){+  /* STOP WHEN HIDDEN (the header comment promised this; it was never implemented). An+     off-screen orbital must not keep burning GPU. Reschedule without drawing or advancing+     time; keep `last` current so returning to visible never computes a jumped dt. */+  if(document.hidden){ last=now; requestAnimationFrame(frame); return; }+  if(FPSCAP&gt;0){+    if(now-lastDraw &lt; 1000/FPSCAP - 1){ requestAnimationFrame(frame); return; }+    lastDraw=now;+  }+  applySize();+  /* Clamp dt to [0, 0.05]: never negative (a backwards clock across resume/DST would run+     the sim in reverse) and never a big jump (a stalled frame can&#x27;t lurch). */+  var dt=Math.max(0,Math.min(0.05,(now-last)/1000)); last=now;+  var adt=dt*SPEED; tEvo+=adt;+  if(birth&lt;1){birthT+=adt;birth=smooth(Math.min(1,birthT/BIRTH_S));+    glc.style.opacity=birth&gt;=1?&#x27;&#x27;:String(0.04+0.96*birth);}+  var k,cheat,fill,teal,pinned=false,drawMesh=true,crisp=0;+  if(inIntro){+    introT+=adt;+    var e1=INTRO.dark,e2=e1+INTRO.logoIn,e3=e2+INTRO.hold,e4=e3+INTRO.reveal,x=introT;+    /* The crisp mark fades in alone and holds; then the 3D leaf solid, fully+       morphed and fully flat (identical to it), replaces it WHOLE on one+       frame and lets its shading back in. No crossfade. */+    k=1;cheat=1;teal=1;pinned=true;drawMesh=x&gt;=e3;+    crisp = x&lt;e1?0 : x&lt;e2?smooth((x-e1)/(e2-e1)) : x&lt;e3?1 : 0;+    fill  = x&lt;e3?1 : 1-smooth((x-e3)/(e4-e3));+    if(x&gt;=e4){inIntro=false;t=eE;roll();}+  }else{+    t=(t+adt)%CYC;+    var ctw=OV?Math.min(CT,DT):CT;+    if(t&lt;PT){k=0;}+    else if(t&lt;PT+DT){k=smooth((t-PT)/DT);}+    else if(t&lt;eS){k=1;}+    else if(t&lt;eE){k=1;pinned=true;}+    else if(!OV&amp;&amp;t&lt;eE+CT){k=1;}+    else{var o=OV?t-eE:t-eE-CT;k=1-smooth(Math.min(1,o/DT));}+    cheat = t&lt;eS ? (t&lt;=eS-ctw?0:smooth(1-(eS-t)/ctw))+          : t&lt;=eE ? 1 : (t&gt;=eE+ctw?0:smooth(1-(t-eE)/ctw));+    if(t&gt;=eS&amp;&amp;!rolled){roll();rolled=true;} if(t&lt;eS)rolled=false;+    /* The flattening is the 3D&#x27;s own shading going to flat teal, on its+       lead, held through the sit. The crisp vector replaces the 3D whole, on+       a frame boundary, only while the two are identical: fully morphed+       (the sit) and fully flat. */+    fill=(LOGO_PK&lt;=0)?0:(t&lt;eS?(LLEAD&lt;=0.001?0:(t&lt;=eS-LLEAD?0:smooth(1-(eS-t)/LLEAD)))+        :t&lt;=eE?1:(LLEAD&lt;=0.001?0:(t&gt;=eE+LLEAD?0:smooth(1-(t-eE)/LLEAD))))*LOGO_PK;+    crisp=(LOGO_PK&gt;=0.999&amp;&amp;t&gt;=eS&amp;&amp;t&lt;=eE&amp;&amp;eE-eS&gt;1e-4)?1:0;+    if(crisp)drawMesh=false;+    teal = t&lt;eS ? (TLEAD&lt;=0.01?0:(t&lt;=eS-TLEAD?0:smooth(1-(eS-t)/TLEAD)))+         : t&lt;=eE ? 1 : (TLEAD&lt;=0.01?0:(t&gt;=eE+TLEAD?0:smooth(1-(t-eE)/TLEAD)));+  }+  /* Auto-orbit: yaw advances only in pure play; the moment sculpting starts+     the angle is pulled to the nearest whole turn, so the epoch pose is the+     calibrated square-on view and nothing ever has to spin backwards. */+  if(ORBIT!==0){+    var kk=inIntro?1:k;+    if(kk&lt;=0){ orbA+=ORBIT*adt; }+    else{+      var whole=Math.round(orbA/(2*Math.PI))*(2*Math.PI);+      orbA=orbA+(whole-orbA)*smooth(Math.min(1,kk));+    }+  }+  /* The camera comes HOME for the logo. Whatever the user zoomed or panned,+     the framing glides back to the exact calibrated pose before epoch-start,+     holds through the epoch (the overlay match depends on it), and hands the+     wheel back afterwards from the home pose. */+  var effR=CAMR, effPX=PANX, effPY=PANY, camK=0;+  if(!inIntro){+    /* Glide home for the logo, then home IS the new state: no gliding back+       to the old zoom, the wheel simply frees again the moment the sit ends+       and play resumes from the calibrated framing. */+    var RET=Math.max(0.6, LLEAD+0.2, Math.min(1.2,DT));+    camK = (t&gt;eS-RET&amp;&amp;t&lt;eS) ? smooth((t-(eS-RET))/RET) : 0;+    if(t&gt;=eS&amp;&amp;t&lt;=eE+0.001){ CAMR=HOME; PANX=0; PANY=0; velR=0; camK=1; }+    // consume the wheel&#x27;s decaying integral, zooming toward the cursor+    if(Math.abs(velR)&gt;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;+      /* 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&#x27;s springs, verbatim: radius 6% and pan 5% per frame at the+       lab&#x27;s 240fps cadence, frame-rate independent. */+    var spr=1-Math.pow(0.94, dt*240), sprT=1-Math.pow(0.95, dt*240);+    CAMR+=(HOME-CAMR)*spr; PANX-=PANX*sprT; PANY-=PANY*sprT;+    window.__lock = (t&gt;eS-RET &amp;&amp; t&lt;=eE);+    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,birth);+  window.__cam={r:+effR.toFixed(3),x:+effPX.toFixed(3),y:+effPY.toFixed(3),k:+camK.toFixed(2)};++  var c=new Array(16), nrm=0, i;+  if(pinned){ for(i=0;i&lt;16;i++)c[i]=LOGO[i]; }+  else{+    for(i=0;i&lt;16;i++){+      var env=0.55+0.45*Math.cos(tEvo*(0.13+i*0.017)+i*1.7);+      var live=gains[i]*env*Math.cos(E[i]*tEvo*0.5);+      c[i]=live*(1-k)+LOGO[i]*k;+    }+  }+  for(i=0;i&lt;16;i++)nrm+=c[i]*c[i]; nrm=Math.sqrt(nrm)||1;+  for(i=0;i&lt;16;i++)c[i]/=nrm;++  var ovA=crisp, shade=fill;++  if(TRANSP) gl.clearColor(0,0,0,0); else gl.clearColor(BG[0],BG[1],BG[2],1);+  gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);+  if(drawMesh){+    gl.uniform1fv(U.c,new Float32Array(c));+    gl.uniform1f(U.uScale,2.5*(0.9+0.25*k));+    gl.uniform1f(U.uCamD,effR/(2.5*(0.9+0.25*k)*birth));+    var mpx=proj(W,H); gl.uniform1f(U.uPx,effR/(mpx.m5*glc.height/2*2.5*(0.9+0.25*k)*birth));+    gl.uniform1f(U.uFlat,0);gl.uniform1f(U.uEdge,0);gl.uniform1f(U.uShade,shade);+    gl.uniform1f(U.uMorph,cheat);gl.uniform1f(U.uOrtho,cheat);+    gl.uniform3f(U.cNeg,lerp(C_NEG[0],C_POS[0],teal),lerp(C_NEG[1],C_POS[1],teal),lerp(C_NEG[2],C_POS[2],teal));+    gl.uniform1f(U.uPass,0);+    gl.drawElements(gl.TRIANGLES,idx.length,gl.UNSIGNED_SHORT,0);+  }+  ox.clearRect(0,0,ovc.width,ovc.height);+  if(ovA&gt;0.004){+    var mm=proj(W,H), ppw=mm.m0*ovc.width/2/(window.__cam?window.__cam.r:CAMR);+    var er=window.__cam?window.__cam.r:CAMR;+    var s=Math.min(ovc.width,ovc.height)*0.34*(R/er);+    ox.save();ox.translate(ovc.width/2-(window.__cam?window.__cam.x:0)*ppw,+                           ovc.height/2+(window.__cam?window.__cam.y:0)*ppw);+    ox.globalAlpha=ovA;ox.fillStyle=&#x27;#00b8b0&#x27;;+    for(var p2=0;p2&lt;PATHS.length;p2++){var pts=PATHS[p2];ox.beginPath();+      for(var j2=0;j2&lt;pts.length;j2++){var X=pts[j2][0]*s,Y=-pts[j2][1]*s;+        j2?ox.lineTo(X,Y):ox.moveTo(X,Y);}+      ox.closePath();ox.fill();}+    ox.restore();+  }+  requestAnimationFrame(frame);+}+/* EXACTLY ONE loop per document: if this script ever evaluates twice, a second concurrent+   frame() loop would advance the sim clock in parallel (2x/3x &quot;crazy speed&quot;). */+if(!window.__ADOM_ORBITAL_RUNNING){+  window.__ADOM_ORBITAL_RUNNING=true;+  requestAnimationFrame(frame);+}++/* Click-to-zoom, OFF unless armed: real load screens must never eat input.+   Armed via ?interact=1 (or window.__ADOM_LOADER_INTERACT, which the wiki+   readme&#x27;s inline preview sets). Click the canvas to capture the wheel for+   zoom; click is released on window blur (clicking outside the iframe). */+if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || window.__ADOM_LOADER_INTERACT){+  var live=false;+  /* The hint pill is OFF by default even when armed: production wants purity.+     ?hint=1 shows it, and armed contexts can flip it live by postMessage. The+     teal edge glow always communicates the armed state either way. */+  var HINTON = P(&#x27;hint&#x27;,0)&gt;=1;+  var edge=document.createElement(&#x27;div&#x27;);+  edge.style.cssText=&#x27;position:fixed;inset:0;pointer-events:none;opacity:0;&#x27;++    &#x27;transition:opacity .18s ease;border:1px solid #00b8b0;&#x27;++    &#x27;box-shadow:inset 0 0 26px rgba(0,184,176,.16), inset 0 0 0 1px rgba(0,184,176,.35);&#x27;;+  document.body.appendChild(edge);+  var hint=document.createElement(&#x27;div&#x27;);+  hint.style.cssText=&#x27;position:absolute;left:50%;bottom:16px;transform:translateX(-50%);&#x27;++    &#x27;padding:5px 12px;border-radius:999px;background:rgba(13,17,23,.78);&#x27;++    &#x27;border:1px solid #30363d;font:10px monospace;letter-spacing:.05em;&#x27;++    &#x27;color:#8b949e;pointer-events:none;opacity:0;transition:opacity .2s&#x27;;+  hint.textContent=&#x27;click to zoom&#x27;;+  document.body.appendChild(hint);+  function hintShow(o){ hint.style.opacity=(HINTON&amp;&amp;o)?&#x27;1&#x27;:&#x27;0&#x27;; }+  document.body.style.cursor=&#x27;pointer&#x27;;+  document.addEventListener(&#x27;mouseenter&#x27;,function(){ if(!live) hintShow(true); });+  document.addEventListener(&#x27;mouseleave&#x27;,function(){ hintShow(false); });+  document.addEventListener(&#x27;pointerdown&#x27;,function(){+    live=true; edge.style.opacity=&#x27;1&#x27;; document.body.style.cursor=&#x27;default&#x27;;+    hint.textContent=&#x27;scroll to zoom&#x27;; hint.style.color=&#x27;#00b8b0&#x27;; hintShow(true);+    setTimeout(function(){ hintShow(false); },1400);+  });+  /* Armed contexts accept live control: {adomLoader:{margin:N}} retargets the+     framing and the spring CARRIES the camera to its new home, animated. Real+     load screens never install this listener. */+  window.addEventListener(&#x27;message&#x27;,function(e){+    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(-70,Math.min(90,d.margin));+      HOME=homeFor(MARGIN);+      ZF=Math.max(100,HOME*3);+    }+    if(typeof d.speed===&#x27;number&#x27;){ SPEED=Math.max(0.05,Math.min(3,Math.abs(d.speed)/100)); }+    if(typeof d.orbit===&#x27;number&#x27;){ ORBIT=d.orbit*Math.PI/180; }+    if(typeof d.logo===&#x27;number&#x27;){ LOGO_PK=Math.max(0,Math.min(1,d.logo/100)); }+  });+  window.addEventListener(&#x27;blur&#x27;,function(){ live=false; edge.style.opacity=&#x27;0&#x27;; document.body.style.cursor=&#x27;pointer&#x27;;+    hint.textContent=&#x27;click to zoom&#x27;; hint.style.color=&#x27;#8b949e&#x27;; });+  document.addEventListener(&#x27;wheel&#x27;,function(e){+    if(!live) return;+    e.preventDefault();+    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(-HOME*0.75,Math.min(HOME*0.75,velR));+  },{passive:false});+}+&lt;/script&gt;+&lt;/body&gt;+&lt;/html&gt;+" style="width:100%;aspect-ratio:16/9;border:1px solid #30363d;border-radius:8px;display:block;background:#0d1117"></iframe></div>+    <div><p style="margin:0 0 6px"><b>4. A correctly tagged video.</b> The brand kit's transparent-version preview is tagged BT.709, so every player shows the true teal.</p>+      <video src="https://wiki.adom.inc/blob/app/orbital-lab/docs/color-check/logo-sting-alpha-preview.mp4" autoplay muted loop playsinline style="width:100%;aspect-ratio:16/9;background:#0d1117;border:1px solid #30363d;border-radius:8px;display:block;object-fit:contain"></video></div>+  </div>+  <p><b>The fix for the videos:</b> encode with the BT.709 matrix and tag the file, e.g. <code>ffmpeg ... -vf scale=out_color_matrix=bt709:out_range=tv -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv</code>.</p>+   <h2>The live viewer</h2>   <div class="rig-acts">     <span>size</span>
tools/build-readme.py+23−1
@@ -78,6 +78,14 @@ loader_armed = loader.replace(     "'use strict';window.__ADOM_LOADER_INTERACT=1;"     "window.__ADOM_LOADER_PARAMS={pt:5,dt:1.5,ct:0.6,st:1,logo:100,llead:0.9,tlead:0.4,bg:'transparent'};", 1) loader_srcdoc = _html.escape(loader_armed, quote=True)+# The color check runs the loader with Hydrogen's brand-teal fix (2026-10-20): lobes exactly+# #00b8b1 and a lifted shading floor, so its lit surface matches the brand teal box.+_cpos_old = "var C_POS=[0x19/255,0xc8/255,0xbd/255]"+_lam_old = "float lam = 0.42 + 0.58*max("+if _cpos_old not in loader_armed or _lam_old not in loader_armed:+    sys.exit('build failed: color-check recolor anchors not found in loader.html')+loader_brand = loader_armed.replace(_cpos_old, "var C_POS=[0x00/255,0xb8/255,0xb1/255]").replace(_lam_old, "float lam = 0.75 + 0.25*max(")+loader_brand_srcdoc = _html.escape(loader_brand.replace("bg:'transparent'", "bg:'0d1117'"), quote=True)  edocs = """ <style>@@ -126,6 +134,20 @@ edocs = """     <p style="margin:0 0 6px"><b>This is THE Adom loading animation.</b> Use <b>loader.html</b> (1.1.0 and later, take 2: the lobes morph into the logo's leaves) for every loading screen, splash, webview load screen and app launch screen. It is the same orbital as the logo sting in the Adom Video Brand Kit, and Hydrogen ships it.</p>     <p style="margin:0"><b>Deprecated for loaders:</b> loader-take1.html, copies of loader.html from before 1.1.0 vendored into other apps (replace them), and the loading icons in adom/orbital-logo (v9, v9-logo), which never form the logo and whose shader takes over a minute to compile on Windows GPUs.</p>   </div>+  <h2>Color check: is it Adom teal?</h2>+  <p>The Adom brand teal is <b>#00B8B1</b> (0, 184, 177). Four tiles to compare by eye on your own screen (screenshots shift color, so judge it live):</p>+  <div style="display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:960px;margin:12px 0 6px">+    <div><p style="margin:0 0 6px"><b>1. The logo sting as most players show it.</b> dark-intro-16x9.mp4 from the Video Brand Kit. Its file carries no color tags, so YouTube, LinkedIn, browsers and editors assume BT.709 and show the teal bluer and darker, about (0, 165, 178).</p>+      <video src="https://wiki.adom.inc/blob/app/orbital-lab/docs/color-check/logo-sting-untagged.mp4" autoplay muted loop playsinline style="width:100%;aspect-ratio:16/9;background:#0d1117;border:1px solid #30363d;border-radius:8px;display:block"></video></div>+    <div><p style="margin:0 0 6px"><b>2. The brand teal.</b> #00B8B1 as plain CSS, nothing in between.</p>+      <div style="aspect-ratio:16/9;background:#0d1117;border:1px solid #30363d;border-radius:8px;display:flex;align-items:center;justify-content:center"><div style="width:38%;aspect-ratio:1;background:#00b8b1;border-radius:12px"></div></div></div>+    <div><p style="margin:0 0 6px"><b>3. The loader with the brand-teal fix</b> (what Hydrogen ships): the lobes are exactly #00B8B1 where the light hits them, shaded darker where it does not. The dark blue lobes are the orbital's negative half.</p>+      <iframe srcdoc="__SRCB__" style="width:100%;aspect-ratio:16/9;border:1px solid #30363d;border-radius:8px;display:block;background:#0d1117"></iframe></div>+    <div><p style="margin:0 0 6px"><b>4. A correctly tagged video.</b> The brand kit's transparent-version preview is tagged BT.709, so every player shows the true teal.</p>+      <video src="https://wiki.adom.inc/blob/app/orbital-lab/docs/color-check/logo-sting-alpha-preview.mp4" autoplay muted loop playsinline style="width:100%;aspect-ratio:16/9;background:#0d1117;border:1px solid #30363d;border-radius:8px;display:block;object-fit:contain"></video></div>+  </div>+  <p><b>The fix for the videos:</b> encode with the BT.709 matrix and tag the file, e.g. <code>ffmpeg ... -vf scale=out_color_matrix=bt709:out_range=tv -colorspace bt709 -color_primaries bt709 -color_trc bt709 -color_range tv</code>.</p>+   <h2>The live viewer</h2>   <div class="rig-acts">     <span>size</span>@@ -424,7 +446,7 @@ edocs = """   report(); })(); </script>-""".replace('__KB__', str(loader_kb)).replace('__SRC__', loader_srcdoc)+""".replace('__KB__', str(loader_kb)).replace('__SRC__', loader_srcdoc).replace('__SRCB__', loader_brand_srcdoc)  src = src.replace('</body>', edocs + '</body>') if '.edocs' not in src: