Kodi Community Forum

Full Version: [Transition] Spin.tra
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This one is just a try (spinnes the current preset out and the next in):
PHP Code:
// Spin.tra
// Author - morte0815

float time;

void Init()
{
  
time 0;
}

void Render()
{

gfxSetAspect(0);
  
time += TIMEPASS;
  
float angle time 1.5f;
  if (
angle 0){ angle = -angle;}
  
angle 1.5f angle
  
gfxRotate(Pow(360,angle*2),0,0,1);
  
gfxPushMatrix();
  if (
time 1.5f){
  
gfxSetTexture(TEXTURE_NEXTPRESET);
     
gfxTranslate(005.414-time);
     
gfxColour(1111);
     
gfxTexRect(-111, -1);
     
gfxPopMatrix();
    
gfxSetTexture(TEXTURE_CURRPRESET);
     
gfxTranslate(002.414+time);
     
gfxColour(1111);
     
gfxTexRect(-111, -1);
   } 
  if (
time >= 1.5f){
  
    
gfxSetTexture(TEXTURE_CURRPRESET);
     
gfxTranslate(002.414+time);
     
gfxColour(1111);
     
gfxTexRect(-111, -1);
     
gfxPopMatrix();
     
gfxSetTexture(TEXTURE_NEXTPRESET);
     
gfxTranslate(005.414-time);
     
gfxColour(1111);
     
gfxTexRect(-111, -1);
   } 
  if (
time>=3){
    
FINISHED true;
  }
        


Have Fun Big Grin
that's alot of spins in a short time!