@luma.gl/webgl 9.0.9 → 9.0.10
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/resources/webgl-render-pipeline.d.ts +1 -0
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js +3 -3
- package/dist/dist.dev.js +27 -19
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +2 -2
- package/package.json +3 -3
- package/src/adapter/resources/webgl-render-pipeline.ts +4 -2
|
@@ -43,6 +43,7 @@ export declare class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
43
43
|
parameters?: RenderPipelineParameters;
|
|
44
44
|
topology?: PrimitiveTopology;
|
|
45
45
|
vertexArray: VertexArray;
|
|
46
|
+
isInstanced?: boolean;
|
|
46
47
|
vertexCount?: number;
|
|
47
48
|
indexCount?: number;
|
|
48
49
|
instanceCount?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-render-pipeline.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-render-pipeline.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,mBAAmB,EAAE,wBAAwB,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACpG,OAAO,KAAK,EAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,EAAC,UAAU,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,cAAc,EAAsC,MAAM,eAAe,CAAC;AAUlF,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAE5C,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAK3C,OAAO,EAAC,sBAAsB,EAAC,sCAAmC;AAKlE,oCAAoC;AACpC,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,yDAAyD;IACzD,MAAM,EAAE,WA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,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE;QAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI;IAyD3F;;;OAGG;IACH,IAAI,CAAC,OAAO,EAAE;QACZ,UAAU,EAAE,UAAU,CAAC;QACvB,UAAU,CAAC,EAAE,wBAAwB,CAAC;QACtC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;QAC7B,WAAW,EAAE,WAAW,CAAC;QACzB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;KAC5C,GAAG,OAAO;IA8FF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC;cAkBhD,YAAY;IA2B5B,wFAAwF;IACxF,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY;IAmB9D;;;;OAIG;IACH,cAAc,IAAI,SAAS,GAAG,SAAS,GAAG,YAAY;IAmBtD,6DAA6D;IACvD,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB3C;;;;OAIG;IACH,sBAAsB;IAatB,iDAAiD;IACjD,cAAc;IAyFd;;;OAGG;IACH,cAAc;CASf"}
|
|
@@ -130,7 +130,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
130
130
|
draw(options) {
|
|
131
131
|
const { renderPass, parameters = this.props.parameters, topology = this.props.topology, vertexArray, vertexCount,
|
|
132
132
|
// indexCount,
|
|
133
|
-
instanceCount, firstVertex = 0,
|
|
133
|
+
instanceCount, isInstanced = false, firstVertex = 0,
|
|
134
134
|
// firstIndex,
|
|
135
135
|
// firstInstance,
|
|
136
136
|
// baseVertex,
|
|
@@ -138,7 +138,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
138
138
|
const glDrawMode = getGLDrawMode(topology);
|
|
139
139
|
const isIndexed = Boolean(vertexArray.indexBuffer);
|
|
140
140
|
const glIndexType = vertexArray.indexBuffer?.glIndexType;
|
|
141
|
-
|
|
141
|
+
// Note that we sometimes get called with 0 instances
|
|
142
142
|
// If we are using async linking, we need to wait until linking completes
|
|
143
143
|
if (this.linkStatus !== 'success') {
|
|
144
144
|
log.info(2, `RenderPipeline:${this.id}.draw() aborted - waiting for shader linking`)();
|
|
@@ -237,7 +237,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
237
237
|
throw new Error(`Error during compilation of shader ${this.vs.id}`);
|
|
238
238
|
}
|
|
239
239
|
if (this.fs?.compilationStatus === 'error') {
|
|
240
|
-
this.
|
|
240
|
+
this.fs.debugShader();
|
|
241
241
|
throw new Error(`Error during compilation of shader ${this.fs.id}`);
|
|
242
242
|
}
|
|
243
243
|
throw new Error(`Error during ${status}: ${this.device.gl.getProgramInfoLog(this.handle)}`);
|
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
|
|
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
|
|
3723
|
+
if (typeof process !== "undefined" && typeof process.versions === "object" && Boolean(process.versions["electron"])) {
|
|
3730
3724
|
return true;
|
|
3731
3725
|
}
|
|
3732
|
-
const realUserAgent = typeof navigator
|
|
3726
|
+
const realUserAgent = typeof navigator === "object" && typeof navigator.userAgent === "string" && navigator.userAgent;
|
|
3733
3727
|
const userAgent = mockUserAgent || realUserAgent;
|
|
3734
|
-
|
|
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
|
-
|
|
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 (
|
|
3769
|
+
if (window2.safari) {
|
|
3762
3770
|
return "Safari";
|
|
3763
3771
|
}
|
|
3764
|
-
if (
|
|
3772
|
+
if (window2.mozInnerScreenX) {
|
|
3765
3773
|
return "Firefox";
|
|
3766
3774
|
}
|
|
3767
3775
|
return "Unknown";
|
|
@@ -4856,6 +4864,7 @@ ${source2}`;
|
|
|
4856
4864
|
vertexCount,
|
|
4857
4865
|
// indexCount,
|
|
4858
4866
|
instanceCount,
|
|
4867
|
+
isInstanced = false,
|
|
4859
4868
|
firstVertex = 0,
|
|
4860
4869
|
// firstIndex,
|
|
4861
4870
|
// firstInstance,
|
|
@@ -4865,7 +4874,6 @@ ${source2}`;
|
|
|
4865
4874
|
const glDrawMode = getGLDrawMode(topology);
|
|
4866
4875
|
const isIndexed = Boolean(vertexArray.indexBuffer);
|
|
4867
4876
|
const glIndexType = vertexArray.indexBuffer?.glIndexType;
|
|
4868
|
-
const isInstanced = Number(instanceCount) > 0;
|
|
4869
4877
|
if (this.linkStatus !== "success") {
|
|
4870
4878
|
import_core17.log.info(2, `RenderPipeline:${this.id}.draw() aborted - waiting for shader linking`)();
|
|
4871
4879
|
return false;
|
|
@@ -4961,7 +4969,7 @@ ${source2}`;
|
|
|
4961
4969
|
throw new Error(`Error during compilation of shader ${this.vs.id}`);
|
|
4962
4970
|
}
|
|
4963
4971
|
if (this.fs?.compilationStatus === "error") {
|
|
4964
|
-
this.
|
|
4972
|
+
this.fs.debugShader();
|
|
4965
4973
|
throw new Error(`Error during compilation of shader ${this.fs.id}`);
|
|
4966
4974
|
}
|
|
4967
4975
|
throw new Error(`Error during ${status}: ${this.device.gl.getProgramInfoLog(this.handle)}`);
|