Skip to content

Instantly share code, notes, and snippets.

@MattRoelle
Created March 8, 2014 04:13
Show Gist options
  • Save MattRoelle/9425238 to your computer and use it in GitHub Desktop.
Save MattRoelle/9425238 to your computer and use it in GitHub Desktop.
registerEntity('player', {
poly: [[100, 100], [200, 100], [100, 200]],
init: function(that) {
},
render: function(that) {
ctx.strokeStyle = '#fff';
canvasUtils.drawPolygon(that.poly);
}
});
begin();
spawnEntity('player');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment