Code Monkey home page Code Monkey logo

helios-web's Introduction

Helios-Web Helios Web demo

Test the preliminary version of Helios Web here:

Light Version Dark Version
No Density Light Dark
Density Light & Density Dark & Density

You an drag and drop your own network in gml, xnet or gexf formats.

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

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

Documentation now available at https://filipinascimento.github.io/helios-web/docs/api/

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

npm run build

Development and testing

To test the environment use npm run 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";
// 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>

You can find a bare-minimal example at https://jsfiddle.net/yatk8jcb/14/ and a more advanced example at https://jsfiddle.net/filsilva/djfomsgw/69/ (Zachary's karate club network).

Full documentation is available at https://filipinascimento.github.io/helios-web/docs/api/

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";

//...

Citing Helios-Web

If you use Helios-Web in your research, please include the following citation in your publication:

Silva, F.N. (2023). Helios-Web (Version 0.7.9) [Computer software].
GitHub. http://heliosweb.io. https://doi.org/10.5281/zenodo.8251049

Note: A paper on Helios-Web is in progress. We will provide an updated citation once the paper is published.

helios-web's People

Contributors

benabus avatar filipinascimento avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

helios-web's Issues

Rendering creates a gap between nodes and edges

There is some gap between nodes and edges when nodes are large in the screen.

image

Can probably be fixed giving a small offset to the edge vOffset or rewriting the fragment shader discard to account for the distance between the node and edge position.

Poor documentation

The documentation is very incomplete. And there is no type declarations. So it's very hard to simply use helios.

  • How do you add labels (tooltips that show up on hover) ?
  • and labels that show up when very zoomed in ? (like this)
  • How do you add a different weight to the nodes ?
  • How can you customise the color of a node ?
  • how can you change the width of an edge ?

Fix for edge width artifact caused by the perspective

A fix is needed for rendering edges.

Screen Shot 2022-01-31 at 3 26 26 PM Screen Shot 2022-01-31 at 3 26 30 PM

As shown in the image, if the position of start and end are similar relative to the camera Right and Up vectors (XY on the view coordinates), it reduces the edge width depending on the angle of view. This is caused by the perspective transformation that happens after projection as objects with similar positions in XY in the view coordinates can still be placed in different positions after perspective correction.

Currently, the viewMatrix is being multiplied to the displacement vector to be written in camera right and up coordinates (see Shaders/edges.js )

I'm not sure how to fix that without doing all the perspective calculations in the shader.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.