minerender 2.1.0-alpha.46 → 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.
@@ -842,7 +842,12 @@ var init_Materials = __esm({
842
842
  const vertShader = `
843
843
  uniform bool SHADE;
844
844
 
845
+ // Keep MSAA edge pixels from sampling outside the face's atlas region.
846
+ #if __VERSION__ >= 300
847
+ centroid out vec2 vUv;
848
+ #else
845
849
  varying vec2 vUv;
850
+ #endif
846
851
  varying vec3 vTint;
847
852
  varying float light;
848
853
  varying float lift;
@@ -899,7 +904,11 @@ var init_Materials = __esm({
899
904
  uniform bool EMISSIVE;
900
905
  uniform float BRIGHTNESS;
901
906
 
907
+ #if __VERSION__ >= 300
908
+ centroid in vec2 vUv;
909
+ #else
902
910
  varying vec2 vUv;
911
+ #endif
903
912
  varying vec3 vTint;
904
913
  varying float light;
905
914
  varying float lift;
@@ -9469,6 +9478,10 @@ var _Renderer = class _Renderer {
9469
9478
  this._dirty = true;
9470
9479
  };
9471
9480
  this.options = (0, import_ts_deepmerge9.default)({}, _Renderer.DEFAULT_OPTIONS, options ?? {});
9481
+ const pixelRatio = this.options.render.pixelRatio ?? 1;
9482
+ if (!Number.isFinite(pixelRatio) || pixelRatio <= 0) {
9483
+ throw new RangeError("render.pixelRatio must be a finite positive number");
9484
+ }
9472
9485
  this._animationLoop = this.animate.bind(this);
9473
9486
  this._frameInterval = this.options.render.fpsLimit > 0 ? 1e3 / this.options.render.fpsLimit : void 0;
9474
9487
  this._scene = this.createScene();
@@ -9518,6 +9531,7 @@ var _Renderer = class _Renderer {
9518
9531
  renderer.shadowMap.enabled = true;
9519
9532
  renderer.shadowMap.type = PCFSoftShadowMap;
9520
9533
  renderer.outputColorSpace = SRGBColorSpace4;
9534
+ renderer.setPixelRatio(this.options.render.pixelRatio ?? 1);
9521
9535
  renderer.setSize(this.viewWidth, this.viewHeight);
9522
9536
  return renderer;
9523
9537
  }
@@ -9773,6 +9787,7 @@ _Renderer.DEFAULT_OPTIONS = (0, import_ts_deepmerge9.default)({}, {
9773
9787
  },
9774
9788
  render: {
9775
9789
  fpsLimit: 60,
9790
+ pixelRatio: 1,
9776
9791
  stats: false,
9777
9792
  antialias: true,
9778
9793
  shade: true,