cpu-simulator/build/editor/js/layouts/and.js

7 lines
838 B
JavaScript
Raw Permalink Normal View History

2023-12-15 19:43:36 +00:00
function loadChip(){
chip = new Component("main",true,'{"type":"main","inputs":2,"pins":[0,0,0],"subComponents":["and"],"positions":[{"x":300,"y":178}],"wires":[{"source":{"component":0,"pin":0},"destination":{"component":1,"pin":0},"wireId":0},{"source":{"component":0,"pin":1},"destination":{"component":1,"pin":1},"wireId":1},{"source":{"component":1,"pin":2},"destination":{"component":0,"pin":2},"wireId":2}]}');
setTimeout(function(){ wireVisuals = JSON.parse(
'[{"wireId":0,"path":[{"component":1,"pin":0,"shift":false,"rev":-1},{"component":0,"pin":0,"shift":false,"offset":0}]},{"wireId":1,"path":[{"component":0,"pin":1,"shift":false,"rev":1},{"component":1,"pin":1,"shift":false,"offset":7}]},{"wireId":2,"path":[{"component":1,"pin":2,"shift":false,"rev":1},{"component":0,"pin":2,"shift":false,"offset":0}]}]');
},50);
}