
scene speed(10,1);
scene position(0,0,-200);
scene rotation(0,0,0);
scene fov(60);

Comets = 10;	//how many comets
Pts    = 15;	//how many points per keyframer
range  = 150;	//maximum range of movement
tParts = 300;	//total particles per comet
tSize  = 3;	//max size

SKY1 = load("SKY1");
object SKY1 scale(10);
object SKY1 test(0);
object SKY1 fixed(1);
object SKY1 active(1);

scene start;

for (Ct=0;Ct<Comets;Ct++){
	
	Cursor = load("CURSOR");
	object Cursor diffuse(0,0,0);
	object Cursor blend(0);
	object Cursor test(0);
	object Cursor active(1);
	
	Path = new cFramer(Cursor);
	framer Path total(Pts,random(100,200));
	framer Path loop(1);
	for (t=0;t<Pts;t++){
		framer Path position  (t,random(-(range+range/2),+(range+range/2)),random(-range,+range),random(-range,+range));
		framer Path rotation(t,random(-360,+360),random(-360,+360),random(-360,+360));
	}
	framer Path start;

	Flare = new cFlare(Cursor);
	flare Flare texture(load("STAR2"));
	flare Flare size(random(10,30));
	flare Flare test(0);
	flare Flare color (random(50,100)/100,random(50,100)/100,random(50,100)/100,1);
	
	pSys = new cParticle(Cursor);
	particle pSys total(tParts);
	particle pSys texture(load("STAR"));
	particle pSys size(random(tSize/2,tSize));
	particle pSys radius(random(0,20)/100);//0.05);
	particle pSys rgb1(random(0,100)/100,random(0,100)/100,random(0,100)/100);
	particle pSys rgb2(0,0,0);
	particle pSys life(random(50,800));
	particle pSys space(0);
	particle pSys test(0);

	for (Tr=0;Tr<random(1,3);Tr++)
	{
		flare Flare add(Cursor,0,Tr);
		particle pSys add(Cursor,0,Tr);
	}
	flare Flare active(1);
	particle pSys active(1);
}

speedCam = 100;
counter  = 0;
countCam = 20000;
deltaX   = 0;
deltaY   = 0;

while(1)
{
	scene spincam(deltaX,deltaY);

	if (++counter > 5000)
	{
		toChange = random(0,Comets);
		if (toChange>=0 && toChange<Comets)
		{
			flare toChange color(random(50,100)/100,random(50,100)/100,random(50,100)/100,1);
			particle toChange life(random(50,800));
			particle toChange rgb1(random(0,100)/100,random(0,100)/100,random(0,100)/100);
		}
		counter = 0;
	}

	if (++countCam > 20000)
	{
		deltaX   = random(-speedCam,+speedCam) / 100000;
		deltaY   = random(-speedCam,+speedCam) / 100000;
		countCam = 0;
	}

}

