@luma.gl/webgl 9.2.0 → 9.2.2

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.2.0",
3
+ "version": "9.2.2",
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.2.0-beta.1"
43
+ "@luma.gl/core": "~9.2.0"
44
44
  },
45
45
  "dependencies": {
46
- "@luma.gl/constants": "9.2.0",
46
+ "@luma.gl/constants": "9.2.2",
47
47
  "@math.gl/types": "^4.1.0",
48
48
  "@probe.gl/env": "^4.0.8"
49
49
  },
50
- "gitHead": "50c5fc86a11e7b2a11683efe73c1ce1c467ac6e0"
50
+ "gitHead": "37d69667d542589649414c46fd4691dd290b2588"
51
51
  }
@@ -50,7 +50,7 @@ export class WebGLAdapter extends Adapter {
50
50
  * @param gl
51
51
  * @returns
52
52
  */
53
- async attach(gl: Device | WebGL2RenderingContext): Promise<WebGLDevice> {
53
+ async attach(gl: Device | WebGL2RenderingContext, props: DeviceProps = {}): Promise<WebGLDevice> {
54
54
  const {WebGLDevice} = await import('./webgl-device');
55
55
  if (gl instanceof WebGLDevice) {
56
56
  return gl;
@@ -64,11 +64,14 @@ export class WebGLAdapter extends Adapter {
64
64
  throw new Error('Invalid WebGL2RenderingContext');
65
65
  }
66
66
 
67
+ const createCanvasContext = props.createCanvasContext === true ? {} : props.createCanvasContext;
68
+
67
69
  // We create a new device using the provided WebGL context and its canvas
68
70
  // Assume that whoever created the external context will be handling resizes.
69
71
  return new WebGLDevice({
72
+ ...props,
70
73
  _handle: gl,
71
- createCanvasContext: {canvas: gl.canvas, autoResize: false}
74
+ createCanvasContext: {canvas: gl.canvas, autoResize: false, ...createCanvasContext}
72
75
  });
73
76
  }
74
77