<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Mike<div class=""><br class=""></div><div class="">This sounds similar to a scene I worked on at <a href="http://www.kshell.com/pages/cmmpoc/index.html" class="">http://www.kshell.com/pages/cmmpoc/index.html</a> . I've got three sliders feeding into 3 position interpolators,</div><div class="">Because I load my x3d as an external file I have to run a javascript after loading that looks through the DOM tree and finds those interpolators.</div><div class=""><br class=""></div><div class="">But the relevant part for you I think, is to define a function which I call "moveInterpolator" and to set it as the handler for the 'oninput' method of the slider.</div><div class="">You can see it in the source html for page <a href="http://www.kshell.com/pages/cmmpoc/index.html" class="">http://www.kshell.com/pages/cmmpoc/index.html</a></div><div class=""><br class=""></div><div class="">Vince Marchetti</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 14, 2019, at 4:29 PM, Mike McCann <<a href="mailto:mccann@mbari.org" class="">mccann@mbari.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Joe,<div class=""><br class=""></div><div class="">Thanks for the memory jog. I recall doing it this way in pure VRML.</div><div class=""><br class=""></div><div class="">What I can’t figure out is how to “route” the output of the HTML slider into X3DOM's Interpolators. Is there an attribute in the x3dom runtime that I can set?</div><div class=""><br class=""></div><div class="">-Mike</div><div class="">
<div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 13, 2019, at 1:44 PM, Joseph D Williams <<a href="mailto:joedwil@earthlink.net" class="">joedwil@earthlink.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi Mike,<span class="Apple-converted-space"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Same as to do a slider control in x3d?</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">You disconnect the TimeSensor and drive the Position and Orientation Interpolators with a number you derive from the slider, I think.</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Joe</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; border: none; padding: 0in;" class=""><b class="">From:<span class="Apple-converted-space"> </span></b><a href="mailto:mccann@mbari.org" style="color: blue; text-decoration: underline;" class="">Mike McCann</a><br class=""><b class="">Sent:<span class="Apple-converted-space"> </span></b>Friday, December 13, 2019 10:25 AM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b><a href="mailto:x3dom-users@lists.sourceforge.net" style="color: blue; text-decoration: underline;" class="">x3dom mlist</a>;<span class="Apple-converted-space"> </span><a href="mailto:x3d-public@web3d.org" style="color: blue; text-decoration: underline;" class="">X3D Graphics public mailing list</a><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>[x3d-public] HTML slider and TimeSensor scrubbing behavior</div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hello,</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I have a TimeSensor that drives Position and Orientation Interpolators via ROUTEd fraction _changed and set_ events.</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The fraction_changed event out is also connected to an HTML slider (<input type=“range”>) via X3DOM’s onoutputchange() attribute.</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The HTML slider shows the progress of the animation, but I’d also like to use it to control the fraction of the animation, much like one can scrub through a video with a timeline slider.</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">It seems that if I were able to set the fraction of the TimeSensor from the HTML slider I could achieve my goal, but there is not a set_fraction event in for it.</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Is there a best practice or any suggestions for how I may achieve my goal?</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks in advance,</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Mike</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">P.S. Though my immediate need is to implement this in X3DOM, I’d think that this might be a common use case, so I’m cross-posting on x3d-public.</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">--</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Mike McCann</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Software Engineer</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Monterey Bay Aquarium Research Institute</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">7700 Sandholdt Road</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Moss Landing, CA 95039-9644</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Voice: 831.775.1769 Fax: 831.775.1736 <a href="http://www.mbari.org/" class="">http://www.mbari.org</a></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">_______________________________________________</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">x3d-public mailing list</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a href="mailto:x3d-public@web3d.org" style="color: blue; text-decoration: underline;" class="">x3d-public@web3d.org</a></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" style="color: blue; text-decoration: underline;" class="">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a></div></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">x3d-public mailing list<br class=""><a href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><br class="">http://web3d.org/mailman/listinfo/x3d-public_web3d.org<br class=""></div></blockquote></div><br class=""></div></body></html>