[x3d-public] BooleanToggle output

Andreas Plesch andreasplesch at gmail.com
Sun Sep 17 16:36:01 PDT 2017


On Sep 17, 2017 6:12 PM, "Andreas Plesch" <andreasplesch at gmail.com> wrote:

Here is an example for reseting the toggle field of the BooleanToggle node:

https://x3dom-booleanfilter.glitch.me/
http://x3dom-booleanfilter.glitch.me/BooleanToggle_test.x3d



Oops, corrected

https://x3dom-booleantoggle.glitch.me
<https://x3dom-booleanfilter.glitch.me/>

http://x3dom-booleantoggle.glitch.me/BooleanToggle_test.x3d
<http://x3dom-booleanfilter.glitch.me/BooleanToggle_test.x3d>




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:

https://glitch.com/edit/#!/x3dom-booleantoggle?path=BooleanToggle.js:11:0

This example routes explicitly from the resetter to the toggle field and in
addition then also to the intended target (the light):

https://glitch.com/edit/#!/x3dom-booleantoggle?path=
BooleanToggle_test.x3d:87:14

This works in view3dscene and Octaga (and x3dom).

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:

http://x3dom-booleantoggle.glitch.me/BooleanToggle_test2.x3d

comments out this route. This still works in Octaga and view3dscene (and
x3dom).

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.

The plan is to submit the implementation to the x3dom repository to be
adopted.

-Andreas



On Sat, Sep 16, 2017 at 7:19 PM, Andreas Plesch <andreasplesch at gmail.com>
wrote:

> http://www.web3d.org/documents/specifications/19775-1/V3.3/
> Part01/components/utils.html#BooleanToggle
>
> produces a toggle output event after it receives a set_boolean event.
>
> Does it also produce a toggle output event after it receives a toggle
> input event (to reset the toggle field value) ?
>
> http://www.web3d.org/x3d/content/X3dTooltips.html#BooleanToggle
>
> does not mention this and the diagram at
> http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-E
> ventUtilitiesScripting/X3dEventUtilityNodeEventDiagrams.pdf
>
> also seems silent.
>
> Not sure if there are examples which reset the internal value of the
> toggle field ?
>
> Andreas
>



-- 
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170917/75b18725/attachment.html>


More information about the x3d-public mailing list