setDrawingBufferSize method

dynamic setDrawingBufferSize(
  1. dynamic width,
  2. dynamic height,
  3. dynamic pixelRatio
)

Implementation

setDrawingBufferSize(width, height, pixelRatio) {
  this._width = width;
  this._height = height;

  this._pixelRatio = pixelRatio;

  this.domElement.width = Math.floor(width * pixelRatio);
  this.domElement.height = Math.floor(height * pixelRatio);

  this._configureContext();
  this._setupColorBuffer();
  this._setupDepthBuffer();
}