@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/dist/adapter/resources/webgl-render-pass.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pass.js +3 -9
- package/dist/adapter/resources/webgl-texture.js +2 -2
- package/dist/dist.dev.js +5 -9
- package/dist/dist.min.js +1 -1
- package/dist/index.cjs +5 -9
- package/dist/index.cjs.map +2 -2
- package/package.json +4 -4
- package/src/adapter/resources/webgl-render-pass.ts +3 -11
- package/src/adapter/resources/webgl-texture.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luma.gl/webgl",
|
|
3
|
-
"version": "9.1.0-alpha.
|
|
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.
|
|
43
|
+
"@luma.gl/core": "9.1.0-alpha.17"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@luma.gl/constants": "9.1.0-alpha.
|
|
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": "
|
|
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
|
-
|
|
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,
|
|
247
|
-
height = Math.min(height,
|
|
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'
|