src/viewer.js
function(ms) {
    var axes = this._cam.mainAxes();
    var intervals = [ new utils.Range(), new utils.Range(), new utils.Range() ];
    this.forEach(function(obj) {
      if (!obj.visible()) {
        return;
      }
      obj.updateProjectionIntervals(axes[0], axes[1], axes[2], intervals[0],
                                    intervals[1], intervals[2]);
    });
    this._fitToIntervals(axes, intervals, ms);
  }
function(ms) {
    var axes = this._cam.mainAxes();
    var intervals = [ new utils.Range(), new utils.Range(), new utils.Range() ];
    this.forEach(function(obj) {
      if (!obj.visible()) {
        return;
      }
      obj.updateProjectionIntervals(axes[0], axes[1], axes[2], intervals[0],
                                    intervals[1], intervals[2]);
    });
    this._fitToIntervals(axes, intervals, ms);
  }
function ( ms ) { var axes = this . _cam . mainAxes ( ) ; var intervals = [ new utils . Range ( ) , new utils . Range ( ) , new utils . Range ( ) ] ; this . forEach ( function ( obj ) { if ( ! obj . visible ( ) ) { return ; } obj . updateProjectionIntervals ( axes [ 0 ] , axes [ 1 ] , axes [ 2 ] , intervals [ 0 ] , intervals [ 1 ] , intervals [ 2 ] ) ; } ) ; this . _fitToIntervals ( axes , intervals , ms ) ; }
adapt the zoom level to fit the viewport to all visible objects.
adapt the zoom level to fit the viewport to all visible objects .