minerender 2.1.0-alpha.47 → 2.1.0-alpha.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -90072,6 +90072,10 @@ uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuf
90072
90072
  this._dirty = true;
90073
90073
  };
90074
90074
  this.options = (0, import_ts_deepmerge9.default)({}, _Renderer.DEFAULT_OPTIONS, options ?? {});
90075
+ const pixelRatio = this.options.render.pixelRatio ?? 1;
90076
+ if (!Number.isFinite(pixelRatio) || pixelRatio <= 0) {
90077
+ throw new RangeError("render.pixelRatio must be a finite positive number");
90078
+ }
90075
90079
  this._animationLoop = this.animate.bind(this);
90076
90080
  this._frameInterval = this.options.render.fpsLimit > 0 ? 1e3 / this.options.render.fpsLimit : void 0;
90077
90081
  this._scene = this.createScene();
@@ -90121,6 +90125,7 @@ uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuf
90121
90125
  renderer.shadowMap.enabled = true;
90122
90126
  renderer.shadowMap.type = PCFSoftShadowMap;
90123
90127
  renderer.outputColorSpace = SRGBColorSpace;
90128
+ renderer.setPixelRatio(this.options.render.pixelRatio ?? 1);
90124
90129
  renderer.setSize(this.viewWidth, this.viewHeight);
90125
90130
  return renderer;
90126
90131
  }
@@ -90376,6 +90381,7 @@ uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuf
90376
90381
  },
90377
90382
  render: {
90378
90383
  fpsLimit: 60,
90384
+ pixelRatio: 1,
90379
90385
  stats: false,
90380
90386
  antialias: true,
90381
90387
  shade: true,