<div dir="ltr"><div dir="ltr"><div dir="ltr"><div># Main x3d.py app goes here.</div><div><br></div><div># Call this file HelloWorld.py</div><div><br></div><div># I can't set up a web host for this yet.  I use localhost/firefox</div><div><br></div><div># Set a time for a zoom meeting!</div><div><br></div><div># I did get the demo.html file working in brython. That's good news.</div><div><br></div><div># it's been a long time since I used x3dom, forgot all about showLog!</div><div><br></div><div><br></div><div><br></div><div><br></div><div>######################</div><div># Main display code. Should display earth, but wipes out canvas, I think.</div><div># Goes in HelloWorld.py too</div><div>######################</div><div><br></div><div>from browser import document</div><div><br></div><div>def change(event):</div><div>    src =  newModel.Scene.HTML5()</div><div>    print(src)</div><div>    document.getElementById("zone1").innerHTML = src</div><div>    document.getElementById("zone2").text = "window.x3dom.reload();"</div><div><br></div><div>document["button1"].bind("click", change)</div><div><br></div><div><!--###################################</div><div># Web page. Save to index.html</div><div>###################################--></div><div><br></div><div><div><!doctype html></div><div><html></div><div>  <head></div><div>   <meta charset="utf-8"/></div><div>    <link rel="stylesheet" type="text/css" href="<a href="https://www.x3dom.org/download/dev/x3dom.css">https://www.x3dom.org/download/dev/x3dom.css</a>"></link></div><div>    <script type="text/javascript" src="<a href="https://www.x3dom.org/download/dev/x3dom-full.debug.js">https://www.x3dom.org/download/dev/x3dom-full.debug.js</a>"></script></div><div>   <script type="text/javascript" src="brython.js"></script></div><div>   <script type="text/javascript" src="brython_stdlib.js"></script></div><div></head></div><div><body onload="brython(1)"></div><div><button id="button1">Press Button to Load Scene</button></div><div><x3d id="zone1" class="zone" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" profile="Immersive" version="3.3" xsd:noNamespaceSchemaLocation="<a href="http://www.web3d.org/specifications/x3d-3.3.xsd">http://www.web3d.org/specifications/x3d-3.3.xsd</a>" showStat="false" showLog="true" width="300px" height="300px" backend="webgl"></div><div></x3d></div><div><script type="text/python" src="HelloWorld.py"></div><div></script></div><div><script type="text/javascript" id="zone2"></div><div></script></div><div></body></div><div></html></div></div></div></div></div>