Comments (6)
@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.
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.
@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.
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.
@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.
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)
- Graph disappears when in VR mode? HOT 1
- import ForceGraphVR in js module gives multiple instances of Three.js imported and A-frame <script>in head warnings HOT 2
- Adding <!DOCTYPE html> at the top of the source code causes basic example to fail HOT 2
- Nodes names not displayed HOT 4
- Text + Nodes causes errors HOT 1
- Not sure how to add a bg video HOT 4
- Movement doesn't work on Oculus HOT 1
- Differentiating same name nodes HOT 1
- Graph with ~150 nodes and ~300 crashes HOT 2
- How to render an image sprite and display text at the same time ?
- How to make the nodes look at the camera at all times without calling refresh ? HOT 4
- Node Labels not Displayed on Mobile HOT 4
- Background Image option instead of background color HOT 1
- Click to expand / collapse in VR?
- interaction to nodes
- Cannot read properties of undefined (reading 'xr') HOT 1
- Is there a way to render the passthrough background for XR headsets (e.g. Oculus Pro)? HOT 1
- Mobile navigation HOT 1
- Which combination to get started HOT 2
- Re-enable touch screen movement controls? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3d-force-graph-vr.