← Commit history

copper L2/L15: fix Y-flip (was below the board) + even-odd depth hole classification (correct triangles); click-pivot on by default; fix ground toggle (re-query at click); add shadows toggle

John Lauer ·8711455463 ·3mo ago ·parent aade2e0
5 files changed +28−7
cu-l15-vec.glb.png
⋯ 1 unchanged line ⋯
cu-l2-vec.glb.png
⋯ 1 unchanged line ⋯
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "type": "component",-  "version": "0.1.54",+  "version": "0.1.55",   "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.54",+  "version": "0.1.55",   "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+17−3
@@ -67,8 +67,9 @@ <div id="viewer-card">   <div id="viewer-wrap"></div>   <div id="floaty"><span class="grip" title="drag">::</span>-    <button class="fbtn" id="btn-pivot" type="button" title="Click any point to orbit around it (Shift+Alt always on)">Click-pivot</button>+    <button class="fbtn active" id="btn-pivot" type="button" title="Click any point to orbit around it (Shift+Alt always on)">Click-pivot</button>     <button class="fbtn active" id="btn-ground" type="button" title="Show/hide the ground plane">Ground</button>+    <button class="fbtn active" id="btn-shadows" type="button" title="Toggle shadows">Shadows</button>     <span style="width:1px;background:rgba(255,255,255,0.12);margin:0 3px"></span>     <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>@@ -371,6 +372,7 @@ exported bodies + design rules.</p>     },400);      buildPanel();+    try{ const cam0=viewer.getCamera(); if(cam0&&cam0.setClickToSetRotationPoint) cam0.setClickToSetRotationPoint(true,250); }catch(e){}     set("animating");   } @@ -445,7 +447,7 @@ exported bodies + design rules.</p>   btnA.addEventListener("click",function(){ mode="t0"; setBtns(btnA); set("assembled"); });   btnE.addEventListener("click",function(){ mode="t1"; setBtns(btnE); set("exploded"); });   // Click-pivot: the viewer's Shift+Alt-click-to-set-orbit-point, made always-on-  let pivotOn=false;+  let pivotOn=true;   const btnPivot=document.getElementById("btn-pivot");   btnPivot.addEventListener("click",function(){     pivotOn=!pivotOn;@@ -458,10 +460,22 @@ exported bodies + design rules.</p>   const btnGround=document.getElementById("btn-ground");   btnGround.addEventListener("click",function(){     groundOn=!groundOn;-    GROUND.forEach(m=>{ try{ m.setEnabled(groundOn); }catch(e){} });+    const sc=viewer.getScene();+    sc.meshes.filter(m=>/ground/i.test(m.name||"")).forEach(m=>{ try{ m.setEnabled(groundOn); }catch(e){} });     btnGround.classList.toggle("active",groundOn);     set(groundOn?"ground shown":"ground hidden");   });+  // Shadows toggle (scene-wide). Ensure the layer meshes are casters + the ground receives.+  let shadowsOn=true;+  const btnShadows=document.getElementById("btn-shadows");+  btnShadows.addEventListener("click",function(){+    shadowsOn=!shadowsOn;+    const sc=viewer.getScene();+    sc.shadowsEnabled=shadowsOn;+    sc.lights.forEach(l=>{ const g=l.getShadowGenerator&&l.getShadowGenerator(); if(g&&g.getShadowMap()) g.getShadowMap().refreshRate = shadowsOn ? window.BABYLON.RenderTargetTexture.REFRESHRATE_RENDER_ONEVERYFRAME : 0; });+    btnShadows.classList.toggle("active",shadowsOn);+    set(shadowsOn?"shadows on":"shadows off");+  });   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"); });