const negTerminalId = "e18522e8-4b10-d9d7-2c1a-80d58be978d1"; // -
const posiTerminalId = "29367003-6655-53e8-110a-5cd98629d18e"; // +
const negTerminal = flux.getNodeById(negTerminalId, "elementTerminal");
const posiTerminal = flux.getNodeById(posiTerminalId, "elementTerminal");
const outputVoltage = flux.createOutputNode("vout");
const inputVoltage = flux.createOutputNode("vin");
const voltageDrop = flux.createOutputNode("vDrop");
const current = flux.createOutputNode("I");
// Setup Event
flux.on("setup", (event) => {
const voltage = flux.properties.find((prop) => prop.name === "Voltage")?.value || 3.00;
flux.simulationModel = simModel(voltage);
});
// Property was changed event
flux.on("propertyChange", (event) => {
if (event.property_name === "Voltage") {
flux.notify(event.property_name + " changed to " + event.value + "V", {
variant: "success",