Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add particles in the link #33

Closed
SailinZh opened this issue Feb 23, 2018 · 2 comments
Closed

Add particles in the link #33

SailinZh opened this issue Feb 23, 2018 · 2 comments
Assignees

Comments

@SailinZh
Copy link

Thank you for the fantastic library.

I'm looking to add moving particle systems within the links like the photon animation in this video: https://www.youtube.com/watch?v=JsEm-CDj4qM. Would it be possible?

@vasturiano
Copy link
Owner

That looks beautiful @SailinZh, thanks for sharing.

To add the additional elements, I'd recommend you use the lower level three-forcegraph Three component instead. That will allow you to combine the new photon particles with the nodes/links generated by the force-directed engine.

You can access the current coordinates of the nodes as x, y, and z attributes of the objects.

You'd also need to take care of the render/scene/camera scaffolding, but there's an example here to guide you, if you need:
https://github.com/vasturiano/three-forcegraph/blob/master/example/basic/index.html

@vasturiano vasturiano self-assigned this Feb 23, 2018
@vasturiano
Copy link
Owner

@SailinZh I add a shot at this and added the feature to have moving particles indicate the directionality of links, since it was a needed feature of the library anyway.

Working example here:
https://vasturiano.github.io/3d-force-graph/example/directional-links/

This is achieved via the new component methods: linkDirectionalParticles, linkDirectionalParticleSpeed, linkDirectionalParticleWidth and linkDirectionalParticleResolution.

Let me know if this works for you. And thanks again for suggesting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants