quake2ts 0.0.63 → 0.0.64

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.
@@ -3746,7 +3746,7 @@ var BspSurfacePipeline = class {
3746
3746
  styleIndices = DEFAULT_STYLE_INDICES,
3747
3747
  styleValues = [],
3748
3748
  diffuseSampler = 0,
3749
- lightmapSampler = 1,
3749
+ lightmapSampler,
3750
3750
  surfaceFlags = SURF_NONE,
3751
3751
  timeSeconds = 0
3752
3752
  } = options;
@@ -3758,11 +3758,12 @@ var BspSurfacePipeline = class {
3758
3758
  this.gl.uniform2f(this.uniformLmScroll, state.flowOffset[0], state.flowOffset[1]);
3759
3759
  this.gl.uniform4fv(this.uniformLightStyles, styles);
3760
3760
  this.gl.uniform1f(this.uniformAlpha, state.alpha);
3761
- this.gl.uniform1i(this.uniformApplyLightmap, state.sky ? 0 : 1);
3761
+ const applyLightmap = !state.sky && lightmapSampler !== void 0;
3762
+ this.gl.uniform1i(this.uniformApplyLightmap, applyLightmap ? 1 : 0);
3762
3763
  this.gl.uniform1i(this.uniformWarp, state.warp ? 1 : 0);
3763
3764
  this.gl.uniform1f(this.uniformTime, timeSeconds);
3764
3765
  this.gl.uniform1i(this.uniformDiffuse, diffuseSampler);
3765
- this.gl.uniform1i(this.uniformLightmap, lightmapSampler);
3766
+ this.gl.uniform1i(this.uniformLightmap, lightmapSampler ?? 0);
3766
3767
  return state;
3767
3768
  }
3768
3769
  dispose() {
@@ -3968,7 +3969,7 @@ var SkyboxPipeline = class {
3968
3969
  }
3969
3970
  };
3970
3971
  function removeViewTranslation(viewMatrix) {
3971
- const noTranslation = viewMatrix.slice();
3972
+ const noTranslation = new Float32Array(viewMatrix);
3972
3973
  noTranslation[12] = 0;
3973
3974
  noTranslation[13] = 0;
3974
3975
  noTranslation[14] = 0;