@antv/l7-layers 2.20.5 → 2.20.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/canvas/index.d.ts +3 -3
- package/es/citybuliding/models/build.d.ts +7 -12
- package/es/citybuliding/models/build.js +22 -11
- package/es/citybuliding/shaders/build_frag.glsl +26 -23
- package/es/citybuliding/shaders/build_vert.glsl +24 -16
- package/es/core/BaseLayer.d.ts +14 -2
- package/es/core/BaseLayer.js +53 -9
- package/es/core/BaseModel.d.ts +1 -1
- package/es/core/BaseModel.js +41 -15
- package/es/core/CommonStyleAttribute.d.ts +4 -2
- package/es/core/CommonStyleAttribute.js +3 -0
- package/es/core/LayerPickService.d.ts +1 -1
- package/es/core/TextureService.d.ts +2 -2
- package/es/core/interface.d.ts +7 -3
- package/es/core/interface.js +0 -1
- package/es/core/line_trangluation.d.ts +1 -1
- package/es/core/shape/arrow.d.ts +1 -1
- package/es/core/shape/extrude.d.ts +1 -1
- package/es/core/triangulation.d.ts +1 -1
- package/es/core/triangulation.js +13 -7
- package/es/core/utils.js +1 -1
- package/es/earth/index.d.ts +1 -1
- package/es/earth/models/atmosphere.d.ts +8 -2
- package/es/earth/models/atmosphere.js +15 -8
- package/es/earth/models/base.d.ts +8 -2
- package/es/earth/models/base.js +21 -12
- package/es/earth/models/bloomsphere.d.ts +8 -2
- package/es/earth/models/bloomsphere.js +15 -8
- package/es/earth/shaders/{atmosphere_frag.glsl → atmosphere/atmosphere_frag.glsl} +9 -6
- package/es/earth/shaders/atmosphere/atmosphere_vert.glsl +22 -0
- package/es/earth/shaders/base/base_frag.glsl +11 -0
- package/es/earth/shaders/base/base_vert.glsl +52 -0
- package/es/earth/shaders/bloomshpere/bloomsphere_frag.glsl +16 -0
- package/es/earth/shaders/bloomshpere/bloomsphere_vert.glsl +19 -0
- package/es/geometry/index.d.ts +2 -2
- package/es/geometry/models/billboard.d.ts +8 -1
- package/es/geometry/models/billboard.js +26 -11
- package/es/geometry/models/plane.d.ts +8 -1
- package/es/geometry/models/plane.js +23 -6
- package/es/geometry/models/sprite.d.ts +12 -2
- package/es/geometry/models/sprite.js +44 -18
- package/es/geometry/shaders/billboard_frag.glsl +11 -6
- package/es/geometry/shaders/billboard_vert.glsl +12 -15
- package/es/geometry/shaders/plane_frag.glsl +14 -10
- package/es/geometry/shaders/plane_vert.glsl +11 -10
- package/es/geometry/shaders/sprite_frag.glsl +11 -7
- package/es/geometry/shaders/sprite_vert.glsl +10 -9
- package/es/heatmap/index.d.ts +3 -3
- package/es/heatmap/models/grid.d.ts +8 -1
- package/es/heatmap/models/grid.js +25 -12
- package/es/heatmap/models/grid3d.d.ts +8 -1
- package/es/heatmap/models/grid3d.js +29 -13
- package/es/heatmap/models/heatmap.d.ts +6 -4
- package/es/heatmap/models/heatmap.js +123 -75
- package/es/heatmap/models/hexagon.d.ts +8 -1
- package/es/heatmap/models/hexagon.js +25 -12
- package/es/heatmap/shaders/grid/grid_frag.glsl +8 -0
- package/es/heatmap/shaders/{grid_vert.glsl → grid/grid_vert.glsl} +15 -15
- package/es/heatmap/shaders/grid3d/grid_3d_frag.glsl +8 -0
- package/{lib/heatmap/shaders/hexagon_3d_vert.glsl → es/heatmap/shaders/grid3d/grid_3d_vert.glsl} +13 -16
- package/es/heatmap/shaders/heatmap/heatmap_3d_frag.glsl +24 -0
- package/es/heatmap/shaders/{heatmap_3d_vert.glsl → heatmap/heatmap_3d_vert.glsl} +19 -9
- package/es/heatmap/shaders/heatmap/heatmap_frag.glsl +52 -0
- package/es/heatmap/shaders/heatmap/heatmap_framebuffer_frag.glsl +16 -0
- package/{lib/heatmap/shaders → es/heatmap/shaders/heatmap}/heatmap_framebuffer_vert.glsl +14 -9
- package/es/heatmap/shaders/heatmap/heatmap_vert.glsl +19 -0
- package/es/heatmap/shaders/hexagon/hexagon_frag.glsl +8 -0
- package/es/heatmap/shaders/{hexagon_vert.glsl → hexagon/hexagon_vert.glsl} +12 -13
- package/es/image/index.d.ts +2 -2
- package/es/image/models/image.d.ts +9 -2
- package/es/image/models/image.js +83 -44
- package/es/image/shaders/image_frag.glsl +34 -7
- package/es/image/shaders/image_vert.glsl +11 -5
- package/es/line/index.d.ts +4 -4
- package/es/line/index.js +2 -1
- package/es/line/models/arc.d.ts +8 -3
- package/es/line/models/arc.js +57 -76
- package/es/line/models/arc_3d.d.ts +8 -3
- package/es/line/models/arc_3d.js +46 -57
- package/es/line/models/flow.d.ts +8 -2
- package/es/line/models/flow.js +14 -12
- package/es/line/models/great_circle.d.ts +8 -3
- package/es/line/models/great_circle.js +40 -29
- package/es/line/models/index.d.ts +1 -1
- package/es/line/models/index.js +3 -6
- package/es/line/models/line.d.ts +8 -3
- package/es/line/models/line.js +67 -140
- package/es/line/models/{simpleLine.d.ts → simple_line.d.ts} +8 -2
- package/es/line/models/simple_line.js +204 -0
- package/es/line/models/wall.d.ts +8 -3
- package/es/line/models/wall.js +35 -27
- package/es/line/shaders/{line_arc_frag.glsl → arc/line_arc_frag.glsl} +36 -26
- package/es/line/shaders/{line_arc_vert.glsl → arc/line_arc_vert.glsl} +52 -22
- package/es/line/shaders/{line_arc_3d_frag.glsl → arc3d/line_arc_3d_frag.glsl} +32 -24
- package/{lib/line/shaders → es/line/shaders/arc3d}/line_arc_3d_vert.glsl +37 -27
- package/es/line/shaders/flow/flow_line_frag.glsl +5 -4
- package/es/line/shaders/flow/flow_line_vert.glsl +17 -18
- package/es/line/shaders/{line_arc_great_circle_frag.glsl → greatCircle/line_arc_great_circle_frag.glsl} +30 -30
- package/{lib/line/shaders → es/line/shaders/greatCircle}/line_arc_great_circle_vert.glsl +43 -40
- package/es/line/shaders/{line_frag.glsl → line/line_frag.glsl} +55 -28
- package/es/line/shaders/line/line_vert.glsl +114 -0
- package/es/line/shaders/simple/simpleline_frag.glsl +27 -3
- package/es/line/shaders/simple/simpleline_vert.glsl +20 -20
- package/es/line/shaders/wall/wall_frag.glsl +31 -26
- package/es/line/shaders/wall/wall_vert.glsl +29 -22
- package/es/mask/index.d.ts +2 -2
- package/es/mask/models/fill.d.ts +1 -1
- package/es/plugins/DataMappingPlugin.d.ts +1 -1
- package/es/plugins/DataMappingPlugin.js +1 -3
- package/es/plugins/DataSourcePlugin.d.ts +1 -1
- package/es/plugins/FeatureScalePlugin.d.ts +1 -1
- package/es/plugins/FeatureScalePlugin.js +14 -3
- package/es/plugins/LayerAnimateStylePlugin.d.ts +1 -1
- package/es/plugins/LayerMaskPlugin.d.ts +1 -1
- package/es/plugins/LayerModelPlugin.d.ts +1 -1
- package/es/plugins/LayerStylePlugin.d.ts +1 -1
- package/es/plugins/LightingPlugin.d.ts +1 -1
- package/es/plugins/MultiPassRendererPlugin.d.ts +1 -1
- package/es/plugins/PixelPickingPlugin.d.ts +6 -2
- package/es/plugins/PixelPickingPlugin.js +36 -49
- package/es/plugins/RegisterStyleAttributePlugin.d.ts +1 -1
- package/es/plugins/ShaderUniformPlugin.d.ts +1 -1
- package/es/plugins/ShaderUniformPlugin.js +11 -6
- package/es/plugins/UpdateModelPlugin.d.ts +1 -1
- package/es/plugins/UpdateStyleAttributePlugin.d.ts +1 -1
- package/es/point/index.d.ts +2 -2
- package/es/point/index.js +1 -0
- package/es/point/models/billboard_point.d.ts +9 -3
- package/es/point/models/billboard_point.js +18 -18
- package/es/point/models/earthExtrude.d.ts +7 -12
- package/es/point/models/earthExtrude.js +21 -13
- package/es/point/models/earthFill.d.ts +8 -3
- package/es/point/models/earthFill.js +18 -30
- package/es/point/models/extrude.d.ts +1 -4
- package/es/point/models/extrude.js +2 -11
- package/es/point/models/fill.d.ts +8 -2
- package/es/point/models/fill.js +33 -84
- package/es/point/models/{fillmage.d.ts → fillImage.d.ts} +8 -2
- package/es/point/models/{fillmage.js → fillImage.js} +23 -15
- package/es/point/models/image.d.ts +8 -1
- package/es/point/models/image.js +31 -17
- package/es/point/models/index.js +1 -1
- package/es/point/models/normal.d.ts +9 -3
- package/es/point/models/normal.js +13 -30
- package/es/point/models/radar.d.ts +8 -2
- package/es/point/models/radar.js +23 -45
- package/es/point/models/text.d.ts +9 -2
- package/es/point/models/text.js +31 -32
- package/{lib/point/shaders → es/point/shaders/billboard}/billboard_point_frag.glsl +17 -13
- package/{lib/point/shaders → es/point/shaders/billboard}/billboard_point_vert.glsl +13 -14
- package/es/point/shaders/earthExtrude/earthExtrude_frag.glsl +36 -0
- package/{lib/point/shaders/earth/extrude_vert.glsl → es/point/shaders/earthExtrude/earthExtrude_vert.glsl} +25 -22
- package/{lib/point/shaders/earth/fill_frag.glsl → es/point/shaders/earthFill/earthFill_frag.glsl} +20 -18
- package/{lib/point/shaders/earth/fill_vert.glsl → es/point/shaders/earthFill/earthFill_vert.glsl} +17 -22
- package/es/point/shaders/extrude/extrude_vert.glsl +0 -3
- package/{lib/point/shaders → es/point/shaders/fill}/fill_frag.glsl +18 -1
- package/es/point/shaders/{fill_vert.glsl → fill/fill_vert.glsl} +5 -4
- package/es/point/shaders/fillImage/fillImage_frag.glsl +24 -0
- package/{lib/point/shaders/image → es/point/shaders/fillImage}/fillImage_vert.glsl +15 -17
- package/es/point/shaders/image/image_frag.glsl +42 -0
- package/{lib/point/shaders → es/point/shaders/image}/image_vert.glsl +14 -13
- package/es/point/shaders/radar/radar_frag.glsl +19 -14
- package/es/point/shaders/radar/radar_vert.glsl +21 -24
- package/es/point/shaders/text/text_frag.glsl +44 -0
- package/es/point/shaders/{text_vert.glsl → text/text_vert.glsl} +19 -17
- package/es/point/shape/extrude.d.ts +1 -1
- package/es/polygon/index.d.ts +2 -2
- package/es/polygon/models/extrude.d.ts +9 -9
- package/es/polygon/models/extrude.js +38 -15
- package/es/polygon/models/extrusion.d.ts +8 -1
- package/es/polygon/models/extrusion.js +24 -7
- package/es/polygon/models/fill.d.ts +9 -4
- package/es/polygon/models/fill.js +26 -13
- package/es/polygon/models/ocean.d.ts +9 -7
- package/es/polygon/models/ocean.js +30 -14
- package/es/polygon/models/water.d.ts +9 -4
- package/es/polygon/models/water.js +26 -10
- package/es/polygon/shaders/extrude/polygon_extrude_frag.glsl +14 -14
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +17 -15
- package/es/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +18 -18
- package/es/polygon/shaders/extrude/polygon_extrude_vert.glsl +18 -24
- package/es/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +19 -15
- package/es/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +20 -24
- package/es/polygon/shaders/extrusion/polygon_extrusion_frag.glsl +4 -8
- package/es/polygon/shaders/extrusion/polygon_extrusion_vert.glsl +7 -16
- package/es/polygon/shaders/fill/fill_frag.glsl +7 -0
- package/es/polygon/shaders/fill/fill_linear_frag.glsl +20 -0
- package/{lib/polygon/shaders/polygon_linear_vert.glsl → es/polygon/shaders/fill/fill_linear_vert.glsl} +12 -11
- package/es/polygon/shaders/{polygon_vert.glsl → fill/fill_vert.glsl} +6 -6
- package/es/polygon/shaders/{water/polygon_ocean_frag.glsl → ocean/ocean_frag.glsl} +13 -13
- package/es/polygon/shaders/ocean/ocean_vert.glsl +22 -0
- package/es/polygon/shaders/water/polygon_water_frag.glsl +14 -12
- package/es/polygon/shaders/water/polygon_water_vert.glsl +10 -10
- package/es/raster/buffers/triangulation.d.ts +1 -1
- package/es/raster/index.d.ts +2 -2
- package/es/raster/models/raster.d.ts +9 -8
- package/es/raster/models/raster.js +54 -38
- package/es/raster/models/rasterRgb.d.ts +9 -7
- package/es/raster/models/rasterRgb.js +36 -19
- package/es/raster/models/rasterTerrainRgb.d.ts +1 -1
- package/es/raster/models/rasterTerrainRgb.js +2 -2
- package/es/raster/shaders/raster/raster_2d_frag.glsl +34 -0
- package/es/raster/shaders/raster/raster_2d_vert.glsl +21 -0
- package/es/raster/shaders/rgb/raster_rgb_frag.glsl +26 -0
- package/es/raster/shaders/rgb/raster_rgb_vert.glsl +21 -0
- package/es/tile/core/BaseLayer.d.ts +2 -2
- package/es/tile/core/TileDebugLayer.d.ts +1 -1
- package/es/tile/interaction/getRasterData.d.ts +2 -2
- package/es/tile/interaction/utils.d.ts +1 -1
- package/es/tile/interface.d.ts +2 -2
- package/es/tile/service/TileLayerService.d.ts +2 -2
- package/es/tile/service/TilePickService.d.ts +2 -2
- package/es/tile/service/TileSourceService.d.ts +1 -1
- package/es/tile/tile/Tile.d.ts +2 -3
- package/es/tile/tile/VectorTile.d.ts +1 -1
- package/es/tile/tile/index.d.ts +1 -1
- package/es/tile/utils/constants.js +1 -1
- package/es/tile/utils/utils.d.ts +1 -1
- package/es/utils/blend.d.ts +1 -1
- package/es/utils/multiPassRender.d.ts +1 -1
- package/es/utils/stencil.d.ts +1 -1
- package/es/wind/index.d.ts +3 -3
- package/es/wind/models/wind.d.ts +1 -1
- package/lib/citybuliding/models/build.js +22 -11
- package/lib/citybuliding/shaders/build_frag.glsl +26 -23
- package/lib/citybuliding/shaders/build_vert.glsl +24 -16
- package/lib/core/BaseLayer.js +53 -9
- package/lib/core/BaseModel.js +41 -15
- package/lib/core/CommonStyleAttribute.js +3 -0
- package/lib/core/triangulation.js +12 -6
- package/lib/core/utils.js +1 -1
- package/lib/earth/models/atmosphere.js +15 -8
- package/lib/earth/models/base.js +21 -12
- package/lib/earth/models/bloomsphere.js +15 -8
- package/lib/earth/shaders/{atmosphere_frag.glsl → atmosphere/atmosphere_frag.glsl} +9 -6
- package/lib/earth/shaders/atmosphere/atmosphere_vert.glsl +22 -0
- package/lib/earth/shaders/base/base_frag.glsl +11 -0
- package/lib/earth/shaders/base/base_vert.glsl +52 -0
- package/lib/earth/shaders/bloomshpere/bloomsphere_frag.glsl +16 -0
- package/lib/earth/shaders/bloomshpere/bloomsphere_vert.glsl +19 -0
- package/lib/geometry/models/billboard.js +26 -11
- package/lib/geometry/models/plane.js +23 -6
- package/lib/geometry/models/sprite.js +44 -18
- package/lib/geometry/shaders/billboard_frag.glsl +11 -6
- package/lib/geometry/shaders/billboard_vert.glsl +12 -15
- package/lib/geometry/shaders/plane_frag.glsl +14 -10
- package/lib/geometry/shaders/plane_vert.glsl +11 -10
- package/lib/geometry/shaders/sprite_frag.glsl +11 -7
- package/lib/geometry/shaders/sprite_vert.glsl +10 -9
- package/lib/heatmap/models/grid.js +25 -12
- package/lib/heatmap/models/grid3d.js +29 -13
- package/lib/heatmap/models/heatmap.js +122 -74
- package/lib/heatmap/models/hexagon.js +25 -12
- package/lib/heatmap/shaders/grid/grid_frag.glsl +8 -0
- package/lib/heatmap/shaders/{grid_vert.glsl → grid/grid_vert.glsl} +15 -15
- package/lib/heatmap/shaders/grid3d/grid_3d_frag.glsl +8 -0
- package/{es/heatmap/shaders/hexagon_3d_vert.glsl → lib/heatmap/shaders/grid3d/grid_3d_vert.glsl} +13 -16
- package/lib/heatmap/shaders/heatmap/heatmap_3d_frag.glsl +24 -0
- package/lib/heatmap/shaders/{heatmap_3d_vert.glsl → heatmap/heatmap_3d_vert.glsl} +19 -9
- package/lib/heatmap/shaders/heatmap/heatmap_frag.glsl +52 -0
- package/lib/heatmap/shaders/heatmap/heatmap_framebuffer_frag.glsl +16 -0
- package/{es/heatmap/shaders → lib/heatmap/shaders/heatmap}/heatmap_framebuffer_vert.glsl +14 -9
- package/lib/heatmap/shaders/heatmap/heatmap_vert.glsl +19 -0
- package/lib/heatmap/shaders/hexagon/hexagon_frag.glsl +8 -0
- package/lib/heatmap/shaders/{hexagon_vert.glsl → hexagon/hexagon_vert.glsl} +12 -13
- package/lib/image/models/image.js +83 -44
- package/lib/image/shaders/image_frag.glsl +34 -7
- package/lib/image/shaders/image_vert.glsl +11 -5
- package/lib/line/index.js +2 -1
- package/lib/line/models/arc.js +57 -76
- package/lib/line/models/arc_3d.js +47 -59
- package/lib/line/models/flow.js +14 -12
- package/lib/line/models/great_circle.js +40 -29
- package/lib/line/models/index.js +4 -7
- package/lib/line/models/line.js +67 -142
- package/lib/line/models/{simpleLine.js → simple_line.js} +84 -74
- package/lib/line/models/wall.js +35 -27
- package/lib/line/shaders/{line_arc_frag.glsl → arc/line_arc_frag.glsl} +36 -26
- package/lib/line/shaders/{line_arc_vert.glsl → arc/line_arc_vert.glsl} +52 -22
- package/lib/line/shaders/{line_arc_3d_frag.glsl → arc3d/line_arc_3d_frag.glsl} +32 -24
- package/{es/line/shaders → lib/line/shaders/arc3d}/line_arc_3d_vert.glsl +37 -27
- package/lib/line/shaders/flow/flow_line_frag.glsl +5 -4
- package/lib/line/shaders/flow/flow_line_vert.glsl +17 -18
- package/lib/line/shaders/{line_arc_great_circle_frag.glsl → greatCircle/line_arc_great_circle_frag.glsl} +30 -30
- package/{es/line/shaders → lib/line/shaders/greatCircle}/line_arc_great_circle_vert.glsl +43 -40
- package/lib/line/shaders/{line_frag.glsl → line/line_frag.glsl} +55 -28
- package/lib/line/shaders/line/line_vert.glsl +114 -0
- package/lib/line/shaders/simple/simpleline_frag.glsl +27 -3
- package/lib/line/shaders/simple/simpleline_vert.glsl +20 -20
- package/lib/line/shaders/wall/wall_frag.glsl +31 -26
- package/lib/line/shaders/wall/wall_vert.glsl +29 -22
- package/lib/plugins/DataMappingPlugin.js +1 -3
- package/lib/plugins/FeatureScalePlugin.js +14 -3
- package/lib/plugins/PixelPickingPlugin.js +35 -48
- package/lib/plugins/ShaderUniformPlugin.js +11 -6
- package/lib/point/index.js +1 -0
- package/lib/point/models/billboard_point.js +18 -18
- package/lib/point/models/earthExtrude.js +21 -13
- package/lib/point/models/earthFill.js +18 -30
- package/lib/point/models/extrude.js +2 -11
- package/lib/point/models/fill.js +33 -84
- package/lib/point/models/{fillmage.js → fillImage.js} +24 -17
- package/lib/point/models/image.js +31 -17
- package/lib/point/models/index.js +2 -2
- package/lib/point/models/normal.js +13 -30
- package/lib/point/models/radar.js +23 -45
- package/lib/point/models/text.js +31 -32
- package/{es/point/shaders → lib/point/shaders/billboard}/billboard_point_frag.glsl +17 -13
- package/{es/point/shaders → lib/point/shaders/billboard}/billboard_point_vert.glsl +13 -14
- package/lib/point/shaders/earthExtrude/earthExtrude_frag.glsl +36 -0
- package/{es/point/shaders/earth/extrude_vert.glsl → lib/point/shaders/earthExtrude/earthExtrude_vert.glsl} +25 -22
- package/{es/point/shaders/earth/fill_frag.glsl → lib/point/shaders/earthFill/earthFill_frag.glsl} +20 -18
- package/{es/point/shaders/earth/fill_vert.glsl → lib/point/shaders/earthFill/earthFill_vert.glsl} +17 -22
- package/lib/point/shaders/extrude/extrude_vert.glsl +0 -3
- package/{es/point/shaders → lib/point/shaders/fill}/fill_frag.glsl +18 -1
- package/lib/point/shaders/{fill_vert.glsl → fill/fill_vert.glsl} +5 -4
- package/lib/point/shaders/fillImage/fillImage_frag.glsl +24 -0
- package/{es/point/shaders/image → lib/point/shaders/fillImage}/fillImage_vert.glsl +15 -17
- package/lib/point/shaders/image/image_frag.glsl +42 -0
- package/{es/point/shaders → lib/point/shaders/image}/image_vert.glsl +14 -13
- package/lib/point/shaders/radar/radar_frag.glsl +19 -14
- package/lib/point/shaders/radar/radar_vert.glsl +21 -24
- package/lib/point/shaders/text/text_frag.glsl +44 -0
- package/lib/point/shaders/{text_vert.glsl → text/text_vert.glsl} +19 -17
- package/lib/polygon/models/extrude.js +38 -15
- package/lib/polygon/models/extrusion.js +24 -7
- package/lib/polygon/models/fill.js +26 -13
- package/lib/polygon/models/ocean.js +30 -14
- package/lib/polygon/models/water.js +26 -10
- package/lib/polygon/shaders/extrude/polygon_extrude_frag.glsl +14 -14
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_frag.glsl +17 -15
- package/lib/polygon/shaders/extrude/polygon_extrude_picklight_vert.glsl +18 -18
- package/lib/polygon/shaders/extrude/polygon_extrude_vert.glsl +18 -24
- package/lib/polygon/shaders/extrude/polygon_extrudetex_frag.glsl +19 -15
- package/lib/polygon/shaders/extrude/polygon_extrudetex_vert.glsl +20 -24
- package/lib/polygon/shaders/extrusion/polygon_extrusion_frag.glsl +4 -8
- package/lib/polygon/shaders/extrusion/polygon_extrusion_vert.glsl +7 -16
- package/lib/polygon/shaders/fill/fill_frag.glsl +7 -0
- package/lib/polygon/shaders/fill/fill_linear_frag.glsl +20 -0
- package/{es/polygon/shaders/polygon_linear_vert.glsl → lib/polygon/shaders/fill/fill_linear_vert.glsl} +12 -11
- package/lib/polygon/shaders/{polygon_vert.glsl → fill/fill_vert.glsl} +6 -6
- package/lib/polygon/shaders/{water/polygon_ocean_frag.glsl → ocean/ocean_frag.glsl} +13 -13
- package/lib/polygon/shaders/ocean/ocean_vert.glsl +22 -0
- package/lib/polygon/shaders/water/polygon_water_frag.glsl +14 -12
- package/lib/polygon/shaders/water/polygon_water_vert.glsl +10 -10
- package/lib/raster/models/raster.js +54 -38
- package/lib/raster/models/rasterRgb.js +36 -19
- package/lib/raster/models/rasterTerrainRgb.js +2 -2
- package/lib/raster/shaders/raster/raster_2d_frag.glsl +34 -0
- package/lib/raster/shaders/raster/raster_2d_vert.glsl +21 -0
- package/lib/raster/shaders/rgb/raster_rgb_frag.glsl +26 -0
- package/lib/raster/shaders/rgb/raster_rgb_vert.glsl +21 -0
- package/lib/tile/utils/constants.js +1 -1
- package/package.json +7 -7
- package/es/earth/shaders/atmosphere_vert.glsl +0 -26
- package/es/earth/shaders/base_frag.glsl +0 -13
- package/es/earth/shaders/base_vert.glsl +0 -52
- package/es/earth/shaders/bloomsphere_frag.glsl +0 -15
- package/es/earth/shaders/bloomsphere_vert.glsl +0 -20
- package/es/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
- package/es/heatmap/shaders/heatmap_frag.glsl +0 -47
- package/es/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
- package/es/heatmap/shaders/heatmap_vert.glsl +0 -10
- package/es/heatmap/shaders/hexagon_frag.glsl +0 -12
- package/es/line/models/earthArc_3d.d.ts +0 -17
- package/es/line/models/earthArc_3d.js +0 -285
- package/es/line/models/linearline.d.ts +0 -11
- package/es/line/models/linearline.js +0 -241
- package/es/line/models/simpleLine.js +0 -194
- package/es/line/shaders/arc_chunks.vert.glsl +0 -21
- package/es/line/shaders/dash/arc_dash_frag.glsl +0 -21
- package/es/line/shaders/dash/arc_dash_vert.glsl +0 -102
- package/es/line/shaders/dash/line_dash_frag.glsl +0 -27
- package/es/line/shaders/dash/line_dash_vert.glsl +0 -82
- package/es/line/shaders/line_arc2d_vert.glsl +0 -114
- package/es/line/shaders/line_bezier_vert.glsl +0 -85
- package/es/line/shaders/line_vert.glsl +0 -165
- package/es/line/shaders/linear/arc3d_linear_frag.glsl +0 -32
- package/es/line/shaders/linear/arc3d_linear_vert.glsl +0 -161
- package/es/line/shaders/linear/arc_linear_frag.glsl +0 -10
- package/es/line/shaders/linear/arc_linear_vert.glsl +0 -98
- package/es/line/shaders/linear/line_linear_frag.glsl +0 -25
- package/es/line/shaders/linearLine/line_linear_frag.glsl +0 -8
- package/es/line/shaders/linearLine/line_linear_vert.glsl +0 -93
- package/es/line/shaders/simple/simpleline_linear_frag.glsl +0 -8
- package/es/point/shaders/animate/wave_frag.glsl +0 -55
- package/es/point/shaders/earth/extrude_frag.glsl +0 -32
- package/es/point/shaders/image/fillImage_frag.glsl +0 -18
- package/es/point/shaders/image_frag.glsl +0 -37
- package/es/point/shaders/text_frag.glsl +0 -39
- package/es/polygon/shaders/polygon_frag.glsl +0 -7
- package/es/polygon/shaders/polygon_linear_frag.glsl +0 -15
- package/es/polygon/shaders/water/polygon_ocean_vert.glsl +0 -16
- package/es/raster/shaders/raster_2d_frag.glsl +0 -32
- package/es/raster/shaders/raster_2d_vert.glsl +0 -13
- package/es/raster/shaders/raster_frag.glsl +0 -11
- package/es/raster/shaders/raster_rgb_frag.glsl +0 -20
- package/es/raster/shaders/raster_vert.glsl +0 -34
- package/lib/earth/shaders/atmosphere_vert.glsl +0 -26
- package/lib/earth/shaders/base_frag.glsl +0 -13
- package/lib/earth/shaders/base_vert.glsl +0 -52
- package/lib/earth/shaders/bloomsphere_frag.glsl +0 -15
- package/lib/earth/shaders/bloomsphere_vert.glsl +0 -20
- package/lib/heatmap/shaders/heatmap_3d_frag.glsl +0 -14
- package/lib/heatmap/shaders/heatmap_frag.glsl +0 -47
- package/lib/heatmap/shaders/heatmap_framebuffer_frag.glsl +0 -10
- package/lib/heatmap/shaders/heatmap_vert.glsl +0 -10
- package/lib/heatmap/shaders/hexagon_frag.glsl +0 -12
- package/lib/line/models/earthArc_3d.js +0 -291
- package/lib/line/models/linearline.js +0 -247
- package/lib/line/shaders/arc_chunks.vert.glsl +0 -21
- package/lib/line/shaders/dash/arc_dash_frag.glsl +0 -21
- package/lib/line/shaders/dash/arc_dash_vert.glsl +0 -102
- package/lib/line/shaders/dash/line_dash_frag.glsl +0 -27
- package/lib/line/shaders/dash/line_dash_vert.glsl +0 -82
- package/lib/line/shaders/line_arc2d_vert.glsl +0 -114
- package/lib/line/shaders/line_bezier_vert.glsl +0 -85
- package/lib/line/shaders/line_vert.glsl +0 -165
- package/lib/line/shaders/linear/arc3d_linear_frag.glsl +0 -32
- package/lib/line/shaders/linear/arc3d_linear_vert.glsl +0 -161
- package/lib/line/shaders/linear/arc_linear_frag.glsl +0 -10
- package/lib/line/shaders/linear/arc_linear_vert.glsl +0 -98
- package/lib/line/shaders/linear/line_linear_frag.glsl +0 -25
- package/lib/line/shaders/linearLine/line_linear_frag.glsl +0 -8
- package/lib/line/shaders/linearLine/line_linear_vert.glsl +0 -93
- package/lib/line/shaders/simple/simpleline_linear_frag.glsl +0 -8
- package/lib/point/shaders/animate/wave_frag.glsl +0 -55
- package/lib/point/shaders/earth/extrude_frag.glsl +0 -32
- package/lib/point/shaders/image/fillImage_frag.glsl +0 -18
- package/lib/point/shaders/image_frag.glsl +0 -37
- package/lib/point/shaders/text_frag.glsl +0 -39
- package/lib/polygon/shaders/polygon_frag.glsl +0 -7
- package/lib/polygon/shaders/polygon_linear_frag.glsl +0 -15
- package/lib/polygon/shaders/water/polygon_ocean_vert.glsl +0 -16
- package/lib/raster/shaders/raster_2d_frag.glsl +0 -32
- package/lib/raster/shaders/raster_2d_vert.glsl +0 -13
- package/lib/raster/shaders/raster_frag.glsl +0 -11
- package/lib/raster/shaders/raster_rgb_frag.glsl +0 -20
- package/lib/raster/shaders/raster_vert.glsl +0 -34
- /package/es/point/shaders/{normal_frag.glsl → normal/normal_frag.glsl} +0 -0
- /package/es/point/shaders/{normal_vert.glsl → normal/normal_vert.glsl} +0 -0
- /package/es/raster/shaders/{raster_terrain_rgb_frag.glsl → terrain/terrain_rgb_frag.glsl} +0 -0
- /package/es/raster/shaders/{rater_terrain_rgb_vert.glsl → terrain/terrain_rgb_vert.glsl} +0 -0
- /package/lib/point/shaders/{normal_frag.glsl → normal/normal_frag.glsl} +0 -0
- /package/lib/point/shaders/{normal_vert.glsl → normal/normal_vert.glsl} +0 -0
- /package/lib/raster/shaders/{raster_terrain_rgb_frag.glsl → terrain/terrain_rgb_frag.glsl} +0 -0
- /package/lib/raster/shaders/{rater_terrain_rgb_vert.glsl → terrain/terrain_rgb_vert.glsl} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
layout(std140) uniform commonUniforms {
|
|
2
|
+
vec2 u_textSize;
|
|
3
|
+
float u_raisingHeight;
|
|
4
|
+
float u_heightfixed;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
uniform sampler2D u_texture;
|
|
8
|
+
|
|
9
|
+
in vec4 v_color;
|
|
10
|
+
in vec2 v_uv;
|
|
11
|
+
in float v_opacity;
|
|
12
|
+
|
|
13
|
+
#pragma include "picking"
|
|
14
|
+
|
|
15
|
+
out vec4 outputColor;
|
|
16
|
+
|
|
17
|
+
void main(){
|
|
18
|
+
vec2 pos = v_uv / u_textSize + gl_PointCoord / u_textSize * 64.;
|
|
19
|
+
vec4 textureColor;
|
|
20
|
+
|
|
21
|
+
// Y = 0.299R + 0.587G + 0.114B // 亮度提取
|
|
22
|
+
|
|
23
|
+
textureColor = texture(SAMPLER_2D(u_texture), pos);
|
|
24
|
+
|
|
25
|
+
// Tip: 去除边缘部分 mipmap 导致的混合变暗
|
|
26
|
+
float fragmengTocenter = distance(vec2(0.5), gl_PointCoord);
|
|
27
|
+
if(fragmengTocenter >= 0.5) {
|
|
28
|
+
float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b;
|
|
29
|
+
textureColor.a *= luma;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if(all(lessThan(v_color, vec4(1.0+0.00001))) && all(greaterThan(v_color, vec4(1.0-0.00001))) || v_color==vec4(1.0)){
|
|
33
|
+
outputColor= textureColor;
|
|
34
|
+
}else {
|
|
35
|
+
outputColor= step(0.01, textureColor.z) * v_color;
|
|
36
|
+
}
|
|
37
|
+
outputColor.a *= v_opacity;
|
|
38
|
+
if (outputColor.a < 0.01) {
|
|
39
|
+
discard;
|
|
40
|
+
}
|
|
41
|
+
outputColor = filterColor(outputColor);
|
|
42
|
+
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
layout(location = 0) in vec3 a_Position;
|
|
2
|
+
layout(location = 1) in vec4 a_Color;
|
|
3
|
+
layout(location = 9) in float a_Size;
|
|
4
|
+
layout(location = 14) in vec2 a_Uv;
|
|
5
|
+
|
|
6
|
+
layout(std140) uniform commonUniforms {
|
|
7
|
+
vec2 u_textSize;
|
|
8
|
+
float u_raisingHeight;
|
|
9
|
+
float u_heightfixed;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
out vec4 v_color;
|
|
13
|
+
out vec2 v_uv;
|
|
14
|
+
out float v_opacity;
|
|
14
15
|
|
|
15
16
|
#pragma include "projection"
|
|
16
17
|
#pragma include "picking"
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
uniform
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
layout(std140) uniform commonUniorm{
|
|
3
|
+
float u_additive;
|
|
4
|
+
float u_size_unit;
|
|
5
|
+
float u_speed: 1.0;
|
|
6
|
+
float u_time;
|
|
7
|
+
};
|
|
8
|
+
in vec4 v_data;
|
|
9
|
+
in vec4 v_color;
|
|
10
|
+
in float v_radius;
|
|
11
|
+
in vec2 v_extrude;
|
|
9
12
|
#pragma include "sdf_2d"
|
|
10
13
|
#pragma include "picking"
|
|
11
14
|
|
|
15
|
+
out vec4 outputColor;
|
|
16
|
+
|
|
12
17
|
void main() {
|
|
13
18
|
|
|
14
19
|
lowp float antialiasblur = v_data.z;
|
|
@@ -19,19 +24,19 @@ void main() {
|
|
|
19
24
|
|
|
20
25
|
float opacity_t = smoothstep(0.0, antialiasblur, outer_df);
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
outputColor = vec4(v_color.rgb, v_color.a);
|
|
23
28
|
|
|
24
29
|
if(u_additive > 0.0) {
|
|
25
|
-
|
|
30
|
+
outputColor *= opacity_t;
|
|
26
31
|
} else {
|
|
27
|
-
|
|
32
|
+
outputColor.a *= opacity_t;
|
|
28
33
|
}
|
|
29
34
|
|
|
30
|
-
if(
|
|
31
|
-
|
|
35
|
+
if(outputColor.a > 0.0) {
|
|
36
|
+
outputColor = filterColor(outputColor);
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
vec2 extrude =
|
|
39
|
+
vec2 extrude = v_extrude;
|
|
35
40
|
vec2 dir = normalize(extrude);
|
|
36
41
|
vec2 baseDir = vec2(1.0, 0.0);
|
|
37
42
|
float pi = 3.14159265359;
|
|
@@ -43,5 +48,5 @@ void main() {
|
|
|
43
48
|
radar_v = 1.0 - (radar_v - 0.99)/0.01;
|
|
44
49
|
}
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
outputColor.a *= radar_v;
|
|
47
52
|
}
|
|
@@ -1,50 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
uniform
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
layout(location = 0) in vec3 a_Position;
|
|
2
|
+
layout(location = 1) in vec4 a_Color;
|
|
3
|
+
layout(location = 11) in vec4 a_ExtrudeAndSize;
|
|
4
|
+
|
|
5
|
+
layout(std140) uniform commonUniorm {
|
|
6
|
+
float u_additive;
|
|
7
|
+
float u_size_unit;
|
|
8
|
+
float u_speed: 1.0;
|
|
9
|
+
float u_time;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
out vec4 v_data;
|
|
13
|
+
out vec4 v_color;
|
|
14
|
+
out float v_radius;
|
|
15
|
+
out vec2 v_extrude;
|
|
16
16
|
|
|
17
17
|
#pragma include "projection"
|
|
18
18
|
#pragma include "picking"
|
|
19
19
|
|
|
20
20
|
void main() {
|
|
21
|
-
vec3 extrude =
|
|
22
|
-
float newSize = setPickingSize(
|
|
21
|
+
vec3 extrude = a_ExtrudeAndSize.xyz;
|
|
22
|
+
float newSize = setPickingSize(a_ExtrudeAndSize.w);
|
|
23
23
|
|
|
24
24
|
float time = u_time * u_speed;
|
|
25
25
|
mat2 rotateMatrix = mat2(
|
|
26
26
|
cos(time), sin(time),
|
|
27
27
|
-sin(time), cos(time)
|
|
28
28
|
);
|
|
29
|
-
|
|
29
|
+
v_extrude = rotateMatrix * a_ExtrudeAndSize.xy;
|
|
30
30
|
|
|
31
|
-
// unpack color(vec2)
|
|
32
31
|
v_color = a_Color;
|
|
32
|
+
v_color.a *= opacity;
|
|
33
33
|
|
|
34
|
-
// anti-alias
|
|
35
34
|
float blur = 0.0;
|
|
36
|
-
float antialiasblur = -max(2.0 / u_DevicePixelRatio /
|
|
35
|
+
float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_ExtrudeAndSize.w, blur);
|
|
37
36
|
|
|
38
|
-
if(u_size_unit == 1) {
|
|
37
|
+
if(u_size_unit == 1.) {
|
|
39
38
|
newSize = newSize * u_PixelsPerMeter.z;
|
|
40
39
|
}
|
|
41
|
-
// radius(16-bit)
|
|
42
40
|
v_radius = newSize;
|
|
43
41
|
|
|
44
42
|
vec2 offset = (extrude.xy * (newSize));
|
|
45
43
|
vec3 aPosition = a_Position;
|
|
46
44
|
|
|
47
|
-
// 不以米为实际单位
|
|
48
45
|
offset = project_pixel(offset);
|
|
49
46
|
|
|
50
47
|
v_data = vec4(extrude.x, extrude.y, antialiasblur, -1.0);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#define SDF_PX 8.0
|
|
2
|
+
#define EDGE_GAMMA 0.105
|
|
3
|
+
#define FONT_SIZE 48.0
|
|
4
|
+
|
|
5
|
+
uniform sampler2D u_sdf_map;
|
|
6
|
+
layout(std140) uniform commonUniforms {
|
|
7
|
+
vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
8
|
+
vec2 u_sdf_map_size;
|
|
9
|
+
float u_raisingHeight: 0.0;
|
|
10
|
+
float u_stroke_width : 2;
|
|
11
|
+
float u_gamma_scale : 0.5;
|
|
12
|
+
float u_halo_blur : 0.5;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
in vec4 v_color;
|
|
16
|
+
in vec4 v_stroke_color;
|
|
17
|
+
in vec2 v_uv;
|
|
18
|
+
in float v_gamma_scale;
|
|
19
|
+
in float v_fontScale;
|
|
20
|
+
out vec4 outputColor;
|
|
21
|
+
|
|
22
|
+
#pragma include "picking"
|
|
23
|
+
void main() {
|
|
24
|
+
// get style data mapping
|
|
25
|
+
|
|
26
|
+
// get sdf from atlas
|
|
27
|
+
float dist = texture(SAMPLER_2D(u_sdf_map), v_uv).a;
|
|
28
|
+
|
|
29
|
+
lowp float buff = (6.0 - u_stroke_width / v_fontScale) / SDF_PX;
|
|
30
|
+
highp float gamma = (u_halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (v_fontScale * u_gamma_scale) / 1.0;
|
|
31
|
+
|
|
32
|
+
highp float gamma_scaled = gamma * v_gamma_scale;
|
|
33
|
+
|
|
34
|
+
highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);
|
|
35
|
+
|
|
36
|
+
outputColor = mix(v_color, v_stroke_color, smoothstep(0., 0.5, 1.- dist));
|
|
37
|
+
|
|
38
|
+
outputColor.a *= alpha;
|
|
39
|
+
// 作为 mask 模板时需要丢弃透明的像素
|
|
40
|
+
if (outputColor.a < 0.01) {
|
|
41
|
+
discard;
|
|
42
|
+
}
|
|
43
|
+
outputColor = filterColor(outputColor);
|
|
44
|
+
}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
#define SDF_PX 8.0
|
|
2
2
|
#define EDGE_GAMMA 0.105
|
|
3
3
|
#define FONT_SIZE 24.0
|
|
4
|
-
attribute vec3 a_Position;
|
|
5
|
-
attribute vec2 a_tex;
|
|
6
|
-
attribute vec2 a_textOffsets;
|
|
7
|
-
attribute vec4 a_Color;
|
|
8
|
-
attribute float a_Size;
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
layout(location = 0) in vec3 a_Position;
|
|
6
|
+
layout(location = 1) in vec4 a_Color;
|
|
7
|
+
layout(location = 9) in float a_Size;
|
|
8
|
+
layout(location = 14) in vec4 a_textUvAndOffsets;
|
|
12
9
|
|
|
13
|
-
uniform
|
|
10
|
+
layout(std140) uniform commonUniforms {
|
|
11
|
+
vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
12
|
+
vec2 u_sdf_map_size;
|
|
13
|
+
float u_raisingHeight: 0.0;
|
|
14
|
+
float u_stroke_width : 2;
|
|
15
|
+
float u_gamma_scale : 0.5;
|
|
16
|
+
float u_halo_blur : 0.5;
|
|
17
|
+
};
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
uniform float u_stroke_width : 2;
|
|
21
|
-
uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
19
|
+
out vec2 v_uv;
|
|
20
|
+
out float v_gamma_scale;
|
|
21
|
+
out vec4 v_color;
|
|
22
|
+
out vec4 v_stroke_color;
|
|
23
|
+
out float v_fontScale;
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
|
|
@@ -29,7 +31,7 @@ uniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];
|
|
|
29
31
|
void main() {
|
|
30
32
|
// cal style mapping - 数据纹理映射部分的计算
|
|
31
33
|
|
|
32
|
-
v_uv =
|
|
34
|
+
v_uv = a_textUvAndOffsets.xy / u_sdf_map_size;
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
|
|
@@ -43,7 +45,7 @@ void main() {
|
|
|
43
45
|
vec4 project_pos = project_position(vec4(a_Position, 1.0));
|
|
44
46
|
// vec4 projected_position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));
|
|
45
47
|
|
|
46
|
-
vec2 offset = rotate_matrix(
|
|
48
|
+
vec2 offset = rotate_matrix(a_textUvAndOffsets.zw,rotation);
|
|
47
49
|
|
|
48
50
|
// gl_Position = vec4(projected_position.xy / projected_position.w + rotation_matrix * a_textOffsets * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0);
|
|
49
51
|
|
|
@@ -18,20 +18,21 @@ var _l7Core = require("@antv/l7-core");
|
|
|
18
18
|
var _l7Utils = require("@antv/l7-utils");
|
|
19
19
|
var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
|
|
20
20
|
var _triangulation = require("../../core/triangulation");
|
|
21
|
+
var _CommonStyleAttribute = require("../../core/CommonStyleAttribute");
|
|
21
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
24
|
/* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_frag.glsl' */
|
|
24
|
-
var polygonExtrudeFrag = "uniform vec4 u_sourceColor;\
|
|
25
|
+
var polygonExtrudeFrag = "layout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nin vec4 v_Color;\n#pragma include \"picking\"\nout vec4 outputColor;\nvoid main() {\n\n // top face\n if(u_topsurface < 1.0) {\n discard;\n }\n\n outputColor = v_Color;\n \n outputColor = filterColor(outputColor);\n}\n";
|
|
25
26
|
/* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_vert.glsl' */
|
|
26
|
-
var polygonExtrudeVert = "
|
|
27
|
+
var polygonExtrudeVert = "layout(location = 0) in vec3 a_Position;\nlayout(location = 1) in vec4 a_Color;\nlayout(location = 9) in float a_Size;\nlayout(location = 13) in vec3 a_Normal;\nlayout(location = 14) in vec3 a_uvs;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nout vec4 v_Color;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n \nfloat isSide = a_Position.z;\n float topU = a_uvs[0];\n float topV = 1.0 - a_uvs[1];\n float sidey = a_uvs[2];\n\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n float lightWeight = calc_lighting(pos);\n\n vec4 project_pos = project_position(pos);\n\n if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n\n gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0));\n\n // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9\n if(isSide < 0.999) {\n // side face\n // if(u_sidesurface < 1.0) {\n // discard;\n // }\n\n if(u_linearColor == 1.0) {\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n v_Color = linearColor;\n } else {\n v_Color = a_Color;\n }\n\n } else {\n v_Color = a_Color;\n }\n\n v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity);\n\n\n setPickingColor(a_PickingColor);\n}\n"; // extrude
|
|
27
28
|
/* babel-plugin-inline-import '../shaders/extrude/polygon_extrudetex_frag.glsl' */
|
|
28
|
-
var polygonExtrudeTexFrag = "uniform sampler2D u_texture;\
|
|
29
|
+
var polygonExtrudeTexFrag = "uniform sampler2D u_texture;\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nin vec4 v_Color;\nin vec3 v_uvs;\nin vec2 v_texture_data;\n\n\n#pragma include \"picking\"\n\nout vec4 outputColor;\n\nvoid main() {\n float opacity = u_opacity;\n float isSide = v_texture_data.x;\n float lightWeight = v_texture_data.y;\n float topU = v_uvs[0];\n float topV = 1.0 - v_uvs[1];\n float sidey = v_uvs[2];\n // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9\n if(isSide < 0.999) {// \u662F\u5426\u662F\u8FB9\u7F18\n // side face\n if(u_sidesurface < 1.0) {\n discard;\n }\n\n if(u_linearColor == 1.0) {\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n outputColor = linearColor;\n } else {\n outputColor = v_Color;\n }\n } else {\n\n // top face\n if(u_topsurface < 1.0) {\n discard;\n }\n\n outputColor = texture(SAMPLER_2D(u_texture), vec2(topU, topV));\n }\n \n\n outputColor.a *= opacity;\n outputColor = filterColor(outputColor);\n}\n"; // texture
|
|
29
30
|
/* babel-plugin-inline-import '../shaders/extrude/polygon_extrudetex_vert.glsl' */
|
|
30
|
-
var polygonExtrudeTexVert = "
|
|
31
|
+
var polygonExtrudeTexVert = "layout(location = 0) in vec3 a_Position;\nlayout(location = 1) in vec4 a_Color;\nlayout(location = 9) in float a_Size;\nlayout(location = 13) in vec3 a_Normal;\nlayout(location = 14) in vec3 a_uvs;\n\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nout vec4 v_Color;\n\nout vec2 v_texture_data;\nout vec3 v_uvs;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n \n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n float lightWeight = calc_lighting(pos);\n vec4 project_pos = project_position(pos);\n v_uvs = a_uvs;\n v_Color = a_Color;\n v_Color.a *= opacity;\n \n v_texture_data = vec2(a_Position.z, lightWeight);\n\n if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n\n gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0));\n\n\n\n setPickingColor(a_PickingColor);\n}\n"; // extrude picking
|
|
31
32
|
/* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_picklight_frag.glsl' */
|
|
32
|
-
var polygonExtrudePickLightFrag = "uniform
|
|
33
|
+
var polygonExtrudePickLightFrag = "\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nin vec4 v_Color;\nin vec3 v_uvs;\nin vec2 v_texture_data;\nout vec4 outputColor;\n\n#pragma include \"picking\"\n\nvoid main() {\n float isSide = v_texture_data.x;\n float sidey = v_uvs[2];\n float lightWeight = v_texture_data.y;\n\n // Tip: \u90E8\u5206\u673A\u578B GPU \u8BA1\u7B97\u7CBE\u5EA6\u517C\u5BB9\n if(isSide < 0.999) {\n // side face\n if(u_sidesurface < 1.0) {\n discard;\n }\n \n if( u_linearColor == 1.0) {\n // side use linear\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n outputColor = linearColor;\n } else {\n // side notuse linear\n outputColor = v_Color;\n }\n } else {\n // top face\n if(u_topsurface < 1.0) {\n discard;\n }\n outputColor = v_Color;\n }\n\n outputColor = filterColorAlpha(outputColor, lightWeight);\n}\n";
|
|
33
34
|
/* babel-plugin-inline-import '../shaders/extrude/polygon_extrude_picklight_vert.glsl' */
|
|
34
|
-
var polygonExtrudePickLightVert = "
|
|
35
|
+
var polygonExtrudePickLightVert = "layout(location = 0) in vec3 a_Position;\nlayout(location = 1) in vec4 a_Color;\nlayout(location = 9) in float a_Size;\nlayout(location = 13) in vec3 a_Normal;\nlayout(location = 14) in vec3 a_uvs;\n\n\nlayout(std140) uniform commonUniforms {\n vec4 u_sourceColor;\n vec4 u_targetColor;\n float u_linearColor;\n float u_topsurface;\n float u_sidesurface;\n float u_heightfixed; // \u9ED8\u8BA4\u4E0D\u56FA\u5B9A\n float u_raisingHeight;\n};\n\nout vec2 v_texture_data;\nout vec3 v_uvs;\nout vec4 v_Color;\n\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n\n\n v_uvs = a_uvs;\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n vec4 project_pos = project_position(pos);\n\n if(u_heightfixed > 0.0) { // \u5224\u65AD\u51E0\u4F55\u4F53\u662F\u5426\u56FA\u5B9A\u9AD8\u5EA6\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0));\n float lightWeight = calc_lighting(pos);\n v_texture_data = vec2(a_Position.z,lightWeight);\n\n v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity);\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
35
36
|
var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
36
37
|
(0, _inherits2.default)(ExtrudeModel, _BaseModel);
|
|
37
38
|
var _super = _createSuper(ExtrudeModel);
|
|
@@ -42,6 +43,14 @@ var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
42
43
|
(0, _createClass2.default)(ExtrudeModel, [{
|
|
43
44
|
key: "getUninforms",
|
|
44
45
|
value: function getUninforms() {
|
|
46
|
+
var commoninfo = this.getCommonUniformsInfo();
|
|
47
|
+
var attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
|
|
48
|
+
this.updateStyleUnifoms();
|
|
49
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, commoninfo.uniformsOption), attributeInfo.uniformsOption);
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "getCommonUniformsInfo",
|
|
53
|
+
value: function getCommonUniformsInfo() {
|
|
45
54
|
var _ref = this.layer.getLayerConfig(),
|
|
46
55
|
_ref$heightfixed = _ref.heightfixed,
|
|
47
56
|
heightfixed = _ref$heightfixed === void 0 ? false : _ref$heightfixed,
|
|
@@ -63,18 +72,24 @@ var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
63
72
|
targetColorArr = (0, _l7Utils.rgb2arr)(targetColor);
|
|
64
73
|
useLinearColor = 1;
|
|
65
74
|
}
|
|
66
|
-
|
|
75
|
+
var commonOptions = {
|
|
76
|
+
u_sourceColor: sourceColorArr,
|
|
77
|
+
u_targetColor: targetColorArr,
|
|
78
|
+
u_linearColor: useLinearColor,
|
|
67
79
|
// 控制侧面和顶面的显示隐藏
|
|
68
80
|
u_topsurface: Number(topsurface),
|
|
69
81
|
u_sidesurface: Number(sidesurface),
|
|
70
82
|
u_heightfixed: Number(heightfixed),
|
|
71
83
|
u_raisingHeight: Number(raisingHeight),
|
|
72
84
|
// 渐变色支持参数
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
u_texture: this.texture // 纹理
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
if (this.texture) {
|
|
89
|
+
this.textures = [this.texture];
|
|
90
|
+
}
|
|
91
|
+
var commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
92
|
+
return commonBufferInfo;
|
|
78
93
|
}
|
|
79
94
|
}, {
|
|
80
95
|
key: "initModels",
|
|
@@ -107,18 +122,22 @@ var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
107
122
|
while (1) switch (_context2.prev = _context2.next) {
|
|
108
123
|
case 0:
|
|
109
124
|
_this$getShaders = this.getShaders(), frag = _this$getShaders.frag, vert = _this$getShaders.vert, type = _this$getShaders.type;
|
|
110
|
-
|
|
125
|
+
this.initUniformsBuffer();
|
|
126
|
+
_context2.next = 4;
|
|
111
127
|
return this.layer.buildLayerModel({
|
|
112
128
|
moduleName: type,
|
|
113
129
|
vertexShader: vert,
|
|
114
130
|
fragmentShader: frag,
|
|
131
|
+
depth: {
|
|
132
|
+
enable: true
|
|
133
|
+
},
|
|
115
134
|
inject: this.getInject(),
|
|
116
135
|
triangulation: _triangulation.PolygonExtrudeTriangulation
|
|
117
136
|
});
|
|
118
|
-
case
|
|
137
|
+
case 4:
|
|
119
138
|
model = _context2.sent;
|
|
120
139
|
return _context2.abrupt("return", [model]);
|
|
121
|
-
case
|
|
140
|
+
case 6:
|
|
122
141
|
case "end":
|
|
123
142
|
return _context2.stop();
|
|
124
143
|
}
|
|
@@ -161,6 +180,7 @@ var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
161
180
|
value: function clearModels() {
|
|
162
181
|
var _this$texture;
|
|
163
182
|
(_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
|
|
183
|
+
this.textures = [];
|
|
164
184
|
}
|
|
165
185
|
}, {
|
|
166
186
|
key: "registerBuiltinAttributes",
|
|
@@ -190,6 +210,7 @@ var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
190
210
|
type: _l7Core.AttributeType.Attribute,
|
|
191
211
|
descriptor: {
|
|
192
212
|
name: 'a_uvs',
|
|
213
|
+
shaderLocation: _CommonStyleAttribute.ShaderLocation.UV,
|
|
193
214
|
buffer: {
|
|
194
215
|
// give the WebGL driver a hint that this buffer may change
|
|
195
216
|
usage: _l7Core.gl.STATIC_DRAW,
|
|
@@ -211,6 +232,7 @@ var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
211
232
|
type: _l7Core.AttributeType.Attribute,
|
|
212
233
|
descriptor: {
|
|
213
234
|
name: 'a_Normal',
|
|
235
|
+
shaderLocation: _CommonStyleAttribute.ShaderLocation.NORMAL,
|
|
214
236
|
buffer: {
|
|
215
237
|
// give the WebGL driver a hint that this buffer may change
|
|
216
238
|
usage: _l7Core.gl.STATIC_DRAW,
|
|
@@ -228,6 +250,7 @@ var ExtrudeModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
228
250
|
type: _l7Core.AttributeType.Attribute,
|
|
229
251
|
descriptor: {
|
|
230
252
|
name: 'a_Size',
|
|
253
|
+
shaderLocation: _CommonStyleAttribute.ShaderLocation.SIZE,
|
|
231
254
|
buffer: {
|
|
232
255
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
233
256
|
data: [],
|
|
@@ -16,12 +16,13 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _l7Core = require("@antv/l7-core");
|
|
17
17
|
var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
|
|
18
18
|
var _triangulation = require("../../core/triangulation");
|
|
19
|
+
var _CommonStyleAttribute = require("../../core/CommonStyleAttribute");
|
|
19
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
21
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
21
22
|
/* babel-plugin-inline-import '../shaders/extrusion/polygon_extrusion_frag.glsl' */
|
|
22
|
-
var polygonExtrudeFrag = "\
|
|
23
|
+
var polygonExtrudeFrag = "\nin vec4 v_Color;\n#pragma include \"picking\"\nout vec4 outputColor;\nvoid main() {\n\n outputColor = v_Color;\n outputColor = filterColor(outputColor);\n}\n";
|
|
23
24
|
/* babel-plugin-inline-import '../shaders/extrusion/polygon_extrusion_vert.glsl' */
|
|
24
|
-
var polygonExtrudeVert = "
|
|
25
|
+
var polygonExtrudeVert = "layout(location = 0) in vec3 a_Position;\nlayout(location = 1) in vec4 a_Color;\nlayout(location = 9) in float a_Size;\nlayout(location = 13) in vec3 a_Normal;\n\nout vec4 v_Color;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvoid main() {\n \n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size + (1.0 - a_Position.z) * extrusionBase, 1.0);\n\n vec4 project_pos = project_position(pos);\n float lightWeight = calc_lighting(project_pos);\n v_Color = a_Color;\n v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity);\n\n gl_Position = project_common_position_to_clipspace_v2(vec4(project_pos.xyz, 1.0));\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
25
26
|
var ExtrusionModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
26
27
|
(0, _inherits2.default)(ExtrusionModel, _BaseModel);
|
|
27
28
|
var _super = _createSuper(ExtrusionModel);
|
|
@@ -32,7 +33,17 @@ var ExtrusionModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
32
33
|
(0, _createClass2.default)(ExtrusionModel, [{
|
|
33
34
|
key: "getUninforms",
|
|
34
35
|
value: function getUninforms() {
|
|
35
|
-
|
|
36
|
+
var commoninfo = this.getCommonUniformsInfo();
|
|
37
|
+
var attributeInfo = this.getUniformsBufferInfo(this.getStyleAttribute());
|
|
38
|
+
this.updateStyleUnifoms();
|
|
39
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, commoninfo.uniformsOption), attributeInfo.uniformsOption);
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "getCommonUniformsInfo",
|
|
43
|
+
value: function getCommonUniformsInfo() {
|
|
44
|
+
var commonOptions = {};
|
|
45
|
+
var commonBufferInfo = this.getUniformsBufferInfo(commonOptions);
|
|
46
|
+
return commonBufferInfo;
|
|
36
47
|
}
|
|
37
48
|
}, {
|
|
38
49
|
key: "initModels",
|
|
@@ -62,18 +73,22 @@ var ExtrusionModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
62
73
|
while (1) switch (_context2.prev = _context2.next) {
|
|
63
74
|
case 0:
|
|
64
75
|
_this$getShaders = this.getShaders(), frag = _this$getShaders.frag, vert = _this$getShaders.vert, type = _this$getShaders.type;
|
|
65
|
-
|
|
76
|
+
this.initUniformsBuffer();
|
|
77
|
+
_context2.next = 4;
|
|
66
78
|
return this.layer.buildLayerModel({
|
|
67
79
|
moduleName: type,
|
|
68
80
|
vertexShader: vert,
|
|
69
81
|
fragmentShader: frag,
|
|
70
82
|
inject: this.getInject(),
|
|
71
|
-
triangulation: _triangulation.PolygonExtrudeTriangulation
|
|
83
|
+
triangulation: _triangulation.PolygonExtrudeTriangulation,
|
|
84
|
+
depth: {
|
|
85
|
+
enable: true
|
|
86
|
+
}
|
|
72
87
|
});
|
|
73
|
-
case
|
|
88
|
+
case 4:
|
|
74
89
|
model = _context2.sent;
|
|
75
90
|
return _context2.abrupt("return", [model]);
|
|
76
|
-
case
|
|
91
|
+
case 6:
|
|
77
92
|
case "end":
|
|
78
93
|
return _context2.stop();
|
|
79
94
|
}
|
|
@@ -107,6 +122,7 @@ var ExtrusionModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
107
122
|
type: _l7Core.AttributeType.Attribute,
|
|
108
123
|
descriptor: {
|
|
109
124
|
name: 'a_Normal',
|
|
125
|
+
shaderLocation: _CommonStyleAttribute.ShaderLocation.NORMAL,
|
|
110
126
|
buffer: {
|
|
111
127
|
// give the WebGL driver a hint that this buffer may change
|
|
112
128
|
usage: _l7Core.gl.STATIC_DRAW,
|
|
@@ -124,6 +140,7 @@ var ExtrusionModel = exports.default = /*#__PURE__*/function (_BaseModel) {
|
|
|
124
140
|
type: _l7Core.AttributeType.Attribute,
|
|
125
141
|
descriptor: {
|
|
126
142
|
name: 'a_Size',
|
|
143
|
+
shaderLocation: _CommonStyleAttribute.ShaderLocation.SIZE,
|
|
127
144
|
buffer: {
|
|
128
145
|
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
129
146
|
data: [],
|