GoodBoyDigital/pixi.js — pull request #896 by JaapRood (2014-07-29 10:03:20+00:00)
Title: Fixed references to global variables (window, document) that prevent Pixi from being loaded into environments that don’t necessarily have these available (like Node)

Pixi does a great job of abstracting out globals in the definition of the module, but a few little things prevented the pixi module from being 'required' in Node. This is because `window` and `document` are not available in that server side environment.

For those curious why I'm loading the module in Node while I wouldn't be able to use it: Pixi is part of view rendering code that is now being ran on both client *and* server side. The code that creates a new stage actually never gets executed, but because I'm using browserify as a bundler, which allows us to do this in the first place, the module does get loaded and evaluated.