An afternoon with pdf.js and CubicVR.js
This week my students have to submit their first deliverable for the Mozilla Open Source class at Seneca. I try to practice what I preach, so today I sat down and tried something something similar in size to what they are doing.
The other day I had had an idea that I couldn't shake: wouldn't it be cool if you could use shaders and nice WebGL transitions to display slides on the web? We already have all that code written in CubicVR.js (the 3D graphics engine we use for all our demos), so it's just a matter of teaching CubicVR.js how to use a rendered PDF as a texture. And since Mozilla's pdf.js project knows how to do the PDF rendering, I just need to do some plumbing to make the two work together.
So this afternoon I wrote a patch for CubicVR.js that added CubicVR.PDF and CubicVR.PdfTexture. This allows me to do really simple code like this small demo. Now I need to get Bobby and CJ to turn it into something really mind blowing :)
The pdf.js project has really come a long way since I last looked at it, and working with their code was a pleasure. Three cheers for being able to do the impossible in the browser!
UPDATE: It didn't take CJ long to make this into something awesome. Check out his coverflow-style viewer.