@mapwhit/tilerenderer 0.47.1

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.
Files changed (356) hide show
  1. package/LICENSE.txt +87 -0
  2. package/README.md +25 -0
  3. package/build/min/.dir +0 -0
  4. package/build/min/package.json +3 -0
  5. package/build/min/src/shaders/_prelude.fragment.glsl.txt +13 -0
  6. package/build/min/src/shaders/_prelude.vertex.glsl.txt +14 -0
  7. package/build/min/src/shaders/background.fragment.glsl.txt +5 -0
  8. package/build/min/src/shaders/background.vertex.glsl.txt +1 -0
  9. package/build/min/src/shaders/background_pattern.fragment.glsl.txt +5 -0
  10. package/build/min/src/shaders/background_pattern.vertex.glsl.txt +1 -0
  11. package/build/min/src/shaders/circle.fragment.glsl.txt +20 -0
  12. package/build/min/src/shaders/circle.vertex.glsl.txt +17 -0
  13. package/build/min/src/shaders/clipping_mask.fragment.glsl.txt +1 -0
  14. package/build/min/src/shaders/clipping_mask.vertex.glsl.txt +1 -0
  15. package/build/min/src/shaders/collision_box.fragment.glsl.txt +1 -0
  16. package/build/min/src/shaders/collision_box.vertex.glsl.txt +1 -0
  17. package/build/min/src/shaders/collision_circle.fragment.glsl.txt +1 -0
  18. package/build/min/src/shaders/collision_circle.vertex.glsl.txt +1 -0
  19. package/build/min/src/shaders/debug.fragment.glsl.txt +1 -0
  20. package/build/min/src/shaders/debug.vertex.glsl.txt +1 -0
  21. package/build/min/src/shaders/fill.fragment.glsl.txt +10 -0
  22. package/build/min/src/shaders/fill.vertex.glsl.txt +7 -0
  23. package/build/min/src/shaders/fill_extrusion.fragment.glsl.txt +13 -0
  24. package/build/min/src/shaders/fill_extrusion.vertex.glsl.txt +9 -0
  25. package/build/min/src/shaders/fill_extrusion_pattern.fragment.glsl.txt +15 -0
  26. package/build/min/src/shaders/fill_extrusion_pattern.vertex.glsl.txt +11 -0
  27. package/build/min/src/shaders/fill_outline.fragment.glsl.txt +10 -0
  28. package/build/min/src/shaders/fill_outline.vertex.glsl.txt +7 -0
  29. package/build/min/src/shaders/fill_outline_pattern.fragment.glsl.txt +13 -0
  30. package/build/min/src/shaders/fill_outline_pattern.vertex.glsl.txt +9 -0
  31. package/build/min/src/shaders/fill_pattern.fragment.glsl.txt +13 -0
  32. package/build/min/src/shaders/fill_pattern.vertex.glsl.txt +9 -0
  33. package/build/min/src/shaders/heatmap.fragment.glsl.txt +10 -0
  34. package/build/min/src/shaders/heatmap.vertex.glsl.txt +8 -0
  35. package/build/min/src/shaders/heatmap_texture.fragment.glsl.txt +5 -0
  36. package/build/min/src/shaders/heatmap_texture.vertex.glsl.txt +1 -0
  37. package/build/min/src/shaders/hillshade.fragment.glsl.txt +7 -0
  38. package/build/min/src/shaders/hillshade.vertex.glsl.txt +1 -0
  39. package/build/min/src/shaders/hillshade_prepare.fragment.glsl.txt +8 -0
  40. package/build/min/src/shaders/hillshade_prepare.vertex.glsl.txt +1 -0
  41. package/build/min/src/shaders/line.fragment.glsl.txt +12 -0
  42. package/build/min/src/shaders/line.vertex.glsl.txt +17 -0
  43. package/build/min/src/shaders/line_gradient.fragment.glsl.txt +10 -0
  44. package/build/min/src/shaders/line_gradient.vertex.glsl.txt +16 -0
  45. package/build/min/src/shaders/line_pattern.fragment.glsl.txt +15 -0
  46. package/build/min/src/shaders/line_pattern.vertex.glsl.txt +20 -0
  47. package/build/min/src/shaders/line_sdf.fragment.glsl.txt +17 -0
  48. package/build/min/src/shaders/line_sdf.vertex.glsl.txt +20 -0
  49. package/build/min/src/shaders/raster.fragment.glsl.txt +5 -0
  50. package/build/min/src/shaders/raster.vertex.glsl.txt +1 -0
  51. package/build/min/src/shaders/symbol_icon.fragment.glsl.txt +9 -0
  52. package/build/min/src/shaders/symbol_icon.vertex.glsl.txt +5 -0
  53. package/build/min/src/shaders/symbol_sdf.fragment.glsl.txt +19 -0
  54. package/build/min/src/shaders/symbol_sdf.vertex.glsl.txt +13 -0
  55. package/package.json +44 -0
  56. package/src/css/mapbox-gl.css +506 -0
  57. package/src/css/svg/mapboxgl-ctrl-attrib.svg +3 -0
  58. package/src/css/svg/mapboxgl-ctrl-compass.svg +4 -0
  59. package/src/css/svg/mapboxgl-ctrl-fullscreen.svg +3 -0
  60. package/src/css/svg/mapboxgl-ctrl-geolocate-background.svg +3 -0
  61. package/src/css/svg/mapboxgl-ctrl-geolocate.svg +3 -0
  62. package/src/css/svg/mapboxgl-ctrl-logo-compact.svg +2 -0
  63. package/src/css/svg/mapboxgl-ctrl-logo.svg +1 -0
  64. package/src/css/svg/mapboxgl-ctrl-shrink.svg +3 -0
  65. package/src/css/svg/mapboxgl-ctrl-zoom-in.svg +3 -0
  66. package/src/css/svg/mapboxgl-ctrl-zoom-out.svg +3 -0
  67. package/src/data/array_types.js +1138 -0
  68. package/src/data/bucket/circle_attributes.js +5 -0
  69. package/src/data/bucket/circle_bucket.js +118 -0
  70. package/src/data/bucket/fill_attributes.js +5 -0
  71. package/src/data/bucket/fill_bucket.js +166 -0
  72. package/src/data/bucket/fill_extrusion_attributes.js +11 -0
  73. package/src/data/bucket/fill_extrusion_bucket.js +247 -0
  74. package/src/data/bucket/heatmap_bucket.js +12 -0
  75. package/src/data/bucket/line_attributes.js +11 -0
  76. package/src/data/bucket/line_bucket.js +625 -0
  77. package/src/data/bucket/pattern_attributes.js +9 -0
  78. package/src/data/bucket/pattern_bucket_features.js +44 -0
  79. package/src/data/bucket/symbol_attributes.js +95 -0
  80. package/src/data/bucket/symbol_bucket.js +697 -0
  81. package/src/data/bucket.js +53 -0
  82. package/src/data/dem_data.js +126 -0
  83. package/src/data/extent.js +17 -0
  84. package/src/data/feature_index.js +254 -0
  85. package/src/data/index_array_type.js +14 -0
  86. package/src/data/load_geometry.js +42 -0
  87. package/src/data/pos_attributes.js +3 -0
  88. package/src/data/program_configuration.js +782 -0
  89. package/src/data/raster_bounds_attributes.js +6 -0
  90. package/src/data/segment.js +63 -0
  91. package/src/geo/coordinate.js +78 -0
  92. package/src/geo/lng_lat.js +129 -0
  93. package/src/geo/lng_lat_bounds.js +253 -0
  94. package/src/geo/transform.js +605 -0
  95. package/src/gl/color_mode.js +21 -0
  96. package/src/gl/context.js +193 -0
  97. package/src/gl/cull_face_mode.js +22 -0
  98. package/src/gl/depth_mode.js +18 -0
  99. package/src/gl/framebuffer.js +28 -0
  100. package/src/gl/index_buffer.js +52 -0
  101. package/src/gl/stencil_mode.js +17 -0
  102. package/src/gl/types.js +0 -0
  103. package/src/gl/value.js +676 -0
  104. package/src/gl/vertex_buffer.js +101 -0
  105. package/src/index.js +50 -0
  106. package/src/render/draw_background.js +60 -0
  107. package/src/render/draw_circle.js +55 -0
  108. package/src/render/draw_collision_debug.js +45 -0
  109. package/src/render/draw_debug.js +429 -0
  110. package/src/render/draw_fill.js +143 -0
  111. package/src/render/draw_fill_extrusion.js +101 -0
  112. package/src/render/draw_heatmap.js +159 -0
  113. package/src/render/draw_hillshade.js +144 -0
  114. package/src/render/draw_line.js +99 -0
  115. package/src/render/draw_raster.js +151 -0
  116. package/src/render/draw_symbol.js +231 -0
  117. package/src/render/glyph_atlas.js +55 -0
  118. package/src/render/glyph_manager.js +145 -0
  119. package/src/render/image_atlas.js +97 -0
  120. package/src/render/image_manager.js +183 -0
  121. package/src/render/line_atlas.js +139 -0
  122. package/src/render/painter.js +483 -0
  123. package/src/render/program/background_program.js +46 -0
  124. package/src/render/program/circle_program.js +40 -0
  125. package/src/render/program/clipping_mask_program.js +11 -0
  126. package/src/render/program/collision_program.js +28 -0
  127. package/src/render/program/debug_program.js +13 -0
  128. package/src/render/program/fill_extrusion_program.js +76 -0
  129. package/src/render/program/fill_program.js +60 -0
  130. package/src/render/program/heatmap_program.js +46 -0
  131. package/src/render/program/hillshade_program.js +77 -0
  132. package/src/render/program/line_program.js +119 -0
  133. package/src/render/program/pattern.js +57 -0
  134. package/src/render/program/program_uniforms.js +46 -0
  135. package/src/render/program/raster_program.js +50 -0
  136. package/src/render/program/symbol_program.js +112 -0
  137. package/src/render/program.js +133 -0
  138. package/src/render/texture.js +88 -0
  139. package/src/render/tile_mask.js +108 -0
  140. package/src/render/uniform_binding.js +129 -0
  141. package/src/render/vertex_array_object.js +155 -0
  142. package/src/shaders/README.md +42 -0
  143. package/src/shaders/_prelude.fragment.glsl +17 -0
  144. package/src/shaders/_prelude.vertex.glsl +73 -0
  145. package/src/shaders/background.fragment.glsl +10 -0
  146. package/src/shaders/background.vertex.glsl +7 -0
  147. package/src/shaders/background_pattern.fragment.glsl +28 -0
  148. package/src/shaders/background_pattern.vertex.glsl +20 -0
  149. package/src/shaders/circle.fragment.glsl +39 -0
  150. package/src/shaders/circle.vertex.glsl +63 -0
  151. package/src/shaders/clipping_mask.fragment.glsl +3 -0
  152. package/src/shaders/clipping_mask.vertex.glsl +7 -0
  153. package/src/shaders/collision_box.fragment.glsl +21 -0
  154. package/src/shaders/collision_box.vertex.glsl +26 -0
  155. package/src/shaders/collision_circle.fragment.glsl +34 -0
  156. package/src/shaders/collision_circle.vertex.glsl +36 -0
  157. package/src/shaders/debug.fragment.glsl +5 -0
  158. package/src/shaders/debug.vertex.glsl +7 -0
  159. package/src/shaders/encode_attribute.js +19 -0
  160. package/src/shaders/fill.fragment.glsl +13 -0
  161. package/src/shaders/fill.vertex.glsl +13 -0
  162. package/src/shaders/fill_extrusion.fragment.glsl +16 -0
  163. package/src/shaders/fill_extrusion.vertex.glsl +66 -0
  164. package/src/shaders/fill_extrusion_pattern.fragment.glsl +41 -0
  165. package/src/shaders/fill_extrusion_pattern.vertex.glsl +76 -0
  166. package/src/shaders/fill_outline.fragment.glsl +17 -0
  167. package/src/shaders/fill_outline.vertex.glsl +17 -0
  168. package/src/shaders/fill_outline_pattern.fragment.glsl +43 -0
  169. package/src/shaders/fill_outline_pattern.vertex.glsl +41 -0
  170. package/src/shaders/fill_pattern.fragment.glsl +36 -0
  171. package/src/shaders/fill_pattern.vertex.glsl +36 -0
  172. package/src/shaders/heatmap.fragment.glsl +21 -0
  173. package/src/shaders/heatmap.vertex.glsl +53 -0
  174. package/src/shaders/heatmap_texture.fragment.glsl +14 -0
  175. package/src/shaders/heatmap_texture.vertex.glsl +11 -0
  176. package/src/shaders/hillshade.fragment.glsl +52 -0
  177. package/src/shaders/hillshade.vertex.glsl +11 -0
  178. package/src/shaders/hillshade_prepare.fragment.glsl +72 -0
  179. package/src/shaders/hillshade_prepare.vertex.glsl +15 -0
  180. package/src/shaders/index.js +194 -0
  181. package/src/shaders/line.fragment.glsl +28 -0
  182. package/src/shaders/line.vertex.glsl +84 -0
  183. package/src/shaders/line_gradient.fragment.glsl +34 -0
  184. package/src/shaders/line_gradient.vertex.glsl +84 -0
  185. package/src/shaders/line_pattern.fragment.glsl +69 -0
  186. package/src/shaders/line_pattern.vertex.glsl +88 -0
  187. package/src/shaders/line_sdf.fragment.glsl +44 -0
  188. package/src/shaders/line_sdf.vertex.glsl +95 -0
  189. package/src/shaders/raster.fragment.glsl +52 -0
  190. package/src/shaders/raster.vertex.glsl +21 -0
  191. package/src/shaders/symbol_icon.fragment.glsl +17 -0
  192. package/src/shaders/symbol_icon.vertex.glsl +91 -0
  193. package/src/shaders/symbol_sdf.fragment.glsl +50 -0
  194. package/src/shaders/symbol_sdf.vertex.glsl +117 -0
  195. package/src/source/geojson_source.js +267 -0
  196. package/src/source/geojson_worker_source.js +210 -0
  197. package/src/source/geojson_wrapper.js +67 -0
  198. package/src/source/image_source.js +213 -0
  199. package/src/source/load_tilejson.js +40 -0
  200. package/src/source/pixels_to_tile_units.js +17 -0
  201. package/src/source/query_features.js +198 -0
  202. package/src/source/raster_dem_tile_source.js +140 -0
  203. package/src/source/raster_dem_tile_worker_source.js +26 -0
  204. package/src/source/raster_tile_source.js +126 -0
  205. package/src/source/rtl_text_plugin.js +63 -0
  206. package/src/source/source.js +75 -0
  207. package/src/source/source_cache.js +794 -0
  208. package/src/source/source_state.js +55 -0
  209. package/src/source/tile.js +332 -0
  210. package/src/source/tile_bounds.js +40 -0
  211. package/src/source/tile_cache.js +122 -0
  212. package/src/source/tile_id.js +150 -0
  213. package/src/source/vector_tile_source.js +144 -0
  214. package/src/source/vector_tile_worker_source.js +126 -0
  215. package/src/source/worker.js +175 -0
  216. package/src/source/worker_source.js +14 -0
  217. package/src/source/worker_tile.js +199 -0
  218. package/src/style/create_style_layer.js +25 -0
  219. package/src/style/evaluation_parameters.js +45 -0
  220. package/src/style/light.js +112 -0
  221. package/src/style/load_glyph_range.js +17 -0
  222. package/src/style/load_sprite.js +26 -0
  223. package/src/style/parse_glyph_pbf.js +45 -0
  224. package/src/style/pauseable_placement.js +88 -0
  225. package/src/style/properties.js +691 -0
  226. package/src/style/query_utils.js +39 -0
  227. package/src/style/style.js +955 -0
  228. package/src/style/style_layer/background_style_layer.js +11 -0
  229. package/src/style/style_layer/background_style_layer_properties.js +25 -0
  230. package/src/style/style_layer/circle_style_layer.js +93 -0
  231. package/src/style/style_layer/circle_style_layer_properties.js +76 -0
  232. package/src/style/style_layer/fill_extrusion_style_layer.js +194 -0
  233. package/src/style/style_layer/fill_extrusion_style_layer_properties.js +56 -0
  234. package/src/style/style_layer/fill_style_layer.js +46 -0
  235. package/src/style/style_layer/fill_style_layer_properties.js +45 -0
  236. package/src/style/style_layer/heatmap_style_layer.js +51 -0
  237. package/src/style/style_layer/heatmap_style_layer_properties.js +52 -0
  238. package/src/style/style_layer/hillshade_style_layer.js +15 -0
  239. package/src/style/style_layer/hillshade_style_layer_properties.js +43 -0
  240. package/src/style/style_layer/line_style_layer.js +129 -0
  241. package/src/style/style_layer/line_style_layer_properties.js +104 -0
  242. package/src/style/style_layer/raster_style_layer.js +11 -0
  243. package/src/style/style_layer/raster_style_layer_properties.js +55 -0
  244. package/src/style/style_layer/symbol_style_layer.js +66 -0
  245. package/src/style/style_layer/symbol_style_layer_properties.js +288 -0
  246. package/src/style/style_layer.js +183 -0
  247. package/src/style/style_layer_index.js +61 -0
  248. package/src/style/zoom_history.js +36 -0
  249. package/src/style-spec/deref.js +51 -0
  250. package/src/style-spec/error/parsing_error.js +8 -0
  251. package/src/style-spec/error/validation_error.js +10 -0
  252. package/src/style-spec/expression/compound_expression.js +118 -0
  253. package/src/style-spec/expression/definitions/array.js +82 -0
  254. package/src/style-spec/expression/definitions/assertion.js +69 -0
  255. package/src/style-spec/expression/definitions/at.js +57 -0
  256. package/src/style-spec/expression/definitions/case.js +73 -0
  257. package/src/style-spec/expression/definitions/coalesce.js +68 -0
  258. package/src/style-spec/expression/definitions/coercion.js +96 -0
  259. package/src/style-spec/expression/definitions/collator.js +102 -0
  260. package/src/style-spec/expression/definitions/equals.js +93 -0
  261. package/src/style-spec/expression/definitions/index.js +407 -0
  262. package/src/style-spec/expression/definitions/interpolate.js +235 -0
  263. package/src/style-spec/expression/definitions/length.js +54 -0
  264. package/src/style-spec/expression/definitions/let.js +60 -0
  265. package/src/style-spec/expression/definitions/literal.js +64 -0
  266. package/src/style-spec/expression/definitions/match.js +142 -0
  267. package/src/style-spec/expression/definitions/step.js +116 -0
  268. package/src/style-spec/expression/definitions/var.js +38 -0
  269. package/src/style-spec/expression/evaluation_context.js +35 -0
  270. package/src/style-spec/expression/index.js +329 -0
  271. package/src/style-spec/expression/is_constant.js +63 -0
  272. package/src/style-spec/expression/parsing_context.js +213 -0
  273. package/src/style-spec/expression/parsing_error.js +9 -0
  274. package/src/style-spec/expression/runtime_error.js +12 -0
  275. package/src/style-spec/expression/scope.js +34 -0
  276. package/src/style-spec/expression/stops.js +37 -0
  277. package/src/style-spec/expression/types.js +77 -0
  278. package/src/style-spec/expression/values.js +126 -0
  279. package/src/style-spec/feature_filter/README.md +55 -0
  280. package/src/style-spec/feature_filter/index.js +158 -0
  281. package/src/style-spec/function/convert.js +256 -0
  282. package/src/style-spec/function/index.js +299 -0
  283. package/src/style-spec/group_by_layout.js +68 -0
  284. package/src/style-spec/reference/v8.json +5356 -0
  285. package/src/style-spec/util/color.js +73 -0
  286. package/src/style-spec/util/color_spaces.js +128 -0
  287. package/src/style-spec/util/eval_support.js +8 -0
  288. package/src/style-spec/util/get_type.js +18 -0
  289. package/src/style-spec/util/interpolate.js +21 -0
  290. package/src/style-spec/util/properties.js +17 -0
  291. package/src/style-spec/util/ref_properties.js +1 -0
  292. package/src/style-spec/util/result.js +19 -0
  293. package/src/symbol/anchor.js +21 -0
  294. package/src/symbol/check_max_angle.js +75 -0
  295. package/src/symbol/clip_line.js +73 -0
  296. package/src/symbol/collision_feature.js +230 -0
  297. package/src/symbol/collision_index.js +379 -0
  298. package/src/symbol/cross_tile_symbol_index.js +270 -0
  299. package/src/symbol/get_anchors.js +177 -0
  300. package/src/symbol/grid_index.js +318 -0
  301. package/src/symbol/mergelines.js +75 -0
  302. package/src/symbol/opacity_state.js +21 -0
  303. package/src/symbol/placement.js +563 -0
  304. package/src/symbol/projection.js +601 -0
  305. package/src/symbol/quads.js +173 -0
  306. package/src/symbol/shaping.js +347 -0
  307. package/src/symbol/symbol_layout.js +519 -0
  308. package/src/symbol/symbol_size.js +110 -0
  309. package/src/symbol/transform_text.js +16 -0
  310. package/src/ui/anchor.js +24 -0
  311. package/src/ui/bind_handlers.js +199 -0
  312. package/src/ui/camera.js +954 -0
  313. package/src/ui/events.js +210 -0
  314. package/src/ui/handler/box_zoom.js +151 -0
  315. package/src/ui/handler/dblclick_zoom.js +91 -0
  316. package/src/ui/handler/drag_pan.js +285 -0
  317. package/src/ui/handler/drag_rotate.js +290 -0
  318. package/src/ui/handler/frame.js +28 -0
  319. package/src/ui/handler/inertia.js +45 -0
  320. package/src/ui/handler/keyboard.js +148 -0
  321. package/src/ui/handler/scroll_zoom.js +284 -0
  322. package/src/ui/handler/touch_zoom_rotate.js +263 -0
  323. package/src/ui/map.js +1645 -0
  324. package/src/util/actor.js +104 -0
  325. package/src/util/async.js +23 -0
  326. package/src/util/browser.js +61 -0
  327. package/src/util/callback.js +26 -0
  328. package/src/util/classify_rings.js +43 -0
  329. package/src/util/color_ramp.js +24 -0
  330. package/src/util/config.js +24 -0
  331. package/src/util/dictionary_coder.js +25 -0
  332. package/src/util/dispatcher.js +68 -0
  333. package/src/util/dom.js +102 -0
  334. package/src/util/evented.js +182 -0
  335. package/src/util/find_pole_of_inaccessibility.js +129 -0
  336. package/src/util/global_worker_pool.js +15 -0
  337. package/src/util/image.js +124 -0
  338. package/src/util/interpolate.js +5 -0
  339. package/src/util/intersection_tests.js +207 -0
  340. package/src/util/is_char_in_unicode_block.js +287 -0
  341. package/src/util/loader/image.js +32 -0
  342. package/src/util/object.js +178 -0
  343. package/src/util/script_detection.js +337 -0
  344. package/src/util/struct_array.js +197 -0
  345. package/src/util/task_queue.js +57 -0
  346. package/src/util/throttle.js +26 -0
  347. package/src/util/tile_cover.js +114 -0
  348. package/src/util/token.js +13 -0
  349. package/src/util/unique_id.js +12 -0
  350. package/src/util/util.js +192 -0
  351. package/src/util/vectortile_to_geojson.js +44 -0
  352. package/src/util/verticalize_punctuation.js +112 -0
  353. package/src/util/warn.js +21 -0
  354. package/src/util/web_worker.js +5 -0
  355. package/src/util/web_worker_transfer.js +228 -0
  356. package/src/util/worker_pool.js +41 -0
@@ -0,0 +1,1138 @@
1
+ // This file is generated. Edit the template at meta/bin/generate-struct-arrays.js.ejs and instead.
2
+
3
+ const assert = require('assert');
4
+ const { Struct, StructArray } = require('../util/struct_array');
5
+ const { register } = require('../util/web_worker_transfer');
6
+ const Point = require('@mapbox/point-geometry');
7
+
8
+ /**
9
+ * Implementation of the StructArray layout:
10
+ * [0]: Int16[2]
11
+ *
12
+ * @private
13
+ */
14
+ class StructArrayLayout2i4 extends StructArray {
15
+ _refreshViews() {
16
+ this.uint8 = new Uint8Array(this.arrayBuffer);
17
+ this.int16 = new Int16Array(this.arrayBuffer);
18
+ }
19
+
20
+ emplaceBack(v0, v1) {
21
+ const i = this.length;
22
+ this.resize(i + 1);
23
+ const o2 = i * 2;
24
+ this.int16[o2 + 0] = v0;
25
+ this.int16[o2 + 1] = v1;
26
+ return i;
27
+ }
28
+
29
+ emplace(i, v0, v1) {
30
+ const o2 = i * 2;
31
+ this.int16[o2 + 0] = v0;
32
+ this.int16[o2 + 1] = v1;
33
+ return i;
34
+ }
35
+ }
36
+
37
+ StructArrayLayout2i4.prototype.bytesPerElement = 4;
38
+ register('StructArrayLayout2i4', StructArrayLayout2i4);
39
+
40
+ /**
41
+ * Implementation of the StructArray layout:
42
+ * [0]: Int16[4]
43
+ *
44
+ * @private
45
+ */
46
+ class StructArrayLayout4i8 extends StructArray {
47
+ _refreshViews() {
48
+ this.uint8 = new Uint8Array(this.arrayBuffer);
49
+ this.int16 = new Int16Array(this.arrayBuffer);
50
+ }
51
+
52
+ emplaceBack(v0, v1, v2, v3) {
53
+ const i = this.length;
54
+ this.resize(i + 1);
55
+ const o2 = i * 4;
56
+ this.int16[o2 + 0] = v0;
57
+ this.int16[o2 + 1] = v1;
58
+ this.int16[o2 + 2] = v2;
59
+ this.int16[o2 + 3] = v3;
60
+ return i;
61
+ }
62
+
63
+ emplace(i, v0, v1, v2, v3) {
64
+ const o2 = i * 4;
65
+ this.int16[o2 + 0] = v0;
66
+ this.int16[o2 + 1] = v1;
67
+ this.int16[o2 + 2] = v2;
68
+ this.int16[o2 + 3] = v3;
69
+ return i;
70
+ }
71
+ }
72
+
73
+ StructArrayLayout4i8.prototype.bytesPerElement = 8;
74
+ register('StructArrayLayout4i8', StructArrayLayout4i8);
75
+
76
+ /**
77
+ * Implementation of the StructArray layout:
78
+ * [0]: Int16[2]
79
+ * [4]: Int16[4]
80
+ *
81
+ * @private
82
+ */
83
+ class StructArrayLayout2i4i12 extends StructArray {
84
+ _refreshViews() {
85
+ this.uint8 = new Uint8Array(this.arrayBuffer);
86
+ this.int16 = new Int16Array(this.arrayBuffer);
87
+ }
88
+
89
+ emplaceBack(v0, v1, v2, v3, v4, v5) {
90
+ const i = this.length;
91
+ this.resize(i + 1);
92
+ const o2 = i * 6;
93
+ this.int16[o2 + 0] = v0;
94
+ this.int16[o2 + 1] = v1;
95
+ this.int16[o2 + 2] = v2;
96
+ this.int16[o2 + 3] = v3;
97
+ this.int16[o2 + 4] = v4;
98
+ this.int16[o2 + 5] = v5;
99
+ return i;
100
+ }
101
+
102
+ emplace(i, v0, v1, v2, v3, v4, v5) {
103
+ const o2 = i * 6;
104
+ this.int16[o2 + 0] = v0;
105
+ this.int16[o2 + 1] = v1;
106
+ this.int16[o2 + 2] = v2;
107
+ this.int16[o2 + 3] = v3;
108
+ this.int16[o2 + 4] = v4;
109
+ this.int16[o2 + 5] = v5;
110
+ return i;
111
+ }
112
+ }
113
+
114
+ StructArrayLayout2i4i12.prototype.bytesPerElement = 12;
115
+ register('StructArrayLayout2i4i12', StructArrayLayout2i4i12);
116
+
117
+ /**
118
+ * Implementation of the StructArray layout:
119
+ * [0]: Int16[4]
120
+ * [8]: Uint8[4]
121
+ *
122
+ * @private
123
+ */
124
+ class StructArrayLayout4i4ub12 extends StructArray {
125
+ _refreshViews() {
126
+ this.uint8 = new Uint8Array(this.arrayBuffer);
127
+ this.int16 = new Int16Array(this.arrayBuffer);
128
+ }
129
+
130
+ emplaceBack(v0, v1, v2, v3, v4, v5, v6, v7) {
131
+ const i = this.length;
132
+ this.resize(i + 1);
133
+ const o2 = i * 6;
134
+ const o1 = i * 12;
135
+ this.int16[o2 + 0] = v0;
136
+ this.int16[o2 + 1] = v1;
137
+ this.int16[o2 + 2] = v2;
138
+ this.int16[o2 + 3] = v3;
139
+ this.uint8[o1 + 8] = v4;
140
+ this.uint8[o1 + 9] = v5;
141
+ this.uint8[o1 + 10] = v6;
142
+ this.uint8[o1 + 11] = v7;
143
+ return i;
144
+ }
145
+
146
+ emplace(i, v0, v1, v2, v3, v4, v5, v6, v7) {
147
+ const o2 = i * 6;
148
+ const o1 = i * 12;
149
+ this.int16[o2 + 0] = v0;
150
+ this.int16[o2 + 1] = v1;
151
+ this.int16[o2 + 2] = v2;
152
+ this.int16[o2 + 3] = v3;
153
+ this.uint8[o1 + 8] = v4;
154
+ this.uint8[o1 + 9] = v5;
155
+ this.uint8[o1 + 10] = v6;
156
+ this.uint8[o1 + 11] = v7;
157
+ return i;
158
+ }
159
+ }
160
+
161
+ StructArrayLayout4i4ub12.prototype.bytesPerElement = 12;
162
+ register('StructArrayLayout4i4ub12', StructArrayLayout4i4ub12);
163
+
164
+ /**
165
+ * Implementation of the StructArray layout:
166
+ * [0]: Uint16[8]
167
+ *
168
+ * @private
169
+ */
170
+ class StructArrayLayout8ui16 extends StructArray {
171
+ _refreshViews() {
172
+ this.uint8 = new Uint8Array(this.arrayBuffer);
173
+ this.uint16 = new Uint16Array(this.arrayBuffer);
174
+ }
175
+
176
+ emplaceBack(v0, v1, v2, v3, v4, v5, v6, v7) {
177
+ const i = this.length;
178
+ this.resize(i + 1);
179
+ const o2 = i * 8;
180
+ this.uint16[o2 + 0] = v0;
181
+ this.uint16[o2 + 1] = v1;
182
+ this.uint16[o2 + 2] = v2;
183
+ this.uint16[o2 + 3] = v3;
184
+ this.uint16[o2 + 4] = v4;
185
+ this.uint16[o2 + 5] = v5;
186
+ this.uint16[o2 + 6] = v6;
187
+ this.uint16[o2 + 7] = v7;
188
+ return i;
189
+ }
190
+
191
+ emplace(i, v0, v1, v2, v3, v4, v5, v6, v7) {
192
+ const o2 = i * 8;
193
+ this.uint16[o2 + 0] = v0;
194
+ this.uint16[o2 + 1] = v1;
195
+ this.uint16[o2 + 2] = v2;
196
+ this.uint16[o2 + 3] = v3;
197
+ this.uint16[o2 + 4] = v4;
198
+ this.uint16[o2 + 5] = v5;
199
+ this.uint16[o2 + 6] = v6;
200
+ this.uint16[o2 + 7] = v7;
201
+ return i;
202
+ }
203
+ }
204
+
205
+ StructArrayLayout8ui16.prototype.bytesPerElement = 16;
206
+ register('StructArrayLayout8ui16', StructArrayLayout8ui16);
207
+
208
+ /**
209
+ * Implementation of the StructArray layout:
210
+ * [0]: Int16[4]
211
+ * [8]: Uint16[4]
212
+ *
213
+ * @private
214
+ */
215
+ class StructArrayLayout4i4ui16 extends StructArray {
216
+ _refreshViews() {
217
+ this.uint8 = new Uint8Array(this.arrayBuffer);
218
+ this.int16 = new Int16Array(this.arrayBuffer);
219
+ this.uint16 = new Uint16Array(this.arrayBuffer);
220
+ }
221
+
222
+ emplaceBack(v0, v1, v2, v3, v4, v5, v6, v7) {
223
+ const i = this.length;
224
+ this.resize(i + 1);
225
+ const o2 = i * 8;
226
+ this.int16[o2 + 0] = v0;
227
+ this.int16[o2 + 1] = v1;
228
+ this.int16[o2 + 2] = v2;
229
+ this.int16[o2 + 3] = v3;
230
+ this.uint16[o2 + 4] = v4;
231
+ this.uint16[o2 + 5] = v5;
232
+ this.uint16[o2 + 6] = v6;
233
+ this.uint16[o2 + 7] = v7;
234
+ return i;
235
+ }
236
+
237
+ emplace(i, v0, v1, v2, v3, v4, v5, v6, v7) {
238
+ const o2 = i * 8;
239
+ this.int16[o2 + 0] = v0;
240
+ this.int16[o2 + 1] = v1;
241
+ this.int16[o2 + 2] = v2;
242
+ this.int16[o2 + 3] = v3;
243
+ this.uint16[o2 + 4] = v4;
244
+ this.uint16[o2 + 5] = v5;
245
+ this.uint16[o2 + 6] = v6;
246
+ this.uint16[o2 + 7] = v7;
247
+ return i;
248
+ }
249
+ }
250
+
251
+ StructArrayLayout4i4ui16.prototype.bytesPerElement = 16;
252
+ register('StructArrayLayout4i4ui16', StructArrayLayout4i4ui16);
253
+
254
+ /**
255
+ * Implementation of the StructArray layout:
256
+ * [0]: Float32[3]
257
+ *
258
+ * @private
259
+ */
260
+ class StructArrayLayout3f12 extends StructArray {
261
+ _refreshViews() {
262
+ this.uint8 = new Uint8Array(this.arrayBuffer);
263
+ this.float32 = new Float32Array(this.arrayBuffer);
264
+ }
265
+
266
+ emplaceBack(v0, v1, v2) {
267
+ const i = this.length;
268
+ this.resize(i + 1);
269
+ const o4 = i * 3;
270
+ this.float32[o4 + 0] = v0;
271
+ this.float32[o4 + 1] = v1;
272
+ this.float32[o4 + 2] = v2;
273
+ return i;
274
+ }
275
+
276
+ emplace(i, v0, v1, v2) {
277
+ const o4 = i * 3;
278
+ this.float32[o4 + 0] = v0;
279
+ this.float32[o4 + 1] = v1;
280
+ this.float32[o4 + 2] = v2;
281
+ return i;
282
+ }
283
+ }
284
+
285
+ StructArrayLayout3f12.prototype.bytesPerElement = 12;
286
+ register('StructArrayLayout3f12', StructArrayLayout3f12);
287
+
288
+ /**
289
+ * Implementation of the StructArray layout:
290
+ * [0]: Uint32[1]
291
+ *
292
+ * @private
293
+ */
294
+ class StructArrayLayout1ul4 extends StructArray {
295
+ _refreshViews() {
296
+ this.uint8 = new Uint8Array(this.arrayBuffer);
297
+ this.uint32 = new Uint32Array(this.arrayBuffer);
298
+ }
299
+
300
+ emplaceBack(v0) {
301
+ const i = this.length;
302
+ this.resize(i + 1);
303
+ const o4 = i * 1;
304
+ this.uint32[o4 + 0] = v0;
305
+ return i;
306
+ }
307
+
308
+ emplace(i, v0) {
309
+ const o4 = i * 1;
310
+ this.uint32[o4 + 0] = v0;
311
+ return i;
312
+ }
313
+ }
314
+
315
+ StructArrayLayout1ul4.prototype.bytesPerElement = 4;
316
+ register('StructArrayLayout1ul4', StructArrayLayout1ul4);
317
+
318
+ /**
319
+ * Implementation of the StructArray layout:
320
+ * [0]: Int16[6]
321
+ * [12]: Uint32[1]
322
+ * [16]: Uint16[2]
323
+ * [20]: Int16[2]
324
+ *
325
+ * @private
326
+ */
327
+ class StructArrayLayout6i1ul2ui2i24 extends StructArray {
328
+ _refreshViews() {
329
+ this.uint8 = new Uint8Array(this.arrayBuffer);
330
+ this.int16 = new Int16Array(this.arrayBuffer);
331
+ this.uint32 = new Uint32Array(this.arrayBuffer);
332
+ this.uint16 = new Uint16Array(this.arrayBuffer);
333
+ }
334
+
335
+ emplaceBack(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) {
336
+ const i = this.length;
337
+ this.resize(i + 1);
338
+ const o2 = i * 12;
339
+ const o4 = i * 6;
340
+ this.int16[o2 + 0] = v0;
341
+ this.int16[o2 + 1] = v1;
342
+ this.int16[o2 + 2] = v2;
343
+ this.int16[o2 + 3] = v3;
344
+ this.int16[o2 + 4] = v4;
345
+ this.int16[o2 + 5] = v5;
346
+ this.uint32[o4 + 3] = v6;
347
+ this.uint16[o2 + 8] = v7;
348
+ this.uint16[o2 + 9] = v8;
349
+ this.int16[o2 + 10] = v9;
350
+ this.int16[o2 + 11] = v10;
351
+ return i;
352
+ }
353
+
354
+ emplace(i, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) {
355
+ const o2 = i * 12;
356
+ const o4 = i * 6;
357
+ this.int16[o2 + 0] = v0;
358
+ this.int16[o2 + 1] = v1;
359
+ this.int16[o2 + 2] = v2;
360
+ this.int16[o2 + 3] = v3;
361
+ this.int16[o2 + 4] = v4;
362
+ this.int16[o2 + 5] = v5;
363
+ this.uint32[o4 + 3] = v6;
364
+ this.uint16[o2 + 8] = v7;
365
+ this.uint16[o2 + 9] = v8;
366
+ this.int16[o2 + 10] = v9;
367
+ this.int16[o2 + 11] = v10;
368
+ return i;
369
+ }
370
+ }
371
+
372
+ StructArrayLayout6i1ul2ui2i24.prototype.bytesPerElement = 24;
373
+ register('StructArrayLayout6i1ul2ui2i24', StructArrayLayout6i1ul2ui2i24);
374
+
375
+ /**
376
+ * Implementation of the StructArray layout:
377
+ * [0]: Int16[2]
378
+ * [4]: Int16[2]
379
+ * [8]: Int16[2]
380
+ *
381
+ * @private
382
+ */
383
+ class StructArrayLayout2i2i2i12 extends StructArray {
384
+ _refreshViews() {
385
+ this.uint8 = new Uint8Array(this.arrayBuffer);
386
+ this.int16 = new Int16Array(this.arrayBuffer);
387
+ }
388
+
389
+ emplaceBack(v0, v1, v2, v3, v4, v5) {
390
+ const i = this.length;
391
+ this.resize(i + 1);
392
+ const o2 = i * 6;
393
+ this.int16[o2 + 0] = v0;
394
+ this.int16[o2 + 1] = v1;
395
+ this.int16[o2 + 2] = v2;
396
+ this.int16[o2 + 3] = v3;
397
+ this.int16[o2 + 4] = v4;
398
+ this.int16[o2 + 5] = v5;
399
+ return i;
400
+ }
401
+
402
+ emplace(i, v0, v1, v2, v3, v4, v5) {
403
+ const o2 = i * 6;
404
+ this.int16[o2 + 0] = v0;
405
+ this.int16[o2 + 1] = v1;
406
+ this.int16[o2 + 2] = v2;
407
+ this.int16[o2 + 3] = v3;
408
+ this.int16[o2 + 4] = v4;
409
+ this.int16[o2 + 5] = v5;
410
+ return i;
411
+ }
412
+ }
413
+
414
+ StructArrayLayout2i2i2i12.prototype.bytesPerElement = 12;
415
+ register('StructArrayLayout2i2i2i12', StructArrayLayout2i2i2i12);
416
+
417
+ /**
418
+ * Implementation of the StructArray layout:
419
+ * [0]: Uint8[2]
420
+ *
421
+ * @private
422
+ */
423
+ class StructArrayLayout2ub4 extends StructArray {
424
+ _refreshViews() {
425
+ this.uint8 = new Uint8Array(this.arrayBuffer);
426
+ }
427
+
428
+ emplaceBack(v0, v1) {
429
+ const i = this.length;
430
+ this.resize(i + 1);
431
+ const o1 = i * 4;
432
+ this.uint8[o1 + 0] = v0;
433
+ this.uint8[o1 + 1] = v1;
434
+ return i;
435
+ }
436
+
437
+ emplace(i, v0, v1) {
438
+ const o1 = i * 4;
439
+ this.uint8[o1 + 0] = v0;
440
+ this.uint8[o1 + 1] = v1;
441
+ return i;
442
+ }
443
+ }
444
+
445
+ StructArrayLayout2ub4.prototype.bytesPerElement = 4;
446
+ register('StructArrayLayout2ub4', StructArrayLayout2ub4);
447
+
448
+ /**
449
+ * Implementation of the StructArray layout:
450
+ * [0]: Int16[2]
451
+ * [4]: Uint16[2]
452
+ * [8]: Uint32[3]
453
+ * [20]: Uint16[3]
454
+ * [28]: Float32[2]
455
+ * [36]: Uint8[2]
456
+ *
457
+ * @private
458
+ */
459
+ class StructArrayLayout2i2ui3ul3ui2f2ub40 extends StructArray {
460
+ _refreshViews() {
461
+ this.uint8 = new Uint8Array(this.arrayBuffer);
462
+ this.int16 = new Int16Array(this.arrayBuffer);
463
+ this.uint16 = new Uint16Array(this.arrayBuffer);
464
+ this.uint32 = new Uint32Array(this.arrayBuffer);
465
+ this.float32 = new Float32Array(this.arrayBuffer);
466
+ }
467
+
468
+ emplaceBack(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) {
469
+ const i = this.length;
470
+ this.resize(i + 1);
471
+ const o2 = i * 20;
472
+ const o4 = i * 10;
473
+ const o1 = i * 40;
474
+ this.int16[o2 + 0] = v0;
475
+ this.int16[o2 + 1] = v1;
476
+ this.uint16[o2 + 2] = v2;
477
+ this.uint16[o2 + 3] = v3;
478
+ this.uint32[o4 + 2] = v4;
479
+ this.uint32[o4 + 3] = v5;
480
+ this.uint32[o4 + 4] = v6;
481
+ this.uint16[o2 + 10] = v7;
482
+ this.uint16[o2 + 11] = v8;
483
+ this.uint16[o2 + 12] = v9;
484
+ this.float32[o4 + 7] = v10;
485
+ this.float32[o4 + 8] = v11;
486
+ this.uint8[o1 + 36] = v12;
487
+ this.uint8[o1 + 37] = v13;
488
+ return i;
489
+ }
490
+
491
+ emplace(i, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) {
492
+ const o2 = i * 20;
493
+ const o4 = i * 10;
494
+ const o1 = i * 40;
495
+ this.int16[o2 + 0] = v0;
496
+ this.int16[o2 + 1] = v1;
497
+ this.uint16[o2 + 2] = v2;
498
+ this.uint16[o2 + 3] = v3;
499
+ this.uint32[o4 + 2] = v4;
500
+ this.uint32[o4 + 3] = v5;
501
+ this.uint32[o4 + 4] = v6;
502
+ this.uint16[o2 + 10] = v7;
503
+ this.uint16[o2 + 11] = v8;
504
+ this.uint16[o2 + 12] = v9;
505
+ this.float32[o4 + 7] = v10;
506
+ this.float32[o4 + 8] = v11;
507
+ this.uint8[o1 + 36] = v12;
508
+ this.uint8[o1 + 37] = v13;
509
+ return i;
510
+ }
511
+ }
512
+
513
+ StructArrayLayout2i2ui3ul3ui2f2ub40.prototype.bytesPerElement = 40;
514
+ register('StructArrayLayout2i2ui3ul3ui2f2ub40', StructArrayLayout2i2ui3ul3ui2f2ub40);
515
+
516
+ /**
517
+ * Implementation of the StructArray layout:
518
+ * [0]: Float32[1]
519
+ *
520
+ * @private
521
+ */
522
+ class StructArrayLayout1f4 extends StructArray {
523
+ _refreshViews() {
524
+ this.uint8 = new Uint8Array(this.arrayBuffer);
525
+ this.float32 = new Float32Array(this.arrayBuffer);
526
+ }
527
+
528
+ emplaceBack(v0) {
529
+ const i = this.length;
530
+ this.resize(i + 1);
531
+ const o4 = i * 1;
532
+ this.float32[o4 + 0] = v0;
533
+ return i;
534
+ }
535
+
536
+ emplace(i, v0) {
537
+ const o4 = i * 1;
538
+ this.float32[o4 + 0] = v0;
539
+ return i;
540
+ }
541
+ }
542
+
543
+ StructArrayLayout1f4.prototype.bytesPerElement = 4;
544
+ register('StructArrayLayout1f4', StructArrayLayout1f4);
545
+
546
+ /**
547
+ * Implementation of the StructArray layout:
548
+ * [0]: Int16[3]
549
+ *
550
+ * @private
551
+ */
552
+ class StructArrayLayout3i6 extends StructArray {
553
+ _refreshViews() {
554
+ this.uint8 = new Uint8Array(this.arrayBuffer);
555
+ this.int16 = new Int16Array(this.arrayBuffer);
556
+ }
557
+
558
+ emplaceBack(v0, v1, v2) {
559
+ const i = this.length;
560
+ this.resize(i + 1);
561
+ const o2 = i * 3;
562
+ this.int16[o2 + 0] = v0;
563
+ this.int16[o2 + 1] = v1;
564
+ this.int16[o2 + 2] = v2;
565
+ return i;
566
+ }
567
+
568
+ emplace(i, v0, v1, v2) {
569
+ const o2 = i * 3;
570
+ this.int16[o2 + 0] = v0;
571
+ this.int16[o2 + 1] = v1;
572
+ this.int16[o2 + 2] = v2;
573
+ return i;
574
+ }
575
+ }
576
+
577
+ StructArrayLayout3i6.prototype.bytesPerElement = 6;
578
+ register('StructArrayLayout3i6', StructArrayLayout3i6);
579
+
580
+ /**
581
+ * Implementation of the StructArray layout:
582
+ * [0]: Uint32[1]
583
+ * [4]: Uint16[2]
584
+ *
585
+ * @private
586
+ */
587
+ class StructArrayLayout1ul2ui8 extends StructArray {
588
+ _refreshViews() {
589
+ this.uint8 = new Uint8Array(this.arrayBuffer);
590
+ this.uint32 = new Uint32Array(this.arrayBuffer);
591
+ this.uint16 = new Uint16Array(this.arrayBuffer);
592
+ }
593
+
594
+ emplaceBack(v0, v1, v2) {
595
+ const i = this.length;
596
+ this.resize(i + 1);
597
+ const o4 = i * 2;
598
+ const o2 = i * 4;
599
+ this.uint32[o4 + 0] = v0;
600
+ this.uint16[o2 + 2] = v1;
601
+ this.uint16[o2 + 3] = v2;
602
+ return i;
603
+ }
604
+
605
+ emplace(i, v0, v1, v2) {
606
+ const o4 = i * 2;
607
+ const o2 = i * 4;
608
+ this.uint32[o4 + 0] = v0;
609
+ this.uint16[o2 + 2] = v1;
610
+ this.uint16[o2 + 3] = v2;
611
+ return i;
612
+ }
613
+ }
614
+
615
+ StructArrayLayout1ul2ui8.prototype.bytesPerElement = 8;
616
+ register('StructArrayLayout1ul2ui8', StructArrayLayout1ul2ui8);
617
+
618
+ /**
619
+ * Implementation of the StructArray layout:
620
+ * [0]: Uint16[3]
621
+ *
622
+ * @private
623
+ */
624
+ class StructArrayLayout3ui6 extends StructArray {
625
+ _refreshViews() {
626
+ this.uint8 = new Uint8Array(this.arrayBuffer);
627
+ this.uint16 = new Uint16Array(this.arrayBuffer);
628
+ }
629
+
630
+ emplaceBack(v0, v1, v2) {
631
+ const i = this.length;
632
+ this.resize(i + 1);
633
+ const o2 = i * 3;
634
+ this.uint16[o2 + 0] = v0;
635
+ this.uint16[o2 + 1] = v1;
636
+ this.uint16[o2 + 2] = v2;
637
+ return i;
638
+ }
639
+
640
+ emplace(i, v0, v1, v2) {
641
+ const o2 = i * 3;
642
+ this.uint16[o2 + 0] = v0;
643
+ this.uint16[o2 + 1] = v1;
644
+ this.uint16[o2 + 2] = v2;
645
+ return i;
646
+ }
647
+ }
648
+
649
+ StructArrayLayout3ui6.prototype.bytesPerElement = 6;
650
+ register('StructArrayLayout3ui6', StructArrayLayout3ui6);
651
+
652
+ /**
653
+ * Implementation of the StructArray layout:
654
+ * [0]: Uint16[2]
655
+ *
656
+ * @private
657
+ */
658
+ class StructArrayLayout2ui4 extends StructArray {
659
+ _refreshViews() {
660
+ this.uint8 = new Uint8Array(this.arrayBuffer);
661
+ this.uint16 = new Uint16Array(this.arrayBuffer);
662
+ }
663
+
664
+ emplaceBack(v0, v1) {
665
+ const i = this.length;
666
+ this.resize(i + 1);
667
+ const o2 = i * 2;
668
+ this.uint16[o2 + 0] = v0;
669
+ this.uint16[o2 + 1] = v1;
670
+ return i;
671
+ }
672
+
673
+ emplace(i, v0, v1) {
674
+ const o2 = i * 2;
675
+ this.uint16[o2 + 0] = v0;
676
+ this.uint16[o2 + 1] = v1;
677
+ return i;
678
+ }
679
+ }
680
+
681
+ StructArrayLayout2ui4.prototype.bytesPerElement = 4;
682
+ register('StructArrayLayout2ui4', StructArrayLayout2ui4);
683
+
684
+ /**
685
+ * Implementation of the StructArray layout:
686
+ * [0]: Uint16[1]
687
+ *
688
+ * @private
689
+ */
690
+ class StructArrayLayout1ui2 extends StructArray {
691
+ _refreshViews() {
692
+ this.uint8 = new Uint8Array(this.arrayBuffer);
693
+ this.uint16 = new Uint16Array(this.arrayBuffer);
694
+ }
695
+
696
+ emplaceBack(v0) {
697
+ const i = this.length;
698
+ this.resize(i + 1);
699
+ const o2 = i * 1;
700
+ this.uint16[o2 + 0] = v0;
701
+ return i;
702
+ }
703
+
704
+ emplace(i, v0) {
705
+ const o2 = i * 1;
706
+ this.uint16[o2 + 0] = v0;
707
+ return i;
708
+ }
709
+ }
710
+
711
+ StructArrayLayout1ui2.prototype.bytesPerElement = 2;
712
+ register('StructArrayLayout1ui2', StructArrayLayout1ui2);
713
+
714
+ /**
715
+ * Implementation of the StructArray layout:
716
+ * [0]: Float32[2]
717
+ *
718
+ * @private
719
+ */
720
+ class StructArrayLayout2f8 extends StructArray {
721
+ _refreshViews() {
722
+ this.uint8 = new Uint8Array(this.arrayBuffer);
723
+ this.float32 = new Float32Array(this.arrayBuffer);
724
+ }
725
+
726
+ emplaceBack(v0, v1) {
727
+ const i = this.length;
728
+ this.resize(i + 1);
729
+ const o4 = i * 2;
730
+ this.float32[o4 + 0] = v0;
731
+ this.float32[o4 + 1] = v1;
732
+ return i;
733
+ }
734
+
735
+ emplace(i, v0, v1) {
736
+ const o4 = i * 2;
737
+ this.float32[o4 + 0] = v0;
738
+ this.float32[o4 + 1] = v1;
739
+ return i;
740
+ }
741
+ }
742
+
743
+ StructArrayLayout2f8.prototype.bytesPerElement = 8;
744
+ register('StructArrayLayout2f8', StructArrayLayout2f8);
745
+
746
+ /**
747
+ * Implementation of the StructArray layout:
748
+ * [0]: Float32[4]
749
+ *
750
+ * @private
751
+ */
752
+ class StructArrayLayout4f16 extends StructArray {
753
+ _refreshViews() {
754
+ this.uint8 = new Uint8Array(this.arrayBuffer);
755
+ this.float32 = new Float32Array(this.arrayBuffer);
756
+ }
757
+
758
+ emplaceBack(v0, v1, v2, v3) {
759
+ const i = this.length;
760
+ this.resize(i + 1);
761
+ const o4 = i * 4;
762
+ this.float32[o4 + 0] = v0;
763
+ this.float32[o4 + 1] = v1;
764
+ this.float32[o4 + 2] = v2;
765
+ this.float32[o4 + 3] = v3;
766
+ return i;
767
+ }
768
+
769
+ emplace(i, v0, v1, v2, v3) {
770
+ const o4 = i * 4;
771
+ this.float32[o4 + 0] = v0;
772
+ this.float32[o4 + 1] = v1;
773
+ this.float32[o4 + 2] = v2;
774
+ this.float32[o4 + 3] = v3;
775
+ return i;
776
+ }
777
+ }
778
+
779
+ StructArrayLayout4f16.prototype.bytesPerElement = 16;
780
+ register('StructArrayLayout4f16', StructArrayLayout4f16);
781
+
782
+ class CollisionBoxStruct extends Struct {
783
+ get anchorPointX() {
784
+ return this._structArray.int16[this._pos2 + 0];
785
+ }
786
+ set anchorPointX(x) {
787
+ this._structArray.int16[this._pos2 + 0] = x;
788
+ }
789
+ get anchorPointY() {
790
+ return this._structArray.int16[this._pos2 + 1];
791
+ }
792
+ set anchorPointY(x) {
793
+ this._structArray.int16[this._pos2 + 1] = x;
794
+ }
795
+ get x1() {
796
+ return this._structArray.int16[this._pos2 + 2];
797
+ }
798
+ set x1(x) {
799
+ this._structArray.int16[this._pos2 + 2] = x;
800
+ }
801
+ get y1() {
802
+ return this._structArray.int16[this._pos2 + 3];
803
+ }
804
+ set y1(x) {
805
+ this._structArray.int16[this._pos2 + 3] = x;
806
+ }
807
+ get x2() {
808
+ return this._structArray.int16[this._pos2 + 4];
809
+ }
810
+ set x2(x) {
811
+ this._structArray.int16[this._pos2 + 4] = x;
812
+ }
813
+ get y2() {
814
+ return this._structArray.int16[this._pos2 + 5];
815
+ }
816
+ set y2(x) {
817
+ this._structArray.int16[this._pos2 + 5] = x;
818
+ }
819
+ get featureIndex() {
820
+ return this._structArray.uint32[this._pos4 + 3];
821
+ }
822
+ set featureIndex(x) {
823
+ this._structArray.uint32[this._pos4 + 3] = x;
824
+ }
825
+ get sourceLayerIndex() {
826
+ return this._structArray.uint16[this._pos2 + 8];
827
+ }
828
+ set sourceLayerIndex(x) {
829
+ this._structArray.uint16[this._pos2 + 8] = x;
830
+ }
831
+ get bucketIndex() {
832
+ return this._structArray.uint16[this._pos2 + 9];
833
+ }
834
+ set bucketIndex(x) {
835
+ this._structArray.uint16[this._pos2 + 9] = x;
836
+ }
837
+ get radius() {
838
+ return this._structArray.int16[this._pos2 + 10];
839
+ }
840
+ set radius(x) {
841
+ this._structArray.int16[this._pos2 + 10] = x;
842
+ }
843
+ get signedDistanceFromAnchor() {
844
+ return this._structArray.int16[this._pos2 + 11];
845
+ }
846
+ set signedDistanceFromAnchor(x) {
847
+ this._structArray.int16[this._pos2 + 11] = x;
848
+ }
849
+ get anchorPoint() {
850
+ return new Point(this.anchorPointX, this.anchorPointY);
851
+ }
852
+ }
853
+
854
+ CollisionBoxStruct.prototype.size = 24;
855
+
856
+ /**
857
+ * @private
858
+ */
859
+ class CollisionBoxArray extends StructArrayLayout6i1ul2ui2i24 {
860
+ /**
861
+ * Return the CollisionBoxStruct at the given location in the array.
862
+ * @param {number} index The index of the element.
863
+ */
864
+ get(index) {
865
+ assert(!this.isTransferred);
866
+ return new CollisionBoxStruct(this, index);
867
+ }
868
+ }
869
+
870
+ register('CollisionBoxArray', CollisionBoxArray);
871
+
872
+ class PlacedSymbolStruct extends Struct {
873
+ get anchorX() {
874
+ return this._structArray.int16[this._pos2 + 0];
875
+ }
876
+ set anchorX(x) {
877
+ this._structArray.int16[this._pos2 + 0] = x;
878
+ }
879
+ get anchorY() {
880
+ return this._structArray.int16[this._pos2 + 1];
881
+ }
882
+ set anchorY(x) {
883
+ this._structArray.int16[this._pos2 + 1] = x;
884
+ }
885
+ get glyphStartIndex() {
886
+ return this._structArray.uint16[this._pos2 + 2];
887
+ }
888
+ set glyphStartIndex(x) {
889
+ this._structArray.uint16[this._pos2 + 2] = x;
890
+ }
891
+ get numGlyphs() {
892
+ return this._structArray.uint16[this._pos2 + 3];
893
+ }
894
+ set numGlyphs(x) {
895
+ this._structArray.uint16[this._pos2 + 3] = x;
896
+ }
897
+ get vertexStartIndex() {
898
+ return this._structArray.uint32[this._pos4 + 2];
899
+ }
900
+ set vertexStartIndex(x) {
901
+ this._structArray.uint32[this._pos4 + 2] = x;
902
+ }
903
+ get lineStartIndex() {
904
+ return this._structArray.uint32[this._pos4 + 3];
905
+ }
906
+ set lineStartIndex(x) {
907
+ this._structArray.uint32[this._pos4 + 3] = x;
908
+ }
909
+ get lineLength() {
910
+ return this._structArray.uint32[this._pos4 + 4];
911
+ }
912
+ set lineLength(x) {
913
+ this._structArray.uint32[this._pos4 + 4] = x;
914
+ }
915
+ get segment() {
916
+ return this._structArray.uint16[this._pos2 + 10];
917
+ }
918
+ set segment(x) {
919
+ this._structArray.uint16[this._pos2 + 10] = x;
920
+ }
921
+ get lowerSize() {
922
+ return this._structArray.uint16[this._pos2 + 11];
923
+ }
924
+ set lowerSize(x) {
925
+ this._structArray.uint16[this._pos2 + 11] = x;
926
+ }
927
+ get upperSize() {
928
+ return this._structArray.uint16[this._pos2 + 12];
929
+ }
930
+ set upperSize(x) {
931
+ this._structArray.uint16[this._pos2 + 12] = x;
932
+ }
933
+ get lineOffsetX() {
934
+ return this._structArray.float32[this._pos4 + 7];
935
+ }
936
+ set lineOffsetX(x) {
937
+ this._structArray.float32[this._pos4 + 7] = x;
938
+ }
939
+ get lineOffsetY() {
940
+ return this._structArray.float32[this._pos4 + 8];
941
+ }
942
+ set lineOffsetY(x) {
943
+ this._structArray.float32[this._pos4 + 8] = x;
944
+ }
945
+ get writingMode() {
946
+ return this._structArray.uint8[this._pos1 + 36];
947
+ }
948
+ set writingMode(x) {
949
+ this._structArray.uint8[this._pos1 + 36] = x;
950
+ }
951
+ get hidden() {
952
+ return this._structArray.uint8[this._pos1 + 37];
953
+ }
954
+ set hidden(x) {
955
+ this._structArray.uint8[this._pos1 + 37] = x;
956
+ }
957
+ }
958
+
959
+ PlacedSymbolStruct.prototype.size = 40;
960
+
961
+ /**
962
+ * @private
963
+ */
964
+ class PlacedSymbolArray extends StructArrayLayout2i2ui3ul3ui2f2ub40 {
965
+ /**
966
+ * Return the PlacedSymbolStruct at the given location in the array.
967
+ * @param {number} index The index of the element.
968
+ */
969
+ get(index) {
970
+ assert(!this.isTransferred);
971
+ return new PlacedSymbolStruct(this, index);
972
+ }
973
+ }
974
+
975
+ register('PlacedSymbolArray', PlacedSymbolArray);
976
+
977
+ class GlyphOffsetStruct extends Struct {
978
+ get offsetX() {
979
+ return this._structArray.float32[this._pos4 + 0];
980
+ }
981
+ set offsetX(x) {
982
+ this._structArray.float32[this._pos4 + 0] = x;
983
+ }
984
+ }
985
+
986
+ GlyphOffsetStruct.prototype.size = 4;
987
+
988
+ /**
989
+ * @private
990
+ */
991
+ class GlyphOffsetArray extends StructArrayLayout1f4 {
992
+ getoffsetX(index) {
993
+ return this.float32[index * 1 + 0];
994
+ }
995
+ /**
996
+ * Return the GlyphOffsetStruct at the given location in the array.
997
+ * @param {number} index The index of the element.
998
+ */
999
+ get(index) {
1000
+ assert(!this.isTransferred);
1001
+ return new GlyphOffsetStruct(this, index);
1002
+ }
1003
+ }
1004
+
1005
+ register('GlyphOffsetArray', GlyphOffsetArray);
1006
+
1007
+ class SymbolLineVertexStruct extends Struct {
1008
+ get x() {
1009
+ return this._structArray.int16[this._pos2 + 0];
1010
+ }
1011
+ set x(x) {
1012
+ this._structArray.int16[this._pos2 + 0] = x;
1013
+ }
1014
+ get y() {
1015
+ return this._structArray.int16[this._pos2 + 1];
1016
+ }
1017
+ set y(x) {
1018
+ this._structArray.int16[this._pos2 + 1] = x;
1019
+ }
1020
+ get tileUnitDistanceFromAnchor() {
1021
+ return this._structArray.int16[this._pos2 + 2];
1022
+ }
1023
+ set tileUnitDistanceFromAnchor(x) {
1024
+ this._structArray.int16[this._pos2 + 2] = x;
1025
+ }
1026
+ }
1027
+
1028
+ SymbolLineVertexStruct.prototype.size = 6;
1029
+
1030
+ /**
1031
+ * @private
1032
+ */
1033
+ class SymbolLineVertexArray extends StructArrayLayout3i6 {
1034
+ getx(index) {
1035
+ return this.int16[index * 3 + 0];
1036
+ }
1037
+ gety(index) {
1038
+ return this.int16[index * 3 + 1];
1039
+ }
1040
+ gettileUnitDistanceFromAnchor(index) {
1041
+ return this.int16[index * 3 + 2];
1042
+ }
1043
+ /**
1044
+ * Return the SymbolLineVertexStruct at the given location in the array.
1045
+ * @param {number} index The index of the element.
1046
+ */
1047
+ get(index) {
1048
+ assert(!this.isTransferred);
1049
+ return new SymbolLineVertexStruct(this, index);
1050
+ }
1051
+ }
1052
+
1053
+ register('SymbolLineVertexArray', SymbolLineVertexArray);
1054
+
1055
+ class FeatureIndexStruct extends Struct {
1056
+ get featureIndex() {
1057
+ return this._structArray.uint32[this._pos4 + 0];
1058
+ }
1059
+ set featureIndex(x) {
1060
+ this._structArray.uint32[this._pos4 + 0] = x;
1061
+ }
1062
+ get sourceLayerIndex() {
1063
+ return this._structArray.uint16[this._pos2 + 2];
1064
+ }
1065
+ set sourceLayerIndex(x) {
1066
+ this._structArray.uint16[this._pos2 + 2] = x;
1067
+ }
1068
+ get bucketIndex() {
1069
+ return this._structArray.uint16[this._pos2 + 3];
1070
+ }
1071
+ set bucketIndex(x) {
1072
+ this._structArray.uint16[this._pos2 + 3] = x;
1073
+ }
1074
+ }
1075
+
1076
+ FeatureIndexStruct.prototype.size = 8;
1077
+
1078
+ /**
1079
+ * @private
1080
+ */
1081
+ class FeatureIndexArray extends StructArrayLayout1ul2ui8 {
1082
+ /**
1083
+ * Return the FeatureIndexStruct at the given location in the array.
1084
+ * @param {number} index The index of the element.
1085
+ */
1086
+ get(index) {
1087
+ assert(!this.isTransferred);
1088
+ return new FeatureIndexStruct(this, index);
1089
+ }
1090
+ }
1091
+
1092
+ register('FeatureIndexArray', FeatureIndexArray);
1093
+
1094
+ module.exports = {
1095
+ StructArrayLayout2i4,
1096
+ StructArrayLayout4i8,
1097
+ StructArrayLayout2i4i12,
1098
+ StructArrayLayout4i4ub12,
1099
+ StructArrayLayout8ui16,
1100
+ StructArrayLayout4i4ui16,
1101
+ StructArrayLayout3f12,
1102
+ StructArrayLayout1ul4,
1103
+ StructArrayLayout6i1ul2ui2i24,
1104
+ StructArrayLayout2i2i2i12,
1105
+ StructArrayLayout2ub4,
1106
+ StructArrayLayout2i2ui3ul3ui2f2ub40,
1107
+ StructArrayLayout1f4,
1108
+ StructArrayLayout3i6,
1109
+ StructArrayLayout1ul2ui8,
1110
+ StructArrayLayout3ui6,
1111
+ StructArrayLayout2ui4,
1112
+ StructArrayLayout1ui2,
1113
+ StructArrayLayout2f8,
1114
+ StructArrayLayout4f16,
1115
+ PosArray: StructArrayLayout2i4,
1116
+ RasterBoundsArray: StructArrayLayout4i8,
1117
+ CircleLayoutArray: StructArrayLayout2i4,
1118
+ FillLayoutArray: StructArrayLayout2i4,
1119
+ FillExtrusionLayoutArray: StructArrayLayout2i4i12,
1120
+ HeatmapLayoutArray: StructArrayLayout2i4,
1121
+ LineLayoutArray: StructArrayLayout4i4ub12,
1122
+ PatternLayoutArray: StructArrayLayout8ui16,
1123
+ SymbolLayoutArray: StructArrayLayout4i4ui16,
1124
+ SymbolDynamicLayoutArray: StructArrayLayout3f12,
1125
+ SymbolOpacityArray: StructArrayLayout1ul4,
1126
+ CollisionBoxLayoutArray: StructArrayLayout2i2i2i12,
1127
+ CollisionCircleLayoutArray: StructArrayLayout2i2i2i12,
1128
+ CollisionVertexArray: StructArrayLayout2ub4,
1129
+ TriangleIndexArray: StructArrayLayout3ui6,
1130
+ LineIndexArray: StructArrayLayout2ui4,
1131
+ LineStripIndexArray: StructArrayLayout1ui2,
1132
+
1133
+ CollisionBoxArray,
1134
+ FeatureIndexArray,
1135
+ GlyphOffsetArray,
1136
+ PlacedSymbolArray,
1137
+ SymbolLineVertexArray
1138
+ };