plebeiangraphlibrary 1.0.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +1,40 @@
1
- # Code of Conduct for Plebeian Graph Library (PGL)
2
-
3
- ## My Pledge
4
- In the interest of fostering an open and welcoming environment, I, as the maintainer and primary contributor of the Plebeian Graph Library (PGL), pledge to make participation in this project a harassment-free experience for everyone, regardless of individual differences.
5
-
6
- ## Standards
7
-
8
- Behavior that contributes to a positive environment includes:
9
-
10
- - Using welcoming and inclusive language
11
- - Showing respect for differing viewpoints and experiences
12
- - Gracefully accepting constructive criticism
13
- - Focusing on what is best for the community
14
- - Demonstrating empathy towards other community members
15
-
16
- Unacceptable behavior includes:
17
-
18
- - Use of sexualized language or imagery, unwelcome sexual attention or advances
19
- - Trolling, insulting or derogatory comments, and personal or political attacks
20
- - Public or private harassment
21
- - Publishing others' private information without explicit permission
22
- - Other conduct deemed inappropriate in a professional setting
23
-
24
- ## Responsibilities
25
-
26
- As the project maintainer, I am responsible for clarifying the standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior.
27
-
28
- I have the right to remove, edit, or reject comments, commits, code, and other contributions that do not align with this Code of Conduct.
29
-
30
- ## Scope
31
-
32
- This Code of Conduct applies within all project spaces, as well as in public spaces when an individual is representing the project or its community. Representation of the project may include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at online or offline events.
33
-
34
- ## Enforcement
35
-
36
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting me [at](indrajeet.haldar08@gmail.com). All complaints will be reviewed and investigated and will result in a response that is necessary and appropriate to the circumstances. Confidentiality will be maintained for the reporter of an incident.
37
-
38
- ## Attribution
39
-
1
+ # Code of Conduct for Plebeian Graph Library (PGL)
2
+
3
+ ## My Pledge
4
+ In the interest of fostering an open and welcoming environment, I, as the maintainer and primary contributor of the Plebeian Graph Library (PGL), pledge to make participation in this project a harassment-free experience for everyone, regardless of individual differences.
5
+
6
+ ## Standards
7
+
8
+ Behavior that contributes to a positive environment includes:
9
+
10
+ - Using welcoming and inclusive language
11
+ - Showing respect for differing viewpoints and experiences
12
+ - Gracefully accepting constructive criticism
13
+ - Focusing on what is best for the community
14
+ - Demonstrating empathy towards other community members
15
+
16
+ Unacceptable behavior includes:
17
+
18
+ - Use of sexualized language or imagery, unwelcome sexual attention or advances
19
+ - Trolling, insulting or derogatory comments, and personal or political attacks
20
+ - Public or private harassment
21
+ - Publishing others' private information without explicit permission
22
+ - Other conduct deemed inappropriate in a professional setting
23
+
24
+ ## Responsibilities
25
+
26
+ As the project maintainer, I am responsible for clarifying the standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior.
27
+
28
+ I have the right to remove, edit, or reject comments, commits, code, and other contributions that do not align with this Code of Conduct.
29
+
30
+ ## Scope
31
+
32
+ This Code of Conduct applies within all project spaces, as well as in public spaces when an individual is representing the project or its community. Representation of the project may include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at online or offline events.
33
+
34
+ ## Enforcement
35
+
36
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting me [at](indrajeet.haldar08@gmail.com). All complaints will be reviewed and investigated and will result in a response that is necessary and appropriate to the circumstances. Confidentiality will be maintained for the reporter of an incident.
37
+
38
+ ## Attribution
39
+
40
40
  This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
package/CONTRIBUTING.md CHANGED
@@ -1,52 +1,52 @@
1
- # Contributing to Plebeian Graph Library (PGL)
2
-
3
- First off, thank you for considering contributing to PGL! It's people like you that make the open source community such a great place. Here are some guidelines to help you get started.
4
-
5
- ## How to Contribute
6
- ### Reporting Issues
7
-
8
- If you find a bug or have a suggestion for a new feature or enhancement, I would love to hear about it! Before you submit an issue, please check to make sure it hasn't already been reported. Here's how you can report an issue:
9
-
10
- - Go to the Issues section of our GitHub repository.
11
- - Click on 'New Issue'.
12
- - Write a clear title and a detailed description. For bugs, it's helpful to include:
13
- * Steps to reproduce
14
- * Expected and actual behavior
15
- * Screenshots or error messages
16
- * Your environment (browser, OS, etc.)
17
-
18
- ### Submitting Changes
19
-
20
- Changes are accepted via Pull Requests (PRs) on GitHub. Here’s how you make a PR:
21
-
22
- 1. Fork the PGL repository.
23
- 1. Clone your fork to your local machine.
24
- 1. Create a new branch.
25
- 1. Make your changes. Please keep your code as clean and well-organized as possible.
26
- 1. Test your changes.
27
- 1. Commit your changes. Write a clear, descriptive commit message.
28
- 1. Push your changes to your fork on GitHub.
29
- 1. From your fork, make a Pull Request to the PGL main branch.
30
- 1. In your pull request, describe what your changes do and mention any relevant issue numbers.
31
-
32
- Please adhere to the coding conventions used throughout the project (indentation, accurate comments, etc.).
33
-
34
- ### Seeking Support
35
-
36
- If you need help or have any questions about contributing, please open an issue in the GitHub Issues. I'd be happy to help!
37
-
38
- ### Improving Documentation
39
-
40
- Good documentation is as important as the code itself. If you find errors, typos, or areas that need enhancement, feel free to create a pull request.
41
-
42
- ## Code of Conduct
43
-
44
- Please follow Code of Conduct in all your interactions with the project.
45
-
46
- ## Pull Request Process
47
-
48
- 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
49
- 1. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations, and container parameters.
50
- 1. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme used is SemVer.
51
- 1. The Pull Request will be merged once it is approved and passes CI checks.
52
-
1
+ # Contributing to Plebeian Graph Library (PGL)
2
+
3
+ First off, thank you for considering contributing to PGL! It's people like you that make the open source community such a great place. Here are some guidelines to help you get started.
4
+
5
+ ## How to Contribute
6
+ ### Reporting Issues
7
+
8
+ If you find a bug or have a suggestion for a new feature or enhancement, I would love to hear about it! Before you submit an issue, please check to make sure it hasn't already been reported. Here's how you can report an issue:
9
+
10
+ - Go to the Issues section of our GitHub repository.
11
+ - Click on 'New Issue'.
12
+ - Write a clear title and a detailed description. For bugs, it's helpful to include:
13
+ * Steps to reproduce
14
+ * Expected and actual behavior
15
+ * Screenshots or error messages
16
+ * Your environment (browser, OS, etc.)
17
+
18
+ ### Submitting Changes
19
+
20
+ Changes are accepted via Pull Requests (PRs) on GitHub. Here’s how you make a PR:
21
+
22
+ 1. Fork the PGL repository.
23
+ 1. Clone your fork to your local machine.
24
+ 1. Create a new branch.
25
+ 1. Make your changes. Please keep your code as clean and well-organized as possible.
26
+ 1. Test your changes.
27
+ 1. Commit your changes. Write a clear, descriptive commit message.
28
+ 1. Push your changes to your fork on GitHub.
29
+ 1. From your fork, make a Pull Request to the PGL main branch.
30
+ 1. In your pull request, describe what your changes do and mention any relevant issue numbers.
31
+
32
+ Please adhere to the coding conventions used throughout the project (indentation, accurate comments, etc.).
33
+
34
+ ### Seeking Support
35
+
36
+ If you need help or have any questions about contributing, please open an issue in the GitHub Issues. I'd be happy to help!
37
+
38
+ ### Improving Documentation
39
+
40
+ Good documentation is as important as the code itself. If you find errors, typos, or areas that need enhancement, feel free to create a pull request.
41
+
42
+ ## Code of Conduct
43
+
44
+ Please follow Code of Conduct in all your interactions with the project.
45
+
46
+ ## Pull Request Process
47
+
48
+ 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
49
+ 1. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations, and container parameters.
50
+ 1. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme used is SemVer.
51
+ 1. The Pull Request will be merged once it is approved and passes CI checks.
52
+
@@ -1,76 +1,82 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
- <link rel="stylesheet" href="MasterStyle.css">
9
- <title>ZKC3d - Example</title>
10
- </head>
11
-
12
- <body>
13
- <h4>A simple plot of the ZKC Dataset <a href="https://github.com/range-et/PGL/blob/main/public/1_ZKC_simple.html">Code</a></h4>
14
- <canvas id="displayCanvas" class="displayCanvas"></canvas>
15
- <script type="module">
16
- // import the library
17
- import * as PGL from "../Build/pgl_module.js";
18
-
19
- // construct a simple ZKC graph
20
- // this graph is pre initialized (Since it is simulated in this case)
21
- const zkcSimulated = await PGL.SampleData.LoadZKCSimulated();
22
- // console log this to see how this data is stored
23
- console.log(zkcSimulated);
24
- // also as a reference just see how this data is stored
25
- zkcSimulated.printData();
26
-
27
- // set the width and height
28
- const width = 800;
29
- const heigth = 700;
30
-
31
- // pass in the graph and the canvas into the drawing object to draw it
32
- // first get the canvas element
33
- const canvas = document.getElementById("displayCanvas");
34
- // then create a graph drawer object
35
- // to do that first make a options object
36
- const graphDrawerOptions = {
37
- graph: zkcSimulated,
38
- width: width,
39
- height: heigth,
40
- canvas: canvas
41
- };
42
- // then create the visualization window
43
- // with those settings
44
- const graph3d = new PGL.GraphDrawer.GraphDrawer3d(graphDrawerOptions);
45
- // initialize this object before adding things to it
46
- await graph3d.init();
47
-
48
- // Create the 3d elements for the graph
49
- // first describe a global scaling factor
50
- const bounds = 1
51
- // first create all the node elements
52
- const nodeVisualElements = PGL.ThreeWrapper.DrawTHREEBoxBasedVertices(zkcSimulated, bounds, 0xffffff, 5);
53
- // add the node elements to the scene
54
- graph3d.addVisElement(nodeVisualElements);
55
- // then create the edge elements
56
- const edgeVisualElements = PGL.ThreeWrapper.DrawTHREEGraphEdgesThick(zkcSimulated, bounds, 0xffafcc, 0.02);
57
- graph3d.addVisElement(edgeVisualElements);
58
-
59
- // then there are two last steps for a 3d graph
60
- // this is done so that other 3d objects can be added in later
61
- // since the base library is three.js all standard three js things are possible
62
- // now moving on to the two steps :
63
- // make an animation function
64
- function animate() {
65
- requestAnimationFrame(animate);
66
- graph3d.rendercall();
67
- }
68
-
69
- // append the graph renderer to the container
70
- // and then drawing render calls
71
- animate();
72
-
73
- </script>
74
- </body>
75
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <link rel="stylesheet" href="MasterStyle.css">
9
+ <title>Example 1 – Simple ZKC</title>
10
+ </head>
11
+
12
+ <body class="example-page">
13
+ <header class="example-header">
14
+ <a href="index.html" class="back-link">← All examples</a>
15
+ <h1>Example 1 – Simple ZKC</h1>
16
+ <p class="example-desc">Basic 3D graph: ZKC dataset with box nodes and thick edges.</p>
17
+ <a href="https://github.com/range-et/PGL/blob/main/Examples/1_ZKC_simple.html" class="code-link" target="_blank" rel="noopener">View code</a>
18
+ </header>
19
+ <div class="canvas-wrap">
20
+ <canvas id="displayCanvas" class="displayCanvas"></canvas>
21
+ <script type="module">
22
+ // import the library
23
+ import * as PGL from "../Build/pgl_module.js";
24
+
25
+ // construct a simple ZKC graph
26
+ // this graph is pre initialized (Since it is simulated in this case)
27
+ const zkcSimulated = await PGL.SampleData.LoadZKCSimulated();
28
+ // console log this to see how this data is stored
29
+ console.log(zkcSimulated);
30
+ // also as a reference just see how this data is stored
31
+ zkcSimulated.printData();
32
+
33
+ // set the width and height
34
+ const width = 800;
35
+ const heigth = 700;
36
+
37
+ // pass in the graph and the canvas into the drawing object to draw it
38
+ // first get the canvas element
39
+ const canvas = document.getElementById("displayCanvas");
40
+ // then create a graph drawer object
41
+ // to do that first make a options object
42
+ const graphDrawerOptions = {
43
+ graph: zkcSimulated,
44
+ width: width,
45
+ height: heigth,
46
+ canvas: canvas
47
+ };
48
+ // then create the visualization window
49
+ // with those settings
50
+ const graph3d = new PGL.GraphDrawer.GraphDrawer3d(graphDrawerOptions);
51
+ // initialize this object before adding things to it
52
+ await graph3d.init();
53
+
54
+ // Create the 3d elements for the graph
55
+ // first describe a global scaling factor
56
+ const bounds = 1
57
+ // first create all the node elements
58
+ const nodeVisualElements = PGL.ThreeWrapper.DrawTHREEBoxBasedVertices(zkcSimulated, bounds, 0xffffff, 5);
59
+ // add the node elements to the scene
60
+ graph3d.addVisElement(nodeVisualElements);
61
+ // then create the edge elements
62
+ const edgeVisualElements = PGL.ThreeWrapper.DrawTHREEGraphEdgesThick(zkcSimulated, bounds, 0xffafcc, 10);
63
+ graph3d.addVisElement(edgeVisualElements);
64
+
65
+ // then there are two last steps for a 3d graph
66
+ // this is done so that other 3d objects can be added in later
67
+ // since the base library is three.js all standard three js things are possible
68
+ // now moving on to the two steps :
69
+ // make an animation function
70
+ function animate() {
71
+ requestAnimationFrame(animate);
72
+ graph3d.rendercall();
73
+ }
74
+
75
+ // append the graph renderer to the container
76
+ // and then drawing render calls
77
+ animate();
78
+ </script>
79
+ </div>
80
+ </body>
81
+
76
82
  </html>
@@ -1,82 +1,88 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
- <link rel="stylesheet" href="MasterStyle.css">
9
- <title>ZKC3d - Example</title>
10
- </head>
11
-
12
- <body>
13
- <h4>A simple plot of the ZKC Dataset <a href="https://github.com/range-et/PGL/blob/main/public/2_ZKC_edge_bundling.html">Code</a></h4>
14
- <canvas id="displayCanvas" class="displayCanvas"></canvas>
15
- <script type="module">
16
- // import the library
17
- import * as PGL from "../Build/pgl_module.js";
18
-
19
- // construct a simple ZKC graph
20
- // this graph is pre initialized (Since it is simulated in this case)
21
- const zkcSimulated = await PGL.SampleData.LoadZKCSimulated();
22
- // console log this to see how this data is stored
23
- zkcSimulated.printData();
24
-
25
- // set the width and height
26
- const width = 800;
27
- const heigth = 700;
28
-
29
- // pass in the graph and the canvas into the drawing object to draw it
30
- // first get the canvas element
31
- const canvas = document.getElementById("displayCanvas");
32
- // then create a graph drawer object
33
- // to do that first make a options object
34
- const graphDrawerOptions = {
35
- graph: zkcSimulated,
36
- width: width,
37
- height: heigth,
38
- canvas: canvas
39
- };
40
- // then create the visualization window
41
- // with those settings
42
- const graph3d = new PGL.GraphDrawer.GraphDrawer3d(graphDrawerOptions);
43
- // initialize this object before adding things to it
44
- await graph3d.init();
45
-
46
- // Create the 3d elements for the graph
47
- // first describe a global scaling factor
48
- const bounds = 1
49
- // first create all the node elements
50
- const nodeVisualElements = PGL.ThreeWrapper.DrawTHREEBoxBasedVertices(zkcSimulated, bounds, 0xffffff, 3);
51
- // add the node elements to the scene
52
- graph3d.addVisElement(nodeVisualElements);
53
-
54
- const EdgeMap = zkcSimulated.get_edge_map();
55
- const EdgeMap_copy = PGL.Drawing.DisplaceEdgeInY(EdgeMap, 20);
56
- const newEdgeMap = await PGL.Drawing.DrawEdgeBundling(EdgeMap_copy, 50, 10);
57
- // then create the edge elements
58
- // these are the reuglar edges
59
- const edgeVisualElements = PGL.ThreeWrapper.DrawThinEdgesFromEdgeMap(EdgeMap, bounds, 0x62b6cb, 0.01);
60
- graph3d.addVisElement(edgeVisualElements);
61
- // these are the bundled edges
62
- const edgeVisualElements_Bundled = PGL.ThreeWrapper.DrawThickEdgesFromEdgeMap(newEdgeMap, bounds, 0x5fa8d3, 0.01);
63
- graph3d.addVisElement(edgeVisualElements_Bundled);
64
-
65
- // then there are two last steps for a 3d graph
66
- // this is done so that other 3d objects can be added in later
67
- // since the base library is three.js all standard three js things are possible
68
- // now moving on to the two steps :
69
- // make an animation function
70
- function animate() {
71
- requestAnimationFrame(animate);
72
- graph3d.rendercall();
73
- }
74
-
75
- // append the graph renderer to the container
76
- // and then drawing render calls
77
- animate();
78
-
79
- </script>
80
- </body>
81
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <link rel="stylesheet" href="MasterStyle.css">
9
+ <title>Example 2 – Edge bundling</title>
10
+ </head>
11
+
12
+ <body class="example-page">
13
+ <header class="example-header">
14
+ <a href="index.html" class="back-link">← All examples</a>
15
+ <h1>Example 2 – Edge bundling</h1>
16
+ <p class="example-desc">ZKC with curved, bundled edges and vertical displacement (arc-style).</p>
17
+ <a href="https://github.com/range-et/PGL/blob/main/Examples/2_ZKC_edge_bundling.html" class="code-link" target="_blank" rel="noopener">View code</a>
18
+ </header>
19
+ <div class="canvas-wrap">
20
+ <canvas id="displayCanvas" class="displayCanvas"></canvas>
21
+ <script type="module">
22
+ // import the library
23
+ import * as PGL from "../Build/pgl_module.js";
24
+
25
+ // construct a simple ZKC graph
26
+ // this graph is pre initialized (Since it is simulated in this case)
27
+ const zkcSimulated = await PGL.SampleData.LoadZKCSimulated();
28
+ // console log this to see how this data is stored
29
+ zkcSimulated.printData();
30
+
31
+ // set the width and height
32
+ const width = 800;
33
+ const heigth = 700;
34
+
35
+ // pass in the graph and the canvas into the drawing object to draw it
36
+ // first get the canvas element
37
+ const canvas = document.getElementById("displayCanvas");
38
+ // then create a graph drawer object
39
+ // to do that first make a options object
40
+ const graphDrawerOptions = {
41
+ graph: zkcSimulated,
42
+ width: width,
43
+ height: heigth,
44
+ canvas: canvas
45
+ };
46
+ // then create the visualization window
47
+ // with those settings
48
+ const graph3d = new PGL.GraphDrawer.GraphDrawer3d(graphDrawerOptions);
49
+ // initialize this object before adding things to it
50
+ await graph3d.init();
51
+
52
+ // Create the 3d elements for the graph
53
+ // first describe a global scaling factor
54
+ const bounds = 1
55
+ // first create all the node elements
56
+ const nodeVisualElements = PGL.ThreeWrapper.DrawTHREEBoxBasedVertices(zkcSimulated, bounds, 0xffffff, 3);
57
+ // add the node elements to the scene
58
+ graph3d.addVisElement(nodeVisualElements);
59
+
60
+ const EdgeMap = zkcSimulated.get_edge_map();
61
+ const EdgeMap_copy = PGL.Drawing.DisplaceEdgeInY(EdgeMap, 20);
62
+ const newEdgeMap = await PGL.Drawing.DrawEdgeBundling(EdgeMap_copy, 50, 10);
63
+ // then create the edge elements
64
+ // these are the reuglar edges
65
+ const edgeVisualElements = PGL.ThreeWrapper.DrawThinEdgesFromEdgeMap(EdgeMap, bounds, 0x62b6cb, 0.1);
66
+ graph3d.addVisElement(edgeVisualElements);
67
+ // these are the bundled edges
68
+ const edgeVisualElements_Bundled = PGL.ThreeWrapper.DrawThickEdgesFromEdgeMap(newEdgeMap, bounds, 0x5fa8d3, 5);
69
+ graph3d.addVisElement(edgeVisualElements_Bundled);
70
+
71
+ // then there are two last steps for a 3d graph
72
+ // this is done so that other 3d objects can be added in later
73
+ // since the base library is three.js all standard three js things are possible
74
+ // now moving on to the two steps :
75
+ // make an animation function
76
+ function animate() {
77
+ requestAnimationFrame(animate);
78
+ graph3d.rendercall();
79
+ }
80
+
81
+ // append the graph renderer to the container
82
+ // and then drawing render calls
83
+ animate();
84
+ </script>
85
+ </div>
86
+ </body>
87
+
82
88
  </html>