This page is work-in-progress. You can reach me on twitter or mail to rezoner1337@gmail.com

Mouse

This is how you interact with mouse:

var app = playground({

  render: function() {

    this.layer
      .clear("#000")
      .font("32px Arial")      
      .fillStyle("#fff")
      .fillText(this.text, 16, 32);

  },

  mousemove: function(data) {

    this.text = "mouse move " + data.x +  " , " + data.y;    

  },

  mousedown: function(data) {

    this.text = "mouse down " + data.button + " " + data.x +  " , " + data.y;

  },

  mouseup: function(data) {

    this.text = "mouse up " + data.button + " " + data.x +  " , " + data.y;  

  },


  /* ignore this container thing, I need it to embed examples
     by default it is document.body */

  container: exampleContainer

});

You can bind Keyboard the same way.

Ask question:

Fork me on GitHub