Skip to content

peer-base/peer-star-network-vis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peer-star-network-vis

Peer-* collaboration network visualization.

made by Protocol Labs

Example

Example

const PeerStar = require('peer-star-app')
const NetworkVis = require('peer-star-network-vis')

dApp = PeerStar('my app')
await dApp.start()
collaboration = await dApp.collaborate('collaboration name', ...)

// inside my render function
const svg = document.getElementById('my-svg')

const vis = NetworkVis(collaboration, svg)

// later...

vis.stop()

API

A NetworkVis instance emits the following events:

emit('selected peer', peerId)

When a peer is selected by the user.

emit('peer stats updated', { peerId, stats })

When the stats for a given peer is updated.

The stats object schema is defined in peer-star-app.

License

MIT

About

Peer-* collaboration network visualisation

Resources

Stars

Watchers

Forks

Packages

No packages published