[x3d-public] TimeSensor resumeTime field [Mantis 1106]
Andreas Plesch
andreasplesch at gmail.com
Mon Dec 19 12:56:26 PST 2016
On Mon, Dec 19, 2016 at 12:14 PM, Yves Piguet <yves.piguet at gmail.com> wrote:
> A global pause is more practical for pausing the whole scene, because
> otherwise you have to route a pause event to all time-related nodes
> (TimeSensor, other nodes enumerated in 19775 8.2.4.1 http://www.web3d.org/
> documents/specifications/19775-1/V3.3/Part01/components/time.html#
> TimeDependentNodesOverview and nodes related to physics models)
>
In many cases it may be possible to use a single time source ? Lots of
routes are not uncommon in scenes.
Dick Tracy style, global time pausing may require another mechanism,
presumably a field in a global node (WorldInfo??). Sensed time then could
be relative to an initial scene time as a time origin. Pausing then may
mean that the time origin keeps advancing (at the same rate as the
simulation time) so that the sensed time appears to stay constant. Resuming
may mean that the time origin becomes fixed again (at the current time).
Hm, this could be probably done in a backwards compatible way, since the
current situation is simply a fixed time origin of 0. This may work but
would produce apparent pausing and no power savings. Apparent pausing would
be a better fit to the fact time actually does not pause.
Pausing correctly is important especially on mobile devices where the user
> wants to reduce power consumption without quitting the browser.
>
On web browsers this is solved by requestAnimationFrame which lets the web
browser control when to stop running code, for example when a user switches
to another tab. Pausing is great for standalone x3d browsers but they may
have their own, external to x3d, mechanisms.
> I haven't found pause/resume methods in 19775-2 (SAI). I'd suggest to add
> this functionality there.
>
One would just set fields, no ?
> Yves
>
> > On 19 Dec 2016, at 17:36, Andreas Plesch <andreasplesch at gmail.com>
> wrote:
> >
> > Thanks Roy,
> >
> > the next step may be to come up with a simple test scene (as I could not
> find any in the x3d examples collection) and check how different x3d
> browsers behave.
> >
> > A directly related question is how x3d/vrml scenes managed pausing of
> animations before pause/resumeTime was introduced ? If there is a well
> known strategy/method for pausing, this issue may become almost irrelevant.
> But it seems pausing would involve stopping, and then restarting with a
> startTime at the appropriate time in the past:
> >
> > timeOffset = fraction_changed_whenStopped * cycleInterval
> > startTime = now - timeOffset
> >
> > Setting startTime of an inactive sensor to a time in the past seems to
> be allowed.
> >
> > This looks like it would require scripting, and does make a built in
> pausing functionality more attractive.
> >
> > -Andreas
>
>
>
--
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161219/481cc391/attachment.html>
More information about the x3d-public
mailing list