mrdoob/three.js — pull request #3399 by bhouston (2013-04-29 14:37:27+00:00)
Title: Npm cleanup for IE10.

Internet Explorer 10 does not support redefining the variable ```window``` (it is const) and thus the previous strategy for deploying to npm was not working, e.g. (```var window = window || {}```). In this version I avoid redefining ```window``` and I also do not depend on it existing.

The main changes are:
* a simplification of the npm-specific ```header.js```.
* ```THREE.Clock.now``` is the general purpose timer function. I confirmed it works on Chrome, IE10 and NodeJS. (Previously we were depending on redefining ```window.performance.now``` but of course that depends on ```window``` existing and thus potentially redefining ```window```.)
* I have disable in the source file ```Three.js``` setting ```window.request/cancelAnimationFrame``` if the variable ```window``` does not exist (as it doesn't exist on NodeJS.)

This works great in IE10, Chrome, Firefox and NodeJS.