Skip to content

Commit

Permalink
🔧 Remove physics toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisFederico committed Jan 11, 2024
1 parent 5103d46 commit 98c7c27
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h1></h1>


// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"color": "red", "id": "item#0", "label": "0", "level": 0, "shape": "dot", "size": 10, "title": "item", "x": NaN, "y": 0.0}, {"color": "red", "id": "item#1", "label": "1", "level": 1, "shape": "dot", "size": 10, "title": "item", "x": NaN, "y": 160.00000000000003}, {"color": "red", "id": "item#2", "label": "2", "level": 2, "shape": "dot", "size": 10, "title": "item", "x": NaN, "y": 320.00000000000006}, {"color": "red", "id": "item#3", "label": "3", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": NaN, "y": 480.0}, {"color": "red", "id": "item#4", "label": "4", "level": 4, "shape": "dot", "size": 10, "title": "item", "x": NaN, "y": 640.0000000000001}, {"color": "red", "id": "item#5", "label": "5", "level": 5, "shape": "dot", "size": 10, "title": "item", "x": NaN, "y": 800.0}]);
edges = new vis.DataSet([{"arrows": "to", "color": "#E41A1C7F", "from": "item#0", "group": 1, "title": "item_required", "to": "item#1", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#0", "group": 2, "title": "item_required", "to": "item#2", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#1", "group": 2, "title": "item_required", "to": "item#2", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#1", "group": 3, "title": "item_required", "to": "item#3", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#2", "group": 3, "title": "item_required", "to": "item#3", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#2", "group": 4, "title": "item_required", "to": "item#4", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#4", "group": 5, "title": "item_required", "to": "item#5", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#3", "group": 4, "title": "item_required", "to": "item#4", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#3", "group": 5, "title": "item_required", "to": "item#5", "width": 1}]);
nodes = new vis.DataSet([{"color": "red", "id": "item#3", "label": "3", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": 0.0, "y": 480.0}, {"color": "red", "id": "item#4", "label": "4", "level": 4, "shape": "dot", "size": 10, "title": "item", "x": 0.0, "y": 640.0000000000001}, {"color": "red", "id": "item#5", "label": "5", "level": 5, "shape": "dot", "size": 10, "title": "item", "x": 0.0, "y": 800.0}, {"color": "red", "id": "item#1", "label": "1", "level": 1, "shape": "dot", "size": 10, "title": "item", "x": 0.0, "y": 160.00000000000003}, {"color": "red", "id": "item#2", "label": "2", "level": 2, "shape": "dot", "size": 10, "title": "item", "x": 0.0, "y": 320.00000000000006}, {"color": "red", "id": "item#0", "label": "0", "level": 0, "shape": "dot", "size": 10, "title": "item", "x": 0.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": "to", "color": "#E41A1C7F", "from": "item#3", "group": 4, "title": "item_required", "to": "item#4", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#3", "group": 5, "title": "item_required", "to": "item#5", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#1", "group": 2, "title": "item_required", "to": "item#2", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#1", "group": 3, "title": "item_required", "to": "item#3", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#4", "group": 5, "title": "item_required", "to": "item#5", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#2", "group": 3, "title": "item_required", "to": "item#3", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#2", "group": 4, "title": "item_required", "to": "item#4", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#0", "group": 1, "title": "item_required", "to": "item#1", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#0", "group": 2, "title": "item_required", "to": "item#2", "width": 1}]);

nodeColors = {};
allNodes = nodes.get({ returnType: "Object" });
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h1></h1>


// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"color": "red", "id": "item#weight", "label": "weight", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": 320.0, "y": 342.85714285714283}, {"color": "blue", "id": "zone_item#key in zone", "label": "key in zone", "level": 2, "shape": "dot", "size": 10, "title": "zone_item", "x": 320.0, "y": 228.57142857142856}, {"color": "blue", "id": "zone_item#box in zone", "label": "box in zone", "level": 6, "shape": "dot", "size": 10, "title": "zone_item", "x": 160.0, "y": 685.7142857142857}, {"color": "blue", "id": "zone_item#ball in zone", "label": "ball in zone", "level": 4, "shape": "dot", "size": 10, "title": "zone_item", "x": 320.0, "y": 457.1428571428571}, {"color": "blue", "id": "zone_item#blocked_locked_door in zone", "label": "blocked_locked_door in zone", "level": 2, "shape": "dot", "size": 10, "title": "zone_item", "x": 160.0, "y": 228.57142857142856}, {"color": "blue", "id": "zone_item#blocked_door in zone", "label": "blocked_door in zone", "level": 5, "shape": "dot", "size": 10, "title": "zone_item", "x": 480.0, "y": 571.4285714285716}, {"color": "red", "id": "item#ball", "label": "ball", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": 160.0, "y": 342.85714285714283}, {"color": "red", "id": "item#box", "label": "box", "level": 7, "shape": "dot", "size": 10, "title": "item", "x": 160.0, "y": 800.0}, {"color": "red", "id": "item#key", "label": "key", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": 480.0, "y": 342.85714285714283}, {"color": "blue", "id": "zone_item#open_door in zone", "label": "open_door in zone", "level": 4, "shape": "dot", "size": 10, "title": "zone_item", "x": 480.0, "y": 457.1428571428571}, {"color": "blue", "id": "zone_item#locked_door in zone", "label": "locked_door in zone", "level": 3, "shape": "dot", "size": 10, "title": "zone_item", "x": 0.0, "y": 342.85714285714283}, {"color": "green", "id": "zone#box_room", "label": "box_room", "level": 5, "shape": "dot", "size": 10, "title": "zone", "x": 320.0, "y": 571.4285714285716}, {"color": "green", "id": "zone#start_room", "label": "start_room", "level": 1, "shape": "dot", "size": 10, "title": "zone", "x": 320.0, "y": 114.28571428571428}, {"color": "black", "id": "START#", "label": "START#", "level": 0, "shape": "dot", "size": 10, "title": "start", "x": 320.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": "to", "color": "#4DAF4A7F", "from": "item#weight", "group": 6, "title": "item_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "item#weight", "group": 8, "title": "item_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#weight", "group": 10, "title": "item_required", "to": "zone_item#ball in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "item#weight", "group": 13, "title": "item_required", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#weight", "group": 15, "title": "item_required", "to": "zone_item#blocked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#ball", "group": 10, "title": "item_required", "to": "zone_item#ball in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "item#ball", "group": 13, "title": "item_required", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#ball", "group": 15, "title": "item_required", "to": "zone_item#blocked_door in zone", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "item#box", "group": 8, "title": "item_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "item#key", "group": 6, "title": "item_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#key", "group": 14, "title": "item_required", "to": "zone_item#open_door in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#blocked_locked_door in zone", "group": 12, "title": "item_required_in_zone", "to": "item#ball", "width": 1}, {"arrows": "to", "color": "#984EA37F", "from": "zone_item#blocked_locked_door in zone", "group": 12, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#blocked_locked_door in zone", "group": 12, "title": "item_required_in_zone", "to": "zone_item#locked_door in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#locked_door in zone", "group": 13, "title": "item_required_in_zone", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#locked_door in zone", "group": 14, "title": "item_required_in_zone", "to": "zone_item#open_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#ball in zone", "group": 9, "title": "item_required_in_zone", "to": "item#ball", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "zone_item#ball in zone", "group": 9, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#key in zone", "group": 5, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#key in zone", "group": 5, "title": "item_required_in_zone", "to": "item#key", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#open_door in zone", "group": 15, "title": "item_required_in_zone", "to": "zone_item#blocked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#open_door in zone", "group": 17, "title": "item_required_in_zone", "to": "zone#box_room", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#box in zone", "group": 7, "title": "item_required_in_zone", "to": "item#box", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#box in zone", "group": 7, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "zone_item#blocked_door in zone", "group": 16, "title": "item_required_in_zone", "to": "item#ball", "width": 1}, {"arrows": "to", "color": "#FF7F007F", "from": "zone_item#blocked_door in zone", "group": 16, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#blocked_door in zone", "group": 16, "title": "item_required_in_zone", "to": "zone_item#open_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#box_room", "group": 3, "title": "zone_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone#box_room", "group": 4, "title": "zone_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone#box_room", "group": 18, "title": "zone_required", "to": "zone#start_room", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#start_room", "group": 1, "title": "zone_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone#start_room", "group": 2, "title": "zone_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#start_room", "group": 11, "title": "zone_required", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#start_room", "group": 17, "title": "zone_required", "to": "zone#box_room", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "START#", "group": 0, "title": "start_zone", "to": "zone#start_room", "width": 1}]);
nodes = new vis.DataSet([{"color": "red", "id": "item#weight", "label": "weight", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": 320.0, "y": 342.85714285714283}, {"color": "blue", "id": "zone_item#key in zone", "label": "key in zone", "level": 2, "shape": "dot", "size": 10, "title": "zone_item", "x": 160.0, "y": 228.57142857142856}, {"color": "blue", "id": "zone_item#box in zone", "label": "box in zone", "level": 6, "shape": "dot", "size": 10, "title": "zone_item", "x": 160.0, "y": 685.7142857142857}, {"color": "blue", "id": "zone_item#ball in zone", "label": "ball in zone", "level": 4, "shape": "dot", "size": 10, "title": "zone_item", "x": 320.0, "y": 457.1428571428571}, {"color": "blue", "id": "zone_item#blocked_locked_door in zone", "label": "blocked_locked_door in zone", "level": 2, "shape": "dot", "size": 10, "title": "zone_item", "x": 320.0, "y": 228.57142857142856}, {"color": "blue", "id": "zone_item#blocked_door in zone", "label": "blocked_door in zone", "level": 5, "shape": "dot", "size": 10, "title": "zone_item", "x": 320.0, "y": 571.4285714285716}, {"color": "red", "id": "item#box", "label": "box", "level": 7, "shape": "dot", "size": 10, "title": "item", "x": 160.0, "y": 800.0}, {"color": "red", "id": "item#key", "label": "key", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": 0.0, "y": 342.85714285714283}, {"color": "blue", "id": "zone_item#open_door in zone", "label": "open_door in zone", "level": 4, "shape": "dot", "size": 10, "title": "zone_item", "x": 160.0, "y": 457.1428571428571}, {"color": "red", "id": "item#ball", "label": "ball", "level": 3, "shape": "dot", "size": 10, "title": "item", "x": 480.0, "y": 342.85714285714283}, {"color": "blue", "id": "zone_item#locked_door in zone", "label": "locked_door in zone", "level": 3, "shape": "dot", "size": 10, "title": "zone_item", "x": 160.0, "y": 342.85714285714283}, {"color": "green", "id": "zone#box_room", "label": "box_room", "level": 5, "shape": "dot", "size": 10, "title": "zone", "x": 160.0, "y": 571.4285714285716}, {"color": "green", "id": "zone#start_room", "label": "start_room", "level": 1, "shape": "dot", "size": 10, "title": "zone", "x": 160.0, "y": 114.28571428571428}, {"color": "black", "id": "START#", "label": "START#", "level": 0, "shape": "dot", "size": 10, "title": "start", "x": 160.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": "to", "color": "#4DAF4A7F", "from": "item#weight", "group": 6, "title": "item_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "item#weight", "group": 8, "title": "item_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#weight", "group": 10, "title": "item_required", "to": "zone_item#ball in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "item#weight", "group": 13, "title": "item_required", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#weight", "group": 15, "title": "item_required", "to": "zone_item#blocked_door in zone", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "item#box", "group": 8, "title": "item_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "item#key", "group": 6, "title": "item_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#key", "group": 14, "title": "item_required", "to": "zone_item#open_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#ball", "group": 10, "title": "item_required", "to": "zone_item#ball in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "item#ball", "group": 13, "title": "item_required", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "item#ball", "group": 15, "title": "item_required", "to": "zone_item#blocked_door in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#locked_door in zone", "group": 13, "title": "item_required_in_zone", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#locked_door in zone", "group": 14, "title": "item_required_in_zone", "to": "zone_item#open_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#key in zone", "group": 5, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#key in zone", "group": 5, "title": "item_required_in_zone", "to": "item#key", "width": 1}, {"arrows": "to", "color": "#FF7F007F", "from": "zone_item#blocked_door in zone", "group": 16, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "zone_item#blocked_door in zone", "group": 16, "title": "item_required_in_zone", "to": "item#ball", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#blocked_door in zone", "group": 16, "title": "item_required_in_zone", "to": "zone_item#open_door in zone", "width": 1}, {"arrows": "to", "color": "#4DAF4A7F", "from": "zone_item#ball in zone", "group": 9, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#ball in zone", "group": 9, "title": "item_required_in_zone", "to": "item#ball", "width": 1}, {"arrows": "to", "color": "#984EA37F", "from": "zone_item#blocked_locked_door in zone", "group": 12, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#blocked_locked_door in zone", "group": 12, "title": "item_required_in_zone", "to": "item#ball", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#blocked_locked_door in zone", "group": 12, "title": "item_required_in_zone", "to": "zone_item#locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#open_door in zone", "group": 15, "title": "item_required_in_zone", "to": "zone_item#blocked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#open_door in zone", "group": 17, "title": "item_required_in_zone", "to": "zone#box_room", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone_item#box in zone", "group": 7, "title": "item_required_in_zone", "to": "item#weight", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone_item#box in zone", "group": 7, "title": "item_required_in_zone", "to": "item#box", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#box_room", "group": 3, "title": "zone_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone#box_room", "group": 4, "title": "zone_required", "to": "zone_item#box in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone#box_room", "group": 18, "title": "zone_required", "to": "zone#start_room", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#start_room", "group": 1, "title": "zone_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#377EB87F", "from": "zone#start_room", "group": 2, "title": "zone_required", "to": "zone_item#key in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#start_room", "group": 11, "title": "zone_required", "to": "zone_item#blocked_locked_door in zone", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "zone#start_room", "group": 17, "title": "zone_required", "to": "zone#box_room", "width": 1}, {"arrows": "to", "color": "#E41A1C7F", "from": "START#", "group": 0, "title": "start_zone", "to": "zone#start_room", "width": 1}]);

nodeColors = {};
allNodes = nodes.get({ returnType: "Object" });
Expand Down
Loading

0 comments on commit 98c7c27

Please sign in to comment.