<div dir="ltr">I have added default values in the ProtoDeclare for outputOnly fields, reverting back to passing out startTime, stopTime and enabled.<div><br></div><div>Referring to this repository:</div><div><br></div><div><a href="https://github.com/coderextreme/ci2had/">https://github.com/coderextreme/ci2had/</a></div><div><br></div><div>I primarily wish to get this working:
<a href="https://github.com/coderextreme/ci2had/blob/main/resources/CleanedYouClocks.x3d">https://github.com/coderextreme/ci2had/blob/main/resources/CleanedYouClocks.x3d</a>, but first, I want to get ManyClocks.x3d working, because it precedes CleanedYouClocks.x3d, but feel free to get it working first (it's a cleaned up version).</div><div><br></div><div>If all else fails, I'll probably strip out the Proto (ugh!).<br><div>--------------------------------------------------------------</div><div>I have confirmed that this doesn't animate:<div><br></div><div><a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/ManyClocks.x3d">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/ManyClocks.x3d</a></div><div>--------------------------------------------------------------</div><div>This does animate:</div><div><br></div><div><a href="https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/ManyClocks.x3d">https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/ManyClocks.x3d</a></div><div>---------------------------------------------------------------</div><div>Castle Model Converter produces errors. The viewer doesn't animate, probably because I use HAnimDisplacers. There are no scripts, in an attempt to appease people who don't like scripts. We now have a good example that has HAnimDisplacers, but no scripts.</div><div><br></div><div>$ ~/Downloads/castle-model-viewer-5.3.0-win64-x86_64/castle-model-viewer/castle-model-converter.exe --validate resources/ManyClocks.x3d 2>&1 |sort -u<br>castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element references unknown field name "enabled"<br>castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element references unknown field name "startTime"<br>castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element references unknown field name "stopTime"<br>Exception "Exception":<br>Validation failed (consult the warnings above), exiting with non-zero status</div><div>---------------------------------------------------------------</div><div>FreeWRL kills JavaScript for some reason (there's no Script), but still doesn;'t animate (try pressing Fear).</div><div><br></div><div>$ /c/Program\ Files\ \(x86\)/freeWRL/freeWRL.6.7/freeWRL.exe resources/ManyClocks.x3d<br><br>MidiInWinMM::initialize: no MIDI input devices currently available.<br><br>libfreewrl version 6.7.0<br>-h for commandline use<br>openGL version 4.6.0 NVIDIA 560.94<br>GLSL shader max version 4.60 NVIDIA 460<br>maximum texture size system/gpu: 32768 runtime/freewrl: 16384<br>processor architecture x64<br>maxiumum image texture units 32<br>depth bits 24<br>Skinning Method: GPU<br>calling kill_javascript()<br>done kill_javascript<br>Ending texture load thread gracefully<br>finalizeRenderSceneUpdateScene</div><div>---------------------------------------------------------------------------------------------------</div><div>Schematron reports a bunch of problems, all of which I ignore. See attached. log and build.xml</div></div><div>---------------------------------------------------------------------------------------------------</div><div>There are many info issues when validating with X3DJSAIL, but I'm not sure about this one:</div><div>$ java -cp ~/Downloads/X3DJSAIL.4.0.full.jar org.web3d.x3d.jsail.CommandLine -validate resources/ManyClocks.x3d|grep -v<br>info</div><div>[snip]</div><div>org.web3d.x3d.sai.InvalidFieldException: IndexedFaceSet containing TextureCoordinate node with 295 values must also include texCoordIndex or coordIndex field<br> at org.web3d.x3d.jsail.Geometry3D.IndexedFaceSet.validate(IndexedFaceSet.java:3756)<br> at org.web3d.x3d.jsail.Shape.Shape.validate(Shape.java:2060)<br> at org.web3d.x3d.jsail.Grouping.Transform.validate(Transform.java:2556)<br> at org.web3d.x3d.jsail.HAnim.HAnimSegment.validate(HAnimSegment.java:6175)<br> at org.web3d.x3d.jsail.HAnim.HAnimJoint.validate(HAnimJoint.java:7476)<br> at org.web3d.x3d.jsail.HAnim.HAnimJoint.validate(HAnimJoint.java:7476)<br> at org.web3d.x3d.jsail.HAnim.HAnimHumanoid.validate(HAnimHumanoid.java:6317)<br> at org.web3d.x3d.jsail.Grouping.Transform.validate(Transform.java:2556)<br> at org.web3d.x3d.jsail.Core.Scene.validate(Scene.java:869)<br> at org.web3d.x3d.jsail.Core.X3D.validate(X3D.java:4549)<br> at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:1098)<br> at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:242)</div><div><br></div><div>I don't have a recent version of X3DJSAIL</div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Feb 4, 2025 at 2:22 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@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="auto"><div>Thanks, exactly what I was looking for.<div dir="auto"><br></div><div dir="auto">Best, Andreas</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 4, 2025, 2:01 PM Holger Seelig <<a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</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>The default value for a field is either specified for each node type or the default value for Script or ComposedShader node custom fields is defined in <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/fieldTypes.html" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/fieldTypes.html</a>. Mostly false, 0, „“, identity, ...<div><br></div><div>A proto instance will inherit its default values from the proto declaration its fields. Fields such as outputOnly will normally have a default value from fieldTypes.html.</div><div><br></div><div>There is an exception with X3DInterpolatorNode.value_changed:</div><div><br></div><div><a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/interpolators.html#X3DInterpolatorNode" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/interpolators.html#X3DInterpolatorNode</a></div><div><br></div><div>If an X3DInterpolatorNode value_changed outputOnly field is read before it receives any inputs, keyValue[0] is returned if keyValue is not empty...</div><div><br></div><div>Best regards,</div><div>Holger</div><div><br id="m_7457095840065251490m_7516275273924181984lineBreakAtBeginningOfMessage"><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="text-align:start;text-indent:0px"><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">--</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Holger Seelig</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Leipzig, Germany</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br></div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><a href="mailto:holger.seelig@yahoo.de" rel="noreferrer" target="_blank">holger.seelig@yahoo.de</a></div><div><a href="https://create3000.github.io/x_ite/" rel="noreferrer" target="_blank">https://create3000.github.io/x_ite/</a></div></div></div></div></div></div></div>
</div>
<div><br><blockquote type="cite"><div>Am 04.02.2025 um 19:26 schrieb Andreas Plesch via x3d-public <<a href="mailto:x3d-public@web3d.org" rel="noreferrer" target="_blank">x3d-public@web3d.org</a>>:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div>Hi John, all,<br></div><div><br></div><div>It turns out that x3dom currently expects a default value for Proto fields even for outputOnly fields. This is due to how Proto fields are initialized. They always need to have a value. While the spec. does not require this, it seems still good practice to always define a default value in the ProtoInterface. There may be a case where an outputOnly field is used in ISing where a valid value would be expected. There may be other corner cases.<br></div><div><br></div><div>Here is your example with added default values for outputOnly fields:<br></div><div><br></div><div><a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/af5ff3148c1159f71d34fb78c1f63024/raw/b3d4470107ab74e301ed48448ab2a4f4154672e0/ManyClocks_John.x3d" rel="noreferrer" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/af5ff3148c1159f71d34fb78c1f63024/raw/b3d4470107ab74e301ed48448ab2a4f4154672e0/ManyClocks_John.x3d</a></div><div><br></div><div>This could be fixed in x3dom, by always setting some default value. Is there a list of recommended defaults for each data type if no other source of defaults is available? For SFTime it seems to be -1.<br></div><div><br></div><div>-Andreas<br></div><div><br></div></div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" class="gmail_attr">On Mon, Feb 3, 2025 at 7:39 AM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" rel="noreferrer" target="_blank">andreasplesch@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>Hi John,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 3, 2025 at 12:48 AM John Carlson <<a href="mailto:yottzumm@gmail.com" rel="noreferrer" target="_blank">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">Andreas, "startTime" is an accessType outputOnly field, so why do I need to provide a value attribute in fieldValue? I'm kind of confused. I'm probably missing something in the spec.</div></blockquote><div><br></div><div>You are right, I only outlined scenarios where the accessType allows input or initialization..</div><div>In the outputOnly case it is not necessary to provide a fieldValue node at all since there is no value which can be provided. Providing the node would indeed be confusing, to both the user code reader and any X3D browser.</div><div>I believe the spec. is silent on this case in any encoding.</div><div><br></div><div>Best, Andreas</div><div><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>Thanks for any clarification.</div><div><br></div><div>I have finally enabled schematron on the project, but I'm finding it hard to understand the messages, and modifications that I make, while removing the immediate problems, seem to move the problems elsewhere.</div><div><br></div><div>Explaining why I need a "startTime" fieldValue value is my main lack of understanding, but perhaps I need a whole review of accessType.</div><div><br></div><div>Castle Model Converter reports:</div><div><br></div><div>castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element references unknown field name "enabled"<br>castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element references unknown field name "startTime"<br>castle-model-converter: Warning: X3D: X3D XML: <fieldValue> element references unknown field name "stopTime"</div><div><br></div><div>I will try providing a field value in the ProtoInterface</div><div><br></div><div>If I "cleanup" enabled, startTime and stopTime, I get:</div><div><br></div><div>castle-model-converter: Warning: VRML/X3D: Within prototype "MenuItem", event "inputTrue" references (by "IS" clause) non-existing event "enabled"<br>castle-model-converter: Warning: VRML/X3D: Within prototype "MenuItem", event "triggerTime" references (by "IS" clause) non-existing event "startTime"<br>castle-model-converter: Warning: VRML/X3D: Within prototype "MenuItem", event "triggerTime" references (by "IS" clause) non-existing event "stopTime"</div><div><br></div><div>I guess what I conclude at this point is, startTime and stopTime are bad DEF names, but what about enabled as a field? The dominoes are falling.</div><div><br></div><div>About your two scenarios in the other message, perhaps this is revealing.</div><div><br></div><div>See attached attempt to fix original issue, which resulted in the above.</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 2, 2025 at 3:59 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" rel="noreferrer" target="_blank">andreasplesch@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>I think x3dom, reasonably, expects a value for the fieldValue nodes:</div><div><br></div><div>For example:</div><div><br></div><fieldValue name="startTime" /><div><br></div><div>and others.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 2, 2025 at 5:42 AM John Carlson <<a href="mailto:yottzumm@gmail.com" rel="noreferrer" target="_blank">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>Andreas, Joe,</div><div><br></div><div>Reset Button, Reset_Clock added.</div><div><br></div><div>See attached zip for details, or visit link;</div><div><br></div><div><a href="https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d" rel="noreferrer" target="_blank">https://create3000.github.io/x_ite/playground/?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d</a></div><div><br></div><div>For some reason, this link doesn't show the live scene?</div><div><br></div><div><a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d" rel="noreferrer" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/ci2had/refs/heads/main/resources/CleanedYouClocks.x3d</a></div><div><br></div><div>Puzzled, haven't researched it yet. Looks good in Sunrize and X_ITE, will try FreeWRL next.</div><div><br></div><div>John</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div></div></blockquote></div></blockquote></div></div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">--<span> </span></span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></blockquote></div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">--<span> </span></span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div></blockquote></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br clear="all"></div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span class="gmail_signature_prefix" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">--<span> </span></span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" class="gmail_signature" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">x3d-public mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><a href="mailto:x3d-public@web3d.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" rel="noreferrer" target="_blank">x3d-public@web3d.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a></div></blockquote></div><br></div></div></blockquote></div></div></div>
</blockquote></div>