soma.js
Version:
soma.js is a javascript framework created to build scalable and maintainable applications.
37 lines (29 loc) • 757 B
text/coffeescript
((clock) ->
"use strict"
class clock.NeedleSeconds
constructor: () ->
= 0
= 0
= 0
= 0
initialize: () ->
= / 2
= * 0.8
update: () ->
draw: (context) ->
theta = (6 * Math.PI / 180)
x = + * Math.cos( * theta - Math.PI/2)
y = + * Math.sin( * theta - Math.PI/2)
context.save()
context.lineWidth = 2
context.strokeStyle = '#015666'
context.lineJoin = 'round'
context.lineCap = 'round'
context.beginPath()
context.moveTo(x,y)
context.lineTo(, )
context.closePath()
context.stroke()
context.restore()
dispose: () ->
) window.clock = window.clock or {}