src/camera/camera2d.js
function (x, y) {
            var _x = this.pos.x;
            var _y = this.pos.y;

            this.pos.x = me.Math.clamp(
                x,
                this.bounds.pos.x,
                this.bounds.width - this.width
            );
            this.pos.y = me.Math.clamp(
                y,
                this.bounds.pos.y,
                this.bounds.height - this.height
            );

            //publish the VIEWPORT_ONCHANGE event if necessary
            if (_x !== this.pos.x || _y !== this.pos.y) {
                me.event.publish(me.event.VIEWPORT_ONCHANGE, [this.pos]);
            }
        }
function (x, y) {
            var _x = this.pos.x;
            var _y = this.pos.y;

            this.pos.x = me.Math.clamp(
                x,
                this.bounds.pos.x,
                this.bounds.width - this.width
            );
            this.pos.y = me.Math.clamp(
                y,
                this.bounds.pos.y,
                this.bounds.height - this.height
            );

            //publish the VIEWPORT_ONCHANGE event if necessary
            if (_x !== this.pos.x || _y !== this.pos.y) {
                me.event.publish(me.event.VIEWPORT_ONCHANGE, [this.pos]);
            }
        }
function ( x , y ) { var _x = this . pos . x ; var _y = this . pos . y ; this . pos . x = me . Math . clamp ( x , this . bounds . pos . x , this . bounds . width - this . width ) ; this . pos . y = me . Math . clamp ( y , this . bounds . pos . y , this . bounds . height - this . height ) ; //publish the VIEWPORT_ONCHANGE event if necessary if ( _x !== this . pos . x || _y !== this . pos . y ) { me . event . publish ( me . event . VIEWPORT_ONCHANGE , [ this . pos ] ) ; } }
move the camera upper-left position to the specified coordinates
@name moveTo
@memberOf me.Camera2d
@see me.Camera2d.focusOn
@function
@param {Number} x
@param {Number} y
move the camera upper - left position to the specified coordinates