GCView - a clean 3d gcode viewer for the browser which works with and without webgl Just look at index.html and js/init.js, this should be super easy to include in other projects.