Пример #1
0
 void buildSpinner(SpinnerData sd)
 {
     spinnerData = sd;
     var canvas = document.getElementsByTagName("canvas")[0].As<HTMLCanvasElement>();
     ctx = canvas.getContext("2d").As<CanvasRenderingContext2D>();
     index = 0;
     degrees = spinnerData.degrees;
     degreesList = new JsArray<JsNumber>();
     for (var x = 0; x < degrees; x++)
         degreesList.push(x);
     // reset
     index = 0;
     // so I can kill it later
     canvasTimer = setInterval(draw, 1000 / degrees);
 }
Пример #2
0
        void buildSpinner(SpinnerData sd)
        {
            spinnerData = sd;
            var canvas = document.getElementsByTagName("canvas")[0].As <HTMLCanvasElement>();

            ctx         = canvas.getContext("2d").As <CanvasRenderingContext2D>();
            index       = 0;
            degrees     = spinnerData.degrees;
            degreesList = new JsArray <JsNumber>();
            for (var x = 0; x < degrees; x++)
            {
                degreesList.push(x);
            }
            // reset
            index = 0;
            // so I can kill it later
            canvasTimer = setInterval(draw, 1000 / degrees);
        }
Пример #3
0
 public Spinner(SpinnerData sd)
 {
     buildSpinner(sd);
 }
Пример #4
0
 public Spinner(SpinnerData sd)
 {
     buildSpinner(sd);
 }