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.
@@ -3601,7 +3601,7 @@ var BspSurfacePipeline = class {
3601
3601
  styleIndices = DEFAULT_STYLE_INDICES,
3602
3602
  styleValues = [],
3603
3603
  diffuseSampler = 0,
3604
- lightmapSampler = 1,
3604
+ lightmapSampler,
3605
3605
  surfaceFlags = SURF_NONE,
3606
3606
  timeSeconds = 0
3607
3607
  } = options;
@@ -3613,11 +3613,12 @@ var BspSurfacePipeline = class {
3613
3613
  this.gl.uniform2f(this.uniformLmScroll, state.flowOffset[0], state.flowOffset[1]);
3614
3614
  this.gl.uniform4fv(this.uniformLightStyles, styles);
3615
3615
  this.gl.uniform1f(this.uniformAlpha, state.alpha);
3616
- this.gl.uniform1i(this.uniformApplyLightmap, state.sky ? 0 : 1);
3616
+ const applyLightmap = !state.sky && lightmapSampler !== void 0;
3617
+ this.gl.uniform1i(this.uniformApplyLightmap, applyLightmap ? 1 : 0);
3617
3618
  this.gl.uniform1i(this.uniformWarp, state.warp ? 1 : 0);
3618
3619
  this.gl.uniform1f(this.uniformTime, timeSeconds);
3619
3620
  this.gl.uniform1i(this.uniformDiffuse, diffuseSampler);
3620
- this.gl.uniform1i(this.uniformLightmap, lightmapSampler);
3621
+ this.gl.uniform1i(this.uniformLightmap, lightmapSampler ?? 0);
3621
3622
  return state;
3622
3623
  }
3623
3624
  dispose() {
@@ -3823,7 +3824,7 @@ var SkyboxPipeline = class {
3823
3824
  }
3824
3825
  };
3825
3826
  function removeViewTranslation(viewMatrix) {
3826
- const noTranslation = viewMatrix.slice();
3827
+ const noTranslation = new Float32Array(viewMatrix);
3827
3828
  noTranslation[12] = 0;
3828
3829
  noTranslation[13] = 0;
3829
3830
  noTranslation[14] = 0;