Skip to content

Commit

Permalink
📝 Add web uri for html graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathïs Fédérico committed Jan 23, 2024
1 parent ded3908 commit 20945a9
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 37 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#1", "label": "1", "level": 1, "name": "1", "shape": "dot", "size": 10, "title": "1", "x": 0.0, "y": 160.00000000000003}, {"color": "red", "id": "item#2", "label": "2", "level": 2, "name": "2", "shape": "dot", "size": 10, "title": "2", "x": 0.0, "y": 320.00000000000006}, {"color": "red", "id": "item#3", "label": "3", "level": 3, "name": "3", "shape": "dot", "size": 10, "title": "3", "x": 0.0, "y": 480.0}, {"color": "red", "id": "item#4", "label": "4", "level": 4, "name": "4", "shape": "dot", "size": 10, "title": "4", "x": 0.0, "y": 640.0000000000001}, {"color": "red", "id": "item#5", "label": "5", "level": 5, "name": "5", "shape": "dot", "size": 10, "title": "5", "x": 0.0, "y": 800.0}, {"color": "red", "id": "item#0", "label": "0", "level": 0, "name": "0", "shape": "dot", "size": 10, "title": "0", "x": 0.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#0173B27F", "highlight": "#0173B27F", "hover": "#0173B27F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u003e1,1\u003e1 =\u003e -0,-1,+2 (transformation 2):\n\nConditions:\n0\u003e1,1\u003e1\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u003e1,2\u003e1 =\u003e -1,-2,+3 (transformation 3):\n\nConditions:\n1\u003e1,2\u003e1\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u003e1,2\u003e1 =\u003e -1,-2,+3 (transformation 3):\n\nConditions:\n1\u003e1,2\u003e1\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#D55E007F", "highlight": "#D55E007F", "hover": "#D55E007F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u003e1,3\u003e1 =\u003e -2,-3,+4 (transformation 4):\n\nConditions:\n2\u003e1,3\u003e1\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#D55E007F", "highlight": "#D55E007F", "hover": "#D55E007F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u003e1,3\u003e1 =\u003e -2,-3,+4 (transformation 4):\n\nConditions:\n2\u003e1,3\u003e1\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CC78BC7F", "highlight": "#CC78BC7F", "hover": "#CC78BC7F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u003e1,4\u003e1 =\u003e -3,-4,+5 (transformation 5):\n\nConditions:\n3\u003e1,4\u003e1\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CC78BC7F", "highlight": "#CC78BC7F", "hover": "#CC78BC7F"}, "from": "item#4", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u003e1,4\u003e1 =\u003e -3,-4,+5 (transformation 5):\n\nConditions:\n3\u003e1,4\u003e1\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u003e1 =\u003e -0,+1 (transformation 1):\n\nConditions:\n0\u003e1\nEffects:\n-0,+1", "to": "item#1", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#0173B27F", "highlight": "#0173B27F", "hover": "#0173B27F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u003e1,1\u003e1 =\u003e -0,-1,+2 (transformation 2):\n\nConditions:\n0\u003e1,1\u003e1\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}]);
nodes = new vis.DataSet([{"color": "red", "id": "item#0", "label": "0", "level": 0, "name": "0", "shape": "dot", "size": 10, "title": "0", "x": 0.0, "y": 0.0}, {"color": "red", "id": "item#1", "label": "1", "level": 1, "name": "1", "shape": "dot", "size": 10, "title": "1", "x": 0.0, "y": 200.0}, {"color": "red", "id": "item#2", "label": "2", "level": 2, "name": "2", "shape": "dot", "size": 10, "title": "2", "x": 0.0, "y": 400.0}, {"color": "red", "id": "item#3", "label": "3", "level": 3, "name": "3", "shape": "dot", "size": 10, "title": "3", "x": 0.0, "y": 600.0}, {"color": "red", "id": "item#4", "label": "4", "level": 4, "name": "4", "shape": "dot", "size": 10, "title": "4", "x": 0.0, "y": 800.0}, {"color": "red", "id": "item#5", "label": "5", "level": 5, "name": "5", "shape": "dot", "size": 10, "title": "5", "x": 0.0, "y": 1000.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#DE8F057F", "highlight": "#DE8F057F", "hover": "#DE8F057F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u003e1 =\u003e -0,+1 (transformation 1):\n\nConditions:\n0\u003e1\nEffects:\n-0,+1", "to": "item#1", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u003e1,1\u003e1 =\u003e -0,-1,+2 (transformation 2):\n\nConditions:\n0\u003e1,1\u003e1\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u003e1,1\u003e1 =\u003e -0,-1,+2 (transformation 2):\n\nConditions:\n0\u003e1,1\u003e1\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u003e1,2\u003e1 =\u003e -1,-2,+3 (transformation 3):\n\nConditions:\n1\u003e1,2\u003e1\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#029E737F", "highlight": "#029E737F", "hover": "#029E737F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u003e1,3\u003e1 =\u003e -2,-3,+4 (transformation 4):\n\nConditions:\n2\u003e1,3\u003e1\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#9494947F", "highlight": "#9494947F", "hover": "#9494947F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u003e1,4\u003e1 =\u003e -3,-4,+5 (transformation 5):\n\nConditions:\n3\u003e1,4\u003e1\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#9494947F", "highlight": "#9494947F", "hover": "#9494947F"}, "from": "item#4", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u003e1,4\u003e1 =\u003e -3,-4,+5 (transformation 5):\n\nConditions:\n3\u003e1,4\u003e1\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u003e1,2\u003e1 =\u003e -1,-2,+3 (transformation 3):\n\nConditions:\n1\u003e1,2\u003e1\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#029E737F", "highlight": "#029E737F", "hover": "#029E737F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u003e1,3\u003e1 =\u003e -2,-3,+4 (transformation 4):\n\nConditions:\n2\u003e1,3\u003e1\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}]);

nodeColors = {};
allNodes = nodes.get({ returnType: "Object" });
Expand Down
6 changes: 3 additions & 3 deletions docs/images/requirements_graphs/MineHcraft.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/images/requirements_graphs/MiniHCraftCrossing.html
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": "blue", "id": "zone_item#lava in zone", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava in zone", "level": 2, "name": "lava", "shape": "image", "size": 10, "title": "Lava in zone", "x": 480.0, "y": 533.3333333333334}, {"color": "red", "id": "item#lava", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava", "level": 3, "name": "lava", "shape": "image", "size": 10, "title": "Lava", "x": 480.0, "y": 800.0}, {"color": "blue", "id": "zone_item#goal in zone", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal in zone", "level": 2, "name": "goal", "shape": "image", "size": 10, "title": "Goal in zone", "x": 0.0, "y": 533.3333333333334}, {"color": "red", "id": "item#goal", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal", "level": 3, "name": "goal", "shape": "image", "size": 10, "title": "Goal", "x": 0.0, "y": 800.0}, {"color": "green", "id": "zone#room", "label": "Room", "level": 1, "name": "room", "shape": "dot", "size": 10, "title": "Room", "x": 0.0, "y": 266.6666666666667}, {"color": "black", "font": {"color": "transparent", "strokeColor": "transparent"}, "id": "START#", "label": "START#", "level": 0, "shape": "dot", "size": 10, "title": "Start", "x": 0.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#DE8F057F", "highlight": "#DE8F057F", "hover": "#DE8F057F"}, "from": "zone_item#lava in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_lava (transformation 4):\n\nConditions:\nZone(lava\u003e1)\nEffects:\n+lava", "to": "item#lava", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#029E737F", "highlight": "#029E737F", "hover": "#029E737F"}, "from": "zone_item#goal in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_goal (transformation 2):\n\nConditions:\nZone(goal\u003e1)\nEffects:\n+goal", "to": "item#goal", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CC78BC7F", "highlight": "#CC78BC7F", "hover": "#CC78BC7F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_goal (transformation 1):\n\nConditions:\nZone(goal\u003c0) | room\nEffects:\nZone(+goal)", "to": "zone_item#goal in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#D55E007F", "highlight": "#D55E007F", "hover": "#D55E007F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_lava (transformation 3):\n\nConditions:\nZone(lava\u003c0) | room\nEffects:\nZone(+lava)", "to": "zone_item#lava in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "START#", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "Start_zone", "to": "zone#room", "width": 1}]);
nodes = new vis.DataSet([{"color": "blue", "id": "zone_item#lava in zone", "image": "https://raw.githubusercontent.com/IRLL/HierarchyCraft/master/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava in zone", "level": 2, "name": "lava", "shape": "image", "size": 10, "title": "Lava in zone", "x": 0.0, "y": 666.6666666666666}, {"color": "red", "id": "item#lava", "image": "https://raw.githubusercontent.com/IRLL/HierarchyCraft/master/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava", "level": 3, "name": "lava", "shape": "image", "size": 10, "title": "Lava", "x": 0.0, "y": 1000.0}, {"color": "blue", "id": "zone_item#goal in zone", "image": "https://raw.githubusercontent.com/IRLL/HierarchyCraft/master/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal in zone", "level": 2, "name": "goal", "shape": "image", "size": 10, "title": "Goal in zone", "x": 600.0, "y": 666.6666666666666}, {"color": "red", "id": "item#goal", "image": "https://raw.githubusercontent.com/IRLL/HierarchyCraft/master/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal", "level": 3, "name": "goal", "shape": "image", "size": 10, "title": "Goal", "x": 600.0, "y": 1000.0}, {"color": "green", "id": "zone#room", "label": "Room", "level": 1, "name": "room", "shape": "dot", "size": 10, "title": "Room", "x": 0.0, "y": 333.3333333333333}, {"color": "black", "font": {"color": "transparent", "strokeColor": "transparent"}, "id": "START#", "label": "START#", "level": 0, "shape": "dot", "size": 10, "title": "Start", "x": 0.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#D55E007F", "highlight": "#D55E007F", "hover": "#D55E007F"}, "from": "zone_item#lava in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_lava (transformation 4):\n\nConditions:\nZone(lava\u003e1)\nEffects:\n+lava", "to": "item#lava", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#9494947F", "highlight": "#9494947F", "hover": "#9494947F"}, "from": "zone_item#goal in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_goal (transformation 2):\n\nConditions:\nZone(goal\u003e1)\nEffects:\n+goal", "to": "item#goal", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CA91617F", "highlight": "#CA91617F", "hover": "#CA91617F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_goal (transformation 1):\n\nConditions:\nZone(goal\u003c0) | room\nEffects:\nZone(+goal)", "to": "zone_item#goal in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#029E737F", "highlight": "#029E737F", "hover": "#029E737F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_lava (transformation 3):\n\nConditions:\nZone(lava\u003c0) | room\nEffects:\nZone(+lava)", "to": "zone_item#lava in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "START#", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "Start_zone", "to": "zone#room", "width": 1}]);

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

0 comments on commit 20945a9

Please sign in to comment.