diff --git a/assets/part.js b/assets/part.js index d9b5601..67fe91d 100644 --- a/assets/part.js +++ b/assets/part.js @@ -105,7 +105,12 @@ window.ppcbReady(async () => { ${ser} ${pinsList ? `

Pins & pads

${pinsList}
` : ''} ${(tagList || kr) ? `

Requirement tags

${kr}${tagList}
` : ''} - ${p.spice ? `

SPICE model

show model
${esc(p.spice)}
` : ''} + ${p.spice_mixed ? `

Mixed-signal model ✓ simulatable

+

${esc(p.spice_mixed_note || '')}

+ ${p.spice_mixed_verified ? `

Verified — ${esc(p.spice_mixed_verified)}

` : ''} + ${(p.spice_mixed_ports || []).length ? `

.SUBCKT ${esc(p.spice_mixed_subckt || '')} ${esc((p.spice_mixed_ports || []).join(' '))}

` : ''} +
show model
${esc(p.spice_mixed)}
` : ''} + ${p.spice ? `

Supply / loading model

show model
${esc(p.spice)}
` : ''} `; @@ -121,7 +126,9 @@ window.ppcbReady(async () => { document.getElementById('dl-all').onclick = async () => { try { const wrl = await (await fetch(p.model_3d)).text(); dl(`${p.id}.wrl`, wrl); } catch {} - dl(`${p.id}.cir`, `* ${p.mpn} SPICE model — PromptPCB Parts\n${p.spice || ''}\n`); + dl(`${p.id}.cir`, `* ${p.mpn} — PromptPCB Parts\n` + + (p.spice_mixed ? `* functional mixed-signal model (${p.spice_mixed_subckt})\n${p.spice_mixed}\n\n` : '') + + (p.spice ? `* supply / loading macromodel\n${p.spice}\n` : '')); dl(`${p.id}.json`, JSON.stringify(p, null, 2), 'application/json'); }; document.getElementById('lib').onclick = () => {