Cool! A canvas-compatible LDraw renderer would be quite useful.
You might be interested in this very simple LDraw renderer written in Processing (a graphics programming system based on Java). After setting it up, I tried using it to make an LDraw applet you could embed in a web page. You can try it here. I haven't done anything with it since, though, mainly because Java applets are kind of finicky and other technologies (like what you're working on) seem better suited for today's web.
You might be interested in this very simple LDraw renderer written in Processing (a graphics programming system based on Java). After setting it up, I tried using it to make an LDraw applet you could embed in a web page. You can try it here. I haven't done anything with it since, though, mainly because Java applets are kind of finicky and other technologies (like what you're working on) seem better suited for today's web.