<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sep 17, 2017 6:12 PM, "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Here is an example for reseting the toggle field of the BooleanToggle node:<div><br></div><div><a href="https://x3dom-booleanfilter.glitch.me/" target="_blank">https://x3dom-booleanfilter.<wbr>glitch.me/</a><br></div><div><a href="http://x3dom-booleanfilter.glitch.me/BooleanToggle_test.x3d" target="_blank">http://x3dom-booleanfilter.<wbr>glitch.me/BooleanToggle_test.<wbr>x3d</a><br></div><div></div></div></blockquote></div></div></div><div dir="auto"><div style="font-family:sans-serif" dir="auto"><div class="elided-text" dir="auto"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div></div></blockquote></div></div></div><div dir="auto"><div style="font-family:sans-serif" dir="auto"><div class="elided-text" dir="auto"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div></div></blockquote></div></div></div><div dir="auto"><div style="font-family:sans-serif" dir="auto"><div class="elided-text" dir="auto"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Oops, corrected</div><div dir="auto"><br></div><div dir="auto">h<a href="https://x3dom-booleanfilter.glitch.me/" style="">ttps://x3dom-booleantoggle.<wbr>glitch.me</a><br></div><div dir="auto"><br></div><div dir="auto"><div style="" dir="auto">h<a href="http://x3dom-booleanfilter.glitch.me/BooleanToggle_test.x3d" style="">ttp://x3dom-booleantoggle.<wbr>glitch.me/BooleanToggle_test.<wbr>x3d</a><br></div></div><div dir="auto"><div style="font-family:sans-serif" dir="auto"><div class="elided-text" dir="auto"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div style="font-family:sans-serif" dir="auto"><div class="elided-text" dir="auto"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div></div></blockquote></div></div></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The x3dom page uses a first (and probably pretty final) implementation of hte BooleanToggle node for x3dom. Again, the x3dom implementation is very straightforward and can be studied to learn more about how to implement nodes in x3dom:</div><div><br></div><div><a href="https://glitch.com/edit/#!/x3dom-booleantoggle?path=BooleanToggle.js:11:0" target="_blank">https://glitch.com/edit/#!/<wbr>x3dom-booleantoggle?path=<wbr>BooleanToggle.js:11:0</a><br></div><div><br></div><div>This example routes explicitly from the resetter to the toggle field and in addition then also to the intended target (the light):</div><div><br></div><div><a href="https://glitch.com/edit/#!/x3dom-booleantoggle?path=BooleanToggle_test.x3d:87:14" target="_blank">https://glitch.com/edit/#!/<wbr>x3dom-booleantoggle?path=<wbr>BooleanToggle_test.x3d:87:14</a><br></div><div><br></div><div>This works in view3dscene and Octaga (and x3dom).</div><div><br></div><div>If the input to the toggle field would also trigger an output the route to the light would not be necessary since there is already a route from the toggle node to the light:</div><div><br></div><div><a href="http://x3dom-booleantoggle.glitch.me/BooleanToggle_test2.x3d" target="_blank">http://x3dom-booleantoggle.<wbr>glitch.me/BooleanToggle_test2.<wbr>x3d</a><br></div><div><br></div><div>comments out this route. This still works in Octaga and view3dscene (and x3dom).</div><div><br></div><div>So it appears that the [in, out] signature of the toggle field of the BooleanToggle node in the spec. implies that an in event also triggers an out event; at least some browsers interpret it this way.</div><div><br></div><div>The plan is to submit the implementation to the x3dom repository to be adopted.</div><div><br></div><div>-Andreas</div><div><br></div><div><br></div></div><div class="gmail_extra"><div class="elided-text"><br><div class="gmail_quote">On Sat, Sep 16, 2017 at 7:19 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/utils.html#BooleanToggle" target="_blank">http://www.web3d.org/documents<wbr>/specifications/19775-1/V3.3/<wbr>Part01/components/utils.html#B<wbr>ooleanToggle</a><div dir="auto"><br></div><div dir="auto">produces a toggle output event after it receives a set_boolean event.</div><div dir="auto"><br></div><div dir="auto">Does it also produce a toggle output event after it receives a toggle input event (to reset the toggle field value) ?</div><div dir="auto"><br></div><div dir="auto"><a href="http://www.web3d.org/x3d/content/X3dTooltips.html#BooleanToggle" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/X3dTooltips.html#BooleanTog<wbr>gle</a><br></div><div dir="auto"><br></div><div dir="auto">does not mention this and the diagram at</div><div dir="auto"><a href="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/X3dEventUtilityNodeEventDiagrams.pdf" target="_blank">http://x3dgraphics.com/example<wbr>s/X3dForWebAuthors/Chapter09-E<wbr>ventUtilitiesScripting/X3dEven<wbr>tUtilityNodeEventDiagrams.pdf</a><br></div><div dir="auto"><br></div><div dir="auto">also seems silent.</div><div dir="auto"><br></div><div dir="auto">Not sure if there are examples which reset the internal value of the toggle field ?</div><span class="m_-7596055134248690682HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">Andreas</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div><font color="#888888">-- <br><div class="m_-7596055134248690682gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</font></div>
</blockquote></div><br></div></div></div>