@luma.gl/webgl 9.0.6 → 9.0.8

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,QAsMzE;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,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"}
@@ -120,10 +120,10 @@ export function setDeviceParameters(device, parameters) {
120
120
  // // Handled by depthBias
121
121
  // },
122
122
  // WEBGL EXTENSIONS
123
- if (device.features.has('provoking-vertex-webgl')) {
124
- const extensions = webglDevice.getExtension('WEBGL_provoking_vertex');
125
- const ext = extensions.WEBGL_provoking_vertex;
126
- if (parameters.provokingVertex) {
123
+ if (parameters.provokingVertex) {
124
+ if (device.features.has('provoking-vertex-webgl')) {
125
+ const extensions = webglDevice.getExtension('WEBGL_provoking_vertex');
126
+ const ext = extensions.WEBGL_provoking_vertex;
127
127
  const vertex = map('provokingVertex', parameters.provokingVertex, {
128
128
  first: 36429,
129
129
  last: 36430
@@ -131,19 +131,21 @@ export function setDeviceParameters(device, parameters) {
131
131
  ext?.provokingVertexWEBGL(vertex);
132
132
  }
133
133
  }
134
- if (device.features.has('polygon-mode-webgl')) {
135
- const extensions = webglDevice.getExtension('WEBGL_polygon_mode');
136
- const ext = extensions.WEBGL_polygon_mode;
137
- if (parameters.polygonMode) {
138
- const mode = map('polygonMode', parameters.polygonMode, {
139
- fill: 6914,
140
- line: 6913
141
- });
142
- ext?.polygonModeWEBGL(1028, mode);
143
- ext?.polygonModeWEBGL(1029, mode);
144
- }
145
- if (parameters.polygonOffsetLine) {
146
- gl.enable(10754);
134
+ if (parameters.polygonMode || parameters.polygonOffsetLine) {
135
+ if (device.features.has('polygon-mode-webgl')) {
136
+ if (parameters.polygonMode) {
137
+ const extensions = webglDevice.getExtension('WEBGL_polygon_mode');
138
+ const ext = extensions.WEBGL_polygon_mode;
139
+ const mode = map('polygonMode', parameters.polygonMode, {
140
+ fill: 6914,
141
+ line: 6913
142
+ });
143
+ ext?.polygonModeWEBGL(1028, mode);
144
+ ext?.polygonModeWEBGL(1029, mode);
145
+ }
146
+ if (parameters.polygonOffsetLine) {
147
+ gl.enable(10754);
148
+ }
147
149
  }
148
150
  }
149
151
  if (device.features.has('shader-clip-cull-distance-webgl')) {
@@ -92,7 +92,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
92
92
  const validBindings = this.shaderLayout.bindings
93
93
  .map(binding => `"${binding.name}"`)
94
94
  .join(', ');
95
- if (options?.disableWarnings) {
95
+ if (!options?.disableWarnings) {
96
96
  log.warn(`Unknown binding "${name}" in render pipeline "${this.id}", expected one of ${validBindings}`)();
97
97
  }
98
98
  continue; // eslint-disable-line no-continue
@@ -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;AAO5C,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,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;IAgC1D,2FAA2F;IAClF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG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GAAG,IAAI,GAAG,IAAI;IAgBhD,gGAAgG;IAChG,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI;IAgC1D,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"}
@@ -5,7 +5,6 @@ import { VertexArray, getScratchArray, fillArray } from '@luma.gl/core';
5
5
  import { GL } from '@luma.gl/constants';
6
6
  import { getBrowser } from '@probe.gl/env';
7
7
  import { getGLFromVertexType } from "../converters/vertex-formats.js";
8
- // import {AccessorObject} from '../..';
9
8
  // import {getGLFromVertexType} from '../converters/vertex-formats';
10
9
  /** VertexArrayObject wrapper */
11
10
  export class WEBGLVertexArray extends VertexArray {
package/dist/dist.dev.js CHANGED
@@ -2311,10 +2311,10 @@ var __exports__ = (() => {
2311
2311
  if (parameters.depthBias !== void 0) {
2312
2312
  gl.polygonOffset(parameters.depthBias, parameters.depthBiasSlopeScale || 0);
2313
2313
  }
2314
- if (device.features.has("provoking-vertex-webgl")) {
2315
- const extensions = webglDevice.getExtension("WEBGL_provoking_vertex");
2316
- const ext = extensions.WEBGL_provoking_vertex;
2317
- if (parameters.provokingVertex) {
2314
+ if (parameters.provokingVertex) {
2315
+ if (device.features.has("provoking-vertex-webgl")) {
2316
+ const extensions = webglDevice.getExtension("WEBGL_provoking_vertex");
2317
+ const ext = extensions.WEBGL_provoking_vertex;
2318
2318
  const vertex = map(
2319
2319
  "provokingVertex",
2320
2320
  parameters.provokingVertex,
@@ -2326,19 +2326,21 @@ var __exports__ = (() => {
2326
2326
  ext?.provokingVertexWEBGL(vertex);
2327
2327
  }
2328
2328
  }
2329
- if (device.features.has("polygon-mode-webgl")) {
2330
- const extensions = webglDevice.getExtension("WEBGL_polygon_mode");
2331
- const ext = extensions.WEBGL_polygon_mode;
2332
- if (parameters.polygonMode) {
2333
- const mode = map("polygonMode", parameters.polygonMode, {
2334
- fill: 6914 /* FILL_WEBGL */,
2335
- line: 6913 /* LINE_WEBGL */
2336
- });
2337
- ext?.polygonModeWEBGL(1028 /* FRONT */, mode);
2338
- ext?.polygonModeWEBGL(1029 /* BACK */, mode);
2339
- }
2340
- if (parameters.polygonOffsetLine) {
2341
- gl.enable(10754 /* POLYGON_OFFSET_LINE_WEBGL */);
2329
+ if (parameters.polygonMode || parameters.polygonOffsetLine) {
2330
+ if (device.features.has("polygon-mode-webgl")) {
2331
+ if (parameters.polygonMode) {
2332
+ const extensions = webglDevice.getExtension("WEBGL_polygon_mode");
2333
+ const ext = extensions.WEBGL_polygon_mode;
2334
+ const mode = map("polygonMode", parameters.polygonMode, {
2335
+ fill: 6914 /* FILL_WEBGL */,
2336
+ line: 6913 /* LINE_WEBGL */
2337
+ });
2338
+ ext?.polygonModeWEBGL(1028 /* FRONT */, mode);
2339
+ ext?.polygonModeWEBGL(1029 /* BACK */, mode);
2340
+ }
2341
+ if (parameters.polygonOffsetLine) {
2342
+ gl.enable(10754 /* POLYGON_OFFSET_LINE_WEBGL */);
2343
+ }
2342
2344
  }
2343
2345
  }
2344
2346
  if (device.features.has("shader-clip-cull-distance-webgl")) {
@@ -3712,35 +3714,38 @@ var __exports__ = (() => {
3712
3714
  // src/context/debug/webgl-developer-tools.ts
3713
3715
  var import_core13 = __toESM(require_core(), 1);
3714
3716
 
3715
- // ../../node_modules/@probe.gl/env/dist/lib/globals.js
3716
- var document_ = globalThis.document || {};
3717
- var process_ = globalThis.process || {};
3718
- var console_ = globalThis.console;
3719
- var navigator_ = globalThis.navigator || {};
3720
-
3721
3717
  // ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
3722
3718
  function isElectron(mockUserAgent) {
3723
- if (typeof window !== "undefined" && window.process?.type === "renderer") {
3719
+ if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
3724
3720
  return true;
3725
3721
  }
3726
- if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
3722
+ if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
3727
3723
  return true;
3728
3724
  }
3729
- const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
3725
+ const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
3730
3726
  const userAgent = mockUserAgent || realUserAgent;
3731
- return Boolean(userAgent && userAgent.indexOf("Electron") >= 0);
3727
+ if (userAgent && userAgent.indexOf("Electron") >= 0) {
3728
+ return true;
3729
+ }
3730
+ return false;
3732
3731
  }
3733
3732
 
3734
3733
  // ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
3735
3734
  function isBrowser() {
3736
- const isNode = (
3737
- // @ts-expect-error
3738
- typeof process === "object" && String(process) === "[object process]" && !process?.browser
3739
- );
3735
+ const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
3740
3736
  return !isNode || isElectron();
3741
3737
  }
3742
3738
 
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
+
3743
3747
  // ../../node_modules/@probe.gl/env/dist/lib/get-browser.js
3748
+ var window2 = globalThis;
3744
3749
  function getBrowser(mockUserAgent) {
3745
3750
  if (!mockUserAgent && !isBrowser()) {
3746
3751
  return "Node";
@@ -3752,13 +3757,18 @@ var __exports__ = (() => {
3752
3757
  if (userAgent.indexOf("Edge") > -1) {
3753
3758
  return "Edge";
3754
3759
  }
3755
- if (globalThis.chrome) {
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) {
3756
3766
  return "Chrome";
3757
3767
  }
3758
- if (globalThis.safari) {
3768
+ if (window2.safari) {
3759
3769
  return "Safari";
3760
3770
  }
3761
- if (globalThis.mozInnerScreenX) {
3771
+ if (window2.mozInnerScreenX) {
3762
3772
  return "Firefox";
3763
3773
  }
3764
3774
  return "Unknown";
@@ -4813,7 +4823,7 @@ ${source2}`;
4813
4823
  const binding = this.shaderLayout.bindings.find((binding2) => binding2.name === name) || this.shaderLayout.bindings.find((binding2) => binding2.name === `${name}Uniforms`);
4814
4824
  if (!binding) {
4815
4825
  const validBindings = this.shaderLayout.bindings.map((binding2) => `"${binding2.name}"`).join(", ");
4816
- if (options?.disableWarnings) {
4826
+ if (!options?.disableWarnings) {
4817
4827
  import_core17.log.warn(
4818
4828
  `Unknown binding "${name}" in render pipeline "${this.id}", expected one of ${validBindings}`
4819
4829
  )();