@luma.gl/webgl 9.0.8 → 9.0.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"device-parameters.d.ts","sourceRoot":"","sources":["../../../src/adapter/converters/device-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAgD,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,MAAM,EAAsB,UAAU,EAA+B,MAAM,eAAe,CAAC;AAEnG,OAAO,KAAK,EAGV,UAAU,EACV,YAAY,EAIb,MAAM,oBAAoB,CAAC;AAO5B;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,GAAG,OAAO,EACnD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAC3B,CAAC,CAgBH;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,OAAO,EAC1C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,YAAY,EACxB,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAC3B,CAAC,CAeH;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,OAAO,EAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAC3B,CAAC,CAgBH;AAED,kCAAkC;AAClC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,QAuMzE;AAyBD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,UAAU,CAW5F;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,eAAe,CAW9F"}
1
+ {"version":3,"file":"device-parameters.d.ts","sourceRoot":"","sources":["../../../src/adapter/converters/device-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAgD,MAAM,eAAe,CAAC;AAClG,OAAO,EAAC,MAAM,EAAsB,UAAU,EAA+B,MAAM,eAAe,CAAC;AAEnG,OAAO,KAAK,EAGV,UAAU,EACV,YAAY,EAIb,MAAM,oBAAoB,CAAC;AAO5B;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,GAAG,OAAO,EACnD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAC3B,CAAC,CAgBH;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,OAAO,EAC1C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,YAAY,EACxB,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAC3B,CAAC,CAeH;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,OAAO,EAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAC3B,CAAC,CAgBH;AAED,kCAAkC;AAClC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,QAwMzE;AAyBD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,UAAU,CAW5F;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,eAAe,CAW9F"}
@@ -114,6 +114,7 @@ export function setDeviceParameters(device, parameters) {
114
114
  }
115
115
  }
116
116
  if (parameters.depthBias !== undefined) {
117
+ gl.enable(32823);
117
118
  gl.polygonOffset(parameters.depthBias, parameters.depthBiasSlopeScale || 0);
118
119
  }
119
120
  // depthBiasSlopeScale: {
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-render-pass.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-render-pass.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAK,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAcpD,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAE7B,8DAA8D;IAC9D,YAAY,EAAE,YAAY,CAAC;gBAEf,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe;IAYvD,GAAG,IAAI,IAAI;IAQX,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IACxC,aAAa,IAAI,IAAI;IACrB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAO5C;;OAEG;IACH,aAAa,CAAC,UAAU,GAAE,oBAAyB,GAAG,IAAI;IAqD1D,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKpC,iBAAiB,IAAI,IAAI;IAOlC;;OAEG;IACH,SAAS,CAAC,KAAK,IAAI,IAAI;IA+BvB;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,UAAU,GAAE,MAAU,EAAE,KAAK,GAAE,WAA0B;CAwCrF"}
1
+ {"version":3,"file":"webgl-render-pass.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-render-pass.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAK,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAcpD,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAE7B,8DAA8D;IAC9D,YAAY,EAAE,YAAY,CAAC;gBAEf,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe;IAYvD,GAAG,IAAI,IAAI;IAKX,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IACxC,aAAa,IAAI,IAAI;IACrB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAO5C;;OAEG;IACH,aAAa,CAAC,UAAU,GAAE,oBAAyB,GAAG,IAAI;IAqD1D,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKpC,iBAAiB,IAAI,IAAI;IAOlC;;OAEG;IACH,SAAS,CAAC,KAAK,IAAI,IAAI;IA+BvB;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,UAAU,GAAE,MAAU,EAAE,KAAK,GAAE,WAA0B;CAwCrF"}
@@ -27,9 +27,6 @@ export class WEBGLRenderPass extends RenderPass {
27
27
  }
28
28
  end() {
29
29
  popContextState(this.device.gl);
30
- if (this.props.framebuffer) {
31
- setGLParameters(this.device.gl, { framebuffer: null });
32
- }
33
30
  // should add commands to CommandEncoder.
34
31
  }
35
32
  pushDebugGroup(groupLabel) { }
@@ -42,7 +39,7 @@ export class WEBGLRenderPass extends RenderPass {
42
39
  * Maps RenderPass parameters to GL parameters
43
40
  */
44
41
  setParameters(parameters = {}) {
45
- const glParameters = {};
42
+ const glParameters = { ...this.glParameters };
46
43
  // Framebuffers are specified using parameters in WebGL
47
44
  if (this.props.framebuffer) {
48
45
  glParameters.framebuffer = this.props.framebuffer;
package/dist/dist.dev.js CHANGED
@@ -2309,6 +2309,7 @@ var __exports__ = (() => {
2309
2309
  }
2310
2310
  }
2311
2311
  if (parameters.depthBias !== void 0) {
2312
+ gl.enable(32823 /* POLYGON_OFFSET_FILL */);
2312
2313
  gl.polygonOffset(parameters.depthBias, parameters.depthBiasSlopeScale || 0);
2313
2314
  }
2314
2315
  if (parameters.provokingVertex) {
@@ -3714,38 +3715,35 @@ var __exports__ = (() => {
3714
3715
  // src/context/debug/webgl-developer-tools.ts
3715
3716
  var import_core13 = __toESM(require_core(), 1);
3716
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
+
3717
3724
  // ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
3718
3725
  function isElectron(mockUserAgent) {
3719
- if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
3726
+ if (typeof window !== "undefined" && window.process?.type === "renderer") {
3720
3727
  return true;
3721
3728
  }
3722
- if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
3729
+ if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
3723
3730
  return true;
3724
3731
  }
3725
- const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
3732
+ const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
3726
3733
  const userAgent = mockUserAgent || realUserAgent;
3727
- if (userAgent && userAgent.indexOf("Electron") >= 0) {
3728
- return true;
3729
- }
3730
- return false;
3734
+ return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
3731
3735
  }
3732
3736
 
3733
3737
  // ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
3734
3738
  function isBrowser() {
3735
- const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
3739
+ const isNode = (
3740
+ // @ts-expect-error
3741
+ typeof process === "object" && String(process) === "[object process]" && !process?.browser
3742
+ );
3736
3743
  return !isNode || isElectron();
3737
3744
  }
3738
3745
 
3739
- // ../../node_modules/@probe.gl/env/dist/lib/globals.js
3740
- var self_ = globalThis.self || globalThis.window || globalThis.global;
3741
- var window_ = globalThis.window || globalThis.self || globalThis.global;
3742
- var document_ = globalThis.document || {};
3743
- var process_ = globalThis.process || {};
3744
- var console_ = globalThis.console;
3745
- var navigator_ = globalThis.navigator || {};
3746
-
3747
3746
  // ../../node_modules/@probe.gl/env/dist/lib/get-browser.js
3748
- var window2 = globalThis;
3749
3747
  function getBrowser(mockUserAgent) {
3750
3748
  if (!mockUserAgent && !isBrowser()) {
3751
3749
  return "Node";
@@ -3757,18 +3755,13 @@ var __exports__ = (() => {
3757
3755
  if (userAgent.indexOf("Edge") > -1) {
3758
3756
  return "Edge";
3759
3757
  }
3760
- const isMSIE = userAgent.indexOf("MSIE ") !== -1;
3761
- const isTrident = userAgent.indexOf("Trident/") !== -1;
3762
- if (isMSIE || isTrident) {
3763
- return "IE";
3764
- }
3765
- if (window2.chrome) {
3758
+ if (globalThis.chrome) {
3766
3759
  return "Chrome";
3767
3760
  }
3768
- if (window2.safari) {
3761
+ if (globalThis.safari) {
3769
3762
  return "Safari";
3770
3763
  }
3771
- if (window2.mozInnerScreenX) {
3764
+ if (globalThis.mozInnerScreenX) {
3772
3765
  return "Firefox";
3773
3766
  }
3774
3767
  return "Unknown";
@@ -4032,9 +4025,6 @@ ${source2}`;
4032
4025
  }
4033
4026
  end() {
4034
4027
  popContextState(this.device.gl);
4035
- if (this.props.framebuffer) {
4036
- setGLParameters(this.device.gl, { framebuffer: null });
4037
- }
4038
4028
  }
4039
4029
  pushDebugGroup(groupLabel) {
4040
4030
  }
@@ -4049,7 +4039,7 @@ ${source2}`;
4049
4039
  * Maps RenderPass parameters to GL parameters
4050
4040
  */
4051
4041
  setParameters(parameters = {}) {
4052
- const glParameters = {};
4042
+ const glParameters = { ...this.glParameters };
4053
4043
  if (this.props.framebuffer) {
4054
4044
  glParameters.framebuffer = this.props.framebuffer;
4055
4045
  }