/CanvasQuery

Canvas for 2d gamedevelopers. Out of box canvas, keyboard, mouse, events.

Primary LanguageJavaScript

Canvas Query

canvasquery.js - an extended canvas for gamedevelopers

var layer = cq()  
  .fillStyle("#ff0000")
  .fillRect(0, 0, 32, 32);

Playground

playground.js - out of box - mouse, keyboard, scaling, gameloop and a layer to draw on.

playground({ 
  
  render: function() {

    this.layer.clear("#007");
    this.layer.drawImage(this.images.cursor, this.mouse.x, this.mouse.y);

  },

  mousedown: function() {

    this.playSound("click");
    
  }

});

ZIP bootstrap.zip - download template using canvasquery + playground.

Works with:

  • chrome, firefox (cutting edge browser experienece)
  • node-webkit (native desktop applications)
  • cocoonjs (native mobile applications)
  • nodejs (serverside)

These are games using CanvasQuery