dist/melonjs.js
function draw(renderer, container) {
         var translateX = this.pos.x + this.offset.x;
         var translateY = this.pos.y + this.offset.y; // translate the world coordinates by default to screen coordinates

         container.currentTransform.translate(-translateX, -translateY); // clip to camera bounds

         renderer.clipRect(0, 0, this.width, this.height);
         this.preDraw(renderer);
         container.preDraw(renderer); // draw all objects,
         // specifying the viewport as the rectangle area to redraw

         container.draw(renderer, this); // draw the viewport/camera effects

         this.drawFX(renderer);
         container.postDraw(renderer);
         this.postDraw(renderer); // translate the world coordinates by default to screen coordinates

         container.currentTransform.translate(translateX, translateY);
       }
function draw(renderer, container) {
         var translateX = this.pos.x + this.offset.x;
         var translateY = this.pos.y + this.offset.y; // translate the world coordinates by default to screen coordinates

         container.currentTransform.translate(-translateX, -translateY); // clip to camera bounds

         renderer.clipRect(0, 0, this.width, this.height);
         this.preDraw(renderer);
         container.preDraw(renderer); // draw all objects,
         // specifying the viewport as the rectangle area to redraw

         container.draw(renderer, this); // draw the viewport/camera effects

         this.drawFX(renderer);
         container.postDraw(renderer);
         this.postDraw(renderer); // translate the world coordinates by default to screen coordinates

         container.currentTransform.translate(translateX, translateY);
       }
function draw ( renderer , container ) { var translateX = this . pos . x + this . offset . x ; var translateY = this . pos . y + this . offset . y ; // translate the world coordinates by default to screen coordinates container . currentTransform . translate ( - translateX , - translateY ) ; // clip to camera bounds renderer . clipRect ( 0 , 0 , this . width , this . height ) ; this . preDraw ( renderer ) ; container . preDraw ( renderer ) ; // draw all objects, // specifying the viewport as the rectangle area to redraw container . draw ( renderer , this ) ; // draw the viewport/camera effects this . drawFX ( renderer ) ; container . postDraw ( renderer ) ; this . postDraw ( renderer ) ; // translate the world coordinates by default to screen coordinates container . currentTransform . translate ( translateX , translateY ) ; }
draw all object visibile in this viewport
@ignore
draw all object visibile in this viewport