ParallelGraphics Forums
Pocket Cortona
You are here:
[Forums]
::
[Browsers]
::
[Pocket Cortona]
All forums
How to use forums
Favorites
Services
Registration
Registration
Forgot your password?
Help
Help
Support
Quick search
Subscribe to newsletters
email:
password:
 
Browsers
-
Pocket Cortona
[reply]
[back to forum]
[new message]
[all forums]
Subject:
TimeSensor CycleTime & EAI with Pocket Cortona,WM6
Sender:
bois.a@wanadoo.fr
5.10.08 07:05
Hi,
I've modelized with VRML somesimple system.
First of all I've some animation sequenced by TimeSensor which allow me to chain animation sequence.
The first one is gear maintenance with all sequences chained, its work on my PC but not on the PPC, it start the first sequence and stop, not chainig to next seuqence .
Te second animation is box open procedure, unscrew 4 screw in a TimeSensor an move up the cover of box. The 4 screw animation iscomputed via script using the same TimeSensor, the cover is moved by another TimeSensor.
It work on PC but not on PPC, here also the first sequence only play.
Here is some code to explain more than words
DEF timer4 TimeSensor {
enabled TRUE
cycleInterval 5
loop FALSE
}
DEF timer5 TimeSensor {
enabled TRUE
cycleInterval 5
loop FALSE
}
DEF ScriptAnim Script {
eventIn SFTime Touched
eventIn SFFloat LaunchingVisAnim
eventIn SFTime aerea51
field SFNode tim1 USE timer1
field SFBool tim2activate FALSE
field SFBool tim3activate FALSE
field SFBool tim4activate FALSE
field SFBool tim5activate FALSE
field SFNode tim2 USE timer2
field SFNode tim3 USE timer3
field SFNode tim4 USE timer4
field SFNode tim5 USE timer5
field SFBool en FALSE
url "javascript:
function Touched(time){
tim1.startTime = time;
}
function LaunchingVisAnim(ratio) {
print('ratio = ' + ratio);
if (ratio < 0.25){
// print('seul timer1');
}
if ((ratio > 0.25)&& (ratio < 0.5)){
if(!tim2activate){
// print('timer 1,timer 2 se lance');
tim2.startTime = tim1.time;
tim2activate = true;
}
else{
// print('timer 1,timer 2');
}
}
if ((ratio > 0.5)&& (ratio< 0.75)){
if(!tim3activate){
//print('timer1,timer 2, timer 3 se lance');
tim3.startTime = tim1.time;
tim3activate = true;
}
else{
//print('timer1,timer2, timer 3');
}
}
if ((ratio > 0.75)&& (ratio < 0.97)){
if(!tim4activate){
// print('timer1,timer 2, timer 3, timer4 se lance');
tim4.startTime = tim1.time;
tim4activate = true;
}
else{
//print('timer1,timer2, timer 3, timer4');
}
}
/* if ((ratio > 0.99)&& (ratio< 1)){
if(!tim5activate){
tim5.startTime = tim1.time;
tim5activate = true;
}
else{
}
}
*/
}
function aerea51(tTime){
if(en){
// second cycletime, fin du cycle de timer4
// on lance maintennat le timer 5
tim5.startTime = tTime;
}
else{
//premier cycletime du timer4
// on change la valeur de en puis
//on attend la fin du timer 4
en = !en;
}
}
"
}
ROUTE TS.touchTime TO ScriptAnim.Touched
ROUTE timer1.fraction_changed TO ScriptAnim.LaunchingVisAnim
#ROUTE TS.touchTime TO timer1.startTime
ROUTE timer1.fraction_changed TO POSVIS.set_fraction
ROUTE POSVIS.value_changed TO vis1.translation
#ROUTE timer1.stopTime TO timer2.startTime
# ne fonctionne pas
# conclusion SCRIPT FULL
#ROUTE TS.touchTime TO timer2.startTime
ROUTE timer2.fraction_changed TO POSVIS2.set_fraction
ROUTE POSVIS2.value_changed TO vis2.translation
ROUTE timer3.fraction_changed TO POSVIS3.set_fraction
ROUTE POSVIS3.value_changed TO vis3.translation
ROUTE timer4.fraction_changed TO POSVIS4.set_fraction
ROUTE POSVIS4.value_changed TO vis4.translation
ROUTE timer4.cycleTime TO ScriptAnim.aerea51
ROUTE timer5.fraction_changed TO POSCOUVERCLE.set_fraction
ROUTE POSCOUVERCLE.value_changed TO couvercle.translation
The last question, on PC using activeX COM technology I use Browser.load() to call javascript function in the HTML parent, Tjere is one way to do this on PPC ??
[reply]
[back to forum]
[new message]
[all forums]
TimeSensor CycleTime & EAI with Pocket Cortona,WM6
/
bois.a@wanadoo.fr
/ 5.10.08 07:05
Messages in thread:
1
[reply]
[back to forum]
[new message]
[all forums]
© 1998-2007
ParallelGraphics
. All rights reserved.
Terms of use
.