You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/upgrade-guide.md
+69
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,74 @@
1
1
# Upgrade Guide
2
2
3
+
## Upgrading from deck.gl v6.4 to v7.0
4
+
5
+
#### Submodule Structure and Dependency Changes
6
+
7
+
-`@deck.gl/core` is moved from `dependencies` to `devDependencies` for all submodules. This will reduce the runtime error caused by installing multiple copies of the core.
8
+
- The master module `deck.gl` now include all submodules except `@deck.gl/test-utils`. See [list of submodules](/docs/get-started/getting-started.md#selectively-install-dependencies) for details.
9
+
-`ContourLayer`, `GridLayer`, `HexagonLayer` and `ScreenGridLayer` are moved from `@deck.gl/layers` to `@deck.gl/aggregation-layers`. No action is required if you are importing them from `deck.gl`.
10
+
-`@deck.gl/experimental-layers` is deprecated. Experimental layers will be exported from their respective modules with a `_` prefix.
11
+
+`BitmapLayer` is moved to `@deck.gl/layers`.
12
+
+`MeshLayer` is renamed to `SimpleMeshLayer` and moved to `@deck.gl/mesh-layers`.
13
+
+`TileLayer` and `TripsLayer` are moved to `@deck.gl/geo-layers`.
14
+
15
+
#### Layers
16
+
17
+
-`HexagonCellLayer` is removed. Use [ColumnLayer](/docs/layers/column-layer.md) with `diskResolution: 6` instead.
18
+
-`ArcLayer` and `LineLayer`'s `getStrokeWidth` props are deprecated. Use `getWidth` instead.
19
+
- The following former experimental layers' APIs are redesigned as they graduate to official layers. Refer to their documentations for details:
The old experimental prop `lightSettings` in many 3D layers is no longer supported. The new and improved settings are split into two places: a [material](https://github.com/uber/luma.gl/tree/master/docs/api-reference/core/materials) prop for each 3D layer and a shared set of lights specified by [LightingEffect](/docs/effects/lighting-effect.md) with the [effects prop of Deck](/docs/api-reference/deck.md#effects).
28
+
29
+
30
+
## Upgrading from deck.gl v6.3 to v6.4
31
+
32
+
#### OrthographicView
33
+
34
+
The experimental `OrthographicView` class has the following breaking changes:
35
+
36
+
-`zoom` is reversed (larger value means zooming in) and switched to logarithmic scale.
37
+
- Changed view state defaults:
38
+
+`zoom` - `1` -> `0`
39
+
+`offset` - `[0, 1]` -> `[0, 0]`
40
+
+`minZoom` - `0.1` -> `-10`
41
+
-`eye`, `lookAt` and `up` are now set in the `OrthographicView` constructor instead of `viewState`.
42
+
43
+
#### ScatterplotLayer
44
+
45
+
Deprecations:
46
+
47
+
-`outline` is deprecated: use `stroked` instead.
48
+
-`strokeWidth` is deprecated: use `getLineWidth` instead. Note that while `strokeWidth` is in pixels, line width is now pecified in meters. The old appearance can be achieved by using `lineWidthMinPixels` and/or `lineWidthMaxPixels`.
49
+
-`getColor` is deprecated: use `getFillColor` and `getLineColor` instead.
50
+
51
+
Breaking changes:
52
+
53
+
-`outline` / `stroked` no longer turns off fill. Use `filled: false` instead.
54
+
55
+
#### GeoJsonLayer
56
+
57
+
Breaking changes:
58
+
59
+
-`stroked`, `getLineWidth` and `getLineColor` props now apply to point features (rendered with a ScatterplotLayer) in addition to polygon features. To revert to the old appearance, supply a `_subLayerProps` override:
The new `@deck.gl/s2-layers` module contains an `S2Layer` that understands geospatial indices from the [S2 Geometry Library](http://s2geometry.io/).
28
+
### New Effects System
29
+
30
+
A new effects system is written from the ground up for v7.0. This opens the possibilities for many exciting visual effect features down the road. As a start, we're introducing [LightingEffect](/docs/effects/lighting-effect.md) - an easier, more comprehensive way to control the lighting for your layers.
31
+
32
+
### New Layer Catalog
33
+
34
+
As the number of deck.gl layers grow, we are splitting existing and new layers into multiple submodules for better dependency management. These new layer modules are:
35
+
36
+
*`@deck.gl/layers` - Primitive layers that are the building blocks of all visualizations
In v7.0 we are making binary data a first-class citizen of deck.gl. Whereas the `data` prop of layers only accepted JavaScript arrays in the past, you may now provide a non-iterable object to `data`.
70
+
71
+
### Improved Test Utilities
72
+
73
+
The `@deck.gl/test-utils` module is revamped with two new exports:
74
+
*[`generateLayerTests`](/docs/api-reference/test-utils/generate-layer-tests.md) - automatically create test cases for use with [`testLayer`](/docs/api-reference/test-utils/test-layer.md) to test layer conformance.
75
+
*[`SnapshotTestRunner`](/docs/api-reference/test-utils/snapshot-test-runner.md) - automated integration test for WebGL. Renders deck.gl layers, takes screenshot and compare with golden images in headless Chromium.
-`ScatterplotLayer` now supports drawing both stroke and fill, and outline width can be controlled per-instance.
104
+
-`ContourLayer` now supports isoband - filling between two thresholds.
105
+
-`ScreenGridLayer` now supports aggregating by min/max/mean.
106
+
-`TextLayer` adds new props that allow better control of the font rendering quality, including font weight and raster size. The layer can also optionally generate a font atlas with [Signed Distance Fields](http://cs.brown.edu/people/pfelzens/papers/dt-final.pdf), which yields a much crisper look when rendering large font sizes.
107
+
-`IconLayer` supports dynamically packed icon atlas. Users can now load programatically generated image urls as icons, for example Facebook profile images.
108
+
-`PathLayer`'s `getPath` and `PolygonLayer`'s `getPolygon` props now support flattened coordinates instead of nested arrays, making it easier for these layers to use binary data.
109
+
110
+
See each layer's documentation for full API changes.
111
+
112
+
113
+
### Composite Layer Customization (experimental)
114
+
115
+
It is now possible to fine-tune sublayer appearances by passing a new experimental prop `_subLayerProps` to a composite layer. For example, in a `GeoJsonLayer`, one may wish to make only the point features interactive, or replace the circles with icons.
116
+
117
+
This offers a light alternative to overriding composite layer behaviors without creating a custom class. See [CompositeLayer](/docs/api-reference/composite-layer.md) for details.
0 commit comments