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

John Carlson yottzumm at gmail.com
Wed Dec 21 20:42:58 PST 2022


I'm going to swap back to brython instead of nbviewer or binder. Do you
have any experience with brython, Vince?  I'll contact my Germany brython
contact if he's available now.

On Wed, Dec 21, 2022 at 3:27 PM Vincent Marchetti <vmarchetti at kshell.com>
wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20221221/56268a89/attachment.html>


More information about the x3d-public mailing list