Skip to main content

Alpha and Intermpolators

2 replies [Last post]
Anonymous

Hi,

I'd like to do a really simple thing, but it looks like I may have the wrong
approach.

- I can constantly move / rotate my boxes with Alpha and Interpolators => No
probmel
- I can click on a Box, no problem

However, what I want is :
1) the user clicks on a box
2) the Box triggers an interpolator (either rotation, position, we don't care
for now) that lasts around 2 seconds

So my approach is
1) Alpha alpha = new Alpha(1, 2000); => only 1 period
2) Create the interpolator, and add it to the tree

=> It looks like alpha starts before the interpolator starts... So I only get
the end of the animation with an alpha that's big enough, so most of the time,
nothing..

I'm sure I may have the wrong approach, so what do you suggest ?

Regards,
Sami Dalouche

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anonymous

Try this...

Alpha alpha = new Alpha (1,2000);
TransformInterpolator interpolator = new TransformInterpolator (alpha, cubeTG);
interpolator.setEnable (false);

//Triggering interpolator.
interpolator.setEnable (true);
alpha.setTriggerTime (System.currentTimeMillis ());

Sami Dalouche

Hi,

yes, it looks to work.. Thank you very much :)

Sami Dalouche

Selon java3d-interest@javadesktop.org:

> Try this...
>
> Alpha alpha = new Alpha (1,2000);
> TransformInterpolator interpolator = new TransformInterpolator (alpha,
> cubeTG);
> interpolator.setEnable (false);
>
> //Triggering interpolator.
> interpolator.setEnable (true);
> alpha.setTriggerTime (System.currentTimeMillis ());
> ---
> [Message sent by forum member 'BrainC' (BrainC)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=102065&#102065
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net