<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>Here’s another example (HelloWorld.kwargs.py). (pardon excessive meta objects, they were in the original). This one nearly compiles. Can some small changes allow this to compile under vpython/glowscript? Thanks! If there are small changes, I will proceed to adapt to the vpython/glowscript 3D API in hopes that we can standardize it (write a specification for the API). If there are larger changes, then I will attempt to write an X3D API on top of vpython/glowscript 3D API</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>from X3Dpackage import *</p><p class=MsoNormal>X3D0 = X3D(profile="Immersive", version="3.3", Head = head(</p><p class=MsoNormal> Meta = [meta(content="HelloWorld.x3d", name="title"),</p><p class=MsoNormal> meta(content="Simple X3D scene example: Hello World!", name="description"),</p><p class=MsoNormal> meta(content="30 October 2000", name="created"),</p><p class=MsoNormal> meta(content="14 April 2017", name="modified"),</p><p class=MsoNormal> meta(content="Don Brutzman", name="creator"),</p><p class=MsoNormal> meta(content="HelloWorld.tall.png", name="Image"),</p><p class=MsoNormal> meta(content="http://en.wikipedia.org/wiki/Hello_world", name="reference"),</p><p class=MsoNormal> meta(content="https://en.wikipedia.org/wiki/Hello#.22Hello.2C_World.22_computer_program", name="reference"),</p><p class=MsoNormal> meta(content="https://en.wikipedia.org/wiki/\"Hello,_World!\"_program", name="reference"),</p><p class=MsoNormal> meta(content="http://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world", name="reference"),</p><p class=MsoNormal> meta(content="http://www.HelloWorldExample.net", name="reference"),</p><p class=MsoNormal> meta(content="http://www.web3D.org", name="reference"),</p><p class=MsoNormal> meta(content="http://www.web3d.org/realtime-3d/news/internationalization-x3d", name="reference"),</p><p class=MsoNormal> meta(content="http://www.web3d.org/x3d/content/examples/HelloWorld.x3d", name="reference"),</p><p class=MsoNormal> meta(content="http://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes", name="reference"),</p><p class=MsoNormal> meta(content="http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.x3d", name="identifier"),</p><p class=MsoNormal> meta(content="http://www.web3d.org/x3d/content/examples/license.html", name="license"),</p><p class=MsoNormal> meta(content="X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit", name="generator") # Alternate encodings: VRML97, X3D ClassicVRML Encoding, X3D Compressed Binary Encoding (CBE), X3DOM, JSON</p><p class=MsoNormal>,</p><p class=MsoNormal> meta(content="HelloWorld.wrl", name="reference"),</p><p class=MsoNormal> meta(content="HelloWorld.x3dv", name="reference"),</p><p class=MsoNormal> meta(content="HelloWorld.x3db", name="reference"),</p><p class=MsoNormal> meta(content="HelloWorld.xhtml", name="reference"),</p><p class=MsoNormal> meta(content="HelloWorld.json", name="reference")]</p><p class=MsoNormal> ),</p><p class=MsoNormal> Scene = Scene( # Example scene to illustrate X3D nodes and fields (XML elements and attributes)</p><p class=MsoNormal> Child = [</p><p class=MsoNormal> WorldInfo(title="Hello world!"),</p><p class=MsoNormal> Group(</p><p class=MsoNormal> Child = [</p><p class=MsoNormal> Viewpoint(DEF="ViewUpClose", centerOfRotation=[0,-1,0], description="Hello world!", position=[0,-1,7]),</p><p class=MsoNormal> Transform(</p><p class=MsoNormal> Child = [ Shape(</p><p class=MsoNormal> Geometry = Sphere(),</p><p class=MsoNormal> Appearance = Appearance(</p><p class=MsoNormal> Material = Material(</p><p class=MsoNormal> Texture = (ImageTexture(DEF="ImageCloudlessEarth", url=["earth-topo.png","earth-topo.jpg","earth-topo-small.gif","http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png","http://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg","http://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif"])),</p><p class=MsoNormal style='margin-left:1.0in'> DEF="MaterialLightBlue",</p><p class=MsoNormal style='margin-left:1.0in'> diffuseColor=[0.1,0.5,1]))),</p><p class=MsoNormal> rotation=[0,1,0,3],</p><p class=MsoNormal> ),</p><p class=MsoNormal> Transform(</p><p class=MsoNormal> Child = [ Shape(</p><p class=MsoNormal> Geometry = Text(DEF="TextMessage", string=["Hello","world!"], FontStyle = (FontStyle(justify=["MIDDLE","MIDDLE"]))),</p><p class=MsoNormal> Appearance = Appearance(</p><p class=MsoNormal> Material = Material(USE="MaterialLightBlue")))],</p><p class=MsoNormal> translation=[0,-2,0])])]))</p><p class=MsoNormal>X3D0.toFileX3D("/x3d-code/www.web3d.org/x3d/stylesheets/java/src/python/pythonapi/data/HelloWorld.newf.x3d")<o:p></o:p></p></div></body></html>