These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Mesh Opacity Animation

mcedeno101
mcedeno101's picture
Registered: Oct 15 2009
Posts: 20
Answered

I want to control the mesh opacity of an object so that it reveals slowly instead of instantly. Is there a "Timer" method in the 3D annotation javascript so I can control opacity?

My Product Information:
Acrobat 3D 9.2, Windows
UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
Assuming you're talking about simulation time rather than system time, you can use the timeEventHandler() object. It's not particularly simple as there's no concept of a tick interval, so your function has to work out by itself when it should do something based on the value of the .deltaTime property.


var TEH = new TimeEventHandler();
TEH.onTimeChange = true;

TEH.onEvent = function( event )
{
do-something-based-on( event.deltaTime );
}

runtime.addEventHandler( TEH );
Ives
Ives's picture
Registered: Oct 14 2010
Posts: 4
nice link shared,..
yup. that was it. Which sucks because I'm trying to create an animation that
has multiple transparent objects in which you "swoop" around in a room so the
order by distance of each object from the camera is variable.
mcedeno101
mcedeno101's picture
Registered: Oct 15 2009
Posts: 20
Thanks for the big help USVAR! It worked.