[x3d-public] FloatSequencer ?

Andreas Plesch andreasplesch at gmail.com
Sun Sep 17 20:25:55 PDT 2017


I am thinking about how to convert this example of a 4 state button from
scripting to event utilities:

http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/ScriptComplexStateEventsIndex.html

Using a Switch driven by an IntegerSequencer driven by the TouchSensor
using the next field would work but requires 4 full Shape nodes.

If there were a FloatSequencer, it would be possible to use it to provide
fractions to a ColorInterpolator to be fed into the bulb material. This
would be closer to the script and overall a more direct, and perhaps
elegant solution.

In general, with a FloatSequencer it would be possible to use all the
Interpolators as typed output, in effect converting from boolean.

Since such a FloatSequencer is very straightforward to implement (in x3dom
almost identical to IntegerSequencer) I will try this but wonder if such a
node had been proposed in the past?

I suspect that it would be almost trivial to add such a node to any browser
and suggest that it would enhance the utility of the event utilities
substantially, pun notwithstanding.

Any feedback or comment very welcome,

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170917/26434671/attachment-0001.html>


More information about the x3d-public mailing list