

// --------------------------------
// Plugin methods
// --------------------------------
function init()
{
	this.x = 0;
	this.y = 0;
	this.angle = 0;
	this.angle2 = 0;
	this.scale = 0.3;
	this.rayon = 3;
	this.mouseX = 0;
	this.mouseY = 0;
	this.isFilterSet = false;
}

function update(dt)
{
	this.angle+=20.0*dt;
	this.angle2+=180*dt;
	if (this.angle >= 360.0)
		this.angle -= 360.0;
	if (this.angle2 >= 360.0)
		this.angle2 -= 360.0;
}

function render()
{
	gl.Scale(3.0,3.0,3.0);

	gl.DisableDepthTest();
	gl.EnableBlend();
	gl.BlendFunc_Add();


//	gl.Color4(1,1,1,1.0);
//	gl.Ellipse(0,0,0.1,0.1);
	
	gl.PushMatrix();
	gl.Rotate(this.angle,0,0,1);
	for (i=0;i<20;i++)
	{
		gl.Rotate(360/20,0,0,1);
	
		gl.Color4(1.0,0.3,0.4,0.4,0.9);
		gl.Ellipse(0,0,0.2,1);
	
		gl.Color4(1,1,1,0.9);
		gl.Line3D(0,0,0, 0.5,0.5, 0.5);
	}
	gl.PopMatrix();

	gl.DisableBlend();
}

