@luma.gl/webgl 9.0.6 → 9.0.7
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/converters/device-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/device-parameters.js +19 -17
- package/dist/adapter/resources/webgl-render-pipeline.js +1 -1
- package/dist/dist.dev.js +45 -35
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +20 -18
- package/dist/index.cjs.map +2 -2
- package/package.json +3 -3
- package/src/.DS_Store +0 -0
- package/src/adapter/.DS_Store +0 -0
- package/src/adapter/converters/device-parameters.ts +20 -19
- package/src/adapter/resources/webgl-render-pipeline.ts +1 -1
- package/src/context/.DS_Store +0 -0
- package/dist.min.js +0 -19
|
@@ -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,
|
|
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 (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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 (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
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 (
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
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 (
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
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
|
|
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
|
|
3722
|
+
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
|
|
3727
3723
|
return true;
|
|
3728
3724
|
}
|
|
3729
|
-
const realUserAgent = typeof navigator
|
|
3725
|
+
const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
|
|
3730
3726
|
const userAgent = mockUserAgent || realUserAgent;
|
|
3731
|
-
|
|
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
|
-
|
|
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 (
|
|
3768
|
+
if (window2.safari) {
|
|
3759
3769
|
return "Safari";
|
|
3760
3770
|
}
|
|
3761
|
-
if (
|
|
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
|
)();
|