maxNum = 10
-- Define our particle characteristics
pAge = Allocate(1) ; -- Allocate a TReal age member
pSpin = Allocate(1); -- Allocate a TReal spin member
pRadius = Allocate(1); -- Allocate a TReal radius member
pSpinSpeed = Allocate(1); -- Allocate a TReal spin member

-- Set the particle texture
SetTexture("starhint3");
SetBlendMode(kBlendAdditiveAlpha);

SetNumParticles(maxNum);    -- Create some particles

pRadius:Init( fRange( 60,60 ) );
pColor:Init( Color(0.5,0.5,0.5,0.25) );
pScale:Init( 0.5 );
pAge:Init(0);
--pSpin:Init( fRange( 0, 2*3.1415927 ) );
pSpin:Init( fOpenCycle( 0,6.26,maxNum ) );
--pSpin:Init( 0 );
--pSpinSpeed:Init( fRange( -10, 10 ) );
pSpinSpeed:Init( 5 );
pPosition:Init(-100,-100);

pRadius:Anim( pRadius - fTimeScale(30) );
pPosition:Anim( f2dRotation(pSpin)*pRadius + dLocus );
pPosition:Anim( pPosition );
--pScale:Anim( pScale + fTimeScale(0.1) );
pColor:Anim( fFade( pAge,Color(0.5,0.5,0.5,0.10), 200,Color(0.5,0.5,0.5,0.75), 1500, Color(1,1,1,0.8), 500, Color(0,0,0,0),200 ) );
pSpin:Anim( pSpin + fTimeScale( pSpinSpeed ) );
--pUp:Anim( f2dRotation( pSpin )*pRadius );
--pUp:Anim( fTimeScale(200) );
-- Add time to the age
pAge:Anim( pAge+fAge() );

-- Expire particles over 1500 ms old
Anim( fExpire( fGreater(pAge,2400) ) );

-- Create an initial particle
CreateParticles( maxNum );

-- A function to run as we're executing
-- seconds - how many seconds have elapsed
function Update(seconds)

end

