@luma.gl/webgl 9.1.0-alpha.17 → 9.1.0-alpha.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luma.gl/webgl",
3
- "version": "9.1.0-alpha.17",
3
+ "version": "9.1.0-alpha.19",
4
4
  "description": "WebGL2 adapter for the luma.gl core API",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,12 +40,12 @@
40
40
  "prepublishOnly": "npm run build-minified-bundle && npm run build-dev-bundle"
41
41
  },
42
42
  "peerDependencies": {
43
- "@luma.gl/core": "9.1.0-alpha.16"
43
+ "@luma.gl/core": "9.1.0-alpha.17"
44
44
  },
45
45
  "dependencies": {
46
- "@luma.gl/constants": "9.1.0-alpha.17",
46
+ "@luma.gl/constants": "9.1.0-alpha.19",
47
47
  "@math.gl/types": "4.1.0-alpha.3",
48
48
  "@probe.gl/env": "^4.0.8"
49
49
  },
50
- "gitHead": "a0d4d3ddc549bbfae6e43eebc8e1afdc4da1693c"
50
+ "gitHead": "c836c09a5105e2515a036abff4a1b926d245a152"
51
51
  }
@@ -138,10 +138,6 @@ export class WEBGLRenderPass extends RenderPass {
138
138
  * Optionally clears depth, color and stencil buffers based on parameters
139
139
  */
140
140
  protected clear(): void {
141
- const DEFAULT_CLEAR_COLOR: [number, number, number, number] = [0, 0, 0, 1];
142
- const DEFAULT_CLEAR_DEPTH = 1;
143
- const DEFAULT_CLEAR_STENCIL = 0;
144
-
145
141
  const glParameters: GLParameters = {...this.glParameters};
146
142
 
147
143
  let clearMask = 0;
@@ -156,19 +152,15 @@ export class WEBGLRenderPass extends RenderPass {
156
152
 
157
153
  if (this.props.clearColor !== false && this.props.clearColors === undefined) {
158
154
  clearMask |= GL.COLOR_BUFFER_BIT;
159
- const clearColor =
160
- this.props.clearColor === true ? DEFAULT_CLEAR_COLOR : this.props.clearColor;
161
- glParameters.clearColor = clearColor;
155
+ glParameters.clearColor = this.props.clearColor;
162
156
  }
163
157
  if (this.props.clearDepth !== false) {
164
158
  clearMask |= GL.DEPTH_BUFFER_BIT;
165
- glParameters.clearDepth =
166
- this.props.clearDepth === true ? DEFAULT_CLEAR_DEPTH : this.props.clearDepth;
159
+ glParameters.clearDepth = this.props.clearDepth;
167
160
  }
168
161
  if (this.props.clearStencil !== false) {
169
162
  clearMask |= GL.STENCIL_BUFFER_BIT;
170
- glParameters.clearStencil =
171
- this.props.clearStencil === true ? DEFAULT_CLEAR_STENCIL : this.props.clearStencil;
163
+ glParameters.clearStencil = this.props.clearStencil;
172
164
  }
173
165
 
174
166
  if (clearMask !== 0) {
@@ -243,8 +243,8 @@ export class WEBGLTexture extends Texture {
243
243
  const {dimension, glTarget, glFormat, glInternalFormat, glType} = this;
244
244
 
245
245
  // WebGL will error if we try to copy outside the bounds of the texture
246
- width = Math.min(width, size.width - x);
247
- height = Math.min(height, size.height - y);
246
+ width = Math.min(width, this.width - x);
247
+ height = Math.min(height, this.height - y);
248
248
 
249
249
  if (options.sourceX || options.sourceY) {
250
250
  // requires copyTexSubImage2D from a framebuffer'