Animate UV code is wrong

Software: Away3D 4.x

CyrilM, Newbie
Posted: 17 April 2013 04:00 PM   Total Posts: 15

in CompiledPass which I believe is now named DefaultScreenPass there is this code

public function set animateUVs(value Boolean) : void
  {
   _animateUVs 
value;
   if ((
value && !_animateUVs) || (!value && _animateUVs)) invalidateShaderProgram();
  

I don’t think that this is correct.
(true && !true) will always be false…
This was causing the shader code to crash when animateUVs was true.
I changed it to

public function set animateUVs(value Boolean) : void
  {
   
if (value != _animateUVs
   
{
    _animateUVs 
value;
    
invalidateShaderProgram();
   
}
  } 

and it seemed to work perfectly. Just a heads up for anyone playing with animated UVs

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X