This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > July 2004 > Non-looping animation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Non-looping animation
|
|
| ashwinmag 2004-07-20, 10:51 pm |
| Hi,
For animation using TimeSensor,
the animation works only when the loop is set to TRUE.
DEF Clock1 TimeSensor {
cycleInterval 3
startTime 0
stopTime 5
loop TRUE
}
Why does it not work when the loop is set to FALSE.
| |
| Joerg Scheurich aka MUFTI 2004-07-20, 10:51 pm |
| > For animation using TimeSensor,
> the animation works only when the loop is set to TRUE.
> Why does it not work when the loop is set to FALSE.
You need to start the using set_startTime, like here via a TouchSensor
when you click to the cone.
It is also possible to let a timesensor start at a specific time (via the
utc seconds since "the epoch") but using something like
DEF TimeSensor1 TimeSensor
{
cycleInterval 3
startTime 1.089107999e9
}
is rather impractical
for details see
http://www.web3d.org/x3d/specificat...html#TimeSensor
#VRML V2.0 utf8
DEF Transform1 Transform
{
children
[
Shape
{
appearance Appearance
{
material Material
{
}
}
geometry Cone
{
}
}
DEF TouchSensor1 TouchSensor
{
}
]
}
DEF TimeSensor1 TimeSensor
{
cycleInterval 3
}
ROUTE TouchSensor1.touchTime TO TimeSensor1.set_startTime
DEF PositionInterpolator1 PositionInterpolator
{
key
[
0
1
]
keyValue
[
0 0 0
0 2 0
]
}
ROUTE TimeSensor1.fraction_changed TO PositionInterpolator1.set_fraction
ROUTE PositionInterpolator1.value_changed TO Transform1.set_translation
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|