← Commit history

logo fade-in percent exposed: postMessage live channel, rig buttons, params docs

John Lauer ·191f379ae8 · ·parent c3b3b23
6 files changed +27−1
SKILL.md+3
@@ -145,6 +145,9 @@ readbacks for the fit measurement); the loader is that lab distilled.  - Inert by default: a load screen never eats input. `?interact=1` arms   click-to-capture (teal ring + glow); click-away or blur releases.+- `?logo=N` sets the logo fill's peak fade-in opacity in percent (default+  100). 50 ghosts it, 10 whispers it, 0 disables the fill while the surface+  still sculpts into the mark shape. Live: postMessage `{adomLoader:{logo:N}}`. - `?speed=N` runs the ANIMATION clocks at N percent (10 = a tenth speed).   Camera springs and interaction stay real time. Live: postMessage   `{adomLoader:{speed:N}}`.
loader.html+1
@@ -510,6 +510,7 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT){     }     if(typeof d.speed==='number'){ SPEED=Math.max(0.05,Math.min(3,Math.abs(d.speed)/100)); }     if(typeof d.orbit==='number'){ ORBIT=d.orbit*Math.PI/180; }+    if(typeof d.logo==='number'){ LOGO_PK=Math.max(0,Math.min(1,d.logo/100)); }   });   window.addEventListener('blur',function(){ live=false; edge.style.opacity='0'; document.body.style.cursor='pointer';     hint.textContent='click to zoom'; hint.style.color='#8b949e'; });
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "orbital-lab",   "title": "Orbital Lab",   "type": "app",-  "version": "1.0.22",+  "version": "1.0.23",   "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+11
@@ -2648,6 +2648,10 @@ window.__lab = { push, zeros, HARMONICS, setAnim:v=>{animate=v;} };     <button data-o="0">off</button>     <button data-o="12">12&deg;/s</button>     <button data-o="45">45&deg;/s</button>+    <span style="margin-left:10px">logo fade</span>+    <button data-lg="10">10%</button>+    <button data-lg="50">50%</button>+    <button data-lg="100">100%</button>     <span style="margin-left:10px">hint</span>     <button data-h="1">on</button>     <button data-h="0">off</button>@@ -3172,6 +3176,7 @@ if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || window.__ADOM_LOADER_INTERACT     }     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;; });@@ -3223,6 +3228,11 @@ if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || window.__ADOM_LOADER_INTERACT         ifr.contentWindow.postMessage({adomLoader:{orbit:parseFloat(b.getAttribute('data-o'))}},'*');       });     });+    document.querySelectorAll('.rig-acts button[data-lg]').forEach(function(b){+      b.addEventListener('click',function(){+        ifr.contentWindow.postMessage({adomLoader:{logo:parseFloat(b.getAttribute('data-lg'))}},'*');+      });+    });     document.querySelectorAll('.rig-acts button[data-h]').forEach(function(b){       b.addEventListener('click',function(){         ifr.contentWindow.postMessage({adomLoader:{hint:b.getAttribute('data-h')==='1'}},'*');@@ -3379,6 +3389,7 @@ if (Q.get(&#x27;interact&#x27;)===&#x27;1&#x27; || window.__ADOM_LOADER_INTERACT     <tr><td>emerge</td><td>0</td><td>1 replaces the logo intro: the equation runs from t=0 and the surface condenses out of nothing (2.6 s scale and fade) straight into play, then the normal timeline. Keep pt above ~3 s so the first epoch never lands mid-birth. A taste toggle: try the start buttons in the rig above</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. NEGATIVE margins bleed: -50 moves the camera 50% closer so the animation runs off every edge (clamped at -70 to protect the near plane). Zoom-in still brings it to the screen; zoom-out caps at 40% past the margined framing. Live-settable by postMessage</td></tr>     <tr><td>speed</td><td>100</td><td>percent playback rate for the animation clocks (timeline, evolution, birth): 10 runs it at a tenth speed. Camera springs and user interaction stay real time so the feel never goes gluey. Live-settable by postMessage</td></tr>+    <tr><td>logo</td><td>100</td><td>peak opacity of the logo fill at the epoch, in percent: 100 is the full solid mark, 50 a translucent ghost, 10 barely a whisper, 0 disables the fill entirely (the sculpted surface still forms the mark shape). Live-settable by postMessage</td></tr>     <tr><td>orbit</td><td>0</td><td>automatic camera yaw during PLAY in degrees per second (try 12). As sculpting starts the angle glides to the nearest whole turn, so every epoch still lands square-on for the logo and play resumes with no unwinding sweep. Live-settable by postMessage</td></tr>   </table>   <h3>The three tuned cuts</h3>
tools/build-loader.py+1
@@ -418,6 +418,7 @@ if (Q.get('interact')==='1' || window.__ADOM_LOADER_INTERACT){     }     if(typeof d.speed==='number'){ SPEED=Math.max(0.05,Math.min(3,Math.abs(d.speed)/100)); }     if(typeof d.orbit==='number'){ ORBIT=d.orbit*Math.PI/180; }+    if(typeof d.logo==='number'){ LOGO_PK=Math.max(0,Math.min(1,d.logo/100)); }   });   window.addEventListener('blur',function(){ live=false; edge.style.opacity='0'; document.body.style.cursor='pointer';     hint.textContent='click to zoom'; hint.style.color='#8b949e'; });
tools/build-readme.py+10
@@ -145,6 +145,10 @@ edocs = """     <button data-o="0">off</button>     <button data-o="12">12&deg;/s</button>     <button data-o="45">45&deg;/s</button>+    <span style="margin-left:10px">logo fade</span>+    <button data-lg="10">10%</button>+    <button data-lg="50">50%</button>+    <button data-lg="100">100%</button>     <span style="margin-left:10px">hint</span>     <button data-h="1">on</button>     <button data-h="0">off</button>@@ -193,6 +197,11 @@ edocs = """         ifr.contentWindow.postMessage({adomLoader:{orbit:parseFloat(b.getAttribute('data-o'))}},'*');       });     });+    document.querySelectorAll('.rig-acts button[data-lg]').forEach(function(b){+      b.addEventListener('click',function(){+        ifr.contentWindow.postMessage({adomLoader:{logo:parseFloat(b.getAttribute('data-lg'))}},'*');+      });+    });     document.querySelectorAll('.rig-acts button[data-h]').forEach(function(b){       b.addEventListener('click',function(){         ifr.contentWindow.postMessage({adomLoader:{hint:b.getAttribute('data-h')==='1'}},'*');@@ -349,6 +358,7 @@ edocs = """     <tr><td>emerge</td><td>0</td><td>1 replaces the logo intro: the equation runs from t=0 and the surface condenses out of nothing (2.6 s scale and fade) straight into play, then the normal timeline. Keep pt above ~3 s so the first epoch never lands mid-birth. A taste toggle: try the start buttons in the rig above</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. NEGATIVE margins bleed: -50 moves the camera 50% closer so the animation runs off every edge (clamped at -70 to protect the near plane). Zoom-in still brings it to the screen; zoom-out caps at 40% past the margined framing. Live-settable by postMessage</td></tr>     <tr><td>speed</td><td>100</td><td>percent playback rate for the animation clocks (timeline, evolution, birth): 10 runs it at a tenth speed. Camera springs and user interaction stay real time so the feel never goes gluey. Live-settable by postMessage</td></tr>+    <tr><td>logo</td><td>100</td><td>peak opacity of the logo fill at the epoch, in percent: 100 is the full solid mark, 50 a translucent ghost, 10 barely a whisper, 0 disables the fill entirely (the sculpted surface still forms the mark shape). Live-settable by postMessage</td></tr>     <tr><td>orbit</td><td>0</td><td>automatic camera yaw during PLAY in degrees per second (try 12). As sculpting starts the angle glides to the nearest whole turn, so every epoch still lands square-on for the logo and play resumes with no unwinding sweep. Live-settable by postMessage</td></tr>   </table>   <h3>The three tuned cuts</h3>