@mapwhit/tilerenderer 0.52.1 → 1.1.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 +7 -0
- package/build/min/package.json +2 -1
- package/build/min/src/shaders/_prelude.fragment.glsl.js +2 -2
- package/build/min/src/shaders/_prelude.vertex.glsl.js +2 -2
- package/build/min/src/shaders/background.fragment.glsl.js +2 -2
- package/build/min/src/shaders/background.vertex.glsl.js +1 -1
- package/build/min/src/shaders/background_pattern.fragment.glsl.js +2 -2
- package/build/min/src/shaders/background_pattern.vertex.glsl.js +1 -1
- package/build/min/src/shaders/circle.fragment.glsl.js +2 -2
- package/build/min/src/shaders/circle.vertex.glsl.js +2 -2
- package/build/min/src/shaders/clipping_mask.fragment.glsl.js +1 -1
- package/build/min/src/shaders/clipping_mask.vertex.glsl.js +1 -1
- package/build/min/src/shaders/collision_box.fragment.glsl.js +1 -1
- package/build/min/src/shaders/collision_box.vertex.glsl.js +1 -1
- package/build/min/src/shaders/collision_circle.fragment.glsl.js +1 -1
- package/build/min/src/shaders/collision_circle.vertex.glsl.js +1 -1
- package/build/min/src/shaders/debug.fragment.glsl.js +1 -1
- package/build/min/src/shaders/debug.vertex.glsl.js +1 -1
- package/build/min/src/shaders/fill.fragment.glsl.js +2 -2
- package/build/min/src/shaders/fill.vertex.glsl.js +2 -2
- package/build/min/src/shaders/fill_extrusion.fragment.glsl.js +2 -2
- package/build/min/src/shaders/fill_extrusion.vertex.glsl.js +2 -2
- package/build/min/src/shaders/fill_extrusion_pattern.fragment.glsl.js +2 -2
- package/build/min/src/shaders/fill_extrusion_pattern.vertex.glsl.js +2 -2
- package/build/min/src/shaders/fill_outline.fragment.glsl.js +2 -2
- package/build/min/src/shaders/fill_outline.vertex.glsl.js +2 -2
- package/build/min/src/shaders/fill_outline_pattern.fragment.glsl.js +2 -2
- package/build/min/src/shaders/fill_outline_pattern.vertex.glsl.js +2 -2
- package/build/min/src/shaders/fill_pattern.fragment.glsl.js +2 -2
- package/build/min/src/shaders/fill_pattern.vertex.glsl.js +2 -2
- package/build/min/src/shaders/heatmap.fragment.glsl.js +2 -2
- package/build/min/src/shaders/heatmap.vertex.glsl.js +2 -2
- package/build/min/src/shaders/heatmap_texture.fragment.glsl.js +2 -2
- package/build/min/src/shaders/heatmap_texture.vertex.glsl.js +1 -1
- package/build/min/src/shaders/hillshade.fragment.glsl.js +2 -2
- package/build/min/src/shaders/hillshade.vertex.glsl.js +1 -1
- package/build/min/src/shaders/hillshade_prepare.fragment.glsl.js +2 -2
- package/build/min/src/shaders/hillshade_prepare.vertex.glsl.js +1 -1
- package/build/min/src/shaders/line.fragment.glsl.js +2 -2
- package/build/min/src/shaders/line.vertex.glsl.js +2 -2
- package/build/min/src/shaders/line_gradient.fragment.glsl.js +2 -2
- package/build/min/src/shaders/line_gradient.vertex.glsl.js +2 -2
- package/build/min/src/shaders/line_pattern.fragment.glsl.js +2 -2
- package/build/min/src/shaders/line_pattern.vertex.glsl.js +2 -2
- package/build/min/src/shaders/line_sdf.fragment.glsl.js +2 -2
- package/build/min/src/shaders/line_sdf.vertex.glsl.js +2 -2
- package/build/min/src/shaders/raster.fragment.glsl.js +2 -2
- package/build/min/src/shaders/raster.vertex.glsl.js +1 -1
- package/build/min/src/shaders/symbol_icon.fragment.glsl.js +2 -2
- package/build/min/src/shaders/symbol_icon.vertex.glsl.js +2 -2
- package/build/min/src/shaders/symbol_sdf.fragment.glsl.js +2 -2
- package/build/min/src/shaders/symbol_sdf.vertex.glsl.js +2 -2
- package/package.json +5 -4
- package/src/data/array_types.js +55 -117
- package/src/data/bucket/circle_attributes.js +2 -4
- package/src/data/bucket/circle_bucket.js +19 -16
- package/src/data/bucket/fill_attributes.js +2 -4
- package/src/data/bucket/fill_bucket.js +38 -27
- package/src/data/bucket/fill_extrusion_attributes.js +2 -4
- package/src/data/bucket/fill_extrusion_bucket.js +56 -37
- package/src/data/bucket/heatmap_bucket.js +2 -11
- package/src/data/bucket/line_attributes.js +2 -4
- package/src/data/bucket/line_bucket.js +208 -163
- package/src/data/bucket/pattern_attributes.js +2 -4
- package/src/data/bucket/pattern_bucket_features.js +7 -9
- package/src/data/bucket/symbol_attributes.js +12 -26
- package/src/data/bucket/symbol_bucket.js +174 -323
- package/src/data/bucket/symbol_buffers.js +62 -0
- package/src/data/bucket/symbol_collision_buffers.js +33 -0
- package/src/data/bucket.js +26 -25
- package/src/data/dem_data.js +11 -10
- package/src/data/extent.js +1 -1
- package/src/data/feature_index.js +38 -28
- package/src/data/index_array_type.js +1 -6
- package/src/data/load_geometry.js +6 -9
- package/src/data/pos_attributes.js +2 -3
- package/src/data/program_configuration.js +47 -38
- package/src/data/raster_bounds_attributes.js +2 -2
- package/src/data/segment.js +4 -7
- package/src/geo/coordinate.js +1 -1
- package/src/geo/lng_lat.js +3 -3
- package/src/geo/lng_lat_bounds.js +8 -4
- package/src/geo/transform.js +69 -30
- package/src/gl/color_mode.js +2 -2
- package/src/gl/context.js +28 -29
- package/src/gl/cull_face_mode.js +1 -1
- package/src/gl/depth_mode.js +1 -1
- package/src/gl/framebuffer.js +8 -4
- package/src/gl/index_buffer.js +2 -2
- package/src/gl/stencil_mode.js +1 -1
- package/src/gl/value.js +33 -68
- package/src/gl/vertex_buffer.js +2 -2
- package/src/index.js +49 -25
- package/src/render/draw_background.js +17 -12
- package/src/render/draw_circle.js +15 -12
- package/src/render/draw_collision_debug.js +11 -8
- package/src/render/draw_debug.js +16 -14
- package/src/render/draw_fill.js +27 -20
- package/src/render/draw_fill_extrusion.js +20 -17
- package/src/render/draw_heatmap.js +21 -16
- package/src/render/draw_hillshade.js +12 -9
- package/src/render/draw_line.js +36 -22
- package/src/render/draw_raster.js +22 -18
- package/src/render/draw_symbol.js +38 -33
- package/src/render/glyph_atlas.js +9 -8
- package/src/render/glyph_manager.js +2 -3
- package/src/render/image_atlas.js +4 -11
- package/src/render/image_manager.js +39 -28
- package/src/render/line_atlas.js +2 -2
- package/src/render/painter.js +78 -61
- package/src/render/program/background_program.js +6 -13
- package/src/render/program/circle_program.js +8 -10
- package/src/render/program/clipping_mask_program.js +3 -5
- package/src/render/program/collision_program.js +4 -6
- package/src/render/program/debug_program.js +3 -5
- package/src/render/program/fill_extrusion_program.js +9 -15
- package/src/render/program/fill_program.js +10 -21
- package/src/render/program/heatmap_program.js +9 -15
- package/src/render/program/hillshade_program.js +16 -22
- package/src/render/program/line_program.js +14 -25
- package/src/render/program/pattern.js +5 -7
- package/src/render/program/program_uniforms.js +13 -20
- package/src/render/program/raster_program.js +9 -11
- package/src/render/program/symbol_program.js +5 -7
- package/src/render/program.js +5 -6
- package/src/render/texture.js +1 -1
- package/src/render/tile_mask.js +6 -4
- package/src/render/uniform_binding.js +9 -20
- package/src/render/vertex_array_object.js +5 -3
- package/src/shaders/encode_attribute.js +2 -6
- package/src/shaders/index.js +103 -51
- package/src/source/geojson_source.js +25 -30
- package/src/source/geojson_worker_source.js +46 -74
- package/src/source/geojson_wrapper.js +13 -5
- package/src/source/image_source.js +17 -28
- package/src/source/load_tilejson.js +3 -3
- package/src/source/pixels_to_tile_units.js +3 -3
- package/src/source/query_features.js +17 -15
- package/src/source/raster_dem_tile_source.js +54 -71
- package/src/source/raster_tile_source.js +14 -15
- package/src/source/resources/glyphs.js +4 -5
- package/src/source/resources/index.js +4 -12
- package/src/source/rtl_text_plugin.js +62 -35
- package/src/source/source.js +14 -22
- package/src/source/source_cache.js +221 -179
- package/src/source/source_state.js +125 -13
- package/src/source/tile.js +67 -66
- package/src/source/tile_bounds.js +36 -29
- package/src/source/tile_cache.js +2 -2
- package/src/source/tile_id.js +30 -26
- package/src/source/vector_tile_source.js +23 -21
- package/src/source/vector_tile_worker_source.js +22 -26
- package/src/source/worker_tile.js +139 -134
- package/src/style/create_style_layer.js +11 -11
- package/src/style/evaluation_parameters.js +4 -6
- package/src/style/light.js +5 -5
- package/src/style/load_sprite.js +6 -6
- package/src/style/parse_glyph_pbf.js +21 -17
- package/src/style/pauseable_placement.js +7 -9
- package/src/style/properties.js +21 -51
- package/src/style/query_utils.js +7 -13
- package/src/style/style.js +314 -221
- package/src/style/style_layer/background_style_layer.js +3 -4
- package/src/style/style_layer/background_style_layer_properties.js +2 -2
- package/src/style/style_layer/circle_style_layer.js +25 -20
- package/src/style/style_layer/circle_style_layer_properties.js +2 -2
- package/src/style/style_layer/fill_extrusion_style_layer.js +55 -37
- package/src/style/style_layer/fill_extrusion_style_layer_properties.js +2 -2
- package/src/style/style_layer/fill_style_layer.js +11 -12
- package/src/style/style_layer/fill_style_layer_properties.js +2 -2
- package/src/style/style_layer/heatmap_style_layer.js +6 -7
- package/src/style/style_layer/heatmap_style_layer_properties.js +2 -2
- package/src/style/style_layer/hillshade_style_layer.js +4 -5
- package/src/style/style_layer/hillshade_style_layer_properties.js +2 -2
- package/src/style/style_layer/line_style_layer.js +33 -30
- package/src/style/style_layer/line_style_layer_properties.js +5 -5
- package/src/style/style_layer/raster_style_layer.js +3 -4
- package/src/style/style_layer/raster_style_layer_properties.js +2 -2
- package/src/style/style_layer/symbol_style_layer.js +20 -21
- package/src/style/style_layer/symbol_style_layer_properties.js +2 -2
- package/src/style/style_layer.js +66 -47
- package/src/style/style_layer_index.js +17 -42
- package/src/style/zoom_history.js +1 -1
- package/src/style-spec/error/parsing_error.js +1 -1
- package/src/style-spec/error/validation_error.js +5 -3
- package/src/style-spec/feature_filter/convert.js +17 -9
- package/src/style-spec/feature_filter/index.js +13 -9
- package/src/style-spec/util/eval_support.js +2 -2
- package/src/style-spec/util/ref_properties.js +1 -1
- package/src/symbol/anchor.js +2 -6
- package/src/symbol/check_max_angle.js +13 -5
- package/src/symbol/clip_line.js +2 -3
- package/src/symbol/collision_feature.js +8 -4
- package/src/symbol/collision_index.js +5 -7
- package/src/symbol/cross_tile_symbol_index.js +7 -10
- package/src/symbol/get_anchors.js +15 -8
- package/src/symbol/grid_index.js +5 -3
- package/src/symbol/mergelines.js +2 -2
- package/src/symbol/opacity_state.js +1 -5
- package/src/symbol/placement.js +28 -23
- package/src/symbol/projection.js +29 -28
- package/src/symbol/quads.js +14 -16
- package/src/symbol/shaping.js +27 -19
- package/src/symbol/symbol_layout.js +24 -28
- package/src/symbol/symbol_size.js +13 -12
- package/src/symbol/transform_text.js +4 -4
- package/src/ui/camera.js +34 -18
- package/src/ui/map.js +102 -44
- package/src/util/async.js +11 -5
- package/src/util/browser.js +1 -1
- package/src/util/callback.js +3 -9
- package/src/util/classify_rings.js +13 -8
- package/src/util/color_ramp.js +3 -3
- package/src/util/config.js +4 -4
- package/src/util/dictionary_coder.js +2 -3
- package/src/util/dom.js +7 -3
- package/src/util/find_pole_of_inaccessibility.js +29 -14
- package/src/util/group_layers.js +41 -0
- package/src/util/image.js +3 -13
- package/src/util/interpolate.js +1 -1
- package/src/util/intersection_tests.js +80 -42
- package/src/util/is_char_in_unicode_block.js +1 -1
- package/src/util/key.js +25 -0
- package/src/util/loader/image.js +1 -1
- package/src/util/object.js +33 -76
- package/src/util/script_detection.js +212 -91
- package/src/util/struct_array.js +8 -40
- package/src/util/task_queue.js +11 -7
- package/src/util/throttle.js +2 -2
- package/src/util/tile_cover.js +8 -5
- package/src/util/token.js +1 -1
- package/src/util/unique_id.js +2 -2
- package/src/util/util.js +21 -29
- package/src/util/vectortile_to_geojson.js +4 -2
- package/src/util/verticalize_punctuation.js +3 -7
- package/src/util/warn.js +4 -4
- package/src/util/web_worker.js +3 -3
- package/src/worker.js +1 -4
- package/src/source/resources/images.js +0 -68
- package/src/source/worker.js +0 -110
- package/src/source/worker_source.js +0 -14
- package/src/style-spec/deref.js +0 -51
- package/src/style-spec/group_by_layout.js +0 -46
- package/src/util/actor.js +0 -108
- package/src/util/dispatcher.js +0 -65
- package/src/util/global_worker_pool.js +0 -15
- package/src/util/transfer_registry.js +0 -168
- package/src/util/web_worker_transfer.js +0 -43
- package/src/util/worker_pool.js +0 -41
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapwhit/tilerenderer",
|
|
3
3
|
"description": "A WebGL interactive maps library",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"exports": {
|
|
6
7
|
".": "./src/index.js",
|
|
7
8
|
"./worker": "./src/worker.js"
|
|
@@ -17,13 +18,13 @@
|
|
|
17
18
|
"@mapbox/unitbezier": "^0.0.1",
|
|
18
19
|
"@mapbox/whoots-js": "^3.0.0",
|
|
19
20
|
"@mapwhit/events": "^0.0.1",
|
|
20
|
-
"@mapwhit/geojson-rewind": "^
|
|
21
|
+
"@mapwhit/geojson-rewind": "^2.0.0",
|
|
21
22
|
"@mapwhit/pbf": "^1.0.0",
|
|
22
23
|
"@mapwhit/style-expressions": "^1.1.0",
|
|
23
24
|
"@mapwhit/vector-tile": "^2.0.1",
|
|
24
|
-
"@mapwhit/vt-pbf": "^2.0.0",
|
|
25
25
|
"@pirxpilot/nanoassert": "~1",
|
|
26
26
|
"csscolorparser": "^1.0.3",
|
|
27
|
+
"dynload": "^1.0.2",
|
|
27
28
|
"earcut": "^3.0.1",
|
|
28
29
|
"geojson-vt": "^4.0.2",
|
|
29
30
|
"grid-index": "^1.1.0",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
},
|
|
40
41
|
"scripts": {
|
|
41
42
|
"test": "make check",
|
|
42
|
-
"
|
|
43
|
+
"prepare": "make prebuild"
|
|
43
44
|
},
|
|
44
45
|
"files": [
|
|
45
46
|
"src",
|
package/src/data/array_types.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// This file is generated. Edit the template at meta/bin/generate-struct-arrays.js.ejs and instead.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const { default: Point } = require('@mapbox/point-geometry');
|
|
3
|
+
import assert from 'assert';
|
|
4
|
+
|
|
5
|
+
import { Struct, StructArray } from '../util/struct_array.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Implementation of the StructArray layout:
|
|
@@ -11,7 +10,7 @@ const { default: Point } = require('@mapbox/point-geometry');
|
|
|
11
10
|
*
|
|
12
11
|
* @private
|
|
13
12
|
*/
|
|
14
|
-
class StructArrayLayout2i4 extends StructArray {
|
|
13
|
+
export class StructArrayLayout2i4 extends StructArray {
|
|
15
14
|
_refreshViews() {
|
|
16
15
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
17
16
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -35,7 +34,6 @@ class StructArrayLayout2i4 extends StructArray {
|
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
StructArrayLayout2i4.prototype.bytesPerElement = 4;
|
|
38
|
-
register('StructArrayLayout2i4', StructArrayLayout2i4);
|
|
39
37
|
|
|
40
38
|
/**
|
|
41
39
|
* Implementation of the StructArray layout:
|
|
@@ -43,7 +41,7 @@ register('StructArrayLayout2i4', StructArrayLayout2i4);
|
|
|
43
41
|
*
|
|
44
42
|
* @private
|
|
45
43
|
*/
|
|
46
|
-
class StructArrayLayout4i8 extends StructArray {
|
|
44
|
+
export class StructArrayLayout4i8 extends StructArray {
|
|
47
45
|
_refreshViews() {
|
|
48
46
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
49
47
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -71,7 +69,6 @@ class StructArrayLayout4i8 extends StructArray {
|
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
StructArrayLayout4i8.prototype.bytesPerElement = 8;
|
|
74
|
-
register('StructArrayLayout4i8', StructArrayLayout4i8);
|
|
75
72
|
|
|
76
73
|
/**
|
|
77
74
|
* Implementation of the StructArray layout:
|
|
@@ -80,7 +77,7 @@ register('StructArrayLayout4i8', StructArrayLayout4i8);
|
|
|
80
77
|
*
|
|
81
78
|
* @private
|
|
82
79
|
*/
|
|
83
|
-
class StructArrayLayout2i4i12 extends StructArray {
|
|
80
|
+
export class StructArrayLayout2i4i12 extends StructArray {
|
|
84
81
|
_refreshViews() {
|
|
85
82
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
86
83
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -112,7 +109,6 @@ class StructArrayLayout2i4i12 extends StructArray {
|
|
|
112
109
|
}
|
|
113
110
|
|
|
114
111
|
StructArrayLayout2i4i12.prototype.bytesPerElement = 12;
|
|
115
|
-
register('StructArrayLayout2i4i12', StructArrayLayout2i4i12);
|
|
116
112
|
|
|
117
113
|
/**
|
|
118
114
|
* Implementation of the StructArray layout:
|
|
@@ -121,7 +117,7 @@ register('StructArrayLayout2i4i12', StructArrayLayout2i4i12);
|
|
|
121
117
|
*
|
|
122
118
|
* @private
|
|
123
119
|
*/
|
|
124
|
-
class StructArrayLayout4i4ub12 extends StructArray {
|
|
120
|
+
export class StructArrayLayout4i4ub12 extends StructArray {
|
|
125
121
|
_refreshViews() {
|
|
126
122
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
127
123
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -159,7 +155,6 @@ class StructArrayLayout4i4ub12 extends StructArray {
|
|
|
159
155
|
}
|
|
160
156
|
|
|
161
157
|
StructArrayLayout4i4ub12.prototype.bytesPerElement = 12;
|
|
162
|
-
register('StructArrayLayout4i4ub12', StructArrayLayout4i4ub12);
|
|
163
158
|
|
|
164
159
|
/**
|
|
165
160
|
* Implementation of the StructArray layout:
|
|
@@ -167,7 +162,7 @@ register('StructArrayLayout4i4ub12', StructArrayLayout4i4ub12);
|
|
|
167
162
|
*
|
|
168
163
|
* @private
|
|
169
164
|
*/
|
|
170
|
-
class StructArrayLayout8ui16 extends StructArray {
|
|
165
|
+
export class StructArrayLayout8ui16 extends StructArray {
|
|
171
166
|
_refreshViews() {
|
|
172
167
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
173
168
|
this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -203,7 +198,6 @@ class StructArrayLayout8ui16 extends StructArray {
|
|
|
203
198
|
}
|
|
204
199
|
|
|
205
200
|
StructArrayLayout8ui16.prototype.bytesPerElement = 16;
|
|
206
|
-
register('StructArrayLayout8ui16', StructArrayLayout8ui16);
|
|
207
201
|
|
|
208
202
|
/**
|
|
209
203
|
* Implementation of the StructArray layout:
|
|
@@ -212,7 +206,7 @@ register('StructArrayLayout8ui16', StructArrayLayout8ui16);
|
|
|
212
206
|
*
|
|
213
207
|
* @private
|
|
214
208
|
*/
|
|
215
|
-
class StructArrayLayout4i4ui16 extends StructArray {
|
|
209
|
+
export class StructArrayLayout4i4ui16 extends StructArray {
|
|
216
210
|
_refreshViews() {
|
|
217
211
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
218
212
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -249,7 +243,6 @@ class StructArrayLayout4i4ui16 extends StructArray {
|
|
|
249
243
|
}
|
|
250
244
|
|
|
251
245
|
StructArrayLayout4i4ui16.prototype.bytesPerElement = 16;
|
|
252
|
-
register('StructArrayLayout4i4ui16', StructArrayLayout4i4ui16);
|
|
253
246
|
|
|
254
247
|
/**
|
|
255
248
|
* Implementation of the StructArray layout:
|
|
@@ -257,7 +250,7 @@ register('StructArrayLayout4i4ui16', StructArrayLayout4i4ui16);
|
|
|
257
250
|
*
|
|
258
251
|
* @private
|
|
259
252
|
*/
|
|
260
|
-
class StructArrayLayout3f12 extends StructArray {
|
|
253
|
+
export class StructArrayLayout3f12 extends StructArray {
|
|
261
254
|
_refreshViews() {
|
|
262
255
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
263
256
|
this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -283,7 +276,6 @@ class StructArrayLayout3f12 extends StructArray {
|
|
|
283
276
|
}
|
|
284
277
|
|
|
285
278
|
StructArrayLayout3f12.prototype.bytesPerElement = 12;
|
|
286
|
-
register('StructArrayLayout3f12', StructArrayLayout3f12);
|
|
287
279
|
|
|
288
280
|
/**
|
|
289
281
|
* Implementation of the StructArray layout:
|
|
@@ -291,7 +283,7 @@ register('StructArrayLayout3f12', StructArrayLayout3f12);
|
|
|
291
283
|
*
|
|
292
284
|
* @private
|
|
293
285
|
*/
|
|
294
|
-
class StructArrayLayout1ul4 extends StructArray {
|
|
286
|
+
export class StructArrayLayout1ul4 extends StructArray {
|
|
295
287
|
_refreshViews() {
|
|
296
288
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
297
289
|
this.uint32 = new Uint32Array(this.arrayBuffer);
|
|
@@ -313,7 +305,6 @@ class StructArrayLayout1ul4 extends StructArray {
|
|
|
313
305
|
}
|
|
314
306
|
|
|
315
307
|
StructArrayLayout1ul4.prototype.bytesPerElement = 4;
|
|
316
|
-
register('StructArrayLayout1ul4', StructArrayLayout1ul4);
|
|
317
308
|
|
|
318
309
|
/**
|
|
319
310
|
* Implementation of the StructArray layout:
|
|
@@ -324,7 +315,7 @@ register('StructArrayLayout1ul4', StructArrayLayout1ul4);
|
|
|
324
315
|
*
|
|
325
316
|
* @private
|
|
326
317
|
*/
|
|
327
|
-
class StructArrayLayout6i1ul2ui2i24 extends StructArray {
|
|
318
|
+
export class StructArrayLayout6i1ul2ui2i24 extends StructArray {
|
|
328
319
|
_refreshViews() {
|
|
329
320
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
330
321
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -370,7 +361,6 @@ class StructArrayLayout6i1ul2ui2i24 extends StructArray {
|
|
|
370
361
|
}
|
|
371
362
|
|
|
372
363
|
StructArrayLayout6i1ul2ui2i24.prototype.bytesPerElement = 24;
|
|
373
|
-
register('StructArrayLayout6i1ul2ui2i24', StructArrayLayout6i1ul2ui2i24);
|
|
374
364
|
|
|
375
365
|
/**
|
|
376
366
|
* Implementation of the StructArray layout:
|
|
@@ -380,7 +370,7 @@ register('StructArrayLayout6i1ul2ui2i24', StructArrayLayout6i1ul2ui2i24);
|
|
|
380
370
|
*
|
|
381
371
|
* @private
|
|
382
372
|
*/
|
|
383
|
-
class StructArrayLayout2i2i2i12 extends StructArray {
|
|
373
|
+
export class StructArrayLayout2i2i2i12 extends StructArray {
|
|
384
374
|
_refreshViews() {
|
|
385
375
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
386
376
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -412,7 +402,6 @@ class StructArrayLayout2i2i2i12 extends StructArray {
|
|
|
412
402
|
}
|
|
413
403
|
|
|
414
404
|
StructArrayLayout2i2i2i12.prototype.bytesPerElement = 12;
|
|
415
|
-
register('StructArrayLayout2i2i2i12', StructArrayLayout2i2i2i12);
|
|
416
405
|
|
|
417
406
|
/**
|
|
418
407
|
* Implementation of the StructArray layout:
|
|
@@ -420,7 +409,7 @@ register('StructArrayLayout2i2i2i12', StructArrayLayout2i2i2i12);
|
|
|
420
409
|
*
|
|
421
410
|
* @private
|
|
422
411
|
*/
|
|
423
|
-
class StructArrayLayout2ub4 extends StructArray {
|
|
412
|
+
export class StructArrayLayout2ub4 extends StructArray {
|
|
424
413
|
_refreshViews() {
|
|
425
414
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
426
415
|
}
|
|
@@ -443,7 +432,6 @@ class StructArrayLayout2ub4 extends StructArray {
|
|
|
443
432
|
}
|
|
444
433
|
|
|
445
434
|
StructArrayLayout2ub4.prototype.bytesPerElement = 4;
|
|
446
|
-
register('StructArrayLayout2ub4', StructArrayLayout2ub4);
|
|
447
435
|
|
|
448
436
|
/**
|
|
449
437
|
* Implementation of the StructArray layout:
|
|
@@ -456,7 +444,7 @@ register('StructArrayLayout2ub4', StructArrayLayout2ub4);
|
|
|
456
444
|
*
|
|
457
445
|
* @private
|
|
458
446
|
*/
|
|
459
|
-
class StructArrayLayout2i2ui3ul3ui2f2ub40 extends StructArray {
|
|
447
|
+
export class StructArrayLayout2i2ui3ul3ui2f2ub40 extends StructArray {
|
|
460
448
|
_refreshViews() {
|
|
461
449
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
462
450
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -511,7 +499,6 @@ class StructArrayLayout2i2ui3ul3ui2f2ub40 extends StructArray {
|
|
|
511
499
|
}
|
|
512
500
|
|
|
513
501
|
StructArrayLayout2i2ui3ul3ui2f2ub40.prototype.bytesPerElement = 40;
|
|
514
|
-
register('StructArrayLayout2i2ui3ul3ui2f2ub40', StructArrayLayout2i2ui3ul3ui2f2ub40);
|
|
515
502
|
|
|
516
503
|
/**
|
|
517
504
|
* Implementation of the StructArray layout:
|
|
@@ -521,7 +508,7 @@ register('StructArrayLayout2i2ui3ul3ui2f2ub40', StructArrayLayout2i2ui3ul3ui2f2u
|
|
|
521
508
|
*
|
|
522
509
|
* @private
|
|
523
510
|
*/
|
|
524
|
-
class StructArrayLayout4i9ui1ul32 extends StructArray {
|
|
511
|
+
export class StructArrayLayout4i9ui1ul32 extends StructArray {
|
|
525
512
|
_refreshViews() {
|
|
526
513
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
527
514
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -573,7 +560,6 @@ class StructArrayLayout4i9ui1ul32 extends StructArray {
|
|
|
573
560
|
}
|
|
574
561
|
|
|
575
562
|
StructArrayLayout4i9ui1ul32.prototype.bytesPerElement = 32;
|
|
576
|
-
register('StructArrayLayout4i9ui1ul32', StructArrayLayout4i9ui1ul32);
|
|
577
563
|
|
|
578
564
|
/**
|
|
579
565
|
* Implementation of the StructArray layout:
|
|
@@ -581,7 +567,7 @@ register('StructArrayLayout4i9ui1ul32', StructArrayLayout4i9ui1ul32);
|
|
|
581
567
|
*
|
|
582
568
|
* @private
|
|
583
569
|
*/
|
|
584
|
-
class StructArrayLayout1f4 extends StructArray {
|
|
570
|
+
export class StructArrayLayout1f4 extends StructArray {
|
|
585
571
|
_refreshViews() {
|
|
586
572
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
587
573
|
this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -603,7 +589,6 @@ class StructArrayLayout1f4 extends StructArray {
|
|
|
603
589
|
}
|
|
604
590
|
|
|
605
591
|
StructArrayLayout1f4.prototype.bytesPerElement = 4;
|
|
606
|
-
register('StructArrayLayout1f4', StructArrayLayout1f4);
|
|
607
592
|
|
|
608
593
|
/**
|
|
609
594
|
* Implementation of the StructArray layout:
|
|
@@ -611,7 +596,7 @@ register('StructArrayLayout1f4', StructArrayLayout1f4);
|
|
|
611
596
|
*
|
|
612
597
|
* @private
|
|
613
598
|
*/
|
|
614
|
-
class StructArrayLayout3i6 extends StructArray {
|
|
599
|
+
export class StructArrayLayout3i6 extends StructArray {
|
|
615
600
|
_refreshViews() {
|
|
616
601
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
617
602
|
this.int16 = new Int16Array(this.arrayBuffer);
|
|
@@ -637,7 +622,6 @@ class StructArrayLayout3i6 extends StructArray {
|
|
|
637
622
|
}
|
|
638
623
|
|
|
639
624
|
StructArrayLayout3i6.prototype.bytesPerElement = 6;
|
|
640
|
-
register('StructArrayLayout3i6', StructArrayLayout3i6);
|
|
641
625
|
|
|
642
626
|
/**
|
|
643
627
|
* Implementation of the StructArray layout:
|
|
@@ -646,7 +630,7 @@ register('StructArrayLayout3i6', StructArrayLayout3i6);
|
|
|
646
630
|
*
|
|
647
631
|
* @private
|
|
648
632
|
*/
|
|
649
|
-
class StructArrayLayout1ul2ui8 extends StructArray {
|
|
633
|
+
export class StructArrayLayout1ul2ui8 extends StructArray {
|
|
650
634
|
_refreshViews() {
|
|
651
635
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
652
636
|
this.uint32 = new Uint32Array(this.arrayBuffer);
|
|
@@ -675,7 +659,6 @@ class StructArrayLayout1ul2ui8 extends StructArray {
|
|
|
675
659
|
}
|
|
676
660
|
|
|
677
661
|
StructArrayLayout1ul2ui8.prototype.bytesPerElement = 8;
|
|
678
|
-
register('StructArrayLayout1ul2ui8', StructArrayLayout1ul2ui8);
|
|
679
662
|
|
|
680
663
|
/**
|
|
681
664
|
* Implementation of the StructArray layout:
|
|
@@ -683,7 +666,7 @@ register('StructArrayLayout1ul2ui8', StructArrayLayout1ul2ui8);
|
|
|
683
666
|
*
|
|
684
667
|
* @private
|
|
685
668
|
*/
|
|
686
|
-
class StructArrayLayout3ui6 extends StructArray {
|
|
669
|
+
export class StructArrayLayout3ui6 extends StructArray {
|
|
687
670
|
_refreshViews() {
|
|
688
671
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
689
672
|
this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -709,7 +692,6 @@ class StructArrayLayout3ui6 extends StructArray {
|
|
|
709
692
|
}
|
|
710
693
|
|
|
711
694
|
StructArrayLayout3ui6.prototype.bytesPerElement = 6;
|
|
712
|
-
register('StructArrayLayout3ui6', StructArrayLayout3ui6);
|
|
713
695
|
|
|
714
696
|
/**
|
|
715
697
|
* Implementation of the StructArray layout:
|
|
@@ -717,7 +699,7 @@ register('StructArrayLayout3ui6', StructArrayLayout3ui6);
|
|
|
717
699
|
*
|
|
718
700
|
* @private
|
|
719
701
|
*/
|
|
720
|
-
class StructArrayLayout2ui4 extends StructArray {
|
|
702
|
+
export class StructArrayLayout2ui4 extends StructArray {
|
|
721
703
|
_refreshViews() {
|
|
722
704
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
723
705
|
this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -741,7 +723,6 @@ class StructArrayLayout2ui4 extends StructArray {
|
|
|
741
723
|
}
|
|
742
724
|
|
|
743
725
|
StructArrayLayout2ui4.prototype.bytesPerElement = 4;
|
|
744
|
-
register('StructArrayLayout2ui4', StructArrayLayout2ui4);
|
|
745
726
|
|
|
746
727
|
/**
|
|
747
728
|
* Implementation of the StructArray layout:
|
|
@@ -749,7 +730,7 @@ register('StructArrayLayout2ui4', StructArrayLayout2ui4);
|
|
|
749
730
|
*
|
|
750
731
|
* @private
|
|
751
732
|
*/
|
|
752
|
-
class StructArrayLayout1ui2 extends StructArray {
|
|
733
|
+
export class StructArrayLayout1ui2 extends StructArray {
|
|
753
734
|
_refreshViews() {
|
|
754
735
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
755
736
|
this.uint16 = new Uint16Array(this.arrayBuffer);
|
|
@@ -771,7 +752,6 @@ class StructArrayLayout1ui2 extends StructArray {
|
|
|
771
752
|
}
|
|
772
753
|
|
|
773
754
|
StructArrayLayout1ui2.prototype.bytesPerElement = 2;
|
|
774
|
-
register('StructArrayLayout1ui2', StructArrayLayout1ui2);
|
|
775
755
|
|
|
776
756
|
/**
|
|
777
757
|
* Implementation of the StructArray layout:
|
|
@@ -779,7 +759,7 @@ register('StructArrayLayout1ui2', StructArrayLayout1ui2);
|
|
|
779
759
|
*
|
|
780
760
|
* @private
|
|
781
761
|
*/
|
|
782
|
-
class StructArrayLayout2f8 extends StructArray {
|
|
762
|
+
export class StructArrayLayout2f8 extends StructArray {
|
|
783
763
|
_refreshViews() {
|
|
784
764
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
785
765
|
this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -803,7 +783,6 @@ class StructArrayLayout2f8 extends StructArray {
|
|
|
803
783
|
}
|
|
804
784
|
|
|
805
785
|
StructArrayLayout2f8.prototype.bytesPerElement = 8;
|
|
806
|
-
register('StructArrayLayout2f8', StructArrayLayout2f8);
|
|
807
786
|
|
|
808
787
|
/**
|
|
809
788
|
* Implementation of the StructArray layout:
|
|
@@ -811,7 +790,7 @@ register('StructArrayLayout2f8', StructArrayLayout2f8);
|
|
|
811
790
|
*
|
|
812
791
|
* @private
|
|
813
792
|
*/
|
|
814
|
-
class StructArrayLayout4f16 extends StructArray {
|
|
793
|
+
export class StructArrayLayout4f16 extends StructArray {
|
|
815
794
|
_refreshViews() {
|
|
816
795
|
this.uint8 = new Uint8Array(this.arrayBuffer);
|
|
817
796
|
this.float32 = new Float32Array(this.arrayBuffer);
|
|
@@ -839,9 +818,8 @@ class StructArrayLayout4f16 extends StructArray {
|
|
|
839
818
|
}
|
|
840
819
|
|
|
841
820
|
StructArrayLayout4f16.prototype.bytesPerElement = 16;
|
|
842
|
-
register('StructArrayLayout4f16', StructArrayLayout4f16);
|
|
843
821
|
|
|
844
|
-
class CollisionBoxStruct extends Struct {
|
|
822
|
+
export class CollisionBoxStruct extends Struct {
|
|
845
823
|
get anchorPointX() {
|
|
846
824
|
return this._structArray.int16[this._pos2 + 0];
|
|
847
825
|
}
|
|
@@ -909,7 +887,7 @@ class CollisionBoxStruct extends Struct {
|
|
|
909
887
|
this._structArray.int16[this._pos2 + 11] = x;
|
|
910
888
|
}
|
|
911
889
|
get anchorPoint() {
|
|
912
|
-
return
|
|
890
|
+
return { x: this.anchorPointX, y: this.anchorPointY };
|
|
913
891
|
}
|
|
914
892
|
}
|
|
915
893
|
|
|
@@ -918,7 +896,7 @@ CollisionBoxStruct.prototype.size = 24;
|
|
|
918
896
|
/**
|
|
919
897
|
* @private
|
|
920
898
|
*/
|
|
921
|
-
class CollisionBoxArray extends StructArrayLayout6i1ul2ui2i24 {
|
|
899
|
+
export class CollisionBoxArray extends StructArrayLayout6i1ul2ui2i24 {
|
|
922
900
|
/**
|
|
923
901
|
* Return the CollisionBoxStruct at the given location in the array.
|
|
924
902
|
* @param {number} index The index of the element.
|
|
@@ -929,9 +907,7 @@ class CollisionBoxArray extends StructArrayLayout6i1ul2ui2i24 {
|
|
|
929
907
|
}
|
|
930
908
|
}
|
|
931
909
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
class PlacedSymbolStruct extends Struct {
|
|
910
|
+
export class PlacedSymbolStruct extends Struct {
|
|
935
911
|
get anchorX() {
|
|
936
912
|
return this._structArray.int16[this._pos2 + 0];
|
|
937
913
|
}
|
|
@@ -1023,7 +999,7 @@ PlacedSymbolStruct.prototype.size = 40;
|
|
|
1023
999
|
/**
|
|
1024
1000
|
* @private
|
|
1025
1001
|
*/
|
|
1026
|
-
class PlacedSymbolArray extends StructArrayLayout2i2ui3ul3ui2f2ub40 {
|
|
1002
|
+
export class PlacedSymbolArray extends StructArrayLayout2i2ui3ul3ui2f2ub40 {
|
|
1027
1003
|
/**
|
|
1028
1004
|
* Return the PlacedSymbolStruct at the given location in the array.
|
|
1029
1005
|
* @param {number} index The index of the element.
|
|
@@ -1034,9 +1010,7 @@ class PlacedSymbolArray extends StructArrayLayout2i2ui3ul3ui2f2ub40 {
|
|
|
1034
1010
|
}
|
|
1035
1011
|
}
|
|
1036
1012
|
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
class SymbolInstanceStruct extends Struct {
|
|
1013
|
+
export class SymbolInstanceStruct extends Struct {
|
|
1040
1014
|
get anchorX() {
|
|
1041
1015
|
return this._structArray.int16[this._pos2 + 0];
|
|
1042
1016
|
}
|
|
@@ -1128,7 +1102,7 @@ SymbolInstanceStruct.prototype.size = 32;
|
|
|
1128
1102
|
/**
|
|
1129
1103
|
* @private
|
|
1130
1104
|
*/
|
|
1131
|
-
class SymbolInstanceArray extends StructArrayLayout4i9ui1ul32 {
|
|
1105
|
+
export class SymbolInstanceArray extends StructArrayLayout4i9ui1ul32 {
|
|
1132
1106
|
/**
|
|
1133
1107
|
* Return the SymbolInstanceStruct at the given location in the array.
|
|
1134
1108
|
* @param {number} index The index of the element.
|
|
@@ -1139,9 +1113,7 @@ class SymbolInstanceArray extends StructArrayLayout4i9ui1ul32 {
|
|
|
1139
1113
|
}
|
|
1140
1114
|
}
|
|
1141
1115
|
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
class GlyphOffsetStruct extends Struct {
|
|
1116
|
+
export class GlyphOffsetStruct extends Struct {
|
|
1145
1117
|
get offsetX() {
|
|
1146
1118
|
return this._structArray.float32[this._pos4 + 0];
|
|
1147
1119
|
}
|
|
@@ -1155,7 +1127,7 @@ GlyphOffsetStruct.prototype.size = 4;
|
|
|
1155
1127
|
/**
|
|
1156
1128
|
* @private
|
|
1157
1129
|
*/
|
|
1158
|
-
class GlyphOffsetArray extends StructArrayLayout1f4 {
|
|
1130
|
+
export class GlyphOffsetArray extends StructArrayLayout1f4 {
|
|
1159
1131
|
getoffsetX(index) {
|
|
1160
1132
|
return this.float32[index * 1 + 0];
|
|
1161
1133
|
}
|
|
@@ -1169,9 +1141,7 @@ class GlyphOffsetArray extends StructArrayLayout1f4 {
|
|
|
1169
1141
|
}
|
|
1170
1142
|
}
|
|
1171
1143
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
class SymbolLineVertexStruct extends Struct {
|
|
1144
|
+
export class SymbolLineVertexStruct extends Struct {
|
|
1175
1145
|
get x() {
|
|
1176
1146
|
return this._structArray.int16[this._pos2 + 0];
|
|
1177
1147
|
}
|
|
@@ -1197,7 +1167,7 @@ SymbolLineVertexStruct.prototype.size = 6;
|
|
|
1197
1167
|
/**
|
|
1198
1168
|
* @private
|
|
1199
1169
|
*/
|
|
1200
|
-
class SymbolLineVertexArray extends StructArrayLayout3i6 {
|
|
1170
|
+
export class SymbolLineVertexArray extends StructArrayLayout3i6 {
|
|
1201
1171
|
getx(index) {
|
|
1202
1172
|
return this.int16[index * 3 + 0];
|
|
1203
1173
|
}
|
|
@@ -1217,9 +1187,7 @@ class SymbolLineVertexArray extends StructArrayLayout3i6 {
|
|
|
1217
1187
|
}
|
|
1218
1188
|
}
|
|
1219
1189
|
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
class FeatureIndexStruct extends Struct {
|
|
1190
|
+
export class FeatureIndexStruct extends Struct {
|
|
1223
1191
|
get featureIndex() {
|
|
1224
1192
|
return this._structArray.uint32[this._pos4 + 0];
|
|
1225
1193
|
}
|
|
@@ -1245,7 +1213,7 @@ FeatureIndexStruct.prototype.size = 8;
|
|
|
1245
1213
|
/**
|
|
1246
1214
|
* @private
|
|
1247
1215
|
*/
|
|
1248
|
-
class FeatureIndexArray extends StructArrayLayout1ul2ui8 {
|
|
1216
|
+
export class FeatureIndexArray extends StructArrayLayout1ul2ui8 {
|
|
1249
1217
|
/**
|
|
1250
1218
|
* Return the FeatureIndexStruct at the given location in the array.
|
|
1251
1219
|
* @param {number} index The index of the element.
|
|
@@ -1256,52 +1224,22 @@ class FeatureIndexArray extends StructArrayLayout1ul2ui8 {
|
|
|
1256
1224
|
}
|
|
1257
1225
|
}
|
|
1258
1226
|
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
StructArrayLayout2i4,
|
|
1263
|
-
|
|
1264
|
-
StructArrayLayout2i4i12,
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
StructArrayLayout2i2i2i12,
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
StructArrayLayout1ul2ui8,
|
|
1278
|
-
StructArrayLayout3ui6,
|
|
1279
|
-
StructArrayLayout2ui4,
|
|
1280
|
-
StructArrayLayout1ui2,
|
|
1281
|
-
StructArrayLayout2f8,
|
|
1282
|
-
StructArrayLayout4f16,
|
|
1283
|
-
PosArray: StructArrayLayout2i4,
|
|
1284
|
-
RasterBoundsArray: StructArrayLayout4i8,
|
|
1285
|
-
CircleLayoutArray: StructArrayLayout2i4,
|
|
1286
|
-
FillLayoutArray: StructArrayLayout2i4,
|
|
1287
|
-
FillExtrusionLayoutArray: StructArrayLayout2i4i12,
|
|
1288
|
-
HeatmapLayoutArray: StructArrayLayout2i4,
|
|
1289
|
-
LineLayoutArray: StructArrayLayout4i4ub12,
|
|
1290
|
-
PatternLayoutArray: StructArrayLayout8ui16,
|
|
1291
|
-
SymbolLayoutArray: StructArrayLayout4i4ui16,
|
|
1292
|
-
SymbolDynamicLayoutArray: StructArrayLayout3f12,
|
|
1293
|
-
SymbolOpacityArray: StructArrayLayout1ul4,
|
|
1294
|
-
CollisionBoxLayoutArray: StructArrayLayout2i2i2i12,
|
|
1295
|
-
CollisionCircleLayoutArray: StructArrayLayout2i2i2i12,
|
|
1296
|
-
CollisionVertexArray: StructArrayLayout2ub4,
|
|
1297
|
-
TriangleIndexArray: StructArrayLayout3ui6,
|
|
1298
|
-
LineIndexArray: StructArrayLayout2ui4,
|
|
1299
|
-
LineStripIndexArray: StructArrayLayout1ui2,
|
|
1300
|
-
|
|
1301
|
-
CollisionBoxArray,
|
|
1302
|
-
FeatureIndexArray,
|
|
1303
|
-
GlyphOffsetArray,
|
|
1304
|
-
PlacedSymbolArray,
|
|
1305
|
-
SymbolInstanceArray,
|
|
1306
|
-
SymbolLineVertexArray
|
|
1227
|
+
export {
|
|
1228
|
+
StructArrayLayout2i4 as PosArray,
|
|
1229
|
+
StructArrayLayout4i8 as RasterBoundsArray,
|
|
1230
|
+
StructArrayLayout2i4 as CircleLayoutArray,
|
|
1231
|
+
StructArrayLayout2i4 as FillLayoutArray,
|
|
1232
|
+
StructArrayLayout2i4i12 as FillExtrusionLayoutArray,
|
|
1233
|
+
StructArrayLayout2i4 as HeatmapLayoutArray,
|
|
1234
|
+
StructArrayLayout4i4ub12 as LineLayoutArray,
|
|
1235
|
+
StructArrayLayout8ui16 as PatternLayoutArray,
|
|
1236
|
+
StructArrayLayout4i4ui16 as SymbolLayoutArray,
|
|
1237
|
+
StructArrayLayout3f12 as SymbolDynamicLayoutArray,
|
|
1238
|
+
StructArrayLayout1ul4 as SymbolOpacityArray,
|
|
1239
|
+
StructArrayLayout2i2i2i12 as CollisionBoxLayoutArray,
|
|
1240
|
+
StructArrayLayout2i2i2i12 as CollisionCircleLayoutArray,
|
|
1241
|
+
StructArrayLayout2ub4 as CollisionVertexArray,
|
|
1242
|
+
StructArrayLayout3ui6 as TriangleIndexArray,
|
|
1243
|
+
StructArrayLayout2ui4 as LineIndexArray,
|
|
1244
|
+
StructArrayLayout1ui2 as LineStripIndexArray
|
|
1307
1245
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { createLayout } from '../../util/struct_array.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports = layout;
|
|
3
|
+
export default createLayout([{ name: 'a_pos', components: 2, type: 'Int16' }], 4);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import EvaluationParameters from '../../style/evaluation_parameters.js';
|
|
2
|
+
import { CircleLayoutArray } from '../array_types.js';
|
|
3
|
+
import EXTENT from '../extent.js';
|
|
4
|
+
import { TriangleIndexArray } from '../index_array_type.js';
|
|
5
|
+
import loadGeometry from '../load_geometry.js';
|
|
6
|
+
import { ProgramConfigurationSet } from '../program_configuration.js';
|
|
7
|
+
import SegmentVector from '../segment.js';
|
|
8
|
+
import layout from './circle_attributes.js';
|
|
2
9
|
|
|
3
|
-
const
|
|
4
|
-
const SegmentVector = require('../segment');
|
|
5
|
-
const { ProgramConfigurationSet } = require('../program_configuration');
|
|
6
|
-
const { TriangleIndexArray } = require('../index_array_type');
|
|
7
|
-
const loadGeometry = require('../load_geometry');
|
|
8
|
-
const EXTENT = require('../extent');
|
|
9
|
-
const { register } = require('../../util/transfer_registry');
|
|
10
|
-
const EvaluationParameters = require('../../style/evaluation_parameters');
|
|
10
|
+
const layoutAttributes = layout.members;
|
|
11
11
|
|
|
12
12
|
function addCircleVertex(layoutVertexArray, x, y, extrudeX, extrudeY) {
|
|
13
13
|
layoutVertexArray.emplaceBack(x * 2 + (extrudeX + 1) / 2, y * 2 + (extrudeY + 1) / 2);
|
|
@@ -26,7 +26,6 @@ class CircleBucket {
|
|
|
26
26
|
this.globalState = options.globalState;
|
|
27
27
|
this.overscaling = options.overscaling;
|
|
28
28
|
this.layers = options.layers;
|
|
29
|
-
this.layerIds = this.layers.map(layer => layer.id);
|
|
30
29
|
this.index = options.index;
|
|
31
30
|
this.hasPattern = false;
|
|
32
31
|
|
|
@@ -49,7 +48,9 @@ class CircleBucket {
|
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
update(states, vtLayer, imagePositions) {
|
|
52
|
-
if (!this.stateDependentLayers.length)
|
|
51
|
+
if (!this.stateDependentLayers.length) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
53
54
|
this.programConfigurations.updatePaintArrays(states, vtLayer, this.stateDependentLayers, {
|
|
54
55
|
imagePositions,
|
|
55
56
|
globalState: this.globalState
|
|
@@ -74,7 +75,9 @@ class CircleBucket {
|
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
destroy() {
|
|
77
|
-
if (!this.layoutVertexBuffer)
|
|
78
|
+
if (!this.layoutVertexBuffer) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
78
81
|
this.layoutVertexBuffer.destroy();
|
|
79
82
|
this.indexBuffer.destroy();
|
|
80
83
|
this.programConfigurations.destroy();
|
|
@@ -88,7 +91,9 @@ class CircleBucket {
|
|
|
88
91
|
const y = point.y;
|
|
89
92
|
|
|
90
93
|
// Do not include points that are outside the tile boundaries.
|
|
91
|
-
if (x < 0 || x >= EXTENT || y < 0 || y >= EXTENT)
|
|
94
|
+
if (x < 0 || x >= EXTENT || y < 0 || y >= EXTENT) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
92
97
|
|
|
93
98
|
// this geometry will be of the Point type, and we'll derive
|
|
94
99
|
// two triangles from it.
|
|
@@ -122,6 +127,4 @@ class CircleBucket {
|
|
|
122
127
|
}
|
|
123
128
|
}
|
|
124
129
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
module.exports = CircleBucket;
|
|
130
|
+
export default CircleBucket;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { createLayout } from '../../util/struct_array.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
module.exports = layout;
|
|
3
|
+
export default createLayout([{ name: 'a_pos', components: 2, type: 'Int16' }], 4);
|