dist/pixi-graph.umd.js
/**
       * change zoom so it fits the entire world in the viewport
       * @param {boolean} center maintain the same center of the screen after zoom
       * @returns {Viewport} this
       */
change zoom so it fits the entire world in the viewport
@param {boolean} center maintain the same center of the screen after zoom
@returns {Viewport} this
change zoom so it fits the entire world in the viewport @param { boolean } center maintain the same center of the screen after zoom @returns { Viewport } this
fitWorld(center) {
          let save;
          if (center) {
              save = this.center;
          }
          this.scale.x = this.screenWidth / this.worldWidth;
          this.scale.y = this.screenHeight / this.worldHeight;
          if (this.scale.x < this.scale.y) {
              this.scale.y = this.scale.x;
          }
          else {
              this.scale.x = this.scale.y;
          }
          const clampZoom = this.plugins.get('clamp-zoom', true);
          if (clampZoom) {
              clampZoom.clamp();
          }
          if (center) {
              this.moveCenter(save);
          }
          return this
      }
fitWorld ( center ) { let save ; if ( center ) { save = this . center ; } this . scale . x = this . screenWidth / this . worldWidth ; this . scale . y = this . screenHeight / this . worldHeight ; if ( this . scale . x < this . scale . y ) { this . scale . y = this . scale . x ; } else { this . scale . x = this . scale . y ; } const clampZoom = this . plugins . get ( 'clamp-zoom' , true ) ; if ( clampZoom ) { clampZoom . clamp ( ) ; } if ( center ) { this . moveCenter ( save ) ; } return this }
change zoom so it fits the entire world in the viewport
 @param {boolean} center maintain the same center of the screen after zoom
 @returns {Viewport} this
change zoom so it fits the entire world in the viewport @param { boolean } center maintain the same center of the screen after zoom @returns { Viewport } this