<div dir="ltr"><div dir="ltr">Joe, here is github repo:<div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/tree/master/hello">https://github.com/coderextreme/X3DJSONLD/tree/master/hello</a><br></div><div><br></div><div>Call me if you need any help setting it up (checkout README.txt). The key is to have python 3 on your system, so you can run a webserver (you can CTRL-C to get out) in the project directory.</div><div><br></div><div>Also, it looks like brython.js needs an upgrade, so I'll be working on that.</div><div><br></div><div>John</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 6, 2023 at 4:06 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre>Here's what you put at the bottom of your python file, weblogo.py:</pre><pre><br></pre><pre># newModel is your main X3D top-level model object.</pre><pre><br></pre><pre>######################################################</pre><pre>from browser import document
def change(event):
src = newModel.Scene.HTML5()
document.getElementById("zone1").html = src
document.getElementById("zone2").text = "window.x3dom.reload();"
document["button1"].bind("click", change)</pre><pre><br></pre><pre><-----------------Example HTML below----------------></pre><pre><br></pre><pre><pre id="m_-187529783942286787gmail-line1"><span><!doctype html></span>
<span id="m_-187529783942286787gmail-line2"></span><<span>html</span>>
<span id="m_-187529783942286787gmail-line3"></span> <<span>head</span>>
<span id="m_-187529783942286787gmail-line4"></span> <<span>meta</span> <span>charset</span>="<a>utf-8</a>"/>
<span id="m_-187529783942286787gmail-line5"></span> <<span>link</span> <span>rel</span>="<a>stylesheet</a>" <span>type</span>="<a>text/css</a>" <span>href</span>="<a>https://www.x3dom.org/download/1.8.2/x3dom.css</a>"><span title="Stray end tag “link”."></<span>link</span>></span>
<span id="m_-187529783942286787gmail-line6"></span> <<span>script</span> <span>type</span>="<a>text/javascript</a>" <span>src</span>="<a>https://www.x3dom.org/download/1.8.2/x3dom-full.debug.js</a>"></<span>script</span>>
<span id="m_-187529783942286787gmail-line7"></span> <<span>script</span> <span>src</span>="<a>https://code.jquery.com/jquery-3.6.0.min.js</a>" <span>integrity</span>="<a>sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=</a>" <span>crossorigin</span>="<a>anonymous</a>"></<span>script</span>>
<span id="m_-187529783942286787gmail-line8"></span> <<span>script</span> <span>type</span>="<a>text/javascript</a>" <span>src</span>="<a>brython.js</a>"></<span>script</span>>
<span id="m_-187529783942286787gmail-line9"></span> <<span>script</span> <span>type</span>="<a>text/javascript</a>" <span>src</span>="<a>brython_stdlib.js</a>"></<span>script</span>>
<span id="m_-187529783942286787gmail-line10"></span></<span>head</span>>
<span id="m_-187529783942286787gmail-line11"></span><<span>body</span> <span>onload</span>="<a>brython(1)</a>">
<span id="m_-187529783942286787gmail-line12"></span><<span>button</span> <span>id</span>="<a>button1</a>">Press Button to Load Scene</<span>button</span>>
<span id="m_-187529783942286787gmail-line13"></span><<span>x3d</span> <span>xmlns:xsd</span>="<a>http://www.w3.org/2001/XMLSchema-instance</a>" <span>profile</span>="<a>Immersive</a>" <span>version</span>="<a>3.3</a>" <span>xsd:noNamespaceSchemaLocation</span>="<a>http://www.web3d.org/specifications/x3d-3.3.xsd</a>" <span>width</span>="<a>300px</a>" <span>height</span>="<a>300px</a>" <span>backend</span>="<a>webgl</a>">
<span id="m_-187529783942286787gmail-line14"></span><<span>scene</span> <span>id</span>="<a>zone1</a>" <span>class</span>="<a>zone</a>"></<span>scene</span>>
<span id="m_-187529783942286787gmail-line15"></span></<span>x3d</span>>
<span id="m_-187529783942286787gmail-line16"></span><<span>script</span> <span>type</span>="<a>text/python</a>" <span>src</span>="<a>weblogo.py</a>">
<span id="m_-187529783942286787gmail-line17"></span></<span>script</span>>
<span id="m_-187529783942286787gmail-line18"></span><<span>script</span> <span>type</span>="<a>text/javascript</a>" <span>id</span>="<a>zone2</a>">
<span id="m_-187529783942286787gmail-line19"></span></<span>script</span>>
<span id="m_-187529783942286787gmail-line20"></span></<span>body</span>>
<span id="m_-187529783942286787gmail-line21"></span></<span>html</span>>
<span id="m_-187529783942286787gmail-line22"></span></pre></pre></div></div></div>
</blockquote></div>