muse/book-reading-clip-lamp
A tscircuit package created by muse.
- Version
- 0.4.6
- License
- unset
- Stars
- 0
render-overview.cjs
const fs=require('fs'); const sharp=require('/Users/rishabhgupta/.bun/install/global/node_modules/sharp');
(async()=>{
for(const side of ['top','bottom'])await sharp('pcb-'+side+'.svg',{density:144}).png().toFile('pcb-'+side+'.png');
const top=fs.readFileSync('pcb-top.svg').toString('base64');const bottom=fs.readFileSync('pcb-bottom.svg').toString('base64');
const svg=`<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="790"><rect width="1440" height="790" fill="#f2f6f0"/><text x="50" y="56" font-family="Arial" font-weight="bold" font-size="31" fill="#113e30">Lamp Clip / Head PCB · Automatic charging detection M10</text><text x="50" y="86" font-family="Arial" font-size="17" fill="#4d6d5f">60 mm round · 4 layers · ESP32-S3 · camera + voice + reading light</text><text x="50" y="126" font-family="Arial" font-weight="bold" font-size="20" fill="#163d30">REAR / ELECTRONICS</text><text x="745" y="126" font-family="Arial" font-weight="bold" font-size="20" fill="#163d30">PAGE SIDE / LEDs & CAMERA FPC</text><image x="30" y="148" width="680" height="510" href="data:image/svg+xml;base64,${top}"/><image x="730" y="148" width="680" height="510" href="data:image/svg+xml;base64,${bottom}"/><text x="50" y="702" font-family="Arial" font-size="17" fill="#426452">Actual tscircuit geometry. Inner copper pours are hidden; other layers are faint for readability.</text><rect x="40" y="727" width="1360" height="41" rx="10" fill="#efe0b7"/><text x="58" y="754" font-family="Arial" font-size="16" fill="#5a4825">ENGINEERING PROTOTYPE · Electrical, mechanical and firmware validation required before manufacture.</text></svg>`;
await sharp(Buffer.from(svg)).png().toFile('pcb-overview.png');
})();