Comments (18)
I could help with something but we should first split it in a separete module: #63
from webtorrent.io.
@roccomuso If you want to send improvements here first, I can publish it a separate module in a few days.
from webtorrent.io.
@feross I'm working on this features.
Here https://github.com/roccomuso/webtorrent-www/commit/2bbe5b02b3d2016ef2f7833cb440aece502b3476 the change of node color depending on seed/leech state. Is graph.seed('id', true/false);
acceptable as API?
I've noticed also that the choke and unchoke methods need to be completed. Choking acts on the link and not on the node itself right? We could change the line color or something like that?
from webtorrent.io.
I think that API works!
I think making the line more transparent when we're choked would be good.
from webtorrent.io.
ok thanks for the tip, I'm on it right now... ;)
By the way I'm introducing a new dependency: https://github.com/avoidwork/filesize.js
It's a few lines browserified but provides a pratical way to show and work with transfer rate and byte size conversion.
from webtorrent.io.
@roccomuso We use prettier-bytes
throughout the webtorrent projects. Please use that to avoid sending extra code to people's browsers 👍
from webtorrent.io.
@feross Alright, now using prettier-bytes
.
Check out the new feature: show transfer rate between nodes (by changing thickness of line) - https://github.com/roccomuso/webtorrent-www/commit/0e67935bf0186ff7cc00ea4ef5cf488cbe7e7b00
The API is: graph.rate('Peer1', 'Peer2', 256 * 1000);
, where the last param is a number expressed in bytes.
On the top of the lib in the COLORS variable I've defined some properties required to "map" the transfer rate to the line thickness.
from webtorrent.io.
Screenshot?
from webtorrent.io.
@feross As you can see the link gets thicker and thinner, changing every second his transfer rate to:
- 150 KB/s.
- 500 KB/s.
- 2.5 MB/s.
- 5 MB/s.
- 2.5 MB/s.
- 1 MB/s.
from webtorrent.io.
That's nice. Can you send a PR?
from webtorrent.io.
@feross yes sure. Couldn't be first splitted it in a separate module? So that I can write also the API documentation in a README.md.
from webtorrent.io.
Sure, I'll do that now and add you as GitHub collaborator and npm owner.
from webtorrent.io.
@feross thanks, let me know ;)
from webtorrent.io.
Okay, it's published as p2p-graph
: https://github.com/feross/p2p-graph I added you to the repo/package.
from webtorrent.io.
Here's a PR to make webtorrent-www
use p2p-graph
: #105
from webtorrent.io.
ok, I think you can merge the PR. I'm gonna push directly on the p2p-graph repo.
from webtorrent.io.
@roccomuso Nice. Please still send PRs to the p2p-graph
repo so there's a chance for other contributors and I to give feedback before merging.
from webtorrent.io.
@feross ok cool! I've sent the PR.
from webtorrent.io.
Related Issues (20)
- CDN and NPM module won't load HOT 1
- Web services are broken or offline. HOT 1
- Action required: Greenkeeper could not be activated 🚨
- Do not autoplay if video is not onscreen HOT 1
- An in-range update of semver is breaking the build 🚨 HOT 2
- Homepage video is blocked by Chrome (for autoplaying audio) HOT 1
- Cannot download this torrent ! HOT 1
- An in-range update of nodemon is breaking the build 🚨 HOT 4
- An in-range update of brfs is breaking the build 🚨 HOT 2
- An in-range update of highlight.js is breaking the build 🚨 HOT 6
- Add Hubzilla To F.A.Q. HOT 2
- Remove Google Analytics
- Dont download without my permission - Landing page 120mb! HOT 3
- Is there any install guide? HOT 1
- NET::ERR_CERT_INVALID on WebTorrent.io HOT 8
- Dependency Dashboard
- Error sending telemetry Error: certificate has expired HOT 1
- Improve Time to First Frame HOT 7
- Docs outdated
- I am trying to create my torrent browser client and that can accept all types of torrent/magent links from places like iptorrents, piratebay, etc. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtorrent.io.