Install the following requirements:
brew info zeromq
npm install zmq
npm install socket.io
gem install ffi-rzmq
Within the app directory run the following commands in different panes.
ruby worker.rb
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext('2d'); | |
var width = 700; | |
var height = 700; | |
var center = {x: width/2 , y: height/2}; | |
var circleStroke = function(radius, x, y, strokeColor) { | |
ctx.strokeStyle = strokeColor; | |
ctx.beginPath(); | |
ctx.arc(x, y, radius, 0, Math.PI * 2); |
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext('2d'); | |
canvas.addEventListener("mousemove", function (e) { | |
findxy('move', e) | |
}, false); | |
canvas.addEventListener("mousedown", function (e) { | |
findxy('down', e) | |
}, false); | |
canvas.addEventListener("mouseup", function (e) { |
Install the following requirements:
brew info zeromq
npm install zmq
npm install socket.io
gem install ffi-rzmq
Within the app directory run the following commands in different panes.
ruby worker.rb