Code Monkey home page Code Monkey logo

Comments (10)

vasturiano avatar vasturiano commented on July 19, 2024

@PixDay thanks for reaching out.

For that type of setup I would suggest to consume from the lower-level three-force-graph. That gives you full freedom to setup your camera/scene/renderer the way you prefer, including making the camera a stereo camera instead of perspective.

from 3d-force-graph.

PixDay avatar PixDay commented on July 19, 2024

I don't see how or where I can change the camera that is set by default in the ForceGraph3D is it what you are refering too?

from 3d-force-graph.

vasturiano avatar vasturiano commented on July 19, 2024

I'm referring to using the three-force-graph module instead of this one 3d-force-graph.

from 3d-force-graph.

PixDay avatar PixDay commented on July 19, 2024

I see, it wont work easily for me and my project, I'm using a lot of feature present in the 3d-force-graph, if you have any other idea on how to make that work otherwise I will just close this issue.

Thanks for the help

from 3d-force-graph.

vasturiano avatar vasturiano commented on July 19, 2024

@PixDay what's an example of a feature that you need from 3d-force-graph?

Swapping the perspective camera with a stereo camera is not as easy as just instantiating a different camera class, because things like TrackballControls don't really work out of the box when using a different camera type. That's why for these cases it's better to craft your own custom ThreeJS scaffolding so that you can customize it to your needs. I can't see another way to do it.

from 3d-force-graph.

PixDay avatar PixDay commented on July 19, 2024

It's possible to have 2 cameras on one graph scene? So I can play with angles to create my effect

An other idea would be to have an array of domElement ForceGraph3d({ configOptions })(<domElement>) to display multiple time the same graph in different canvas.

from 3d-force-graph.

vasturiano avatar vasturiano commented on July 19, 2024

All of those options are possible if you setup your own scene and use three-force-graph.

from 3d-force-graph.

PixDay avatar PixDay commented on July 19, 2024

It's not possible to add a second camera in ForceGraph3d ?

from 3d-force-graph.

vasturiano avatar vasturiano commented on July 19, 2024

Not as it stands currently, no. The setup in 3d-force-graph is intended as the most common use case of the ThreeJS scene/camera scaffolding, so that the consumer doesn't have to do it repeatedly. Having more than one camera is not really part of this common case, and for these custom cases the most flexible approach is to manage your own scaffolding.

from 3d-force-graph.

PixDay avatar PixDay commented on July 19, 2024

I had an idea that worked for me, is to create a THREE scene, and add referenced threeObject inside the scene to keep it sync and then add 2 cameras so it's working

Thanks for the help

from 3d-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.