@luma.gl/webgl 9.0.12 → 9.0.14

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.
@@ -184,7 +184,7 @@ export declare class WEBGLTexture extends Texture<WEBGLTextureProps> {
184
184
  width: number;
185
185
  height: number;
186
186
  format: import("@luma.gl/core").TextureFormat;
187
- data: string | import("@luma.gl/core").TextureData | Promise<import("@luma.gl/core").TextureData> | import("modules/core/dist/adapter/resources/texture").CubeTextureData | HTMLVideoElement;
187
+ data: string | import("@luma.gl/core").TextureData | Promise<import("@luma.gl/core").TextureData> | import("@luma.gl/core/dist/adapter/resources/texture").CubeTextureData | HTMLVideoElement;
188
188
  };
189
189
  _deduceImageSize(data: any, width: any, height: any): {
190
190
  width: number;
@@ -45,7 +45,7 @@ export class WEBGLTransformFeedback extends TransformFeedback {
45
45
  }
46
46
  end() {
47
47
  this.gl.endTransformFeedback();
48
- if (!this.bindOnUse) {
48
+ if (this.bindOnUse) {
49
49
  this._unbindBuffers();
50
50
  }
51
51
  this.gl.bindTransformFeedback(36386, null);
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-vertex-array.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-vertex-array.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAc,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,WAAW,EAA6B,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AAGtC,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAM5C,gCAAgC;AAChC,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,IAAa,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAE1C;IAED,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAExC,kCAA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C;AAChC,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,IAAa,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAE1C;IAED,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAExC,kCAAkC;IAClC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,WAAW,CAAQ;IAE3B,6EAA6E;IAC7E,MAAM,CAAC,gCAAgC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;gBAKpD,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,gBAAgB;IAMhD,OAAO,IAAI,IAAI;IAexB;;;;;OAKG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAgBhD,gGAAgG;IAChG,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI;IAmC1D,2FAA2F;IAClF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IAK3D,gBAAgB,IAAI,IAAI;IAKxB,iBAAiB,IAAI,IAAI;IAOlC;;;;;OAKG;IACH,SAAS,CAAC,wBAAwB,IAAI,IAAI;IAU1C;;;OAGG;IAcH,gCAAgC;IAChC,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;IAsBvC;;;;;OAKG;IACH,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,IAAI;IAiBxD;;;;;OAKG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM;CA8BnE"}
@@ -77,6 +77,9 @@ export class WEBGLVertexArray extends VertexArray {
77
77
  // Attaches ARRAY_BUFFER with specified buffer format to location
78
78
  this.device.gl.vertexAttribPointer(location, size, type, normalized, stride, offset);
79
79
  }
80
+ // Clear binding - keeping it may cause [.WebGL-0x12804417100]
81
+ // GL_INVALID_OPERATION: A transform feedback buffer that would be written to is also bound to a non-transform-feedback target
82
+ this.device.gl.bindBuffer(34962, null);
80
83
  // Mark as non-constant
81
84
  this.device.gl.enableVertexAttribArray(location);
82
85
  // Set the step mode 0=vertex, 1=instance
package/dist/dist.dev.js CHANGED
@@ -3715,35 +3715,38 @@ var __exports__ = (() => {
3715
3715
  // src/context/debug/webgl-developer-tools.ts
3716
3716
  var import_core13 = __toESM(require_core(), 1);
3717
3717
 
3718
- // ../../node_modules/@probe.gl/env/dist/lib/globals.js
3719
- var document_ = globalThis.document || {};
3720
- var process_ = globalThis.process || {};
3721
- var console_ = globalThis.console;
3722
- var navigator_ = globalThis.navigator || {};
3723
-
3724
3718
  // ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
3725
3719
  function isElectron(mockUserAgent) {
3726
- if (typeof window !== "undefined" && window.process?.type === "renderer") {
3720
+ if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
3727
3721
  return true;
3728
3722
  }
3729
- if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
3723
+ if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
3730
3724
  return true;
3731
3725
  }
3732
- const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
3726
+ const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
3733
3727
  const userAgent = mockUserAgent || realUserAgent;
3734
- return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
3728
+ if (userAgent && userAgent.indexOf("Electron") >= 0) {
3729
+ return true;
3730
+ }
3731
+ return false;
3735
3732
  }
3736
3733
 
3737
3734
  // ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
3738
3735
  function isBrowser() {
3739
- const isNode = (
3740
- // @ts-expect-error
3741
- typeof process === "object" && String(process) === "[object process]" && !process?.browser
3742
- );
3736
+ const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
3743
3737
  return !isNode || isElectron();
3744
3738
  }
3745
3739
 
3740
+ // ../../node_modules/@probe.gl/env/dist/lib/globals.js
3741
+ var self_ = globalThis.self || globalThis.window || globalThis.global;
3742
+ var window_ = globalThis.window || globalThis.self || globalThis.global;
3743
+ var document_ = globalThis.document || {};
3744
+ var process_ = globalThis.process || {};
3745
+ var console_ = globalThis.console;
3746
+ var navigator_ = globalThis.navigator || {};
3747
+
3746
3748
  // ../../node_modules/@probe.gl/env/dist/lib/get-browser.js
3749
+ var window2 = globalThis;
3747
3750
  function getBrowser(mockUserAgent) {
3748
3751
  if (!mockUserAgent && !isBrowser()) {
3749
3752
  return "Node";
@@ -3755,13 +3758,18 @@ var __exports__ = (() => {
3755
3758
  if (userAgent.indexOf("Edge") > -1) {
3756
3759
  return "Edge";
3757
3760
  }
3758
- if (globalThis.chrome) {
3761
+ const isMSIE = userAgent.indexOf("MSIE ") !== -1;
3762
+ const isTrident = userAgent.indexOf("Trident/") !== -1;
3763
+ if (isMSIE || isTrident) {
3764
+ return "IE";
3765
+ }
3766
+ if (window2.chrome) {
3759
3767
  return "Chrome";
3760
3768
  }
3761
- if (globalThis.safari) {
3769
+ if (window2.safari) {
3762
3770
  return "Safari";
3763
3771
  }
3764
- if (globalThis.mozInnerScreenX) {
3772
+ if (window2.mozInnerScreenX) {
3765
3773
  return "Firefox";
3766
3774
  }
3767
3775
  return "Unknown";
@@ -5417,6 +5425,7 @@ ${source2}`;
5417
5425
  } else {
5418
5426
  this.device.gl.vertexAttribPointer(location, size, type, normalized, stride, offset);
5419
5427
  }
5428
+ this.device.gl.bindBuffer(34962 /* ARRAY_BUFFER */, null);
5420
5429
  this.device.gl.enableVertexAttribArray(location);
5421
5430
  this.device.gl.vertexAttribDivisor(location, divisor || 0);
5422
5431
  this.attributes[location] = buffer;
@@ -5596,7 +5605,7 @@ ${source2}`;
5596
5605
  }
5597
5606
  end() {
5598
5607
  this.gl.endTransformFeedback();
5599
- if (!this.bindOnUse) {
5608
+ if (this.bindOnUse) {
5600
5609
  this._unbindBuffers();
5601
5610
  }
5602
5611
  this.gl.bindTransformFeedback(36386 /* TRANSFORM_FEEDBACK */, null);