mrdoob/three.js — pull request #3403 by bhouston (2013-04-29 19:37:08+00:00)
Title: Npm package cleanup for IE10 and NodeJS

NodeJS does not define the variable ```window``` so we were creating it using this form ```var window = window || {}```. This works in Chrome and Firefox but in IE10, ```window``` is const.

@mrdoob suggested that instead of using window we rely ```self``` which is creatable in IE10.

I also check on ```self``` to see if the the functions ```setTimeout``` and ```clearTimeout``` exist in order to set up the backwards compatibility shims (these functions do not exist on self in NodeJS, thus these shims are not created.)