examples/game/lib/view.js
function(){

            canvas = document.getElementById("canvas");
            canvas.width = Zone.prototype.WIDTH;
            canvas.height =  Zone.prototype.HEIGHT;

            frameCount = 0;

            if (GameView.isRunning()){
                run();
            }

            //Add a listener on our global gameData object, to know when our game starts/stops
            gameData.on("change:isRunning", function(model, value){
                value ? run() : reset();
            });
        }
function(){

            canvas = document.getElementById("canvas");
            canvas.width = Zone.prototype.WIDTH;
            canvas.height =  Zone.prototype.HEIGHT;

            frameCount = 0;

            if (GameView.isRunning()){
                run();
            }

            //Add a listener on our global gameData object, to know when our game starts/stops
            gameData.on("change:isRunning", function(model, value){
                value ? run() : reset();
            });
        }
function ( ) { canvas = document . getElementById ( "canvas" ) ; canvas . width = Zone . prototype . WIDTH ; canvas . height = Zone . prototype . HEIGHT ; frameCount = 0 ; if ( GameView . isRunning ( ) ) { run ( ) ; } //Add a listener on our global gameData object, to know when our game starts/stops gameData . on ( "change:isRunning" , function ( model , value ) { value ? run ( ) : reset ( ) ; } ) ; }
Set up Game View
Set up Game View