<div dir="auto"><div dir="auto">Here is a first x3dom IntegerTrigger implementation and example:</div><div dir="auto"><br></div><div dir="auto"><a href="https://x3dom-integertrigger.glitch.me" target="_blank">https://x3dom-integertrigger.<wbr>glitch.me</a></div><div dir="auto"><br></div><div dir="auto">I will try to add resetting of the IntegerKey field, probably from an IntegerSequencer field.</div><div dir="auto"><br></div><div dir="auto">The tooltip at</div><div dir="auto"><br></div><a href="http://www.web3d.org/x3d/content/X3dTooltips.html#IntegerTrigger" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/X3dTooltips.html#IntegerTri<wbr>gger</a><div dir="auto"><br></div><div dir="auto">explains that<b style="font-family:"times new roman";font-size:medium"><font color="navy"> boolean true or time input events </font></b><span style="font-family:sans-serif">can be converted. Why time input ? And Boolean false is also triggering, no ?</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Andreas</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 22, 2017 6:20 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="auto">I agree, IntegerTrigger would also require such a statement.<div dir="auto"><br></div><div dir="auto">Since I have implemented IntegerTrigger now for x3dom, and recognize its utility for choosing a switch option, it is less obvious to me that resetting its value should always also lead to output of that value.</div><div dir="auto"><br></div><div dir="auto">The more conservative approach would be to leave this decision to the author. If a new value is provided to the IntegerTrigger node, the same new value can also always be provided to another node.</div><div dir="auto"><br></div><div dir="auto">But since players currently do forward these inputs as outputs, there may be a event cascade requirement or similar.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div></div><div class="elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Sep 20, 2017 10:20 AM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is an excellent improvement, we should submit a spec change.<br>
<br>
Am thinking that similar wording should be provided for IntegerTrigger integerKey field, e.g.<br>
<br>
        "Resetting the /integerKey/ field generates a<br>
corresponding /integerKey/ field output event."<br>
<br>
<a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/utils.html#IntegerTrigger" rel="noreferrer" target="_blank">http://www.web3d.org/documents<wbr>/specifications/19775-1/V3.3/P<wbr>art01/components/utils.html#In<wbr>tegerTrigger</a><br>
<br>
==============================<wbr>================<br>
30.4.6 IntegerTrigger<br>
<br>
IntegerTrigger : X3DTriggerNode {<br>
  SFBool  [in]     set_boolean<br>
  SFInt32 [in,out] integerKey   -1   (-∞,∞)<br>
  SFNode  [in,out] metadata     NULL [X3DMetadataObject]<br>
  SFInt32 [out]    triggerValue<br>
}<br>
<br>
IntegerTrigger handles single field Boolean events to set an integer value for the output event. This is useful for connecting environmental events to the Switch node's whichChoice field.<br>
<br>
Upon receiving a set_boolean event, the IntegerTrigger node will generate a triggerValue event with the current value of integerKey. The value of set_boolean shall be ignored.<br>
==============================<wbr>================<br>
<br>
<br>
On 9/18/2017 10:39 AM, Andreas Plesch wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sending output fields upon value changes is how the browsers I tested behaved. Although to me the sentence in 4.4.8.1 which addresses this behaviour and begins with "Nodes also define output fields .." is more explanatory than defining and seems to be intended to leave the exact behavior specification to node definitions. Here is suggested wording to help clarify 30.4.3:<br>
<br>
The BooleanToggle can be reset to a specific state by directly setting the value of the inputOutput /toggle/ field. Resetting the /toggle/ field generates a corresponding /toggle/ field output event.<br>
<br>
There is probably a better and/or more concise phrase to add.<br>
<br>
-Andreas<br>
<br>
On Mon, Sep 18, 2017 at 12:46 PM, Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>> wrote:<br>
<br>
    Thank you Andreas.  Looks like you have identified an ambiguity in the spec<br>
    that might benefit from clarification.<br>
<br>
    Since the first paragraph specifically identified output events, and the<br>
    second paragraph on "reset" did not, my interpretation was that no event was<br>
    sent as part of a reset.  That informed the tooltips and diagram notes.     However, checking event model rules:<br>
    <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#Events" rel="noreferrer" target="_blank">http://www.web3d.org/documents<wbr>/specifications/19775-1/V3.3/P<wbr>art01/concepts.html#Events</a><br>
    <<a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#Events" rel="noreferrer" target="_blank">http://www.web3d.org/document<wbr>s/specifications/19775-1/V3.3/<wbr>Part01/concepts.html#Events</a>><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
        4.4.8 Event model<br>
<br>
<br>
          4.4.8.1 Events<br>
<br>
    /Events/ are the primary means of generating behaviors in the X3D run-time<br>
    environment. Events are used throughout X3D: driving time-based<br>
    animations; handling object picking; detecting user movement and<br>
    collision; changing the scene graph hierarchy. The run-time environment<br>
    manages the propagation of events through the system according to a<br>
    well-defined set of rules.<br>
<br>
    Nodes define input fields (/i.e./, fields with inputOutput or inputOnly<br>
    access) that trigger behavior. When a given event occurs, the node<br>
    receives notification and can potentially change internal state and the<br>
    value of one or more of its fields. *Nodes also define output fields<br>
    (/i.e./, fields with inputOutput or outputOnly access) that are sent upon<br>
    signal state changes or other occurrences within the node.* Events sent to<br>
    input fields and events sent by output fields are referred to collectively<br>
    in ISO/IEC 19775 as /Events/.<br>
<br>
</blockquote>
<br>
    The bolded sentence (beginning with "Nodes also define output fields... that<br>
    are sent upon signal state changes" ...) indicates that a corresponding<br>
    output event should be sent when the value is changed.<br>
<br>
    Subject to review, am happy to make the tooltips and diagram notes more<br>
    explicit in this matter.  We should likely also add words to spec to avoid<br>
    indirect ambiguity and explicitly add clarity.<br>
<br>
    all the best, Don<br>
    --     Don Brutzman  Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
    <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>
    Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA <a href="tel:%2B1.831.656.2149" value="+18316562149" target="_blank">+1.831.656.2149</a><br>
    <tel:<a href="tel:%2B1.831.656.2149" value="+18316562149" target="_blank">+1.831.656.2149</a>><br>
    X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzma<wbr>n</a><br>
    <<a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzm<wbr>an</a>><br>
<br>
<br>
    On Sep 16, 2017, at 4:20 PM, Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a><br>
    <mailto:<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.co<wbr>m</a>>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/utils.html#BooleanToggle" rel="noreferrer" target="_blank">http://www.web3d.org/documents<wbr>/specifications/19775-1/V3.3/P<wbr>art01/components/utils.html#Bo<wbr>oleanToggle</a><br>
    <<a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/utils.html#BooleanToggle" rel="noreferrer" target="_blank">http://www.web3d.org/document<wbr>s/specifications/19775-1/V3.3/<wbr>Part01/components/utils.html#B<wbr>ooleanToggle</a>><br>
<br>
<br>
    produces a toggle output event after it receives a set_boolean event.<br>
<br>
    Does it also produce a toggle output event after it receives a toggle<br>
    input event (to reset the toggle field value) ?<br>
<br>
    <a href="http://www.web3d.org/x3d/content/X3dTooltips.html#BooleanToggle" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/X3dTooltips.html#BooleanTog<wbr>gle</a><br>
    <<a href="http://www.web3d.org/x3d/content/X3dTooltips.html#BooleanToggle" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/cont<wbr>ent/X3dTooltips.html#BooleanTo<wbr>ggle</a>><br>
<br>
    does not mention this and the diagram at<br>
    <a href="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/X3dEventUtilityNodeEventDiagrams.pdf" rel="noreferrer" target="_blank">http://x3dgraphics.com/example<wbr>s/X3dForWebAuthors/Chapter09-E<wbr>ventUtilitiesScripting/X3dEven<wbr>tUtilityNodeEventDiagrams.pdf</a><br>
    <<a href="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/X3dEventUtilityNodeEventDiagrams.pdf" rel="noreferrer" target="_blank">http://x3dgraphics.com/exampl<wbr>es/X3dForWebAuthors/Chapter09-<wbr>EventUtilitiesScripting/X3dEve<wbr>ntUtilityNodeEventDiagrams.pdf</a><wbr>><br>
<br>
    also seems silent.<br>
<br>
    Not sure if there are examples which reset the internal value of the<br>
    toggle field ?<br>
<br>
    Andreas<br>
    ______________________________<wbr>_________________<br>
    x3d-public mailing list<br>
    <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
    <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listi<wbr>nfo/x3d-public_web3d.org</a><br>
    <<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/list<wbr>info/x3d-public_web3d.org</a>><br>
</blockquote>
<br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
</blockquote>
<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   <a href="tel:%2B1.831.656.2149" value="+18316562149" target="_blank">+1.831.656.2149</a><br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzma<wbr>n</a><br>
</blockquote></div></div>
</div></blockquote></div><br></div>