← Commit history

toolbar toggles for both floaties: Lighting hidden by default (toggle to show), Layers shown by default (toggle to hide)

John Lauer ·2a619585db ·3mo ago ·parent effaacd
3 files changed +37−7
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "type": "component",-  "version": "0.1.80",+  "version": "0.1.81",   "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.",   "tags": [     "hardware"
page.json+10−3
@@ -4,9 +4,16 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "brief": "Buck-boost 1S-4S battery charger board (TI BQ25792) with 14 Adom machine pins, by Adonis",-  "version": "0.1.80",+  "version": "0.1.81",   "tags": [-    "hardware"+    "adom",+    "adom-modular",+    "component",+    "charger",+    "battery",+    "bq25792",+    "power",+    "usb-c"   ],   "license": "proprietary",   "component": {@@ -49,7 +56,7 @@     "email": "[email protected]"   },   "visibility": "public",-  "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.",+  "description": "BQ25792 Charger - a buck-boost 1S-4S battery charger board (Texas Instruments BQ25792) designed by Adonis in Fusion 360, with 14 Adom machine pins for the modular stack. Interactive colored 3D model, schematic and layout views.",   "dependencies": {},   "files": [     "README.md",
readme.html+26−3
@@ -73,7 +73,7 @@     background:transparent; color:#6e7681; font-size:11px; line-height:1; cursor:pointer; flex:none; }   .lp-iso:hover { color:#5ff5e8; border-color:#00b8b1; }   .lp-iso.on { background:#0b3d33; border-color:#00b8b1; color:#5ff5e8; }-  #light-panel { position:absolute; top:70px; left:14px; z-index:30; width:250px;+  #light-panel { display:none; position:absolute; top:70px; left:14px; z-index:30; width:250px;     background:rgba(13,17,23,0.62); backdrop-filter:blur(8px); border:1px solid rgba(48,54,61,0.8);     border-radius:10px; padding:8px 10px; font-size:11px; }   .lt-row { display:flex; align-items:center; gap:6px; padding:1px 2px; color:#c9d1d9; }@@ -96,6 +96,9 @@     <button class="fbtn active" id="btn-anim" type="button" title="Auto-play cascade">Animate</button>     <button class="fbtn" id="btn-assembled" type="button">Assembled</button>     <button class="fbtn" id="btn-exploded" type="button">Exploded</button>+    <span style="width:1px;background:rgba(255,255,255,0.12);margin:0 3px"></span>+    <button class="fbtn" id="btn-lightpanel" type="button" title="Lighting controls">Light</button>+    <button class="fbtn active" id="btn-layerspanel" type="button" title="Layers panel">Layers</button>     <button class="fbtn" id="btn-fs" type="button" title="Fullscreen">Fullscreen</button>   </div>   <div id="light-panel"><div class="lp-title"><span class="grip" title="drag">::</span> Lighting <button id="lt-helpers" class="lp-iso" style="width:auto;padding:0 6px" data-tip="Show light helper gizmo (where the spot sits and points)">helper</button> <button id="lt-snap" class="lp-iso" style="width:auto;padding:0 6px" data-tip="Snapshot current settings so the AI can bake them">snapshot</button></div><div id="lt-rows"></div></div>@@ -181,7 +184,9 @@ exported bodies + design rules.</p>       "btn-anim":'<path d="M2 4h12M2 8h12M2 12h12"/><path d="M11.5 1.5L14 4l-2.5 2.5"/>',       "btn-assembled":'<rect x="3" y="6" width="10" height="1.6"/><rect x="3" y="9" width="10" height="1.6"/><rect x="3" y="12" width="10" height="1.6"/>',       "btn-exploded":'<rect x="3" y="2.5" width="10" height="1.6"/><rect x="3" y="7.2" width="10" height="1.6"/><rect x="3" y="11.9" width="10" height="1.6"/><path d="M8 5.2v1M8 9.9v1" stroke-dasharray="1 1"/>',-      "btn-fs":'<path d="M2 5.5V2h3.5M14 5.5V2h-3.5M2 10.5V14h3.5M14 10.5V14h-3.5"/>'+      "btn-fs":'<path d="M2 5.5V2h3.5M14 5.5V2h-3.5M2 10.5V14h3.5M14 10.5V14h-3.5"/>',+      "btn-lightpanel":'<circle cx="8" cy="6.5" r="3.4"/><path d="M6.6 9.5h2.8M6.9 11.5h2.2M8 1.2v1M3.3 3l.7.7M12.7 3l-.7.7M1.8 6.5h1M13.2 6.5h1"/>',+      "btn-layerspanel":'<path d="M8 2l6 3-6 3-6-3z"/><path d="M2 8.5l6 3 6-3M2 11.5l6 3 6-3"/>'     };     Object.keys(I).forEach(function(id){       const b=document.getElementById(id); if(!b) return;@@ -193,7 +198,9 @@ exported bodies + design rules.</p>         "btn-anim":"Animate: auto-play the cascade that lifts each layer in turn, then reassembles",         "btn-assembled":"Assembled: jump to the finished, fully-stacked board",         "btn-exploded":"Exploded: jump to the fully-separated stackup",-        "btn-fs":"Fullscreen: expand the 3D viewer to fill the browser window"+        "btn-fs":"Fullscreen: expand the 3D viewer to fill the browser window",+        "btn-lightpanel":"Lighting controls: tune the spotlight, environment, shadows and copper material, then snapshot your settings",+        "btn-layerspanel":"Layers panel: per-layer visibility, isolate, bounding box and live z heights"       };       b.setAttribute("data-tip",TIP[id]||label); b.removeAttribute("title");       b.innerHTML='<svg viewBox="0 0 16 16" aria-hidden="true">'+I[id]+'</svg>';@@ -641,6 +648,22 @@ exported bodies + design rules.</p>     btnShadows.classList.toggle("active",shadowsOn);     set(shadowsOn?"shadows on":"shadows off");   });+  const btnLightPanel=document.getElementById("btn-lightpanel");+  const btnLayersPanel=document.getElementById("btn-layerspanel");+  btnLightPanel.addEventListener("click",function(){+    const p=document.getElementById("light-panel"); if(!p) return;+    const show=p.style.display!=="block";+    p.style.display=show?"block":"none";+    btnLightPanel.classList.toggle("active",show);+    set(show?"lighting controls shown":"lighting controls hidden");+  });+  btnLayersPanel.addEventListener("click",function(){+    const p=document.getElementById("layers-panel"); if(!p) return;+    const show=p.style.display==="none";+    p.style.display=show?"block":"none";+    btnLayersPanel.classList.toggle("active",show);+    set(show?"layers panel shown":"layers panel hidden");+  });   btnFS.addEventListener("click",function(){     if(document.fullscreenElement){ document.exitFullscreen(); return; }     (card.requestFullscreen?card.requestFullscreen():Promise.reject()).catch?.(function(){ set("fullscreen blocked in the embed - open the readme URL directly"); });