Skip to content

Instantly share code, notes, and snippets.

@mattdesl
Created July 25, 2014 15:52
Show Gist options
  • Save mattdesl/7848c1f847e74421d46a to your computer and use it in GitHub Desktop.
Save mattdesl/7848c1f847e74421d46a to your computer and use it in GitHub Desktop.
kami - compressed to about 25kb with `uglifyjs -cm`
//grabs webgl context
var gl = require('webgl-context')();
//this in turn depends on kami-texture
var tex = require('kami-white-texture')(gl);
//this in turn depends on kami-shader and kami-mesh-buffer
var batch = require('kami-batch')(gl);
batch.begin();
batch.setColor(1, 0, 0);
batch.draw(tex, 0, 0, 10, 10);
batch.end();
document.body.appendChild(gl.canvas);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment