text: /**
   * Hilo 1.0.1 for commonjs
   * Copyright 2016 alibaba.com
   * Licensed under the MIT License
   */
  var Hilo=require("../core/Hilo"),Class=require("../core/Class"),Camera=Class.create({constructor:function(t){this.width=0,this.height=0,this.target=null,this.deadzone=null,this.bounds=null,this.scroll={x:0,y:0},Hilo.copy(this,t)},tick:function(t){var i=this.target,h=this.scroll,a=this.bounds,s=this.deadzone;if(i){var e,o;s?(e=Math.min(Math.max(i.x-h.x,s[0]),s[0]+s[2]),o=Math.min(Math.max(i.y-h.y,s[1]),s[1]+s[3])):(e=.5*this.width,o=.5*this.height),h.x=i.x-e,h.y=i.y-o,a&&(h.x=Math.min(Math.max(h.x,a[0]),a[0]+a[2]),h.y=Math.min(Math.max(h.y,a[1]),a[1]+a[3]))}else h.x=0,h.y=0},follow:function(t,i){this.target=t,void 0!==i&&(this.deadzone=i),this.tick()}});module.exports=Camera;