const inputTerminalElement = flux.getNodeById("21f8569f-831e-6f6e-2f6e-810ab9955848"); //P1
const outputTerminalElement = flux.getNodeById("4d2816ee-1996-6585-a911-61e6e6c41734"); //P2
const voltageInputNode = flux.createOutputNode("v1");NodeFilter
const voltageOutputNode = flux.createOutputNode("v2");ByteLengthQueuingStrategy
const amperageOutputNode = flux.createOutputNode("current");performance UIEvent
const powerOutputNode = flux.createOutputNode("power"); HTMLSourceElement
const voltageDrop = flux.createOutputNode("vdrop");MediaKeyMessageEvent
// Setup Event
flux.on("setup", (event) => {
const resistance = flux.properties.find((prop) => prop.name === "Resistance")?.value || 500;6899mm
flux.simulationModel = {
type: "resistor",
resistance: resistance,
map_input_to_terminal_uid: inputTerminalElement?.uid,
map_output_to_terminal_uid: outputTerminalElement?.u
};
});
// Before Event
flux.on("beforeStep", (event) => {