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 Full 2D Support #24

Open
Flashfyre opened this issue Apr 18, 2020 · 2 comments
Open

Add Full 2D Support #24

Flashfyre opened this issue Apr 18, 2020 · 2 comments

Comments

@Flashfyre
Copy link

I am currently developing my own modifications of this for my project, but I think having full native support for setting numDimensions to 2 would be nice, considering I've found it to be more performant than using the regular 2D Force Graph, at least with my medium-large dataset. By 'full support', I mean disabling rotation, using an orthographic camera instead of a perspective one, making zoom relative to mouse position rather than the viewport center, and similar functionalities that make it act more like the 2D version of Force Graph while also using ThreeJS.

This is the app I am currently using Force Graph in. It has a 2D mode that uses the regular Force Graph, and a 3D mode that uses the 3D one. On my phone, 2D mode is so slow it's unusable, while 3D runs just fine. Both could be further optimized, but I believe there are definitely some advantages to the way the ThreeJS implementation is rendered that can make it more performant for larger datasets.

@sirrodgepodge
Copy link

sirrodgepodge commented Apr 29, 2020

I have a similar use case, ran into similar performance constraints, found this for converting to orthographic camera, I think it could be useful here:
https://stackoverflow.com/questions/48758959/what-is-required-to-convert-threejs-perspective-camera-to-orthographic

btw this PR is for controlling mouse interactions:
vasturiano/three-render-objects#5

@sirrodgepodge
Copy link

I actually too a stab at orthographic camera with that SO post here:
vasturiano/three-render-objects#6

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