Skip to content

Instantly share code, notes, and snippets.

@gtramontina
Created May 13, 2011 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtramontina/970925 to your computer and use it in GitHub Desktop.
Save gtramontina/970925 to your computer and use it in GitHub Desktop.
getRoom = (roomId) ->
room = nowjs.getGroup roomId
return room if room.augumented
room.drawings = []
room.now.sendStartDrawing = (x, y) ->
room.currentDrawing = [ x: x, y: y ]
room.now.startDrawing x, y
room.now.sendDraw = (x, y) ->
room.currentDrawing.push x: x, y: y
room.now.draw x, y
room.now.sendStopDrawing = ->
room.drawings.push room.currentDrawing
room.now.stopDrawing()
room.augumented = true
room
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment