Abstracts setup and main loop handling in PIXI.js