Closed smoes closed 6 years ago
I just noticed that it isn't possible to create a custom link three object. This will make it certainly hard to animate edges at all, right?
Hi @smoes. Correct, currently you can't supply a custom link object, at least not the same way that it's possible with nodes. The lib generates either plain line or cylinder objects that you can configure via the props linkColor
, linkOpacity
, linkWidth
, linkResolution
, etc.
However, if you just wish to animate color, you don't need to supply a custom object, you can simply change the values of linkColor
from inside the tween cycle and the graph will react.
Reg your question about accessing the renderer, you may not need it if you follow the route above, but just in case, this issue response may be of help: https://github.com/vasturiano/3d-force-graph/issues/38
Thanks for your fast answer. I now went with downloading the sources for 3d-force-graph and three-forcegraph to access the renderer and to change the link mesh. It was quite tricky since the tweening material must be stored to be re-used in every update cycle. I had some troubles with your kapsule-methodology. It feels a little over-engineered. However, as a mainly functional programmer I begin to like passing around the state object ;)
Good work, keep it up.
I am trying to animate edges (fading color).
In conjunction with three.js I found GSAP's TweenLite. However, for integrating TweenLite, the renderer must be accessible and on each tick update must be callable.
Is there a way to access the renderer? Is there an easier way to animate edges (e.g. fading color)?