[x3d-public] TimeSensor Control - CoordinateInterpolator2dExample.x3d

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Thu Aug 31 06:19:29 PDT 2023


Agreed that good TimeSensor control can be tricky (sure seems harder than it
should be) but it is achievable.

 

For your vignette, Joe, with enabled=true you can send a triggering event to
TimeSensor set_startTime to commence operation, keep loop=false to not
repeat.  Lather rinse repeat as desired.

 

*	X3D Tooltips, TimeSensor
*	https://www.web3d.org/x3d/content/X3dTooltips.html#TimeSensor

 

*	X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 07 Event
Animation Interpolation
*
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAn
imationInterpolation

 

The following example from that chapter shows use of a TouchSensor to send
the triggering SFTime event to the animation-clock TimeSensor.  It
simultaneously ROUTEs the TouchSensor isActive event to the animation
clock's enabled field, meaning that the animation only proceeds while the
user continues to select the TouchSensor on the green shape.

 

*	X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 07 Event
Animation Interpolation, Coordinate Interpolator 2D Example
*
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAn
imationInterpolation/CoordinateInterpolator2dExampleIndex.html

 

The language "select" here is carefully chosen because user selection might
occur with all manner of interaction devices.  If using a mouse, "select"
means the user clicks and holds the mouse button.  If using a phone or pad
with a touch screen, then "select" means touch and hold with your finger
(screenshot follows).  Keyboard-only operation (with arrow and ENTER keys)
is also defined in the X3D4 Architecture specification.  If using an
underwater CAVE immersive installation (perhaps in Blacksburg Virginia or
downtown Monterey California) then a swimming shark wearing a laser might
simply point and keep the green Extrusion painted to watch the animation.
Sorry but no video of that last one, yet, perhaps a good metaverse use case.

 

*
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAn
imationInterpolation/CoordinateInterpolator2dExamplePhoneTouchScreenImage.pn
g

 

Trouble report:  X3DOM does not yet support CoordinateInterpolator2D node.

*	X3DOM Nodes Index
*	https://doc.x3dom.org/author/nodes.html

 

Small additional progress report:  discerning eyes will notice a small
recent refinement in the pretty-print HTML documentation.  When inserting
the documentation links for ROUTE connections to/from the following node,
there is now a small box surrounding the inserted and original lines of
source.  Hopefully this is a usability help, suggested improvements always
welcome.

*
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAn
imationInterpolation/CoordinateInterpolator2dExample.html

 

Have fun with X3D interaction + animation!  8)

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
<mailto:brutzman at nps.edu> 

Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman

 

-----Original Message-----
From: x3d-public <x3d-public-bounces at web3d.org
<mailto:x3d-public-bounces at web3d.org> > On Behalf Of Joe D Williams
Sent: Wednesday, August 30, 2023 6:09 PM
To: x3d-public at web3d.org <mailto:x3d-public at web3d.org> 
Subject: [x3d-public] TimeSensor Control

 

<TimeSensor DEF='GBTimer' cycleInterval='100' loop='false' enabled='false'
/>

 

<BooleanSequencer DEF='GBTimerControl' 

key='0 1'

keyValue='true false' />

 

<ROUTE fromField='fraction_changed' fromNode='GBTimer'
toField='set_fraction' toNode='GBTimerControl'/> <ROUTE
fromField='value_changed' fromNode='GBTimerControl' toField='enabled'
toNode='GBTimer'/>

 

What combination of parameters so I need to get this to just Run Once then
stop.

Seems like if I start with loop='false' it doesn't go. 

enabled true or false sent by control does nothing 

 

Thanks,

Joe

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

_______________________________________________

x3d-public mailing list

x3d-public at web3d.org <mailto:x3d-public at web3d.org> 

http://web3d.org/mailman/listinfo/x3d-public_web3d.org

 

 

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu

Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman

 

-----Original Message-----
From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Joe D Williams
Sent: Wednesday, August 30, 2023 6:09 PM
To: x3d-public at web3d.org
Subject: [x3d-public] TimeSensor Control

 

<TimeSensor DEF='GBTimer' cycleInterval='100' loop='false' enabled='false'
/>

 

<BooleanSequencer DEF='GBTimerControl' 

key='0 1'

keyValue='true false' />

 

<ROUTE fromField='fraction_changed' fromNode='GBTimer'
toField='set_fraction' toNode='GBTimerControl'/> <ROUTE
fromField='value_changed' fromNode='GBTimerControl' toField='enabled'
toNode='GBTimer'/>

 

What combination of parameters so I need to get this to just Run Once then
stop.

Seems like if I start with loop='false' it doesn't go. 

enabled true or false sent by control does nothing 

 

Thanks,

Joe

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

_______________________________________________

x3d-public mailing list

 <mailto:x3d-public at web3d.org> x3d-public at web3d.org

 <http://web3d.org/mailman/listinfo/x3d-public_web3d.org>
http://web3d.org/mailman/listinfo/x3d-public_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230831/d1c707a3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230831/d1c707a3/attachment-0001.p7s>


More information about the x3d-public mailing list