Kodi Community Forum
[Transition] Spin.tra - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: Screensavers and visualisations (https://forum.kodi.tv/forumdisplay.php?fid=38)
+---- Thread: [Transition] Spin.tra (/showthread.php?tid=22392)



[Transition] Spin.tra - morte0815 - 2006-10-03

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


- pike - 2006-10-03

that's alot of spins in a short time!