<div dir="ltr"><div>I updated</div><div><br></div><a href="https://rawgit.com/andreasplesch/cobweb_dom/proto/tests/interactiveTransformations.xhtml">https://rawgit.com/andreasplesch/cobweb_dom/proto/tests/interactiveTransformations.xhtml</a><div><br></div><div>to show a fade-in/out effect for the rotor handles when hovering over the teapot, and decided to use event utilities rather than scripting.</div><div><br></div><div>It was quick to see that TimeTrigger could be used to trigger the fade animation as TouchSensor does not generate a time event for just hovering. It was harder for me to recognize that BooleanFilter would allow for invoking the different interpolators for fading in and fading out.</div><div><br></div><div>Here is the relevant animation section:</div><br><font face="monospace, monospace" size="1"><!-- fade gizmo in and out --><br><TimeSensor DEF='timerIn' cycleInterval='1' enabled='true' /><br><TimeSensor DEF='timerOut' cycleInterval='1' enabled='true' /><br><TimeTrigger DEF='getTimeIn' /><br><TimeTrigger DEF='getTimeOut' /><br><BooleanFilter DEF='splitBool' /><br><ROUTE fromNode='bandsSensor' fromField='isOver' toNode='splitBool' toField='set_boolean' /><br><ROUTE fromNode='splitBool' fromField='inputTrue' toNode='getTimeIn' toField='set_boolean' /><br><ROUTE fromNode='splitBool' fromField='inputFalse' toNode='getTimeOut' toField='set_boolean' /><br><ROUTE fromNode='getTimeIn' fromField='triggerTime' toNode='timerIn' toField='startTime' /><br><ROUTE fromNode='getTimeOut' fromField='triggerTime' toNode='timerOut' toField='startTime' /><br><ScalarInterpolator DEF='fadeIn' key='0 0.5 1' keyValue='0.9 0.25 0' /><br><ScalarInterpolator DEF='fadeOut' key='0 0.5 1' keyValue='0 0.75 0.9' /><br><ROUTE fromNode='timerIn' fromField='fraction_changed' toNode='fadeIn' toField='set_fraction' /><br><ROUTE fromNode='timerOut' fromField='fraction_changed' toNode='fadeOut' toField='set_fraction' /><br><ROUTE fromNode='fadeIn' fromField='value_changed' toNode='RED_APP_Mat' toField='transparency' /><br><ROUTE fromNode='fadeOut' fromField='value_changed' toNode='RED_APP_Mat' toField='transparency' /></font><div><font face="monospace, monospace" size="1"><br></font></div><div><br></div><div>It looks rather verbose and I am wondering if there is a more concise way to achieve the same effect without scripting ? The answer may well be to use a script.</div><div><br></div><div>I also learned that it can be useful to 'debug' the flow of x3d events. One way is to have a script log things to the console. Are there builtin tools in x3d editors to help with tracing events (perhaps as they happen) ?</div><div><br></div><div>-Andreas </div><div><br></div><div><br></div><div><br></div><div> </div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div>