/******************************************************************* * * File : pinwheel.js * * Created : 2000/06/17 * * Author : Roy Whittle (Roy@Whittle.com) www.Roy.Whittle.com * * Purpose : To create a pinwheel firework that follows the cursor. * * History * Date Version Description * * 2000-06-17 1.0 Initial version ***********************************************************************/ var theTimer=null; var mouseX = 100; var mouseY = 100; var oneDeg=(2*Math.PI)/360; /*** Pinwheel type 1 ***/ var Radius = 5; var NumStars=32; var NumSteps=16; var StepAngle=(25)*oneDeg; /*** Pinwheel type 2 ***/ //var Radius = 10; //var NumStars=16; //var NumSteps=8; //var StepAngle=(22.5)*oneDeg; /*** Pinwheel type 3 ***/ //var Radius = 5; //var NumStars=16; //var NumSteps=16; //var StepAngle=(22.5)*oneDeg; /*** Pinwheel type 4 ***/ //var Radius = 10; //var NumStars=32; //var NumSteps=16; //var StepAngle=(11.25)*oneDeg; var StarObject=new Array(); var hexDigit=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"); function dec2hex(dec) { return(hexDigit[dec>>4]+hexDigit[dec&15]); } function hex2dec(hex) { return(parseInt(hex,16)) } function CreateStar() { this.layer = new xLayer(" ", 100, 100, 10); this.currAngle = 0; this.step = 0; this.x = 100; this.y = 100; return (this); } function restart() { for(i=0;i