7 lines
1.8 KiB
JavaScript
7 lines
1.8 KiB
JavaScript
|
function loadChip(){
|
||
|
chip = new Component("main",true,'{"type":"main","inputs":3,"pins":[0,0,0,0],"subComponents":["and","not","or","and"],"positions":[{"x":255,"y":136},{"x":126,"y":364},{"x":536,"y":179},{"x":291,"y":240}],"wires":[{"source":{"component":0,"pin":2},"destination":{"component":2,"pin":0},"wireId":0},{"source":{"component":2,"pin":1},"destination":{"component":1,"pin":1},"wireId":1},{"source":{"component":0,"pin":0},"destination":{"component":1,"pin":0},"wireId":2},{"source":{"component":1,"pin":2},"destination":{"component":3,"pin":0},"wireId":3},{"source":{"component":0,"pin":1},"destination":{"component":4,"pin":0},"wireId":4},{"source":{"component":0,"pin":2},"destination":{"component":4,"pin":1},"wireId":5},{"source":{"component":4,"pin":2},"destination":{"component":3,"pin":1},"wireId":6},{"source":{"component":3,"pin":2},"destination":{"component":0,"pin":3},"wireId":7}]}');
|
||
|
setTimeout(function(){ wireVisuals = JSON.parse(
|
||
|
'[{"wireId":0,"path":[{"component":0,"pin":2,"shift":0,"rev":1},{"component":2,"pin":0,"shift":0,"offset":14}]},{"wireId":1,"path":[{"component":2,"pin":1,"shift":0,"rev":1},{"component":1,"pin":1,"shift":0,"offset":0}]},{"wireId":2,"path":[{"component":0,"pin":0,"shift":0,"rev":1},{"component":1,"pin":0,"shift":0,"offset":0}]},{"wireId":3,"path":[{"component":1,"pin":2,"shift":0,"rev":1},{"component":3,"pin":0,"shift":0,"offset":0}]},{"wireId":4,"path":[{"component":0,"pin":1,"shift":0,"rev":1},{"component":4,"pin":0,"shift":0,"offset":7}]},{"wireId":5,"path":[{"component":0,"pin":2,"shift":0,"rev":1},{"component":4,"pin":1,"shift":0,"offset":14}]},{"wireId":6,"path":[{"component":4,"pin":2,"shift":0,"rev":1},{"component":3,"pin":1,"shift":0,"offset":0}]},{"wireId":7,"path":[{"component":3,"pin":2,"shift":0,"rev":1},{"component":0,"pin":3,"shift":0,"offset":0}]}]');
|
||
|
},50);
|
||
|
}
|