Categories
Archives
- September 2019
- May 2019
- March 2019
- February 2019
- January 2019
- April 2018
- February 2018
- August 2011
- July 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- October 2008
HTML5 Quake II MD2 Model Loader and Renderer
Hot on the heels of my PHP MD2 renderer that loads a Quake II MD2 model file and renders and rotates the model in 3D, I decided that it was clunky and to take advantage of new techniques in browsers
I present an HTML5 based Quake II MD2 model loader and renderer that I wrote to demonstrate file reading and canvases.
Notes
I used the BinaryReader which was refactored by Vjeux although I had to slightly refactor it myself as I had problems getting floats to read properly. I quickly wrote my own function for calculating the IEE 754 Single precision floats rather than modify the function as doing it from scratch was quicker in the end, either way, it gave me the result I was after.
I also made use of the MD2 file format specification document by David Henry because I’m nowhere near smart enough to remember the headers every time I do an MD2 reader 🙂
This demo will not work in Internet Explorer 8 or less. Use Chrome, Firefox, Safari or Opera. They are all far better choices.