@macrostrat/cesium-martini 1.1.1 → 1.2.0
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/README.md +39 -22
- package/dist/index.js +847 -420
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
- package/webpack.config.js +7 -1
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
**On-the-fly meshing of raster elevation tiles for the CesiumJS virtual globe**
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
|
-
This package contains a
|
|
7
|
+
This package contains a Cesium
|
|
8
8
|
[TerrainProvider](https://cesium.com/docs/cesiumjs-ref-doc/TerrainProvider.html)
|
|
9
9
|
that uses right-triangular irregular networks (RTIN) pioneered by
|
|
10
10
|
[Mapbox's Martini](https://observablehq.com/@mourner/martin-real-time-rtin-terrain-mesh) to
|
|
@@ -19,6 +19,7 @@ This module was created to support our geologic map visualization work
|
|
|
19
19
|
at [Macrostrat](https://macrostrat.org) and as a building block
|
|
20
20
|
for future rich geoscience visualizations.
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
## Installation
|
|
23
24
|
|
|
24
25
|
This package is listed on NPM as `@macrostrat/cesium-martini`. It can be installed
|
|
@@ -28,6 +29,8 @@ using the command
|
|
|
28
29
|
npm install --save @macrostrat/cesium-martini
|
|
29
30
|
```
|
|
30
31
|
|
|
32
|
+

|
|
33
|
+
|
|
31
34
|
## Development
|
|
32
35
|
|
|
33
36
|
After cloning this repository, you can build the module (using Rollup) with
|
|
@@ -75,12 +78,12 @@ without adding overhead of TIN processing and storage.
|
|
|
75
78
|
|
|
76
79
|
## Current limitations
|
|
77
80
|
|
|
78
|
-
###
|
|
81
|
+
### Lack of support for overzooming
|
|
79
82
|
|
|
80
83
|
Cesium's implementations of the `TerrainProvider` interface are generally geared
|
|
81
84
|
towards representing static terrain meshes. The RTIN algorithm used here can
|
|
82
85
|
dynamically build meshes at a variety of error levels, and the input height
|
|
83
|
-
field are data-dense and can represent extremely detailed meshes.
|
|
86
|
+
field are data-dense and can represent extremely detailed meshes at a given zoom level. Currently,
|
|
84
87
|
meshes are generated at levels of detail that undersample the available structure
|
|
85
88
|
in a terrain tile — levels of detail are calibrated to what Cesium needs to
|
|
86
89
|
render visually pleasing output at a given zoom level.
|
|
@@ -89,26 +92,12 @@ A smarter and more parsimonious solution would use much lower zoom levels
|
|
|
89
92
|
for terrain than imagery, using the full resolution of the dataset in
|
|
90
93
|
mesh construction. Done correctly, this could lead to an extremely
|
|
91
94
|
data-efficient and adaptive terrain render, but this seems to run somewhat
|
|
92
|
-
counter to how Cesium internally manages levels of detail,
|
|
93
|
-
go into how to organize this. Ideally, someone familiar with the inner workings
|
|
95
|
+
counter to how Cesium internally manages levels of detail. Ideally, someone familiar with the inner workings
|
|
94
96
|
of Cesium would provide some guidance here.
|
|
95
97
|
|
|
96
|
-
###
|
|
97
|
-
|
|
98
|
-
- [
|
|
99
|
-
`terrainExaggeration: 1` in the Cesium viewer
|
|
100
|
-
(setting `terrainExaggeration: 1.00001` works just fine). I'm uncertain why
|
|
101
|
-
this is occurring, but it is likely easily fixable.
|
|
102
|
-
- [x] High-resolution `@2x` tiles can be requested, but an indexing error
|
|
103
|
-
prevents them from rendering properly.
|
|
104
|
-
- [ ] The increased resolution of `@2x` tiles can be used, but doing so forces
|
|
105
|
-
the loading of high resolution overlay imagery across a wide area, so using them is not
|
|
106
|
-
advisable until broader changes are made to the renderer.
|
|
107
|
-
- [x] Tiles at low zoom levels must to respond to the curvature of the Earth,
|
|
108
|
-
while their topographic range often yields only two triangles covering the entire
|
|
109
|
-
tile. For zoom levels less than 5, we currently fall back to a basic height field,
|
|
110
|
-
but we should ideally have a method that subdivides triangles to densify
|
|
111
|
-
the mesh.
|
|
98
|
+
### Outstanding bugs and issues
|
|
99
|
+
|
|
100
|
+
- [ ] High-resolution `@2x` tiles are notionally supported but not well-tested.
|
|
112
101
|
- [ ] There is no formal testing framework to catch regressions.
|
|
113
102
|
- [ ] TypeScript types are discarded on compilation rather than checked properly.
|
|
114
103
|
|
|
@@ -123,8 +112,28 @@ of Cesium would provide some guidance here.
|
|
|
123
112
|
- [Cesium globe materials example](https://sandcastle.cesium.com/?src=Globe%20Materials.html)
|
|
124
113
|
- [Cesium sky/atmosphere example](https://sandcastle.cesium.com/?src=Sky%20Atmosphere.html)
|
|
125
114
|
|
|
115
|
+
## TODO
|
|
116
|
+
|
|
117
|
+
- Make compatible with Mapbox's new `terrain-dem` tileset if possible
|
|
118
|
+
- Better masking of unavailable tiles
|
|
119
|
+
- Bathymetry option
|
|
120
|
+
- Tie to hillshade generator so the same tiles are loaded
|
|
121
|
+
|
|
122
|
+
Pull requests for any and all of these priorities are appreciated!
|
|
123
|
+
|
|
126
124
|
## Changelog
|
|
127
125
|
|
|
126
|
+
### `[1.1.3]`: June 2021
|
|
127
|
+
|
|
128
|
+
- Fix memory leak where `ArrayBuffer`s were retained due to console logging.
|
|
129
|
+
|
|
130
|
+
### `[1.1.2]`: May 2021
|
|
131
|
+
|
|
132
|
+
- Fixed a bug with loading high-resolution tiles
|
|
133
|
+
- Added a `skipOddLevels` option that significantly reduces the load of zooming through many terrain levels.
|
|
134
|
+
This is enabled by default.
|
|
135
|
+
- Greatly increase skirt height
|
|
136
|
+
|
|
128
137
|
### `[1.1.0]`: May 2021
|
|
129
138
|
|
|
130
139
|
- Fixed a bug with tile occlusion south of the equator for high-detail tiles
|
|
@@ -132,3 +141,11 @@ of Cesium would provide some guidance here.
|
|
|
132
141
|
- More configurability with options like `detailScalar` and `minimumErrorLevel`.
|
|
133
142
|
- Updated README and examples
|
|
134
143
|
- Uses web workers for rapid tile generation off the main thread
|
|
144
|
+
|
|
145
|
+
### `[1.2.0]`: November 2020
|
|
146
|
+
|
|
147
|
+
- Globe caps! (disable using the `fillPoles` option).
|
|
148
|
+
- Some fixes for efficiency
|
|
149
|
+
- Fixed small errors in tile occlusion code
|
|
150
|
+
- Added a `minZoom` configuration option to prevent excessive loading of low-resolution tiles
|
|
151
|
+
- Four (!) pull requests from [@stuarta0](https://github.com/stuarta0) to improve loading of non-Mapbox tilesets
|