Skip to content

Commit

Permalink
chore: Remove internal texture parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Apr 29, 2024
1 parent be76eef commit 8cd89ca
Show file tree
Hide file tree
Showing 28 changed files with 144 additions and 134 deletions.
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"npmClient": "yarn",
"packages": [
"modules/*"
Expand Down
10 changes: 5 additions & 5 deletions modules/aggregation-layers/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "deck.gl layers that aggregate the input data into alternative representations",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -38,16 +38,16 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.0.11",
"@luma.gl/shadertools": "^9.0.11",
"@luma.gl/constants": "^9.1.0-alpha.2",
"@luma.gl/shadertools": "^9.1.0-alpha.2",
"@math.gl/web-mercator": "^4.0.0",
"d3-hexbin": "^0.2.1"
},
"peerDependencies": {
"@deck.gl/core": "^9.0.0-beta",
"@deck.gl/layers": "^9.0.0-beta",
"@luma.gl/core": "^9.0.0",
"@luma.gl/engine": "^9.0.0"
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/engine": "^9.1.0-alpha.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
Expand Up @@ -550,7 +550,7 @@ export default class HeatmapLayer<

if (colorTexture && colorTexture?.width === colorRange.length) {
// TODO(v9): Unclear whether `setSubImageData` is a public API, or what to use if not.
(colorTexture as any).setSubImageData({data: colors});
(colorTexture as any).setTexture2DData({data: colors});
} else {
colorTexture?.destroy();
colorTexture = this.context.device.createTexture({
Expand Down
Expand Up @@ -65,7 +65,8 @@ export default class TriangleLayer extends Layer<_TriangleLayerProps> {
{name: 'positions', format: 'float32x3'},
{name: 'texCoords', format: 'float32x2'}
],
topology: 'triangle-fan-webgl',
// TODO v9. was triangle-fan-webgl, update geometry
topology: 'triangle-strip',
vertexCount
});
}
Expand Down
8 changes: 4 additions & 4 deletions modules/arcgis/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "Use deck.gl as a custom ArcGIS API for JavaScript layer",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -36,14 +36,14 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.0.11",
"@luma.gl/constants": "^9.1.0-alpha.2",
"esri-loader": "^3.7.0"
},
"peerDependencies": {
"@arcgis/core": "^4.0.0",
"@deck.gl/core": "^9.0.0-beta",
"@luma.gl/core": "^9.0.0",
"@luma.gl/engine": "^9.0.0"
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/engine": "^9.1.0-alpha.2"
},
"devDependencies": {
"@arcgis/core": "^4.21.0"
Expand Down
11 changes: 6 additions & 5 deletions modules/carto/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -47,9 +47,9 @@
"@loaders.gl/mvt": "^4.2.0",
"@loaders.gl/schema": "^4.2.0",
"@loaders.gl/tiles": "^4.2.0",
"@luma.gl/constants": "^9.0.11",
"@luma.gl/core": "^9.0.11",
"@luma.gl/shadertools": "^9.0.11",
"@luma.gl/constants": "^9.1.0-alpha.2",
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/shadertools": "^9.1.0-alpha.2",
"@math.gl/web-mercator": "^4.0.0",
"@types/d3-array": "^3.0.2",
"@types/d3-color": "^1.4.2",
Expand All @@ -71,7 +71,8 @@
"@deck.gl/extensions": "^9.0.0-beta",
"@deck.gl/geo-layers": "^9.0.0-beta",
"@deck.gl/layers": "^9.0.0-beta",
"@loaders.gl/core": "^4.2.0"
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.1.0-alpha.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
12 changes: 6 additions & 6 deletions modules/core/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "deck.gl core library",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -42,11 +42,11 @@
"dependencies": {
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/images": "^4.2.0",
"@luma.gl/constants": "^9.0.11",
"@luma.gl/core": "^9.0.11",
"@luma.gl/engine": "^9.0.11",
"@luma.gl/shadertools": "^9.0.11",
"@luma.gl/webgl": "^9.0.11",
"@luma.gl/constants": "^9.1.0-alpha.2",
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/engine": "^9.1.0-alpha.2",
"@luma.gl/shadertools": "^9.1.0-alpha.2",
"@luma.gl/webgl": "^9.1.0-alpha.2",
"@math.gl/core": "^4.0.0",
"@math.gl/sun": "^4.0.0",
"@math.gl/web-mercator": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions modules/core/src/effects/post-process-effect.ts
@@ -1,5 +1,5 @@
import type {Device, Framebuffer} from '@luma.gl/core';
import {normalizeShaderModule, ShaderPass} from '@luma.gl/shadertools';
import {initializeShaderModule, ShaderPass} from '@luma.gl/shadertools';

import ScreenPass from '../passes/screen-pass';

Expand All @@ -14,7 +14,7 @@ export default class PostProcessEffect<ShaderPassT extends ShaderPass> implement
constructor(module: ShaderPassT, props: ShaderPassT['props']) {
this.id = `${module.name}-pass`;
this.props = props;
normalizeShaderModule(module);
initializeShaderModule(module);
this.module = module;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/lib/attribute/data-column.ts
Expand Up @@ -356,7 +356,7 @@ export default class DataColumn<Options, State> {
buffer?: Buffer;
} & Partial<BufferAccessor>;
if (ArrayBuffer.isView(data)) {
opts = {value: data};
opts = {value: data as TypedArray};

Check failure on line 359 in modules/core/src/lib/attribute/data-column.ts

View workflow job for this annotation

GitHub Actions / test-node

This assertion is unnecessary since it does not change the type of the expression
} else if (data instanceof Buffer) {
opts = {buffer: data};
} else {
Expand Down
1 change: 0 additions & 1 deletion modules/core/src/utils/texture.ts
Expand Up @@ -29,7 +29,6 @@ export function createTexture(
sampler: SamplerProps
): Texture | null {
if (image instanceof Texture) {
// @ts-expect-error This type error seems like it shouldn't happen...
return image;
} else if (image.constructor && image.constructor.name !== 'Object') {
// Browser object
Expand Down
10 changes: 5 additions & 5 deletions modules/extensions/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "Plug-and-play functionalities for deck.gl layers",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -38,14 +38,14 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.0.11",
"@luma.gl/shadertools": "^9.0.11",
"@luma.gl/constants": "^9.1.0-alpha.2",
"@luma.gl/shadertools": "^9.1.0-alpha.2",
"@math.gl/core": "^4.0.0"
},
"peerDependencies": {
"@deck.gl/core": "^9.0.0-beta",
"@luma.gl/core": "^9.0.0",
"@luma.gl/engine": "^9.0.0"
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/engine": "^9.1.0-alpha.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
10 changes: 5 additions & 5 deletions modules/geo-layers/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "deck.gl layers supporting geospatial use cases and GIS formats",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down 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.0.11",
"@luma.gl/shadertools": "^9.0.11",
"@luma.gl/gltf": "^9.1.0-alpha.2",
"@luma.gl/shadertools": "^9.1.0-alpha.2",
"@math.gl/core": "^4.0.0",
"@math.gl/culling": "^4.0.0",
"@math.gl/web-mercator": "^4.0.0",
Expand All @@ -61,8 +61,8 @@
"@deck.gl/layers": "^9.0.0-beta",
"@deck.gl/mesh-layers": "^9.0.0-beta",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.0.0",
"@luma.gl/engine": "^9.0.0"
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/engine": "^9.1.0-alpha.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
6 changes: 3 additions & 3 deletions modules/google-maps/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "Use deck.gl as a custom Google Maps overlay",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -38,13 +38,13 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.0.11",
"@luma.gl/constants": "^9.1.0-alpha.2",
"@math.gl/core": "^4.0.0",
"@types/google.maps": "^3.48.6"
},
"peerDependencies": {
"@deck.gl/core": "^9.0.0-beta",
"@luma.gl/core": "^9.0.0"
"@luma.gl/core": "^9.1.0-alpha.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
2 changes: 1 addition & 1 deletion modules/json/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "JSON format rendering components for deck.gl",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down
16 changes: 8 additions & 8 deletions modules/jupyter-widget/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "@deck.gl/jupyter-widget",
"description": "Jupyter widget for rendering deck.gl in a Jupyter notebook",
"license": "MIT",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"keywords": [
"jupyter",
"jupyterlab",
Expand All @@ -29,17 +29,17 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@deck.gl/aggregation-layers": "9.0.0-beta.11",
"@deck.gl/geo-layers": "9.0.0-beta.11",
"@deck.gl/google-maps": "9.0.0-beta.11",
"@deck.gl/json": "9.0.0-beta.11",
"@deck.gl/layers": "9.0.0-beta.11",
"@deck.gl/mesh-layers": "9.0.0-beta.11",
"@deck.gl/aggregation-layers": "9.1.0-alpha.0",
"@deck.gl/geo-layers": "9.1.0-alpha.0",
"@deck.gl/google-maps": "9.1.0-alpha.0",
"@deck.gl/json": "9.1.0-alpha.0",
"@deck.gl/layers": "9.1.0-alpha.0",
"@deck.gl/mesh-layers": "9.1.0-alpha.0",
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4",
"@loaders.gl/3d-tiles": "^4.2.0",
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/csv": "^4.2.0",
"@luma.gl/core": "^9.0.11",
"@luma.gl/core": "^9.1.0-alpha.2",
"d3-dsv": "^1.0.8",
"mapbox-gl": "^1.13.2"
},
Expand Down
6 changes: 3 additions & 3 deletions modules/layers/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "deck.gl core layers",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -48,8 +48,8 @@
"peerDependencies": {
"@deck.gl/core": "^9.0.0-beta",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.0.0",
"@luma.gl/engine": "^9.0.0"
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/engine": "^9.1.0-alpha.2"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
2 changes: 1 addition & 1 deletion modules/layers/src/icon-layer/icon-manager.ts
Expand Up @@ -456,7 +456,7 @@ export default class IconManager {
);

// @ts-expect-error TODO v9 API not yet clear
this._texture.setSubImageData({
this._texture.setTexture2DData({
data,
x: x + (maxWidth - width) / 2,
y: y + (maxHeight - height) / 2,
Expand Down
Expand Up @@ -166,7 +166,8 @@ export default class TextBackgroundLayer<DataT = any, ExtraPropsT extends {} = {
id: this.props.id,
bufferLayout: this.getAttributeManager()!.getBufferLayouts(),
geometry: new Geometry({
topology: 'triangle-fan-webgl',
// TODO v9. was triangle-fan-webgl, update geometry
topology: 'triangle-strip',
vertexCount: 4,
attributes: {
positions: {size: 2, value: new Float32Array(positions)}
Expand Down
32 changes: 16 additions & 16 deletions modules/main/package.json
Expand Up @@ -3,7 +3,7 @@
"description": "A suite of 3D-enabled data visualization overlays, suitable for react-map-gl",
"license": "MIT",
"type": "module",
"version": "9.0.0-beta.11",
"version": "9.1.0-alpha.0",
"keywords": [
"webgl",
"visualization",
Expand Down Expand Up @@ -36,22 +36,22 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@deck.gl/aggregation-layers": "9.0.0-beta.11",
"@deck.gl/arcgis": "9.0.0-beta.11",
"@deck.gl/carto": "9.0.0-beta.11",
"@deck.gl/core": "9.0.0-beta.11",
"@deck.gl/extensions": "9.0.0-beta.11",
"@deck.gl/geo-layers": "9.0.0-beta.11",
"@deck.gl/google-maps": "9.0.0-beta.11",
"@deck.gl/json": "9.0.0-beta.11",
"@deck.gl/layers": "9.0.0-beta.11",
"@deck.gl/mapbox": "9.0.0-beta.11",
"@deck.gl/mesh-layers": "9.0.0-beta.11",
"@deck.gl/react": "9.0.0-beta.11",
"@deck.gl/widgets": "9.0.0-beta.11",
"@deck.gl/aggregation-layers": "9.1.0-alpha.0",
"@deck.gl/arcgis": "9.1.0-alpha.0",
"@deck.gl/carto": "9.1.0-alpha.0",
"@deck.gl/core": "9.1.0-alpha.0",
"@deck.gl/extensions": "9.1.0-alpha.0",
"@deck.gl/geo-layers": "9.1.0-alpha.0",
"@deck.gl/google-maps": "9.1.0-alpha.0",
"@deck.gl/json": "9.1.0-alpha.0",
"@deck.gl/layers": "9.1.0-alpha.0",
"@deck.gl/mapbox": "9.1.0-alpha.0",
"@deck.gl/mesh-layers": "9.1.0-alpha.0",
"@deck.gl/react": "9.1.0-alpha.0",
"@deck.gl/widgets": "9.1.0-alpha.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.0.9",
"@luma.gl/engine": "^9.0.9"
"@luma.gl/core": "^9.1.0-alpha.2",
"@luma.gl/engine": "^9.1.0-alpha.2"
},
"peerDependencies": {
"@arcgis/core": "^4.0.0",
Expand Down

0 comments on commit 8cd89ca

Please sign in to comment.