<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">Hi,</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">my colleague Pasquale (CC) did something similar in
one of his X3DOM projects - let me forward his message to this
list (see below).<o:p><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"><br>
</span></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"><o:p><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">
Regards,<br>
Max<br>
</span><br>
<br>
<br>
</o:p>We have a basic html slider. Slider movement triggers a
function that manipulates the time source.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">The basic idea is to set a new start time which
lies in the past. The elapsed time since the start is the given
fraction of one cycle interval.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"><o:p><br>
</o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">var currentInterval =
timeSource.getAttribute("cycleInterval");<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">var timeElapsed = fraction * currentInterval;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">var currentTime = (new Date()).getTime()/1000;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">var newStartTime = currentTime - timeElapsed;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">timeSource.setAttribute("enabled","false");<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">timeSource.setAttribute("startTime",
String(newStartTime));<o:p></o:p></span></p>
<span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
lang="EN-US">timeSource.setAttribute("enabled",”true”);<br>
<br>
<br>
<br>
</span><br>
<div class="moz-cite-prefix">On 19.03.2015 00:42, Mike McCann wrote:<br>
</div>
<blockquote
cite="mid:39269265-0159-4E9B-8EA9-37AB8F8286AC@mbari.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Hello,
<div><br>
</div>
<div>I have an hour's worth of platform orientation data that I
can play back with a TimeSensor. I'd like to give the viewer a
slider to be able to "scrub" through the data.</div>
<div><br>
</div>
<div>I can route in a PlaneSensor to control the
OrientationInterpolators, but when the PlaneSensor is not active
the TimeSensor resumes with its value not being changed.</div>
<div><br>
</div>
<div>What I'd like to do is to route a value into a 'set_fraction'
field of TimeSensor, but that is not in the X3D specification.</div>
<div><br>
</div>
<div>Are there any other ideas on how to accomplish this? (I'd
think that this would be a common use case: basically a video
playback controller for any sort of time dependent data.)</div>
<div><br>
</div>
<div>-Mike</div>
<div><br>
<div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse:
separate; color: rgb(0, 0, 0); font-family: Helvetica;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; ">--<br>
Mike McCann<br>
Software Engineer<br>
Monterey Bay Aquarium Research Institute<br>
7700 Sandholdt Road<br>
Moss Landing, CA 95039-9644<br>
Voice: 831.775.1769 Fax: 831.775.1736 <a
moz-do-not-send="true" href="http://www.mbari.org">http://www.mbari.org</a></span>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
x3d-public mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>
<a class="moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>
</pre>
</blockquote>
<br>
</body>
</html>