[x3d-public] FloatSequencer ?

Andreas Plesch andreasplesch at gmail.com
Fri Oct 6 12:17:44 PDT 2017


Here is the

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

converted using a ScalarSequencer (naming following ScalarInterpolator):

https://quirky-winter.glitch.me/

And here are the relevant changes to the scene

https://glitch.com/edit/#!/quirky-winter?path=index.html:75:7

Replacing the script and its custom field declarations, there is now only
one Sequencer node, one ColorInterpolator and one additional route, three
lines.

This pattern would be the main intended usage, eg. using sequencer fraction
output to get interpolator typed output for use in the scene (colors,
orientations, positions ..).

How does that look ?

-Andreas




On Sun, Sep 17, 2017 at 11:25 PM, Andreas Plesch <andreasplesch at gmail.com>
wrote:

> 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
>



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


More information about the x3d-public mailing list