general/clocks/src/clock.js
/**
     * Paint the alarm "phantom" minute hand.
     * Scaled to a 200px diameter clock rotated to origin of 12o'clock.
     */
Paint the alarm "phantom" minute hand.
Scaled to a 200px diameter clock rotated to origin of 12o'clock.
Paint the alarm " phantom " minute hand . Scaled to a 200px diameter clock rotated to origin of 12o ' clock .
function drawAlarmMinuteHand() {
        var begin = -30,
            end = 72;
        ctx.save();
        ctx.lineWidth = 5;
        ctx.strokeStyle = "rgba(0,0,0,0.1)";
        ctx.lineCap = "round";
        ctx.rotate((Math.PI/30)*alarm.getMinutes() + (Math.PI/1800)*alarm.getSeconds())
        ctx.beginPath();
        ctx.moveTo(begin, 0);
        ctx.lineTo(end , 0);
        ctx.stroke();
        ctx.restore();
    }
function drawAlarmMinuteHand ( ) { var begin = - 30 , end = 72 ; ctx . save ( ) ; ctx . lineWidth = 5 ; ctx . strokeStyle = "rgba(0,0,0,0.1)" ; ctx . lineCap = "round" ; ctx . rotate ( ( Math . PI / 30 ) * alarm . getMinutes ( ) + ( Math . PI / 1800 ) * alarm . getSeconds ( ) ) ctx . beginPath ( ) ; ctx . moveTo ( begin , 0 ) ; ctx . lineTo ( end , 0 ) ; ctx . stroke ( ) ; ctx . restore ( ) ; }
Paint the alarm "phantom" minute hand.
Paint the alarm " phantom " minute hand .
// Drawing constraints for the minute hand
 // Extend the minute hand beyond the center
 // Don't touch any previous settings on the stack
 // Style the minute hand
 // Rotate based on the current fractions of time
 // Restore previous settings on the canvas stack
