@luma.gl/webgl 9.0.11 → 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.
- package/LICENSE +34 -0
- package/dist/adapter/resources/webgl-texture.d.ts +1 -1
- package/dist/adapter/resources/webgl-transform-feedback.js +1 -1
- package/dist/adapter/resources/webgl-vertex-array.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-vertex-array.js +3 -0
- package/dist/adapter/webgl-device.js +3 -3
- package/dist/context/debug/spector.js +2 -2
- package/dist/dist.dev.js +7 -6
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +7 -6
- package/dist/index.cjs.map +2 -2
- package/package.json +3 -3
- package/src/adapter/resources/webgl-transform-feedback.ts +1 -1
- package/src/adapter/resources/webgl-vertex-array.ts +3 -0
- package/src/adapter/webgl-device.ts +4 -4
- package/src/context/debug/spector.ts +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
luma.gl is provided under the MIT license
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 vis.gl contributors
|
|
4
|
+
|
|
5
|
+
This software includes parts initially developed by Uber and open sourced under MIT license.
|
|
6
|
+
Copyright (c) 2015 Uber Technologies, Inc.
|
|
7
|
+
|
|
8
|
+
This software includes parts of PhiloGL (https://github.com/philogb/philogl)
|
|
9
|
+
under MIT license. PhiloGL parts Copyright © 2013 Sencha Labs.
|
|
10
|
+
|
|
11
|
+
This software includes adaptations of some postprocessing code from
|
|
12
|
+
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
13
|
+
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
14
|
+
|
|
15
|
+
Additional attribution given in specific source files.
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
in the Software without restriction, including without limitation the rights
|
|
20
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
furnished to do so, subject to the following conditions:
|
|
23
|
+
|
|
24
|
+
The above copyright notice and this permission notice shall be included in
|
|
25
|
+
all copies or substantial portions of the Software.
|
|
26
|
+
|
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
33
|
+
THE SOFTWARE.
|
|
34
|
+
|
|
@@ -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("
|
|
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;
|
|
@@ -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,MA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C,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
|
|
@@ -143,6 +143,9 @@ ${device.info.vendor}, ${device.info.renderer} for canvas: ${device.canvasContex
|
|
|
143
143
|
this.gl = gl;
|
|
144
144
|
this.gl.device = this; // Update GL context: Link webgl context back to device
|
|
145
145
|
this.gl._version = 2; // Update GL context: Store WebGL version field on gl context (HACK to identify debug contexts)
|
|
146
|
+
if (props.spector) {
|
|
147
|
+
this.spectorJS = initializeSpectorJS({ ...this.props, canvas: this.handle.canvas });
|
|
148
|
+
}
|
|
146
149
|
// luma Device fields
|
|
147
150
|
this.info = getDeviceInfo(this.gl, this._extensions);
|
|
148
151
|
this.limits = new WebGLDeviceLimits(this.gl);
|
|
@@ -166,9 +169,6 @@ ${device.info.vendor}, ${device.info.renderer} for canvas: ${device.canvasContex
|
|
|
166
169
|
log.level = Math.max(log.level, 1);
|
|
167
170
|
log.warn('WebGL debug mode activated. Performance reduced.')();
|
|
168
171
|
}
|
|
169
|
-
if (props.spector) {
|
|
170
|
-
this.spectorJS = initializeSpectorJS({ ...this.props, canvas: this.handle.canvas });
|
|
171
|
-
}
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
174
|
* Destroys the context
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import { log, loadScript } from '@luma.gl/core';
|
|
5
5
|
const DEFAULT_SPECTOR_PROPS = {
|
|
6
|
-
spector: log.get('spector') || log.get('
|
|
6
|
+
spector: log.get('spector') || log.get('spectorjs')
|
|
7
7
|
};
|
|
8
8
|
// https://github.com/BabylonJS/Spector.js#basic-usage
|
|
9
|
-
const SPECTOR_CDN_URL = 'https://
|
|
9
|
+
const SPECTOR_CDN_URL = 'https://cdn.jsdelivr.net/npm/spectorjs@0.9.30/dist/spector.bundle.js';
|
|
10
10
|
const LOG_LEVEL = 1;
|
|
11
11
|
let spector = null;
|
|
12
12
|
let initialized = false;
|
package/dist/dist.dev.js
CHANGED
|
@@ -3656,9 +3656,9 @@ var __exports__ = (() => {
|
|
|
3656
3656
|
// src/context/debug/spector.ts
|
|
3657
3657
|
var import_core12 = __toESM(require_core(), 1);
|
|
3658
3658
|
var DEFAULT_SPECTOR_PROPS = {
|
|
3659
|
-
spector: import_core12.log.get("spector") || import_core12.log.get("
|
|
3659
|
+
spector: import_core12.log.get("spector") || import_core12.log.get("spectorjs")
|
|
3660
3660
|
};
|
|
3661
|
-
var SPECTOR_CDN_URL = "https://
|
|
3661
|
+
var SPECTOR_CDN_URL = "https://cdn.jsdelivr.net/npm/spectorjs@0.9.30/dist/spector.bundle.js";
|
|
3662
3662
|
var LOG_LEVEL = 1;
|
|
3663
3663
|
var spector = null;
|
|
3664
3664
|
var initialized = false;
|
|
@@ -5425,6 +5425,7 @@ ${source2}`;
|
|
|
5425
5425
|
} else {
|
|
5426
5426
|
this.device.gl.vertexAttribPointer(location, size, type, normalized, stride, offset);
|
|
5427
5427
|
}
|
|
5428
|
+
this.device.gl.bindBuffer(34962 /* ARRAY_BUFFER */, null);
|
|
5428
5429
|
this.device.gl.enableVertexAttribArray(location);
|
|
5429
5430
|
this.device.gl.vertexAttribDivisor(location, divisor || 0);
|
|
5430
5431
|
this.attributes[location] = buffer;
|
|
@@ -5604,7 +5605,7 @@ ${source2}`;
|
|
|
5604
5605
|
}
|
|
5605
5606
|
end() {
|
|
5606
5607
|
this.gl.endTransformFeedback();
|
|
5607
|
-
if (
|
|
5608
|
+
if (this.bindOnUse) {
|
|
5608
5609
|
this._unbindBuffers();
|
|
5609
5610
|
}
|
|
5610
5611
|
this.gl.bindTransformFeedback(36386 /* TRANSFORM_FEEDBACK */, null);
|
|
@@ -6117,6 +6118,9 @@ ${source2}`;
|
|
|
6117
6118
|
this.gl = gl;
|
|
6118
6119
|
this.gl.device = this;
|
|
6119
6120
|
this.gl._version = 2;
|
|
6121
|
+
if (props.spector) {
|
|
6122
|
+
this.spectorJS = initializeSpectorJS({ ...this.props, canvas: this.handle.canvas });
|
|
6123
|
+
}
|
|
6120
6124
|
this.info = getDeviceInfo(this.gl, this._extensions);
|
|
6121
6125
|
this.limits = new WebGLDeviceLimits(this.gl);
|
|
6122
6126
|
this.features = new WebGLDeviceFeatures(this.gl, this._extensions, this.props.disabledFeatures);
|
|
@@ -6136,9 +6140,6 @@ ${source2}`;
|
|
|
6136
6140
|
import_core27.log.level = Math.max(import_core27.log.level, 1);
|
|
6137
6141
|
import_core27.log.warn("WebGL debug mode activated. Performance reduced.")();
|
|
6138
6142
|
}
|
|
6139
|
-
if (props.spector) {
|
|
6140
|
-
this.spectorJS = initializeSpectorJS({ ...this.props, canvas: this.handle.canvas });
|
|
6141
|
-
}
|
|
6142
6143
|
}
|
|
6143
6144
|
/**
|
|
6144
6145
|
* Destroys the context
|