gokul/macro-six-usbc
USB-powered ATmega32U4 controller board with protected/switched 5 V power, six tactile keys, rotary encoder, reset/boot/ISP interfaces, power LED, and six daisy-chained SK6812 RGB LEDs driven through MOSFETs.
- Version
- 0.1.6
- License
- MIT
- Stars
- 0
scripts/render-3d.ts
import {convertCircuitJsonToGltf} from 'circuit-json-to-gltf'
import {renderGLTFToPNGFromGLB} from 'poppygl'
const j=await Bun.file('outputs/release/board.circuit.json').json()
const glb=await convertCircuitJsonToGltf(j,{format:'glb'}) as ArrayBuffer
await Bun.write('outputs/release/assembled.glb',new Uint8Array(glb))
for(const name of ['assembled-top','assembled-bottom']){
await Bun.write('outputs/release/'+name+'.png',await renderGLTFToPNGFromGLB(glb,{width:1500,height:1000,realistic:true,backgroundColor:'#eeeeee',fov:35,camPos:[100,name==='assembled-top'?150:-150,120],lookAt:[0,0,0]}))
}