https://github.com/peer-base/peer-star-network-vis
Peer-* collaboration network visualisation
https://github.com/peer-base/peer-star-network-vis
Last synced: 18 days ago
JSON representation
Peer-* collaboration network visualisation
- Host: GitHub
- URL: https://github.com/peer-base/peer-star-network-vis
- Owner: peer-base
- Created: 2018-08-16T11:36:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T12:02:23.000Z (almost 8 years ago)
- Last Synced: 2025-02-17T16:05:51.428Z (over 1 year ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# peer-star-network-vis
[Peer-*](https://github.com/ipfs-shipyard/peer-star-app) collaboration network visualization.
[](https://protocol.ai)

## Example
```js
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`](github.com/ipfs-shipyard/peer-star-app#readme).
## License
MIT