同步操作将从 Gitee 极速下载/Mapbox-GL-JS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Map
and its subsystemsVector tiles are fetched and parsed on WebWorker threads. "Parsing" a vector tile involves:
vector-tile-js
library.WorkerTile
, the Bucket
classes, and ProgramConfiguration
.FeatureIndex
, used for spatial queries (e.g. queryRenderedFeatures
).WorkerTile#parse()
takes a (deserialized) vector tile, fetches additional resources if they're needed (fonts, images), and then creates a Bucket
for each 'family' of style layers that share the same underlying features and 'layout' properties (see group_by_layout.js
).
Bucket is the single point of knowledge about turning vector tiles into WebGL buffers. Each bucket holds the vertex and element array data needed to render its group of style layers (see ArrayGroup). The particular bucket types each know how to populate that data for their layer types.
Once bucket data has been transferred to the main thread, it looks like this:
Tile
|
+- buckets[layer-id]: Bucket
| |
| + ArrayGroup {
| globalProperties: { zoom }
| layoutVertexArray,
| indexArray,
| indexArray2,
| layerData: {
| [style layer id]: {
| programConfiguration,
| paintVertexArray,
| paintPropertyStatistics
| }
| ...
| }
| }
|
+- buckets[...]: Bucket
...
Note that a particular bucket may appear multiple times in tile.buckets
--once for each layer in a given layout 'family'.
Painter#renderPass()
, which delegates to the layer-specific drawXxxx()
methods in src/render/draw_*.js
.drawXxxx()
methods, in turn, render a layer tile by tile, by:
Painter
BufferGroup
) and calling gl.drawElements()
Compiling and caching GL shader programs is managed by the Painter
and ProgramConfiguration
classes. In particular, an instance of ProgramConfiguration
handles, for a given (tile, style layer) pair:
#pragma mapbox
statement in our shader source into either a uniform or attribute, varying, and local variable declaration, depending on whether or not the relevant style property is data-driven.attributes
declared in the shader. (This happens at layout time, on the worker side.)此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。