3 ms·
John Resig's Class-Object has some simple inheritance without the (very verbose) prototype stuff. It's the basis of my engine: http://ejohn.org/blog/simple-jav
by phoboslab 16y ago
John Resig's Class-Object has some simple inheritance without the (very verbose) prototype stuff. It's the basis of my engine:
http://ejohn.org/blog/simple-javascript-inheritance/ http://ejohn.org/blog/simple-javascript-inheritance/
I used the Audio API's canPlayType() to decide whether to use mp3 or ogg. I just found it simpler than constructing the DOM for Audio and Source elements. I'll definitely look into the sound issuse on iPhone. Thanks for your tutorial!
Yes, the levels are saved in JSON format, with a bit of boiler plate code so it can get loaded and "baked" nicely. Here's the source for the first level:
http://www.phoboslab.org/biolab/lib/biolab/levels/biolab1.js http://www.phoboslab.org/biolab/lib/biolab/levels/biolab1.js