这是indexloc提供的服务,不要输入任何密码
Skip to content

jisungyoon/helios-web

 
 

Repository files navigation

Helios Web

Helios Web demo

Helios Web is a web-based library to visualize dynamic networks in real-time. Currently under development it aims to provide a simple API and optimized implementation to be integrated in other systems and render and layout large networks. This is the sucessor to the Networks 3D project and the Networks Web project.

Check out the demo https://filipinascimento.github.io/helios-web/docs/example/

More demos:

Network light light+2D dark dark+2D dark+blend dark+blend+2D
Watts-Strogatz light light+2D dark dark+2D dark+blend dark+blend+2D
Facebook Egos light light+2D dark dark+2D dark+blend dark+blend+2D
Rewired Voronoi light light+2D dark dark+2D dark+blend dark+blend+2D
US Airports light light+2D dark dark+2D dark+blend dark+blend+2D
Global Airports light light+2D dark dark+2D dark+blend dark+blend+2D
Protein-protein light light+2D dark dark+2D dark+blend dark+blend+2D
Erdos collaboration light light+2D dark dark+2D dark+blend dark+blend+2D
Europe roads light light+2D dark dark+2D dark+blend dark+blend+2D
Wiki Sciences* light light+2D dark dark+2D dark+blend dark+blend+2D
Wiki Sciences (small) light light+2D dark dark+2D dark+blend dark+blend+2D
APS Citations* light light+2D dark dark+2D dark+blend dark+blend+2D
COVID Citations* light light+2D dark dark+2D dark+blend dark+blend+2D

* huge, may need a good CPU/GPU (press space to enable the layout algorithm)

Building

First install packages

npm install

Build

npx snowpack build

Development and testing

To test the environment use npm start or npx snowpack dev. Then go to http://localhost:8080/docs/example/ in your browser (or use the provided hostname and port).

Usage

To use it in your project you can load it as a module in modern browsers via skypack:

<script type="module">

import {Helios} from "https://cdn.skypack.dev/helios-web?min";
// Currently not working. please download and follow the build instructions.
// This will be fixed in the next release

// Nodes are dictionaries (any key can be used as node properties)
let nodes = {
  "0": {
    label: "Node 0",
  },
  "1": {
    label: "Node 1",
  },
  "2": {
    label: "Node 2",
  },
}

// Edges are arrays of node ids
let edges = [
  {
    source: "0",
    target: "1",
  },
  {
    source: "1",
    target: "2",
  },
  {
    source: "2",
    target: "0",
  }
];

let helios = new Helios({
		elementID: "netviz", // ID of the element to render the network in
		nodes: nodes, // Dictionary of nodes 
		edges: edges, // Array of edges
		use2D: false, // Choose between 2D or 3D layouts
	});

</script>

Helios web is also available as a npm package:

npm install helios-web

then you can use it in your project by importing using the same syntax as above:

import {Helios} from "helios-web";

//...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.5%
  • GLSL 7.5%