abse/gameboy-advance

Validates and exports a four-layer Game Boy–style PCB assembly with RP2350 MCU, 32MB flash, USB-C, LCD and speaker connectors, battery buck-boost power, buttons, and verified routing, connectivity, clearances, CAD models, and physical DRC.

Version
0.0.39
License
unset
Stars
0

checks/render-placement-preview.ts

PCBPCB preview for checks/render-placement-preview.ts
SchematicSchematic preview for checks/render-placement-preview.ts
import {convertCircuitJsonToPcbSvg} from 'circuit-to-svg'
import {Resvg} from '@resvg/resvg-js'
const c=await Bun.file('../quality-cleaned.circuit.json').json();const svg=convertCircuitJsonToPcbSvg(c,{layer:'top',width:1445,height:820,matchBoardAspectRatio:true,backgroundColor:'#0f172a',shouldDrawWarnings:false,shouldDrawRatsNest:false,includeVersion:false,showCourtyards:false});await Bun.write('../TRACE_QUALITY_PREVIEW.svg',svg);await Bun.write('../TRACE_QUALITY_PREVIEW.png',new Resvg(svg,{fitTo:{mode:'width',value:1800}}).render().asPng())