@geoinsight/react-components 1.0.4 → 1.0.6
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/.pnp.cjs +2014 -3638
- package/.yarn/install-state.gz +0 -0
- package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/package.json +1 -1
- package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/CHANGELOG.md +70 -85
- package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/package.json +11 -11
- package/dist/cjs/components/button/index.stories.d.ts +12 -9
- package/dist/cjs/components/map/map-mapbox.d.ts +0 -1
- package/dist/cjs/index.css +67 -184
- package/dist/cjs/index.d.ts +0 -3
- package/dist/cjs/index.js +47 -213
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/button/index.stories.d.ts +12 -9
- package/dist/esm/components/map/map-mapbox.d.ts +0 -1
- package/dist/esm/index.css +67 -184
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +49 -192
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -5
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/.ready +0 -0
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/LICENSE.txt +0 -116
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/README.md +0 -149
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/banner.ts +0 -4
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/check-bundle-size.js +0 -77
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-debug-index-file.ts +0 -19
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-query-test-fixtures.ts +0 -126
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-shaders.ts +0 -35
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-struct-arrays.ts +0 -437
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-style-code.ts +0 -280
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-style-spec.ts +0 -323
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-typings.ts +0 -26
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/readme.md +0 -52
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/release-notes.js +0 -45
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/rollup_plugin_minify_style_spec.ts +0 -25
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/rollup_plugins.ts +0 -52
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp-worker.js +0 -2
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp-worker.js.map +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp.js +0 -2
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp.js.map +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-dev.js +0 -51935
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.css +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.d.ts +0 -11736
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.js +0 -44
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.js.map +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/package.json +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/style-spec/index.d.ts +0 -1768
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/package.json +0 -182
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/postinstall.js +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/.editorconfig +0 -7
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/.ready +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/LICENSE +0 -21
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/README.md +0 -108
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/LICENSE-PVRTexToolCLI.txt +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/LICENSE-astcenc.txt +0 -137
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/LICENSE-crunch.txt +0 -25
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/PVRTexToolCLI +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/astcenc +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/crunch +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/LICENSE-PVRTexToolCLI.txt +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/LICENSE-astcenc.txt +0 -137
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/LICENSE-crunch.txt +0 -25
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/PVRTexToolCLI +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/astcenc +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/crunch +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/texture-compressor.js +0 -3
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/LICENSE-PVRTexToolCLI.txt +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/LICENSE-astcenc.txt +0 -137
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/LICENSE-crunch.txt +0 -25
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/PVRTexToolCLI.exe +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/astcenc.exe +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/crunch.exe +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/argsHandler.js +0 -101
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/argsHandler.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithCrunch.js +0 -48
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithCrunch.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithPVRTexTool.js +0 -51
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithPVRTexTool.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/spawnProcess.js +0 -45
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/spawnProcess.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/validateArgs.js +0 -36
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/validateArgs.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/constants.js +0 -85
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/constants.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/index.js +0 -33
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/index.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/utilities.js +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/utilities.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/package.json +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/argsHandler.d.ts +0 -14
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/compressWithCrunch.d.ts +0 -5
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/compressWithPVRTexTool.d.ts +0 -5
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/spawnProcess.d.ts +0 -9
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/validateArgs.d.ts +0 -11
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/constants.d.ts +0 -45
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/index.d.ts +0 -5
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/utilities.d.ts +0 -43
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/RECOMMENDED_PARAMETERS.md +0 -17
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/SUPPORTED_DEVICES_TABLE.md +0 -47
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/SUPPORTED_PARAMETERS.md +0 -154
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/KTXLoader.js +0 -149
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-astc-4x4.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-astc-8x8.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt1.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt1A.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt3.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt5.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-etc1.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-etc2.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-etc2A.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc2BPP.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc2BPPA.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc4BPP.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc4BPPA.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/main.js +0 -195
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/index.html +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/argsHandler.ts +0 -135
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/compressWithCrunch.ts +0 -66
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/compressWithPVRTexTool.ts +0 -91
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/spawnProcess.ts +0 -57
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/validateArgs.ts +0 -53
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/constants.ts +0 -86
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/index.ts +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/utilities.ts +0 -57
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/package.json +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/tslint.json +0 -12
- /package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/.ready +0 -0
- /package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/.ready +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/LICENSE +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/Visitor.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/Visitor.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/binding.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/binding.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/bindings/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/bindings/binding_core_wasm/package.json +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/index.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/index.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/postinstall.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/spack.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/spack.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/util.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/util.js +0 -0
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Generates the following:
|
|
3
|
-
* - data/array_types.js, which consists of:
|
|
4
|
-
* - StructArrayLayout_* subclasses, one for each underlying memory layout we need
|
|
5
|
-
* - Named exports mapping each conceptual array type (e.g., CircleLayoutArray) to its corresponding StructArrayLayout class
|
|
6
|
-
* - Particular, named StructArray subclasses, when fancy struct accessors are needed (e.g. CollisionBoxArray)
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
'use strict'; // eslint-disable-line strict
|
|
10
|
-
|
|
11
|
-
import * as fs from 'fs';
|
|
12
|
-
import * as util from '../src/util/util';
|
|
13
|
-
import {createLayout, viewTypes} from '../src/util/struct_array';
|
|
14
|
-
import type {ViewType, StructArrayLayout} from '../src/util/struct_array';
|
|
15
|
-
|
|
16
|
-
import posAttributes from '../src/data/pos_attributes';
|
|
17
|
-
import rasterBoundsAttributes from '../src/data/raster_bounds_attributes';
|
|
18
|
-
import circleAttributes from '../src/data/bucket/circle_attributes';
|
|
19
|
-
import fillAttributes from '../src/data/bucket/fill_attributes';
|
|
20
|
-
import fillExtrusionAttributes from '../src/data/bucket/fill_extrusion_attributes';
|
|
21
|
-
import lineAttributes from '../src/data/bucket/line_attributes';
|
|
22
|
-
import lineAttributesExt from '../src/data/bucket/line_attributes_ext';
|
|
23
|
-
import patternAttributes from '../src/data/bucket/pattern_attributes';
|
|
24
|
-
// symbol layer specific arrays
|
|
25
|
-
import {
|
|
26
|
-
symbolLayoutAttributes,
|
|
27
|
-
dynamicLayoutAttributes,
|
|
28
|
-
placementOpacityAttributes,
|
|
29
|
-
collisionBox,
|
|
30
|
-
collisionBoxLayout,
|
|
31
|
-
collisionCircleLayout,
|
|
32
|
-
collisionVertexAttributes,
|
|
33
|
-
quadTriangle,
|
|
34
|
-
placement,
|
|
35
|
-
symbolInstance,
|
|
36
|
-
glyphOffset,
|
|
37
|
-
lineVertex
|
|
38
|
-
} from '../src/data/bucket/symbol_attributes';
|
|
39
|
-
|
|
40
|
-
const typeAbbreviations = {
|
|
41
|
-
'Int8': 'b',
|
|
42
|
-
'Uint8': 'ub',
|
|
43
|
-
'Int16': 'i',
|
|
44
|
-
'Uint16': 'ui',
|
|
45
|
-
'Int32': 'l',
|
|
46
|
-
'Uint32': 'ul',
|
|
47
|
-
'Float32': 'f'
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const arraysWithStructAccessors = [];
|
|
51
|
-
const arrayTypeEntries = new Set();
|
|
52
|
-
const layoutCache = {};
|
|
53
|
-
|
|
54
|
-
function normalizeMembers(members, usedTypes) {
|
|
55
|
-
return members.map((member) => {
|
|
56
|
-
if (usedTypes && !usedTypes.has(member.type)) {
|
|
57
|
-
usedTypes.add(member.type);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return util.extend(member, {
|
|
61
|
-
size: sizeOf(member.type),
|
|
62
|
-
view: member.type.toLowerCase()
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// - If necessary, write the StructArrayLayout_* class for the given layout
|
|
68
|
-
// - If `includeStructAccessors`, write the fancy subclass
|
|
69
|
-
// - Add an entry for `name` in the array type registry
|
|
70
|
-
function createStructArrayType(name: string, layout: StructArrayLayout, includeStructAccessors: boolean = false) {
|
|
71
|
-
const hasAnchorPoint = layout.members.some(m => m.name === 'anchorPointX');
|
|
72
|
-
|
|
73
|
-
// create the underlying StructArrayLayout class exists
|
|
74
|
-
const layoutClass = createStructArrayLayoutType(layout);
|
|
75
|
-
const arrayClass = `${camelize(name)}Array`;
|
|
76
|
-
|
|
77
|
-
if (includeStructAccessors) {
|
|
78
|
-
const usedTypes = new Set(['Uint8']);
|
|
79
|
-
const members = normalizeMembers(layout.members, usedTypes);
|
|
80
|
-
arraysWithStructAccessors.push({
|
|
81
|
-
arrayClass,
|
|
82
|
-
members,
|
|
83
|
-
size: layout.size,
|
|
84
|
-
usedTypes,
|
|
85
|
-
hasAnchorPoint,
|
|
86
|
-
layoutClass,
|
|
87
|
-
includeStructAccessors
|
|
88
|
-
});
|
|
89
|
-
} else {
|
|
90
|
-
arrayTypeEntries.add(`export class ${arrayClass} extends ${layoutClass} {}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function createStructArrayLayoutType({members, size, alignment}) {
|
|
95
|
-
const usedTypes = new Set(['Uint8']);
|
|
96
|
-
members = normalizeMembers(members, usedTypes);
|
|
97
|
-
|
|
98
|
-
// combine consecutive 'members' with same underlying type, summing their
|
|
99
|
-
// component counts
|
|
100
|
-
if (!alignment || alignment === 1) members = members.reduce((memo, member) => {
|
|
101
|
-
if (memo.length > 0 && memo[memo.length - 1].type === member.type) {
|
|
102
|
-
const last = memo[memo.length - 1];
|
|
103
|
-
return memo.slice(0, -1).concat(util.extend({}, last, {
|
|
104
|
-
components: last.components + member.components,
|
|
105
|
-
}));
|
|
106
|
-
}
|
|
107
|
-
return memo.concat(member);
|
|
108
|
-
}, []);
|
|
109
|
-
|
|
110
|
-
const key = `${members.map(m => `${m.components}${typeAbbreviations[m.type]}`).join('')}${size}`;
|
|
111
|
-
const className = `StructArrayLayout${key}`;
|
|
112
|
-
// Layout alignment to 4 bytes boundaries can be an issue on some set of graphics cards. Particularly AMD.
|
|
113
|
-
if (size % 4 !== 0) { console.warn(`Warning: The layout ${className} is not aligned to 4-bytes boundaries.`); }
|
|
114
|
-
if (!layoutCache[key]) {
|
|
115
|
-
layoutCache[key] = {
|
|
116
|
-
className,
|
|
117
|
-
members,
|
|
118
|
-
size,
|
|
119
|
-
usedTypes
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return className;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function sizeOf(type: ViewType): number {
|
|
127
|
-
return viewTypes[type].BYTES_PER_ELEMENT;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function camelize (str) {
|
|
131
|
-
return str.replace(/(?:^|[-_])(.)/g, (_, x) => {
|
|
132
|
-
return /^[0-9]$/.test(x) ? _ : x.toUpperCase();
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
createStructArrayType('pos', posAttributes);
|
|
137
|
-
createStructArrayType('raster_bounds', rasterBoundsAttributes);
|
|
138
|
-
|
|
139
|
-
// layout vertex arrays
|
|
140
|
-
const layoutAttributes = {
|
|
141
|
-
circle: circleAttributes,
|
|
142
|
-
fill: fillAttributes,
|
|
143
|
-
'fill-extrusion': fillExtrusionAttributes,
|
|
144
|
-
heatmap: circleAttributes,
|
|
145
|
-
line: lineAttributes,
|
|
146
|
-
lineExt: lineAttributesExt,
|
|
147
|
-
pattern: patternAttributes
|
|
148
|
-
};
|
|
149
|
-
for (const name in layoutAttributes) {
|
|
150
|
-
createStructArrayType(`${name.replace(/-/g, '_')}_layout`, layoutAttributes[name]);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
createStructArrayType('symbol_layout', symbolLayoutAttributes);
|
|
154
|
-
createStructArrayType('symbol_dynamic_layout', dynamicLayoutAttributes);
|
|
155
|
-
createStructArrayType('symbol_opacity', placementOpacityAttributes);
|
|
156
|
-
createStructArrayType('collision_box', collisionBox, true);
|
|
157
|
-
createStructArrayType('collision_box_layout', collisionBoxLayout);
|
|
158
|
-
createStructArrayType('collision_circle_layout', collisionCircleLayout);
|
|
159
|
-
createStructArrayType('collision_vertex', collisionVertexAttributes);
|
|
160
|
-
createStructArrayType('quad_triangle', quadTriangle);
|
|
161
|
-
createStructArrayType('placed_symbol', placement, true);
|
|
162
|
-
createStructArrayType('symbol_instance', symbolInstance, true);
|
|
163
|
-
createStructArrayType('glyph_offset', glyphOffset, true);
|
|
164
|
-
createStructArrayType('symbol_line_vertex', lineVertex, true);
|
|
165
|
-
|
|
166
|
-
// feature index array
|
|
167
|
-
createStructArrayType('feature_index', createLayout([
|
|
168
|
-
// the index of the feature in the original vectortile
|
|
169
|
-
{type: 'Uint32', name: 'featureIndex'},
|
|
170
|
-
// the source layer the feature appears in
|
|
171
|
-
{type: 'Uint16', name: 'sourceLayerIndex'},
|
|
172
|
-
// the bucket the feature appears in
|
|
173
|
-
{type: 'Uint16', name: 'bucketIndex'}
|
|
174
|
-
]), true);
|
|
175
|
-
|
|
176
|
-
// triangle index array
|
|
177
|
-
createStructArrayType('triangle_index', createLayout([
|
|
178
|
-
{type: 'Uint16', name: 'vertices', components: 3}
|
|
179
|
-
]));
|
|
180
|
-
|
|
181
|
-
// line index array
|
|
182
|
-
createStructArrayType('line_index', createLayout([
|
|
183
|
-
{type: 'Uint16', name: 'vertices', components: 2}
|
|
184
|
-
]));
|
|
185
|
-
|
|
186
|
-
// line strip index array
|
|
187
|
-
createStructArrayType('line_strip_index', createLayout([
|
|
188
|
-
{type: 'Uint16', name: 'vertices', components: 1}
|
|
189
|
-
]));
|
|
190
|
-
|
|
191
|
-
// paint vertex arrays
|
|
192
|
-
|
|
193
|
-
// used by SourceBinder for float properties
|
|
194
|
-
createStructArrayLayoutType(createLayout([{
|
|
195
|
-
name: 'dummy name (unused for StructArrayLayout)',
|
|
196
|
-
type: 'Float32',
|
|
197
|
-
components: 1
|
|
198
|
-
}], 4));
|
|
199
|
-
|
|
200
|
-
// used by SourceBinder for color properties and CompositeBinder for float properties
|
|
201
|
-
createStructArrayLayoutType(createLayout([{
|
|
202
|
-
name: 'dummy name (unused for StructArrayLayout)',
|
|
203
|
-
type: 'Float32',
|
|
204
|
-
components: 2
|
|
205
|
-
}], 4));
|
|
206
|
-
|
|
207
|
-
// used by CompositeBinder for color properties
|
|
208
|
-
createStructArrayLayoutType(createLayout([{
|
|
209
|
-
name: 'dummy name (unused for StructArrayLayout)',
|
|
210
|
-
type: 'Float32',
|
|
211
|
-
components: 4
|
|
212
|
-
}], 4));
|
|
213
|
-
|
|
214
|
-
const layouts = Object.keys(layoutCache).map(k => layoutCache[k]);
|
|
215
|
-
|
|
216
|
-
function emitStructArrayLayout(locals) {
|
|
217
|
-
const output = [];
|
|
218
|
-
const {
|
|
219
|
-
className,
|
|
220
|
-
members,
|
|
221
|
-
size,
|
|
222
|
-
usedTypes
|
|
223
|
-
} = locals;
|
|
224
|
-
const structArrayLayoutClass = className;
|
|
225
|
-
|
|
226
|
-
output.push(
|
|
227
|
-
`/**
|
|
228
|
-
* Implementation of the StructArray layout:`);
|
|
229
|
-
|
|
230
|
-
for (const member of members) {
|
|
231
|
-
output.push(
|
|
232
|
-
` * [${member.offset}]: ${member.type}[${member.components}]`);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
output.push(
|
|
236
|
-
` *
|
|
237
|
-
* @private
|
|
238
|
-
*/
|
|
239
|
-
class ${structArrayLayoutClass} extends StructArray {`);
|
|
240
|
-
|
|
241
|
-
for (const type of usedTypes) {
|
|
242
|
-
output.push(
|
|
243
|
-
` ${type.toLowerCase()}: ${type}Array;`);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
output.push(`
|
|
247
|
-
_refreshViews() {`);
|
|
248
|
-
|
|
249
|
-
for (const type of usedTypes) {
|
|
250
|
-
output.push(
|
|
251
|
-
` this.${type.toLowerCase()} = new ${type}Array(this.arrayBuffer);`);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
output.push(
|
|
255
|
-
' }');
|
|
256
|
-
|
|
257
|
-
// prep for emplaceBack: collect type sizes and count the number of arguments
|
|
258
|
-
// we'll need
|
|
259
|
-
const bytesPerElement = size;
|
|
260
|
-
const usedTypeSizes = [];
|
|
261
|
-
const argNames = [];
|
|
262
|
-
const argNamesTyped = [];
|
|
263
|
-
|
|
264
|
-
for (const member of members) {
|
|
265
|
-
if (usedTypeSizes.indexOf(member.size) < 0) {
|
|
266
|
-
usedTypeSizes.push(member.size);
|
|
267
|
-
}
|
|
268
|
-
for (let c = 0; c < member.components; c++) {
|
|
269
|
-
// arguments v0, v1, v2, ... are, in order, the components of
|
|
270
|
-
// member 0, then the components of member 1, etc.
|
|
271
|
-
const name = `v${argNames.length}`;
|
|
272
|
-
argNames.push(name);
|
|
273
|
-
argNamesTyped.push(`${name}: number`);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
output.push(
|
|
278
|
-
`
|
|
279
|
-
public emplaceBack(${argNamesTyped.join(', ')}) {
|
|
280
|
-
const i = this.length;
|
|
281
|
-
this.resize(i + 1);
|
|
282
|
-
return this.emplace(i, ${argNames.join(', ')});
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
public emplace(i: number, ${argNamesTyped.join(', ')}) {`);
|
|
286
|
-
|
|
287
|
-
for (const size of usedTypeSizes) {
|
|
288
|
-
output.push(
|
|
289
|
-
` const o${size.toFixed(0)} = i * ${(bytesPerElement / size).toFixed(0)};`);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
let argIndex = 0;
|
|
293
|
-
for (const member of members) {
|
|
294
|
-
for (let c = 0; c < member.components; c++) {
|
|
295
|
-
// The index for `member` component `c` into the appropriate type array is:
|
|
296
|
-
// this.{TYPE}[o{SIZE} + MEMBER_OFFSET + {c}] = v{X}
|
|
297
|
-
// where MEMBER_OFFSET = ROUND(member.offset / size) is the per-element
|
|
298
|
-
// offset of this member into the array
|
|
299
|
-
const index = `o${member.size.toFixed(0)} + ${(member.offset / member.size + c).toFixed(0)}`;
|
|
300
|
-
|
|
301
|
-
output.push(
|
|
302
|
-
` this.${member.view}[${index}] = v${argIndex++};`);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
output.push(
|
|
307
|
-
` return i;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
${structArrayLayoutClass}.prototype.bytesPerElement = ${size};
|
|
312
|
-
register('${structArrayLayoutClass}', ${structArrayLayoutClass});
|
|
313
|
-
`);
|
|
314
|
-
|
|
315
|
-
return output.join('\n');
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
function emitStructArray(locals) {
|
|
319
|
-
const output = [];
|
|
320
|
-
const {
|
|
321
|
-
arrayClass,
|
|
322
|
-
members,
|
|
323
|
-
size,
|
|
324
|
-
hasAnchorPoint,
|
|
325
|
-
layoutClass,
|
|
326
|
-
includeStructAccessors
|
|
327
|
-
} = locals;
|
|
328
|
-
|
|
329
|
-
const structTypeClass = arrayClass.replace('Array', 'Struct');
|
|
330
|
-
const structArrayClass = arrayClass;
|
|
331
|
-
const structArrayLayoutClass = layoutClass;
|
|
332
|
-
|
|
333
|
-
// collect components
|
|
334
|
-
const components = [];
|
|
335
|
-
for (const member of members) {
|
|
336
|
-
for (let c = 0; c < member.components; c++) {
|
|
337
|
-
let name = member.name;
|
|
338
|
-
if (member.components > 1) {
|
|
339
|
-
name += c;
|
|
340
|
-
}
|
|
341
|
-
components.push({name, member, component: c});
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// exceptions for which we generate accessors on the array rather than a separate struct for performance
|
|
346
|
-
const useComponentGetters = structArrayClass === 'GlyphOffsetArray' || structArrayClass === 'SymbolLineVertexArray';
|
|
347
|
-
|
|
348
|
-
if (includeStructAccessors && !useComponentGetters) {
|
|
349
|
-
output.push(
|
|
350
|
-
`class ${structTypeClass} extends Struct {
|
|
351
|
-
_structArray: ${structArrayClass};`);
|
|
352
|
-
|
|
353
|
-
for (const {name, member, component} of components) {
|
|
354
|
-
const elementOffset = `this._pos${member.size.toFixed(0)}`;
|
|
355
|
-
const componentOffset = (member.offset / member.size + component).toFixed(0);
|
|
356
|
-
const index = `${elementOffset} + ${componentOffset}`;
|
|
357
|
-
const componentAccess = `this._structArray.${member.view}[${index}]`;
|
|
358
|
-
|
|
359
|
-
output.push(
|
|
360
|
-
` get ${name}() { return ${componentAccess}; }`);
|
|
361
|
-
|
|
362
|
-
// generate setters for properties that are updated during runtime symbol placement; others are read-only
|
|
363
|
-
if (name === 'crossTileID' || name === 'placedOrientation' || name === 'hidden') {
|
|
364
|
-
output.push(
|
|
365
|
-
` set ${name}(x: number) { ${componentAccess} = x; }`);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
// Special case used for the CollisionBoxArray type
|
|
370
|
-
if (hasAnchorPoint) {
|
|
371
|
-
output.push(
|
|
372
|
-
' get anchorPoint() { return new Point(this.anchorPointX, this.anchorPointY); }');
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
output.push(
|
|
376
|
-
`}
|
|
377
|
-
|
|
378
|
-
${structTypeClass}.prototype.size = ${size};
|
|
379
|
-
|
|
380
|
-
export type ${structTypeClass.replace('Struct', '')} = ${structTypeClass};
|
|
381
|
-
`);
|
|
382
|
-
} // end 'if (includeStructAccessors)'
|
|
383
|
-
|
|
384
|
-
output.push(
|
|
385
|
-
`/**
|
|
386
|
-
* @private
|
|
387
|
-
*/
|
|
388
|
-
export class ${structArrayClass} extends ${structArrayLayoutClass} {`);
|
|
389
|
-
|
|
390
|
-
if (useComponentGetters) {
|
|
391
|
-
for (const member of members) {
|
|
392
|
-
for (let c = 0; c < member.components; c++) {
|
|
393
|
-
if (!includeStructAccessors) continue;
|
|
394
|
-
let name = `get${member.name}`;
|
|
395
|
-
if (member.components > 1) {
|
|
396
|
-
name += c;
|
|
397
|
-
}
|
|
398
|
-
const componentOffset = (member.offset / member.size + c).toFixed(0);
|
|
399
|
-
const componentStride = size / member.size;
|
|
400
|
-
output.push(
|
|
401
|
-
` ${name}(index: number) { return this.${member.view}[index * ${componentStride} + ${componentOffset}]; }`);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
} else if (includeStructAccessors) { // get(i)
|
|
405
|
-
output.push(
|
|
406
|
-
` /**
|
|
407
|
-
* Return the ${structTypeClass} at the given location in the array.
|
|
408
|
-
* @param {number} index The index of the element.
|
|
409
|
-
* @private
|
|
410
|
-
*/
|
|
411
|
-
get(index: number): ${structTypeClass} {
|
|
412
|
-
return new ${structTypeClass}(this, index);
|
|
413
|
-
}`);
|
|
414
|
-
}
|
|
415
|
-
output.push(
|
|
416
|
-
`}
|
|
417
|
-
|
|
418
|
-
register('${structArrayClass}', ${structArrayClass});
|
|
419
|
-
`);
|
|
420
|
-
|
|
421
|
-
return output.join('\n');
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
fs.writeFileSync('src/data/array_types.g.ts',
|
|
425
|
-
`// This file is generated. Edit build/generate-struct-arrays.ts, then run \`npm run codegen\`.
|
|
426
|
-
|
|
427
|
-
import {Struct, StructArray} from '../util/struct_array';
|
|
428
|
-
import {register} from '../util/web_worker_transfer';
|
|
429
|
-
import Point from '@mapbox/point-geometry';
|
|
430
|
-
|
|
431
|
-
${layouts.map(emitStructArrayLayout).join('\n')}
|
|
432
|
-
${arraysWithStructAccessors.map(emitStructArray).join('\n')}
|
|
433
|
-
${[...arrayTypeEntries].join('\n')}
|
|
434
|
-
export {
|
|
435
|
-
${layouts.map(layout => layout.className).join(',\n ')}
|
|
436
|
-
};
|
|
437
|
-
`);
|