GithubHelp home page GithubHelp logo

Comments (6)

vasturiano avatar vasturiano commented on June 24, 2024

@eric-schleicher that's a great question. The challenge lies in the object references, because aframe (used by the underlying component) needs to serialize all accessor properties to strings, so they can be specified in the html. Therefore using references won't work.

On the other hand, this would be quite doable in the webgl version, since this restriction doesn't exist there: https://github.com/vasturiano/3d-force-graph.
It would be just a matter of exposing a mesh accessor property.

What's the particular use case for which you need this functionality?

from 3d-force-graph-vr.

eric-schleicher avatar eric-schleicher commented on June 24, 2024

I find myself wanting for personal organization and mind mapping solution and haven't found anything that lets me organize quite the way i would like to (in VR). I would like to come up with a way to create mind maps and use (proxy) representations of node with arbitrary 3d models. and then be able to change those from "thumbnail" models to "scenes" as the used chooses to get closer or interact with it.

Unfortunately i don't have the time to work one something like that. but it would be awesome.

from 3d-force-graph-vr.

vasturiano avatar vasturiano commented on June 24, 2024

@eric-schleicher I've just added a new feature nodeThreeObject, which allows for custom node objects. See here for an example: https://vasturiano.github.io/3d-force-graph-vr/example/custom-node-geometry/.

Let me know if this helps your case.

from 3d-force-graph-vr.

eric-schleicher avatar eric-schleicher commented on June 24, 2024

OK that's awesome! I will definitely use it

looking at the page's source this is not an a-frame component but the webGL. given what you wrote about the accessor properties, is there any way to ultimately have this work in a-frame?

I'm about to start a project what c/would use this but I'm leaning on starting with a-frame.

from 3d-force-graph-vr.

vasturiano avatar vasturiano commented on June 24, 2024

@eric-schleicher actually it is still using a-frame. The trick is to serialize the functions into the html attributes:
https://github.com/vasturiano/3d-force-graph-vr/blob/master/src/3d-force-graph-vr.js#L137

And then unserialize it on the a-frame component side:
https://github.com/vasturiano/aframe-forcegraph-component/blob/master/index.js#L19

The catch with this approach is that your functions need to be pure and don't access any local state external to the function, because they're re-instantiated (and called) in a different context then where they're defined.

from 3d-force-graph-vr.

eric-schleicher avatar eric-schleicher commented on June 24, 2024

Ok that makes sense. I'll likely have some question(s) in the next month.

This is great!

from 3d-force-graph-vr.

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.