dist/melonjs.js
function setDeadzone(w, h) {
         if (typeof this.deadzone === "undefined") {
           this.deadzone = new me.Rect(0, 0, 0, 0);
         } // reusing the old code for now...


         this.deadzone.pos.set(~~((this.width - w) / 2), ~~((this.height - h) / 2 - h * 0.25));
         this.deadzone.resize(w, h);
         this.smoothFollow = false; // force a camera update

         this.updateTarget();
         this.smoothFollow = true;
       }
function setDeadzone(w, h) {
         if (typeof this.deadzone === "undefined") {
           this.deadzone = new me.Rect(0, 0, 0, 0);
         } // reusing the old code for now...


         this.deadzone.pos.set(~~((this.width - w) / 2), ~~((this.height - h) / 2 - h * 0.25));
         this.deadzone.resize(w, h);
         this.smoothFollow = false; // force a camera update

         this.updateTarget();
         this.smoothFollow = true;
       }
function setDeadzone ( w , h ) { if ( typeof this . deadzone === "undefined" ) { this . deadzone = new me . Rect ( 0 , 0 , 0 , 0 ) ; } // reusing the old code for now... this . deadzone . pos . set ( ~ ~ ( ( this . width - w ) / 2 ) , ~ ~ ( ( this . height - h ) / 2 - h * 0.25 ) ) ; this . deadzone . resize ( w , h ) ; this . smoothFollow = false ; // force a camera update this . updateTarget ( ) ; this . smoothFollow = true ; }
change the deadzone settings.
the "deadzone" defines an area within the current camera in which
the followed renderable can move without scrolling the camera.
@name setDeadzone
@see me.Camera2d.follow
@memberOf me.Camera2d
@function
@param {Number} w deadzone width
@param {Number} h deadzone height
change the deadzone settings . the deadzone defines an area within the current camera in which the followed renderable can move without scrolling the camera .