x3dom / x3dom

X3DOM. A framework for integrating and manipulating X3D scenes as HTML5/DOM elements.
http://x3dom.org
Other
815 stars 271 forks source link

Using an older custom version of x3dom #1276

Closed Markus-4DRL closed 1 year ago

Markus-4DRL commented 1 year ago

Hello, I have some issues recently with including external .x3d models via inline tags, as described here https://doc.x3dom.org/tutorials/models/inline/index.html.

We are using the same library as http://vnhm.de/VNHM/index.php, to both render volumetric data, and load 3D models via the .x3d method. This library is based on X3DOM 1.7.2.

However, although locally building everything went fine (using live server), when I put it online the .x3d models did not render. Interestingly enough, your deer.x3d does render, but only if I use the url directly copied from your website. If I use that exact model on our own site, that also does not work, without changing anything for the rest.

Do you have any idea what this could be? I'll be working on recreating this issue in a clean version of the app, and try to pinpoint the problem.

Thank you very much in advance.

andreasplesch commented 1 year ago

Perhaps a CORS problem with the Inlines ? You may have to configure your server for CORS. Are there console message or debug messages ( press 'd' ) ? <Inline crossOrigin='anonymous' .. may help.

Markus-4DRL commented 1 year ago

Unfortunately this does not solve the issue yet. I'm used to seeing a very clear message in the console whenever there is a CORS problem. On my project the X3DOM debug hasn't been working, but I have been recreating the issue trying to combine the inline test on the X3DOM site with the custom version: https://4dresearchlab.nl/dierenmummies/app3/inline/example.html

andreasplesch commented 1 year ago

You could use the css for 1.7.2 : https://x3dom.org/download/1.7.2/x3dom.css. I believe the debug console will then show. It has the line: ERROR: XHR status: 404 - XMLHttpRequest requires web server running!

The Network panel in devtools shows:

Request URL: https://4dresearchlab.nl/dierenmummies/app3/inline/models/Deer.x3d Request Method: GET Status Code: 404 Remote Address: 145.92.238.241:443 Referrer Policy: strict-origin-when-cross-origin

https://corsproxy.io/?https%3A%2F%2F4dresearchlab.nl%2Fdierenmummies%2Fapp3%2Finline%2Fmodels%2FDeer.x3d

gives a warning about hotlinking. The server refuses to serve the file. More analysis would probably involve the server configuration.

Markus-4DRL commented 1 year ago

Thank you for your feedback! I was also considering whether it the 404 was caused in a similar way as https://github.com/x3dom/x3dom/issues/531

However, no solution worked. Then, I changed the inline node in the custom library to the node of a more recent version of x3dom. Now it works! If I blew up something else by accident by replacing that node, I'll come back later :)

andreasplesch commented 1 year ago

Super. Glad you found a solution.