- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

https://x3dom.netlify.com/x3dom.min.js and https://x3dom.netlify.com/x3dom-full.min.js are available for further testing

Does anyone know if anything significant was changed 1.7.2 -> 1.8.0 regarding loading from http using inline/url? I can reproduce a specific case where loading with 1.7.2 works but 1.8.0 just displays the spinning progress.

Found it: now have to use contentType='model/x3d+xml' on the inline node if file is not ending with .x3d

Hi all, I am attempting to look for an alternative JS library to calculate rotation angles for d3-x3d Vecotor chart arrows (https://github.com/jamesleesaunders/d3-x3d/blob/master/src/component/vectorFields.js).

Example: https://raw.githack.com/jamesleesaunders/d3-x3d/master/examples/X3DOM/chart/VectorFieldChart.html

At the moment I use x3dom's built-in vector functions to calcuate arrow rotations, but I am attempting to make d3-x3d agnostic of X3D viewer, so it will be compatible with both X3DOM and X_ITE and not rely on x3dom, I therefore would like to use the more generic math.gl NPM library for vector maths.

I have put together some example tests on Observable https://observablehq.com/@jamesleesaunders/calculating-vector-rotations

can anyone help work out how to use math.gl to calculate these rotations?

This is not that I am dropping the ball on x3dom of course! This is just that I want to use something more re-usable.

Thanks Andreas, I have had a play with gl-matrix also and I am afraid I am still lost :-( I have added to my notebook https://observablehq.com/@jamesleesaunders/calculating-vector-rotations

I am obviously missing something here as I just cant seem to get the same results as x3dom?

Maybe I am looking at this the wrong way.

Given 2 vectors 1: pointing up (0,1,0) and the other pointing else where (-0.125, 0.125, 0) what translation rotation values do I need?

(The rotation for each arrow in the vector chart https://github.com/jamesleesaunders/d3-x3d/blob/master/src/component/vectorFields.js)

for .rotationTo the inputs need to be unit vectors, and you want to convert to axisangle from quaternion.

And now the vector field chart works on both x3dom and x_ite https://raw.githack.com/jamesleesaunders/d3-x3d/master/examples/X_ITE/chart/VectorFieldChart.html

Question is: how can I query the x3d object for the current user camera coordinates (viewpoint and view direction), then re-apply the same viewpoint and view direction after reloading the scene?

Hi Dave, this may not be exactly what you are after but as a starter for 10 you could look at the syncViewpoints() code at the bottom of https://github.com/jamesleesaunders/d3-x3d/blob/master/examples/X3DOM/component/Showcase.html

This is an example of grabbing the viewpoint values, and then re-using them again on a different chart.

(BTW You don’t necessarily need to send to mailing list as this Gitter forum is automatically replicated on the mailing list also.)

Thanks James, I see the behavior is that changing viewpoint on one chart will apply the same viewpoint to all the charts. The syncViewpoints(e) function takes that "e" argument - where does the "e" come from, exactly? Is that an event or a viewpoint object? Is it getting bound automatically by the viewpoint which is listening for the viewpointChanged event?

So, the orientations in x3dom are given as axis ([0]) and rotation angle ([1]). Of course that makes sense, it's the same representation as in X3D..

I could load gendl on jupyter notebook with a common lisp kernel: https://github.com/yitzchak/common-lisp-jupyter

and quicklisp:

```
(ql:quickload :gendl)
(gendl:start-gendl!)
```

x3dom now also supports a good part of the X3D Nurbs component which may be interesting to gendl.

@andreasplesch Happy to hear that Gendl loaded and started without issues in Jupyter. Which CL implementation is it? From the little I've heard of Jupyter, using Gendl inside Jupyter sounds interesting for sure. I haven't really looked at Jupyter at all yet. So far we just deploy Gendl as a traditional web application server, with its built-in CL-based webserver, and old-school Emacs/Slime as IDE. Rendering a simple box indeed sounds like the next logical step, if your goal is to embed dynamic Gendl models inside a Jupyter notebook. Gendl's online demos and documentation are somewhat lacking and out of date at present; we are working to correct that as soon and as nicely as possible. In the meantime, please reach out to me directly with any issues or if you'd like to discuss ideas for next steps (and let me know here if you need contact info).

Just exploring at this point. https://github.com/yitzchak/common-lisp-jupyter/blob/master/Dockerfile installs most CLs and then uses SBCL. I am not versed enough to tell from the REPL/Jupyter notebook if that CL is actually then used.

e who are here only for x3dom..

To check which CL is running, you can try

(lisp-implementation-type) ;;and

(lisp-implementation-version)

I've just converted some VRML files to X3D to display with X3DOM. They aren't showing up correctly, so I'm looking for some troubleshooting. Instead of typing up all the links and details, I've put up a tagged question here https://stackoverflow.com/questions/59920017/where-are-the-issues-in-this-conversion-from-vrml-to-x3d