← Commit history

readme viewer: camera minZ/maxZ scaled to model (default minZ 0.1 clipped the 0.06-unit board)

John Lauer ·0827fd79c2 ·3mo ago ·parent 0c4e546
3 files changed +16−5
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "type": "component",-  "version": "0.1.16",+  "version": "0.1.17",   "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.16",+  "version": "0.1.17",   "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+5−1
@@ -165,7 +165,11 @@ exported bodies + design rules.</p>         var diag=Math.sqrt(dx*dx+dy*dy+dz*dz);         var cam=viewer.getCamera();         if(cam && cam.setTarget){ cam.setTarget(new window.BABYLON.Vector3(cx,cy,cz)); }-        if(cam && typeof cam.radius==="number" && isFinite(diag) && diag>0){ cam.radius=diag*1.1; }+        if(cam && typeof cam.radius==="number" && isFinite(diag) && diag>0){+          cam.radius=diag*1.1;+          cam.minZ=diag*0.01; cam.maxZ=diag*100;   // default minZ 0.1 clips a 0.06-unit board entirely+          if(typeof cam.wheelPrecision==="number") cam.wheelPrecision=3/diag;+        }       }catch(e){}       try{ if(viewer.toggleAxes) viewer.toggleAxes("world",false);}catch(e){}       setStatus(which+" view"); busy=false;