general/clocks/src/clock.js
/**
     * Paint the alarm "phantom" second hand.
     * Scaled to a 200px diameter clock rotated to origin of 12o'clock.
     */
Paint the alarm "phantom" second hand.
Scaled to a 200px diameter clock rotated to origin of 12o'clock.
Paint the alarm " phantom " second hand . Scaled to a 200px diameter clock rotated to origin of 12o ' clock .
function drawAlarmSecondHand() {
        var begin = -28,
            end = 63;
        ctx.save();
        ctx.lineWidth = 4;
        ctx.strokeStyle = "rgba(212,0,0,0.1)";
        ctx.lineCap = "round";
        ctx.rotate(alarm.getSeconds() * Math.PI/30);
        ctx.beginPath();
        ctx.moveTo(begin, 0);
        ctx.lineTo(end, 0);
        ctx.stroke();
        ctx.restore();
    }
function drawAlarmSecondHand ( ) { var begin = - 28 , end = 63 ; ctx . save ( ) ; ctx . lineWidth = 4 ; ctx . strokeStyle = "rgba(212,0,0,0.1)" ; ctx . lineCap = "round" ; ctx . rotate ( alarm . getSeconds ( ) * Math . PI / 30 ) ; ctx . beginPath ( ) ; ctx . moveTo ( begin , 0 ) ; ctx . lineTo ( end , 0 ) ; ctx . stroke ( ) ; ctx . restore ( ) ; }
Paint the alarm "phantom" second hand.
Paint the alarm " phantom " second hand .
// Drawing constraints for the second hand
 // Extend the second hand beyond the center
 // Don't touch any previous settings on the stack
 // Styling for most of the parts of the second hand
 // Every sixty seconds is one revolution
 // Only stem of the second hand for alarm
 // Restore previous settings on the canvas stack
