<div dir="ltr">Here is the<div><br></div><div><a href="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/ScriptComplexStateEventsIndex.html">http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/ScriptComplexStateEventsIndex.html</a></div><div><br></div><div>converted using a ScalarSequencer (naming following ScalarInterpolator):</div><div><br></div><div><a href="https://quirky-winter.glitch.me/">https://quirky-winter.glitch.me/</a><br></div><div><br></div><div>And here are the relevant changes to the scene</div><div><br></div><div><a href="https://glitch.com/edit/#!/quirky-winter?path=index.html:75:7">https://glitch.com/edit/#!/quirky-winter?path=index.html:75:7</a><br></div><div><br></div><div>Replacing the script and its custom field declarations, there is now only one Sequencer node, one ColorInterpolator and one additional route, three lines.</div><div><br></div><div>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 ..).</div><div><br></div><div>How does that look ?</div><div><br></div><div>-Andreas</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 17, 2017 at 11:25 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I am thinking about how to convert this example of a 4 state button from scripting to event utilities:<div dir="auto"><br></div><div dir="auto"><a href="http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter09-EventUtilitiesScripting/ScriptComplexStateEventsIndex.html" target="_blank">http://x3dgraphics.com/<wbr>examples/X3dForWebAuthors/<wbr>Chapter09-<wbr>EventUtilitiesScripting/<wbr>ScriptComplexStateEventsIndex.<wbr>html</a><br></div><div dir="auto"><br></div><div dir="auto">Using a Switch driven by an IntegerSequencer driven by the TouchSensor using the next field would work but requires 4 full Shape nodes.</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">In general, with a FloatSequencer it would be possible to use all the Interpolators as typed output, in effect converting from boolean.</div><div dir="auto"><br></div><div dir="auto">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?</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Any feedback or comment very welcome,</div><div dir="auto"><br></div><div dir="auto">Andreas</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</div>