[x3d-public] Repairing this Jupyter Notebook is a pain!

Vincent Marchetti vmarchetti at kshell.com
Wed Dec 21 13:27:00 PST 2022


I forgot to mention that the rendering of an .ipynb file on the github page can garble the markup.

A more reliable way to see the notebook as a static rendering is to use the nbviewer page:

https://nbviewer.org/github/vincentmarchetti/web3d2021_jupyter_tutorial/blob/main/HelloWorld.ipynb

to see this HelloWorld style example of putting an X3D scene in a Jupyter notebook

Vince Marchetti


> On Dec 21, 2022, at 4:16 PM, Vincent Marchetti <vmarchetti at kshell.com> wrote:
> 
> A problem with the Jupyter notebook attached in this email was that the entire XML document, including the <xml...> declaration, was inserted into the <x3d> node for X3DOM to interpret, and that failed.
> 
> There seem to be as many ways of inserting an <x3d> node for X3DOM into an notebook as there are authors, but the method I use is illustrated at
> 
> https://github.com/vincentmarchetti/web3d2021_jupyter_tutorial/blob/main/HelloWorld.ipynb 
> 
> which is an attempt at illustrating the intent of John's notebook, to prepare the HelloWorld scene using the X3D python module, and then to render it in the notebook.
> 
> I did note two problems in fully rendering the HelloWorld scene, pertaining to loading the image texture from the web3d.org site
> 1. X3DOM only tries the first URL in the ImageTexture url field
> 2. Even if the web3d.org url is put first, the web3d.org server is not configured to support the strict CORS protocol. As a result, the Firefox brower will retrieve the the image from web3d.org, but will not allow the x3dom code to see that data.
> 
> The notebook referenced above from github will render the earth as a sphere and show the text in the X3D scene.
> 
> Vince Marchetti
> 
> 
> 
> 
> 
>> On Dec 21, 2022, at 5:08 AM, John Carlson <yottzumm at gmail.com> wrote:
>> 
>> 
>> <HelloWorld.ipynb>_______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> 
> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org




More information about the x3d-public mailing list