Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@loaders.gl/csv": "^4.2.0",
"@loaders.gl/draco": "^4.2.0",
"@loaders.gl/gltf": "^4.2.0",
"@luma.gl/constants": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"deck.gl": "^9.0.0",
"maplibre-gl": "^5.0.0",
"monaco-editor": "^0.39.0",
Expand Down
8 changes: 4 additions & 4 deletions modules/aggregation-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.2.0",
"@luma.gl/shadertools": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"@luma.gl/shadertools": "^9.2.2",
"@math.gl/core": "^4.1.0",
"@math.gl/web-mercator": "^4.1.0",
"d3-hexbin": "^0.2.1"
},
"peerDependencies": {
"@deck.gl/core": "^9.1.0",
"@deck.gl/layers": "^9.1.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0"
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
8 changes: 4 additions & 4 deletions modules/arcgis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"esri-loader": "^3.7.0"
},
"peerDependencies": {
"@arcgis/core": "^4.0.0",
"@deck.gl/core": "^9.1.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0",
"@luma.gl/webgl": "^9.2.0"
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2",
"@luma.gl/webgl": "^9.2.2"
},
"devDependencies": {
"@arcgis/core": "^4.21.0"
Expand Down
6 changes: 3 additions & 3 deletions modules/carto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"@loaders.gl/mvt": "^4.2.0",
"@loaders.gl/schema": "^4.2.0",
"@loaders.gl/tiles": "^4.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/shadertools": "^9.2.0",
"@luma.gl/core": "^9.2.2",
"@luma.gl/shadertools": "^9.2.2",
"@math.gl/web-mercator": "^4.1.0",
"@types/d3-array": "^3.0.2",
"@types/d3-color": "^1.4.2",
Expand All @@ -73,7 +73,7 @@
"@deck.gl/geo-layers": "^9.1.0",
"@deck.gl/layers": "^9.1.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.2.0"
"@luma.gl/core": "^9.2.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
10 changes: 5 additions & 5 deletions modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
"dependencies": {
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/images": "^4.2.0",
"@luma.gl/constants": "^9.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0",
"@luma.gl/shadertools": "^9.2.0",
"@luma.gl/webgl": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2",
"@luma.gl/shadertools": "^9.2.2",
"@luma.gl/webgl": "^9.2.2",
"@math.gl/core": "^4.1.0",
"@math.gl/sun": "^4.1.0",
"@math.gl/types": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/lib/deck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export default class Deck<ViewsT extends ViewOrViews = null> {
if (props.gl instanceof WebGLRenderingContext) {
log.error('WebGL1 context not supported.')();
}
deviceOrPromise = webgl2Adapter.attach(props.gl);
deviceOrPromise = webgl2Adapter.attach(props.gl, this.props.deviceProps);
}

// Create a new device
Expand Down
8 changes: 4 additions & 4 deletions modules/extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.2.0",
"@luma.gl/shadertools": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"@luma.gl/shadertools": "^9.2.2",
"@math.gl/core": "^4.1.0"
},
"peerDependencies": {
"@deck.gl/core": "^9.1.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0"
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
8 changes: 4 additions & 4 deletions modules/geo-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"@loaders.gl/terrain": "^4.2.0",
"@loaders.gl/tiles": "^4.2.0",
"@loaders.gl/wms": "^4.2.0",
"@luma.gl/gltf": "^9.2.0",
"@luma.gl/shadertools": "^9.2.0",
"@luma.gl/gltf": "^9.2.2",
"@luma.gl/shadertools": "^9.2.2",
"@math.gl/core": "^4.1.0",
"@math.gl/culling": "^4.1.0",
"@math.gl/web-mercator": "^4.1.0",
Expand All @@ -62,8 +62,8 @@
"@deck.gl/layers": "^9.1.0",
"@deck.gl/mesh-layers": "^9.1.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0"
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
10 changes: 5 additions & 5 deletions modules/google-maps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.2.0",
"@luma.gl/webgl": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"@luma.gl/webgl": "^9.2.2",
"@math.gl/core": "^4.1.0",
"@types/google.maps": "^3.48.6"
},
"peerDependencies": {
"@deck.gl/core": "^9.1.0",
"@luma.gl/constants": "^9.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/webgl": "^9.2.0"
"@luma.gl/constants": "^9.2.2",
"@luma.gl/core": "^9.2.2",
"@luma.gl/webgl": "^9.2.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
6 changes: 3 additions & 3 deletions modules/jupyter-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"@loaders.gl/3d-tiles": "^4.2.0",
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/csv": "^4.2.0",
"@luma.gl/constants": "^9.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/webgl": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"@luma.gl/core": "^9.2.2",
"@luma.gl/webgl": "^9.2.2",
"d3-dsv": "^1.0.8",
"mapbox-gl": "^1.13.2"
},
Expand Down
6 changes: 3 additions & 3 deletions modules/layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"@loaders.gl/images": "^4.2.0",
"@loaders.gl/schema": "^4.2.0",
"@luma.gl/shadertools": "^9.2.0",
"@luma.gl/shadertools": "^9.2.2",
"@mapbox/tiny-sdf": "^2.0.5",
"@math.gl/core": "^4.1.0",
"@math.gl/polygon": "^4.1.0",
Expand All @@ -49,8 +49,8 @@
"peerDependencies": {
"@deck.gl/core": "^9.1.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0"
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
4 changes: 2 additions & 2 deletions modules/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"@deck.gl/react": "9.2.0-beta.3",
"@deck.gl/widgets": "9.2.0-beta.3",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0"
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2"
},
"peerDependencies": {
"@arcgis/core": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions modules/mapbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"@math.gl/web-mercator": "^4.1.0"
},
"peerDependencies": {
"@deck.gl/core": "^9.1.0",
"@luma.gl/constants": "^9.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/constants": "^9.2.2",
"@luma.gl/core": "^9.2.2",
"@math.gl/web-mercator": "^4.1.0"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
Expand Down
22 changes: 18 additions & 4 deletions modules/mapbox/src/mapbox-overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,19 @@ export default class MapboxOverlay implements IControl {
private _lastMouseDownPoint?: {x: number; y: number; clientX: number; clientY: number};

constructor(props: MapboxOverlayProps) {
const {interleaved = false, ...otherProps} = props;
const {interleaved = false} = props;
this._interleaved = interleaved;
this._props = otherProps;
this._props = this.filterProps(props);
}

/** Filter out props to pass to Deck **/
filterProps(props: MapboxOverlayProps): MapboxOverlayProps {
const {interleaved = false, useDevicePixels, ...deckProps} = props;
if (!interleaved && useDevicePixels !== undefined) {
// useDevicePixels cannot be used in interleaved mode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we document this here to use pixelRatio instead https://www.maplibre.org/maplibre-gl-js/docs/API/type-aliases/MapOptions/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately that isn't working nicely in interleaved mode so I would rather not encourage it now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, well we should still document the behavior there like we do for other prop overrides

(deckProps as MapboxOverlayProps).useDevicePixels = useDevicePixels;
}
return deckProps;
}

/** Update (partial) props of the underlying Deck instance. */
Expand All @@ -58,7 +68,7 @@ export default class MapboxOverlay implements IControl {
resolveLayers(this._map, this._deck, this._props.layers, props.layers);
}

Object.assign(this._props, props);
Object.assign(this._props, this.filterProps(props));

if (this._deck && this._map) {
this._deck.setProps({
Expand Down Expand Up @@ -127,7 +137,11 @@ export default class MapboxOverlay implements IControl {
gl,
deck: new Deck({
...this._props,
gl
gl,
parameters: {...getDefaultParameters(map, false), ...this._props.parameters},
deviceProps: {
createCanvasContext: {autoResize: true}
}
})
});

Expand Down
12 changes: 6 additions & 6 deletions modules/mesh-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
"dependencies": {
"@loaders.gl/gltf": "^4.2.0",
"@loaders.gl/schema": "^4.2.0",
"@luma.gl/gltf": "^9.2.0",
"@luma.gl/shadertools": "^9.2.0"
"@luma.gl/gltf": "^9.2.2",
"@luma.gl/shadertools": "^9.2.2"
},
"peerDependencies": {
"@deck.gl/core": "^9.1.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0",
"@luma.gl/gltf": "^9.2.0",
"@luma.gl/shadertools": "^9.2.0"
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2",
"@luma.gl/gltf": "^9.2.2",
"@luma.gl/shadertools": "^9.2.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
8 changes: 4 additions & 4 deletions modules/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
"src"
],
"dependencies": {
"@luma.gl/test-utils": "^9.2.0",
"@luma.gl/webgl": "^9.2.0"
"@luma.gl/test-utils": "^9.2.2",
"@luma.gl/webgl": "^9.2.2"
},
"peerDependencies": {
"@deck.gl/core": "^9.1.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/engine": "^9.2.0",
"@luma.gl/core": "^9.2.2",
"@luma.gl/engine": "^9.2.2",
"@probe.gl/test-utils": "^4.1.0"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"devDependencies": {
"@loaders.gl/csv": "^4.2.0",
"@loaders.gl/polyfills": "^4.2.0",
"@luma.gl/core": "^9.2.0",
"@luma.gl/webgpu": "^9.2.0",
"@luma.gl/effects": "^9.2.0",
"@luma.gl/core": "^9.2.2",
"@luma.gl/webgpu": "^9.2.2",
"@luma.gl/effects": "^9.2.2",
"@math.gl/proj4": "^4.1.0",
"@probe.gl/bench": "^4.1.0",
"@vis.gl/dev-tools": "1.0.0-alpha.21",
Expand Down
6 changes: 2 additions & 4 deletions test/modules/mapbox/mapbox-overlay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ test('MapboxOverlay#interleaved', t => {
'Overlay parameters are intact'
);

t.is(overlay._deck.props.useDevicePixels, 1, 'useDevicePixels is set correctly');
t.is(overlay._props.useDevicePixels, 1, 'useDevicePixels are intact');
t.is(overlay._props.useDevicePixels, undefined, 'useDevicePixels is not forwarded');

await sleep(100);
t.ok(map.getLayer('poi'), 'MapboxLayer is added');
Expand Down Expand Up @@ -294,8 +293,7 @@ test('MapboxOverlay#interleavedNoInitialLayers', t => {
);
t.false('parameters' in overlay._props, 'Overlay parameters arent set');

t.true(overlay._deck.props.useDevicePixels === false, 'useDevicePixels is set correctly');
t.true(overlay._props.useDevicePixels === false, 'useDevicePixels are intact');
t.is(overlay._props.useDevicePixels, undefined, 'useDevicePixels is not forwarded');

overlay.setProps({
layers: [new ScatterplotLayer({id: 'cities'})],
Expand Down
Loading
Loading