Skip to content

Instantly share code, notes, and snippets.

@akfish
Created May 23, 2015 13:11
Show Gist options
  • Save akfish/cb83085ab39340c468d3 to your computer and use it in GitHub Desktop.
Save akfish/cb83085ab39340c468d3 to your computer and use it in GitHub Desktop.
Context Free JS Port High Level API Mock-up
// The compiler
var AK = require('ak'),
// Render target
canvas = require('ak/target/node');
// This compiles a CFDG file into a JavaScript class
var Art = AK.Generate('path/to/src.cfdg');
// Create an instance with canvase target
var art = new Art(canvas);
// Render with options
var img = art.render(opts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment