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.
package/dist/bundle.js CHANGED
@@ -33044,7 +33044,12 @@ var MineRender = (() => {
33044
33044
  const vertShader = `
33045
33045
  uniform bool SHADE;
33046
33046
 
33047
+ // Keep MSAA edge pixels from sampling outside the face's atlas region.
33048
+ #if __VERSION__ >= 300
33049
+ centroid out vec2 vUv;
33050
+ #else
33047
33051
  varying vec2 vUv;
33052
+ #endif
33048
33053
  varying vec3 vTint;
33049
33054
  varying float light;
33050
33055
  varying float lift;
@@ -33101,7 +33106,11 @@ var MineRender = (() => {
33101
33106
  uniform bool EMISSIVE;
33102
33107
  uniform float BRIGHTNESS;
33103
33108
 
33109
+ #if __VERSION__ >= 300
33110
+ centroid in vec2 vUv;
33111
+ #else
33104
33112
  varying vec2 vUv;
33113
+ #endif
33105
33114
  varying vec3 vTint;
33106
33115
  varying float light;
33107
33116
  varying float lift;
@@ -90063,6 +90072,10 @@ uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuf
90063
90072
  this._dirty = true;
90064
90073
  };
90065
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
+ }
90066
90079
  this._animationLoop = this.animate.bind(this);
90067
90080
  this._frameInterval = this.options.render.fpsLimit > 0 ? 1e3 / this.options.render.fpsLimit : void 0;
90068
90081
  this._scene = this.createScene();
@@ -90112,6 +90125,7 @@ uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuf
90112
90125
  renderer.shadowMap.enabled = true;
90113
90126
  renderer.shadowMap.type = PCFSoftShadowMap;
90114
90127
  renderer.outputColorSpace = SRGBColorSpace;
90128
+ renderer.setPixelRatio(this.options.render.pixelRatio ?? 1);
90115
90129
  renderer.setSize(this.viewWidth, this.viewHeight);
90116
90130
  return renderer;
90117
90131
  }
@@ -90367,6 +90381,7 @@ uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuf
90367
90381
  },
90368
90382
  render: {
90369
90383
  fpsLimit: 60,
90384
+ pixelRatio: 1,
90370
90385
  stats: false,
90371
90386
  antialias: true,
90372
90387
  shade: true,