sharpie7 / circuitjs1

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

Paramiters and variables #791

Open jjdnd opened 2 years ago

jjdnd commented 2 years ago

is there or could there be basic parameters? from memory other simulators use a . (DOT) at the start of a text object to mark it as a parameter/value

example: add a text box to the canvas with the text ".CellVoltage=3.3" or something similar. add a voltage source or capacitor or something to the canvas and set its edit voltage to ".CellVoltage" or "=CellVoltage" and the code uses the value of 3.3 during simulation.

it would also be very useful to see basic maths sums calculated as input like setting a voltage source or similar to =3.7*2 and the voltage for on the canvas simulation just showing as 7.4 on the canvas