<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Thanks Andreas,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have forwarded this message to Don so he can make enhancements to X3DJSAIL.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Sent: </b>Tuesday, May 28, 2019 2:12 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] jupyter notebook</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi John, group,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I tried image textures and inlines with x3dom on jupyterlab:</p><p class=MsoNormal>https://mybinder.org/v2/gh/andreasplesch/conda/master/?urlpath=lab/tree/sphere.ipynb</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Run all cells.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here are some observations and a suggestion:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>- inline works. But jupyterlab serves local files from a folder above</p><p class=MsoNormal>the folder where the notebook and resources are stored and so the</p><p class=MsoNormal>relative url to the inline starts with "./files/"</p><p class=MsoNormal>- generated X3D with ImageTexture used within an Inline works. Here</p><p class=MsoNormal>the url to the image is relative to the inline url, and so does not</p><p class=MsoNormal>need the "./files/" prefix</p><p class=MsoNormal>- x3dom has a problem with generated X3D outside of an Inline because</p><p class=MsoNormal>the serialized XML output uses self-closing tags such as <Material /></p><p class=MsoNormal>which is not HTML compatible.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So the suggestion would be to provide a method, say</p><p class=MsoNormal>x3d.toStringX3DClosingTags(), which generates explicit closing tags:</p><p class=MsoNormal><Material></Material></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-Andreas</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On Thu, May 23, 2019 at 5:34 PM Andreas Plesch <andreasplesch@gmail.com> wrote:</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Hi John,</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> the mybinder notebooks are not permanent. Saving only works for one session.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> The .toFileX_ITE() generated html has too much styling to be useful for jupyter.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> But just manually creating the proper minimal HTML, similar to x3dom, works better, after generating the x3d as file in the docker instance.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Unfortunately, the html served in the HTML display does not use the local home as root, so it is not possible to just point to the x3d file as a relative url.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> I added a couple of attempt to use x_ite to the jupyter notebook here:</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> https://mybinder.org/v2/gh/andreasplesch/conda/master/?urlpath=lab/tree/sphere.ipynb</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> but had to give up.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> x_ite works in an iframe with a accessible, remote url but does not work with a local url, in jupyterlab on mybinder. Perhaps it works on a local install.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Maybe I will try and see if textures and inlines work in x3dom on jupyter.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Cheers, Andreas</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> On Wed, May 22, 2019 at 11:37 AM John Carlson <yottzumm@gmail.com> wrote:</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > I welcome feedback on this X_ITE version, in a second notebook in your binder.  I merely stepped into the XML output 140 characters to arrive at something I could put between X3DCanvas tags.</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> > I’m not sure if this link will get you there, but it got me there.  I think the notebook is titled x_ite_sphere.ipynb.</p><p class=MsoNormal>> ></p><p class=MsoNormal>> > https://hub.mybinder.org/user/andreasplesch-conda-vpb30a9r/lab</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> > Needs debugged.  I don’t quite know what’s missing, looks like shaders.   See console log.</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> > Probably we need a released version?</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> > Twitter keeps the first 140 characters, and we drop them.   Heh!</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> > All the more reason to pass parameters or provide alternative functions.</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> > John</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> > Sent from Mail for Windows 10</p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal>> ></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>