Giter VIP home page Giter VIP logo

Comments (3)

vasturiano avatar vasturiano commented on May 14, 2024

Hi @Benkevych, thanks for the report. The visual artifacts you see are due to three.js dificulty with transparent object. Some background here: https://stackoverflow.com/questions/15994944/transparent-objects-in-threejs/15995475#15995475

Long story short, just add depthWrite: false to your link custom material and it should fix it.

from react-force-graph.

Benkevych avatar Benkevych commented on May 14, 2024

@vasturiano well, this is not the best solution, because it results some wierd illusions)
screen shot 2018-05-08 at 12 32 03

from react-force-graph.

vasturiano avatar vasturiano commented on May 14, 2024

Yes, it does cause some Escher-like effects, because the depth buffer computation is being bypassed.
This is a hard problem, rooted in three.js and WebGL.

An alternative work-around I would suggest for your case is to simply make your hidden (opacity=0) links as thin as possible (but not 0). Something like:

linkWidth={link => isHidden(link) ? 0.01 : normalWidth}

This will minimize the visual impact of the gaps, hopefully to a point that is neglectable.

from react-force-graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.