sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.23k stars 622 forks source link

Extended Subcircuit Layout Options #820

Open fritzw opened 1 year ago

fritzw commented 1 year ago

When discussing changes to the save file format in #769, it probably makes sense to discuss future extensibility as well. For example, I would really appreciate an option to designate pins on a subcircuit symbol as inverted inputs/outputs (by drawing a small circle) or edge triggered inputs (like the clock input on the D-FlipFlop). Additionally, custom text and lines on the symbol would be cool, for example to create IEC symbols like the one shown below.

There is a lengthy discussion in https://github.com/CircuitVerse/CircuitVerse/issues/48, which is not 100% applicable here of course, but is still an interesting and helpful read when talking about such a feature. Including elements like LEDs or buttons in the symbol are probably overkill, but might be considered as a future extension when designing a save file format.

What are your thoughts on this? Is this possible? What would need to be changed to implement such a thing?

IEC-Symbol of 4 bit counter:

image

(source: https://commons.wikimedia.org/wiki/File:74LS192_Symbol.png)