deck.gl 9.2.1 → 9.2.3
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/dist.dev.js +19 -17
- package/dist.min.js +61 -61
- package/package.json +15 -15
package/dist/dist.dev.js
CHANGED
|
@@ -43274,7 +43274,17 @@ void main() {
|
|
|
43274
43274
|
if (props.gl instanceof WebGLRenderingContext) {
|
|
43275
43275
|
log_default.error("WebGL1 context not supported.")();
|
|
43276
43276
|
}
|
|
43277
|
-
|
|
43277
|
+
const userOnResize = this.props.deviceProps?.onResize;
|
|
43278
|
+
deviceOrPromise = webgl2Adapter.attach(props.gl, {
|
|
43279
|
+
...this.props.deviceProps,
|
|
43280
|
+
onResize: (canvasContext, info) => {
|
|
43281
|
+
const { width, height } = canvasContext.canvas;
|
|
43282
|
+
canvasContext.drawingBufferWidth = width;
|
|
43283
|
+
canvasContext.drawingBufferHeight = height;
|
|
43284
|
+
this._needsRedraw = "Canvas resized";
|
|
43285
|
+
userOnResize?.(canvasContext, info);
|
|
43286
|
+
}
|
|
43287
|
+
});
|
|
43278
43288
|
}
|
|
43279
43289
|
if (!deviceOrPromise) {
|
|
43280
43290
|
deviceOrPromise = this._createDevice(props);
|
|
@@ -43345,18 +43355,8 @@ void main() {
|
|
|
43345
43355
|
this.animationLoop.start();
|
|
43346
43356
|
}
|
|
43347
43357
|
this.animationLoop?.setProps(resolvedProps);
|
|
43348
|
-
if (props.useDevicePixels !== void 0 && this.device?.canvasContext
|
|
43349
|
-
this.device.canvasContext.
|
|
43350
|
-
const canvas2 = this.device.canvasContext.canvas;
|
|
43351
|
-
const entry = {
|
|
43352
|
-
target: canvas2,
|
|
43353
|
-
contentBoxSize: [{ inlineSize: canvas2.clientWidth, blockSize: canvas2.clientHeight }],
|
|
43354
|
-
devicePixelContentBoxSize: [
|
|
43355
|
-
{ inlineSize: canvas2.clientWidth, blockSize: canvas2.clientHeight }
|
|
43356
|
-
],
|
|
43357
|
-
borderBoxSize: [{ inlineSize: canvas2.clientWidth, blockSize: canvas2.clientHeight }]
|
|
43358
|
-
};
|
|
43359
|
-
this.device.canvasContext._handleResize([entry]);
|
|
43358
|
+
if (props.useDevicePixels !== void 0 && this.device?.canvasContext) {
|
|
43359
|
+
this.device.canvasContext.setProps({ useDevicePixels: props.useDevicePixels });
|
|
43360
43360
|
}
|
|
43361
43361
|
if (this.layerManager) {
|
|
43362
43362
|
this.viewManager.setProps(resolvedProps);
|
|
@@ -43583,6 +43583,7 @@ void main() {
|
|
|
43583
43583
|
// we must use 'premultiplied' canvas for webgpu to enable transparency and match shaders
|
|
43584
43584
|
alphaMode: this.props.deviceProps?.type === "webgpu" ? "premultiplied" : void 0
|
|
43585
43585
|
};
|
|
43586
|
+
const userOnResize = this.props.deviceProps?.onResize;
|
|
43586
43587
|
return luma.createDevice({
|
|
43587
43588
|
// luma by default throws if a device is already attached
|
|
43588
43589
|
// asynchronous device creation could happen after finalize() is called
|
|
@@ -43598,6 +43599,10 @@ void main() {
|
|
|
43598
43599
|
canvas: this._createCanvas(props),
|
|
43599
43600
|
useDevicePixels: this.props.useDevicePixels,
|
|
43600
43601
|
autoResize: true
|
|
43602
|
+
},
|
|
43603
|
+
onResize: (canvasContext, info) => {
|
|
43604
|
+
this._needsRedraw = "Canvas resized";
|
|
43605
|
+
userOnResize?.(canvasContext, info);
|
|
43601
43606
|
}
|
|
43602
43607
|
});
|
|
43603
43608
|
}
|
|
@@ -102374,10 +102379,7 @@ void main() {
|
|
|
102374
102379
|
deck: new Deck({
|
|
102375
102380
|
...this._props,
|
|
102376
102381
|
gl,
|
|
102377
|
-
parameters: { ...getDefaultParameters(map6,
|
|
102378
|
-
deviceProps: {
|
|
102379
|
-
createCanvasContext: { autoResize: true }
|
|
102380
|
-
}
|
|
102382
|
+
parameters: { ...getDefaultParameters(map6, true), ...this._props.parameters }
|
|
102381
102383
|
})
|
|
102382
102384
|
});
|
|
102383
102385
|
map6.on("styledata", this._handleStyleChange);
|