[x3d-public] Discussion of TimeSensor Controls
Leonard Daly
Leonard.Daly at realism.com
Tue Feb 2 11:53:42 PST 2016
Mike McCann and I have been having a private discussion that we both
thought should be put on x3d-public and perhaps x3dom-users.
I had announced the initial availability of a new node in work that I am
doing for V4. This node is a functional replacement for TImeSensor and
the various interpolation nodes. It is called Animate. I will go into
more detail on that node later on. The particular question also arises
with V3.x nodes.
Mike was wondering what it would take to have an HTML slider that would
show where in the animation loop and allow control of playback, much
like a slider on an audio or video playback you might find with YouTube,
NetFlix, etc.
IOW, in hands-off mode, the slider moves from start to finish as
fractional time advances. This is easy to implement as you can get the
fractional time value and apply it to the slider position.
In hands-on mode, a button-click on the slider needs to pause the time
control. A drag on the slider would change the fractional time of the
sensor and button release would start playback from that position. Also
clicking at a location on the slider widget would have the same effect
as a drag.
TimeSensor has 'startTime', 'pauseTIme', 'resumeTime', and 'stopTIme'
fields. This all take local-time in seconds from epoch as the time of
action. There is also 'cycleInterval' for the duration of a single pass,
and 'loop' to indicate if the animation should repeat.
To implement a controlling slider, it would be nice to have 'pause' and
'resume' fields that pause and resume the sensor without needing to
explicitly supply time. For the slider to control where (when?) in the
playback, it might be possible to manipulate the existing 'startTime'
and 'stopTIme' fields to achieve the desired results, but some of those
changes are ignored if the TImeSensor is currently active (paused counts
as active).
I think adding a new field called (something like) 'set_fraction' would
make the user's work much easier and obvious. This would set the current
fractional time and everything would proceed from there.
There are open questions when things need to run for certain and
specific intervals. For example, an animation needed to run from 11:03
to 11:05 local time. At 11:04:48 (fractional time = 0.9) someone changes
the fractional time to 0.1 (essentially 11:03:12).
1) Is this a case of not a spec problem, because the developer needs to
ensure this kind of integrity
2) This is a security issue that needs to be handled inside the X3D
application
3) This is a major vulnerability that needs specification definition
4) This is interpreted code that is run on the user's computer and there
is nothing that can be done.
5) Something else or not listed.
--
*Leonard Daly*
3D Systems & Cloud Consultant
X3D Co-Chair on Sabbatical
LA ACM SIGGRAPH Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160202/afc20da7/attachment.html>
More information about the x3d-public
mailing list