[x3d-public] BooleanTrigger example

Andreas Plesch andreasplesch at gmail.com
Wed Sep 20 14:06:20 PDT 2017


Here is the simplest, non-interactive BooleanTrigger example I could think
of to test an implementation:

https://glitch.com/edit/#!/x3dom-booleantrigger?path=index.html:22:1

https://x3dom-booleantrigger.glitch.me/

and the x3dom implementation which is tested:

https://glitch.com/edit/#!/x3dom-booleantrigger?path=BooleanTrigger.js:32:57

The perhaps most interesting part of the code is the commented
this.addField call for the triggerTrue field. While the field could be
added, I believe it is not necessary since it is output only and could not
be accessed anyways. However, x3dom should probably use actual node fields
for generating output events.

Another way to produce a blinking light is by using BooleanSequencer which
would reduce nodes and routes. Admittedly, the example is somewhat
contrived. Most (all?) potential time event sources for the trigger also
produce a boolean event in the first place. So where would BooleanTrigger
be typically used ?

-Andreas

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


More information about the x3d-public mailing list