<div dir="ltr">Yes, I realized after some work a few hours ago that I had to override colorRamp with color and textCoordRamp with texCoord<div><br></div><div>I had be prototyping code, but here's the gist from x3djsonld.py:</div><div><br></div><div>        if k in ("-colorRamp"):<br>            k = "-color"<br>            key = k[1:]<br>        if k in ("-texCoordRamp"):<br>            k = "-texCoord"<br>            key = k[1:]<br></div><div><br></div><div>We've nearly exhausted Holger's ParticleSystem/ examples.  She needs to stay within bounds, and we need an MFBool solution that doesn't have ,, together in python.</div><div><br></div><div>Thanks!  I hope the reference to xsl analyze-string helps!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 5, 2022 at 9:52 AM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</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 lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_-7353280485723381189WordSection1"><p class="MsoNormal">The field <i>colorRamp</i> was renamed <i>color</i> in X3D4.  So you need to be able to handle both.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="gmail-m_-7353280485723381189MsoListParagraph" style="margin-left:0in">X3D4 Architecture, 40.4.5 ParticleSystem<u></u><u></u></li><li class="gmail-m_-7353280485723381189MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/particleSystems.html#ParticleSystem" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/particleSystems.html#ParticleSystem</a><u></u><u></u></li><li class="gmail-m_-7353280485723381189MsoListParagraph" style="margin-left:0in"><span style="font-size:10pt;font-family:Verdana,sans-serif;color:black;background:white">“NOTE  the original name for the ParticleSystem <i>color</i> field in X3D version 3 is <i>colorRamp</i>.”</span><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I checked various stylesheets and they seemed to be consistent.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">We still can use examples in the archives for this component to facilitate regular testing.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Comprehensive list of such changes is found online, following some other hints.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="gmail-m_-7353280485723381189MsoListParagraph" style="margin-left:0in">X3D Scene Authoring Hints, containerField, Field name changes for improved consistency in X3D4<u></u><u></u></li><li class="gmail-m_-7353280485723381189MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges</a><u></u><u></u></li></ul><div style="border-top:none;border-right:none;border-left:none;border-bottom:1.5pt solid windowtext;padding:0in 0in 1pt"><p class="MsoNormal" style="border:none;padding:0in"><u></u> <u></u></p></div><p class="MsoNormal"><b><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black"><a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges" target="_blank"><span style="font-family:"Segoe UI Emoji",sans-serif">🔖</span></a> Field name changes for improved consistency in X3D4<u></u><u></u></span></b></p><p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">Completed work for <a href="https://www.web3d.org/x3d4" target="_blank">X3D Version 4</a> and <a href="https://www.web3d.org/specifications/X3DUOM.html" target="_blank">X3D Unified Object Model (X3DUOM)</a> makes a number of candidate optimizations possible and (in most cases) desirable. Consistent X3D scene-graph architecture across multiple file encodings and programming-language bindings is important.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">The following consistency changes to </span><span style="font-size:10pt;font-family:"Courier New";color:black">SFNode</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">/</span><span style="font-size:10pt;font-family:"Courier New";color:black">MFNode</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black"> field names in X3D4 have the potential to reduce the number of </span><span style="font-size:10pt;font-family:"Courier New";color:black">containerField</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black"> variations by more than half. Further simplification benefits are foreseen for X3D4 implementations, X3D authors, and X3D Ontology field disambiguation.<u></u><u></u></span></p><ol start="1" type="1"><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#ComposedCubeMapTexture" target="_blank"><i>ComposedCubeMapTexture</i></a>: make six sets of field names identical to <a href="https://www.web3d.org/x3d/content/X3dTooltips.html#TextureBackground" target="_blank"><i>TextureBackground</i></a> for contained textures, e.g. </span><span style="font-size:10pt;font-family:"Courier New"">back</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> becomes </span><span style="font-size:10pt;font-family:"Courier New"">backTexture</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif">, </span><span style="font-size:10pt;font-family:"Courier New"">top</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> becomes </span><span style="font-size:10pt;font-family:"Courier New"">topTexture</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif">, etc.<u></u><u></u></span></li><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#DISEntityManager" target="_blank"><i>DISEntityManager</i></a>: when typically containing <a href="https://www.web3d.org/x3d/content/X3dTooltips.html#DISEntityTypeMapping" target="_blank"><i>DISEntityTypeMapping</i></a>, change that unnecessarily different </span><span style="font-size:10pt;font-family:"Courier New"">containerField='mapping'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> and rename as </span><span style="font-size:10pt;font-family:"Courier New"">containerField='children'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> instead.<u></u><u></u></span></li><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#LoadSensor" target="_blank"><i>LoadSensor</i></a>: change unnecessarily different field name </span><span style="font-size:10pt;font-family:"Courier New"">containerField='watchList'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> and rename as </span><span style="font-size:10pt;font-family:"Courier New"">containerField='children'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> instead. Child node restrictions can achieve a functionally equivalent effect and improve the object-oriented design.<u></u><u></u></span></li><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#ParticleSystem" target="_blank"><i>ParticleSystem</i></a>: change unnecessarily different field names </span><span style="font-size:10pt;font-family:"Courier New"">colorRamp</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif">, </span><span style="font-size:10pt;font-family:"Courier New"">texCoordRamp</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> and rename as regular defaults </span><span style="font-size:10pt;font-family:"Courier New"">color</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif">, </span><span style="font-size:10pt;font-family:"Courier New"">texCoord</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> instead.<br>Related: see issue <a href="https://www.web3d.org/member-only/mantis/view.php?id=1322" target="_blank">Mantis 1322</a> to allow <i>TextureCoordinateGenerator</i> as an alternative to <i>TextureCoordinate</i> for that child node.<u></u><u></u></span></li></ol><p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">Not accepted for X3D4: nodes with working functionality but proposed design refinements were not workable.<u></u><u></u></span></p><ul type="disc"><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#CADFace" target="_blank"><i>CADFace</i></a> issue <a href="https://www.web3d.org/member-only/mantis/view.php?id=1234" title="CADFace field 'shape' has unusual name and causes unnecessary complexity, similar for CollidableShape" target="_blank">Mantis 1234</a> to change unnecessarily different </span><span style="font-size:10pt;font-family:"Courier New"">containerField='shape'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> and rename as </span><span style="font-size:10pt;font-family:"Courier New"">containerField='children'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> instead. This change was rejected since the field can only contain a single SFNode, making it functionally different that MFNode </span><span style="font-size:10pt;font-family:"Courier New"">children</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif">.<u></u><u></u></span></li><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#CollidableShape" target="_blank"><i>CollidableShape</i></a>: issue to change field name </span><span style="font-size:10pt;font-family:"Courier New"">containerField='shape'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> (which has different semantics than CADFace </span><span style="font-size:10pt;font-family:"Courier New"">shape</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> field) and rename as </span><span style="font-size:10pt;font-family:"Courier New"">containerField='children'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> instead. This change was rejected since the field can only contain a Shape node and has accessType initializeOnly, making it functionally different.<u></u><u></u></span></li><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#Collision" target="_blank"><i>Collision</i></a>: typed content-model definitions for a proxy node (</span><span style="font-size:10pt;font-family:"Courier New"">containerField='proxy'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif">) might be insufficiently strict [X3DChildNode]. Mantis issue <a href="https://www.web3d.org/member-only/mantis/view.php?id=1149" target="_blank">Mantis 1149</a> considered node-type restrictions "matching CADFace </span><span style="font-size:10pt;font-family:"Courier New"">shape</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> field" instead, i.e. [Shape|LOD|Transform]. This issue was reviewed but not approved, with no change applied.<u></u><u></u></span></li><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#GeoLOD" target="_blank"><i>GeoLOD</i></a>: see issue <a href="https://www.web3d.org/member-only/mantis/view.php?id=920" target="_blank">Mantis 920</a> to change unnecessarily different field name </span><span style="font-size:10pt;font-family:"Courier New"">containerField='rootNode'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> and rename as </span><span style="font-size:10pt;font-family:"Courier New"">containerField='children'</span><span style="font-size:13.5pt;font-family:"Times New Roman",serif"> instead. Also enter Mantis issue to implement object interface <a href="https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/networking.html#X3DUrlObject" target="_blank"><i>X3DUrlObject</i></a>.<u></u><u></u></span></li><li class="MsoNormal" style="color:black"><span style="font-size:13.5pt;font-family:"Times New Roman",serif"><a href="https://www.web3d.org/x3d/content/X3dTooltips.html#GeoMetadata" target="_blank"><i>GeoMetadata</i></a>: has <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD3/Part01/components/geospatial.html#GeoMetadata" target="_blank"><i>X3DUrlObject</i></a> object interface applied for consistency, so no changes in field names necessary.<u></u><u></u></span></li></ul><p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">For model authors and software implementers, few changes are needed for upgrading X3D and browsers from X3D3 to X3D4. These changes require modified parsers, validation tools and converters for proper handling. Performing this one-time effort now, when progressing from X3D3 to X3D4, means that future authors and modelers have a more streamlined and consistent interface, with less legacy baggage from earlier evolutions of the language.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">These improvements support slight improvements to X3D4 authoring and animation. Issue resolution is tracked by X3D Working Group email summary <a href="http://web3d.org/pipermail/x3d-public_web3d.org/2020-December/014254.html" target="_blank">X3D4 finalization endgame: Field naming reconciliation decision</a> and <a href="https://www.web3d.org/member-only/mantis/view.php?id=1331" title="Mantis 1331: Rename selected X3D4 fields for object-oriented consistency" target="_blank">Mantis 1331</a>.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black">These changes to field names (for a handful of affected nodes) received close scrutiny by Web3D Consortium members with corresponding technical review by the X3D Community. Companies, institutions, agencies and individuals are invited to <a href="https://www.web3d.org/join" target="_blank">Join Web3D Consortium</a> to participate and influence this important continuing evolution of X3D.<u></u><u></u></span></p><div style="border-top:none;border-right:none;border-left:none;border-bottom:1.5pt solid windowtext;padding:0in 0in 1pt"><p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:13.5pt;font-family:"Times New Roman",serif;color:black"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a><u></u><u></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Monday, July 4, 2022 4:44 PM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br><b>Cc:</b> X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>; <a href="mailto:holger.seelig@gmail.com" target="_blank">holger.seelig@gmail.com</a><br><b>Subject:</b> [SOLUTION] X3dToJson.xslt, -colorRamp object/array Holger's VolumeEmitter.x3d<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal">Good news, leaving colorRamp out of X3dToJson.xslt seems to have fixed the particle system issue in Holger's example, VolumeEmitter.x3d when converting to JSON.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Patch below:<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">$ diff /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/X3dToJson.xslt" target="_blank">www.web3d.org/x3d/stylesheets/X3dToJson.xslt</a> X3dToJson.xslt<br>600c600<br><                             ($fieldName = 'color')              or ($fieldName = 'colorRamp')          or ($fieldName = 'coord')              or<br>---<br>>                             ($fieldName = 'color')              or ($fieldName = 'coord')              or<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Looks like a pretty clean fix.  I can check in as desired, or we can hopefully leave the email as a key for later (no guarantees I will keep my stylesheet around).<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">It looks like other color fields in other nodes may also have a type that start with MF, but I'm not sure if they're containerFields. <u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Mon, Jul 4, 2022 at 6:15 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><p class="MsoNormal">Re: colorRamp for color in X3dToJson.xslt: <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><xsl:variable name="SFNodeType" select="<u></u><u></u></p></div><div><p class="MsoNormal">[snip]<u></u><u></u></p></div><div><p class="MsoNormal">                            ($fieldName = 'color')              or ($fieldName = 'colorRamp')          or ($fieldName = 'coord')              or<u></u><u></u></p></div><div><p class="MsoNormal">[snip]<u></u><u></u></p></div><div><p class="MsoNormal">                            <xsl:if test="not($SFNodeType) or //AllX3dElementsAttributes"><br>                                    <xsl:text>[</xsl:text><br>                            </xsl:if><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Investigations into X3DUOM:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">            <field name="color"<br>                    synonym="colorRamp"<br>                    type="MFNode"<br>                    accessType="initializeOnly"<br>                    acceptableNodeTypes="X3DColorNode"<br>                    description="The color field contains Color|ColorRGBA nodes as a series of color values to be used at the given colorKey points in time."/><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Suggestion to leave colorRamp out of the boolean expression above (will test to see if it works).  Note that name="color" fields vary between many types, including MFNode, MFColor, MFColorRGBA ( I didn't do an exhaustive search).<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Note that the colorRamp is in a ParticleSystem, and other .xslt files seem to address it.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I'm going to test the suggestion, and get back to you, to see if we can close this issue.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Mon, Jul 4, 2022 at 5:45 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">Ajv JSON schema reports on VolumeEmitter.json (potential issue in X3dToJson.xslt): <u></u><u></u></p><div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Can only validate version 4.0 presently. Switching version to 4.0.<br>=================================================<br>File: VolumeEmitter.json<br>Error reading VolumeEmitter.json<br> keyword: required<br> instancePath: /X3D/Scene/-children/4/ParticleSystem<br> message: must have required property @USE<br> params: {"missingProperty":"@USE"}<br> file: VolumeEmitter.json<br> version: 3.3<br><br> keyword: type<br> instancePath: /X3D/Scene/-children/4/ParticleSystem/-colorRamp<br> message: must be array<br> params: {"type":"array"}<br> file: VolumeEmitter.json<br> version: 3.3<br><br> keyword: oneOf<br> instancePath: /X3D/Scene/-children/4/ParticleSystem<br> message: must match exactly one schema in "oneOf"<br> params: {"passingSchemas":null}<br> file: VolumeEmitter.json<br> version: 3.3<u></u><u></u></p></div><div><p class="MsoNormal">=============================================================================================<u></u><u></u></p></div><div><p class="MsoNormal">Source file: <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcreate3000%2FLibrary%2Fblob%2Fmain%2FTests%2FComponents%2FParticleSystems%2FVolumeEmitter.x3d&data=05%7C01%7Cbrutzman%40nps.edu%7Ccaae589fa74b47a32b0308da5e17291c%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637925751277317620%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Swk4q42C38KM6XVh5akxVxsmIvRa1E8OsgdNZchdKPQ%3D&reserved=0" target="_blank">https://github.com/create3000/Library/blob/main/Tests/Components/ParticleSystems/VolumeEmitter.x3d</a><u></u><u></u></p></div><div><p class="MsoNormal">Note changes to VolumeEmitter.json to make it play well with JSON schema (not sure if correct or not):<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">$ diff ../X3DJSONLD/src/main/Library/Tests/Components/ParticleSystems/VolumeEmitter.json  VolumeEmitter.json<br>6c6<br><     "JSON schema":"<a href="https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json" target="_blank">https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json</a>",<br>---<br>>     "JSON schema":"<a href="https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json" target="_blank">https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json</a>",<br>170c170<br><               "-colorRamp":<br>---<br>>               "-colorRamp": [<br>175c175,176<br><                 },<br>---<br>>                 }<br>>             ],<br>233c234<br>< }<br>\ No newline at end of file<br>---<br>> }<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Mon, Jul 4, 2022 at 5:27 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">As previously posted:<u></u><u></u></p></div><div><p class="MsoNormal">"Changed subject to be more focused on what's not working. Thanks for the effort on VolumeEmitter.x3d, which despite not passing the x3d validator, products of the XML are passing jsonlint and python. Note that the VolumeEmitter.json passes jsonlint (and I guess the jshint and jslint or whatever you use), but it does not pass the Ajv validator.  Will respond on the other thread if something comes up."<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Apparently it pays to have a non-empty schema!<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Changes:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">diff --git a/x3d-4.0-JSONSchema.json b/x3d-4.0-JSONSchema.json<br>index 5834443..abfcd9f 100644<br>--- a/x3d-4.0-JSONSchema.json<br>+++ b/x3d-4.0-JSONSchema.json<br>@@ -1,7 +1,7 @@<br> {<br>   "$schema": "<a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjson-schema.org%2Fdraft%2F2020-12%2Fschema&data=05%7C01%7Cbrutzman%40nps.edu%7Ccaae589fa74b47a32b0308da5e17291c%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637925751277474370%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cnsb4PPBbjuB9gAmS9esr%2BD9HWzB2Qo7AMgYHixFLOg%3D&reserved=0" target="_blank">https://json-schema.org/draft/2020-12/schema</a>",<br>   "$id": "<a href="https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json" target="_blank">https://www.web3d.org/specifications/x3d-4.0-JSONSchema.json</a>",<br>-  "title": "X3D V4.0 JSON Schema, generated 2022/05/24 17:50:41",<br>+  "title": "X3D V4.0 JSON Schema, generated 2022/07/04 17:13:07",<br>   "description": "Experimental JSON Schema for X3D V4.0",<br>   "type": "object",<br>   "properties": {<br>@@ -19398,8 +19398,10 @@<br>               "type": "number"<br>             },<br>             "@fieldOfView": {<br>-              "$comment": "MFFloat inputOutput",<br>+              "$comment": "SFVec4f inputOutput",<br>               "type": "array",<br>+              "minItems": 4,<br>+              "maxItems": 4,<br>               "prefixItems": [<br>                 {<br>                   "default": -1,<br>@@ -19418,9 +19420,7 @@<br>                   "type": "number"<br>                 }<br>               ],<br>-              "items": {<br>-                "type": "number"<br>-              }<br>+              "items": false<br>             },<br>             "@jump": {<br>               "default": true,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Sorry for confusion!<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Sun, Jul 3, 2022 at 11:24 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">[Changed subject line for readability/searchability – this is about OrthoViewpoint fieldOfView]<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><ol start="1" type="1"><li class="MsoNormal">Invalid source XML in your .x3d excerpt: simple types should not have commas within them.<u></u><u></u></li></ol><p class="MsoNormal"> <u></u><u></u></p><ul type="disc"><li class="MsoNormal">OrthoViewpoint fieldOfView='-1.5, -1.5, 1.5, 1.5'<u></u><u></u></li></ul><p class="MsoNormal"> <u></u><u></u></p><ol start="2" type="1"><li class="MsoNormal">OrthoViewpoint fieldOfView is defined as MFFloat in specification but ought to be SFVec4f, since it must always have four numbers defining ordered values (minimum_x, minimum_y, maximum_x, maximum_y).<u></u><u></u></li></ol><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I am somehow locked out of mantis and so can’t verify what we previously said about this (if anything).  Seems like a simple specification erratum.<u></u><u></u></p><p class="MsoNormal"><br>Correlation confirmation: TextureProjectorParallel has fieldOfView SFVec4f.  Meanwhile Viewpoint GeoViewpoint and TextureProjector have SFFloat.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><ol start="3" type="1"><li class="MsoNormal">I think that the various fieldOfView types are handled in the stylesheet s correctly now, checked in.<u></u><u></u></li></ol><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I have also applied a tentative fix to X3D DOCTYPE, Schema, Tooltips and X3DUOM, but will wait to deploy any updates (including X3DJSAIL, X3DPSAIL) until checking mantis to confirm status.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Thanks John for reporting this error, very helpful.<u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a></span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> <b>On Behalf Of </b>John Carlson<br><b>Sent:</b> Sunday, July 3, 2022 12:10 AM<br><b>To:</b> X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>>; <a href="mailto:holger.seelig@gmail.com" target="_blank">holger.seelig@gmail.com</a><br><b>Subject:</b> [x3d-public] X3dToJson.xslt, X3dToPython.xslt, create3000/Library Test ParticleSystem possible issues. Though may not pass!<u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">Don,<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Here are some issues with various X3dTo*.xslt:<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">grep fieldOfView VolumeEmitter.py<br>VolumeEmitter.py:    OrthoViewpoint(description='OrthoViewpoint',fieldOfView=-1.5,-1.5,1.5,1.5),<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">$ grep fieldOfView VolumeEmitter*<br>VolumeEmitter.json:              "@fieldOfView":-1.5,-1.5,1.5,1.5<br>VolumeEmitter.x3d:        fieldOfView='-1.5, -1.5, 1.5, 1.5'/><u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">In the JSON, the MFFloat is does not appear to be an array, with [] around the numbers.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">In the python, there's no tuple or list markers denoting a tuple or list<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Note in the XML, both the "," and the space is separating the floats in the MFFloat.  I haven't seen that the MFBools with ", " as separators is working, but perhaps the problem is more general.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Links to XML below.<u></u><u></u></p></div><div><p class="MsoNormal">====================================================<u></u><u></u></p></div><div><p class="MsoNormal">Holger,<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I fully realize that these are test samples, and they may not pass, thus when I convert x3d  to python and run, these errors may appear (which may be totally valid).<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">BoundedPhysicsModel.py<br>x3d.py package 4.0.64.1 loaded, have fun with X3D Graphics!<br>Traceback (most recent call last):<br>  File "C:\Users\john\X3DJSONLD\src\main\python\net\x3djsonld\Library\Tests\Components\ParticleSystems\BoundedPhysicsModel.py", line 82, in <module><br>    emitter=ConeEmitter(position=(0,-3,0),direction=(1,4,0),angle=0.4,speed=0.2,mass=3200),<br>  File "C:\Users\john\X3DJSONLD\venv\lib\site-packages\x3d\x3d.py", line 29419, in __init__<br>    self.direction = direction<br>  File "C:\Users\john\X3DJSONLD\venv\lib\site-packages\x3d\x3d.py", line 29450, in direction<br>    assertLessThanEquals('direction', direction, 1)<br>  File "C:\Users\john\X3DJSONLD\venv\lib\site-packages\x3d\x3d.py", line 1847, in assertLessThanEquals<br>    assert isLessThanEquals(value, maximum), fieldName + '=' + str(value) + ' fails assertLessThanEquals maximum=' + str(maximum)<br>AssertionError: direction=(1, 4, 0) fails assertLessThanEquals maximum=1<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">PointEmitter.py<br>x3d.py package 4.0.64.1 loaded, have fun with X3D Graphics!<br>Traceback (most recent call last):<br>  File "C:\Users\john\X3DJSONLD\src\main\python\net\x3djsonld\Library\Tests\Components\ParticleSystems\PointEmitter.py", line 92, in <module><br>    WindPhysicsModel(speed=0.8,gustiness=0.8,turbulence=2),<br>  File "C:\Users\john\X3DJSONLD\venv\lib\site-packages\x3d\x3d.py", line 99589, in __init__<br>    self.turbulence = turbulence<br>  File "C:\Users\john\X3DJSONLD\venv\lib\site-packages\x3d\x3d.py", line 99643, in turbulence<br>    assertZeroToOne('turbulence', turbulence)<br>  File "C:\Users\john\X3DJSONLD\venv\lib\site-packages\x3d\x3d.py", line 1818, in assertZeroToOne<br>    assert isZeroToOne(value), str(fieldName) + '=' + str(value) + ' fails assertZeroToOne requirements: value(s) must be in range [0..1]'<br>AssertionError: turbulence=2 fails assertZeroToOne requirements: value(s) must be in range [0..1]<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12pt">SurfaceEmitter.py<br>x3d.py package 4.0.64.1 loaded, have fun with X3D Graphics!<br>Traceback (most recent call last):<br>  File "C:\Users\john\X3DJSONLD\src\main\python\net\x3djsonld\Library\Tests\Components\ParticleSystems\SurfaceEmitter.py", line 50, in <module><br>    MetadataSet(DEF='children',name='children',reference='<a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftitania.create3000.de%2F&data=05%7C01%7Cbrutzman%40nps.edu%7Ccaae589fa74b47a32b0308da5e17291c%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637925751277474370%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bzoete5DEh5g0KpzRPEVUm8sNQwfrpjNpOoO8Vv96PA%3D&reserved=0" target="_blank">http://titania.create3000.de</a>',<br>TypeError: MetadataSet.__init__() got an unexpected keyword argument 'appearance'<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Original XML here:  <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcreate3000%2FLibrary%2Ftree%2Fmain%2FTests%2FComponents%2FParticleSystems&data=05%7C01%7Cbrutzman%40nps.edu%7Ccaae589fa74b47a32b0308da5e17291c%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637925751277474370%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9q3CPSVjQue58GzgcOu2JCVqhJBDz0hd%2FqgucYPZnew%3D&reserved=0" target="_blank">Library/Tests/Components/ParticleSystems at main · create3000/Library (github.com)</a><u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Attached generated python code.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div></div></blockquote></div></blockquote></div></div></blockquote></div></blockquote></div></div></div></div></div></blockquote></div>