From 650257e9312987554478bbc0b83a7cb8a9f931f4 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Wed, 27 Nov 2019 14:54:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor(amap):=20rename=20Amap=20to=20GaodeMap?= =?UTF-8?q?=20=20=E9=81=BF=E5=85=8D=E5=92=8C=E9=AB=98=E5=BE=B7=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=AF=B9=E8=B1=A1Amap=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/scene.en.md | 8 +- docs/api/scene.zh.md | 8 +- docs/tutorial/map/amap.en.md | 6 +- docs/tutorial/map/amap.zh.md | 4 +- docs/tutorial/quickstart.en.md | 12 +-- docs/tutorial/quickstart.zh.md | 12 +-- examples/gallery/basic/demo/column_dark.js | 4 +- examples/gallery/basic/demo/normal.js | 4 +- examples/gallery/basic/demo/point.js | 4 +- examples/heatmap/grid/demo/china.js | 4 +- examples/heatmap/grid/demo/grid1.js | 4 +- examples/heatmap/grid/demo/heatmap3.js | 4 +- examples/heatmap/grid/demo/world.js | 4 +- examples/heatmap/hexagon/demo/world.js | 4 +- examples/line/isoline/demo/ele.js | 4 +- examples/line/isoline/demo/ele_dark.js | 4 +- examples/line/isoline/demo/isoline.js | 4 +- examples/line/line/demo/isoline.js | 4 +- examples/point/bubble/demo/color.js | 4 +- examples/point/bubble/demo/point.js | 4 +- examples/point/bubble/demo/scatter.js | 4 +- examples/point/chart/demo/bar.js | 4 +- examples/point/chart/demo/chart.js | 4 +- examples/point/column/demo/clumn_shape.js | 4 +- examples/point/column/demo/column_dark.js | 4 +- examples/point/column/demo/column_light.js | 4 +- examples/point/image/demo/image.js | 4 +- examples/point/image/demo/locate.js | 4 +- examples/point/image/demo/weather.js | 4 +- examples/point/marker/demo/marker.js | 4 +- examples/point/scatter/demo/normal.js | 4 +- examples/point/scatter/demo/normal2.js | 4 +- examples/polygon/3d/demo/polygon.js | 4 +- examples/polygon/fill/demo/fill.js | 4 +- examples/polygon/fill/demo/polygon.js | 4 +- examples/raster/basic/demo/image.js | 4 +- examples/raster/basic/demo/radar.js | 4 +- examples/tutorial/control/demo/amap.js | 51 ++++++++++ examples/tutorial/control/demo/mapbox.js | 17 ++++ examples/tutorial/control/demo/meta.json | 16 +++ examples/tutorial/control/demo/popup.js | 53 ++++++++++ examples/tutorial/control/index.en.md | 4 + examples/tutorial/control/index.zh.md | 6 ++ examples/tutorial/data/demo/line.js | 37 +++++++ examples/tutorial/data/demo/meta.json | 13 +++ examples/tutorial/data/index.en.md | 4 + examples/tutorial/data/index.zh.md | 4 + examples/tutorial/map/demo/amap.js | 9 ++ examples/tutorial/map/demo/mapbox.js | 10 ++ examples/tutorial/map/demo/meta.json | 18 ++++ examples/tutorial/map/index.en.md | 6 ++ examples/tutorial/map/index.zh.md | 9 ++ packages/layers/src/point/models/extrude.ts | 2 +- .../src/point/shaders/extrude3_vert.glsl | 33 ------- .../src/point/shaders/extrude_vert.glsl | 19 +--- packages/layers/src/polygon/polygon3D.ts | 98 ------------------- .../polygon/shaders/polygon_extrude_vert.glsl | 22 +---- packages/maps/src/index.ts | 4 +- packages/renderer/src/regl/index.ts | 1 - 59 files changed, 352 insertions(+), 258 deletions(-) create mode 100644 examples/tutorial/control/demo/amap.js create mode 100644 examples/tutorial/control/demo/mapbox.js create mode 100644 examples/tutorial/control/demo/meta.json create mode 100644 examples/tutorial/control/demo/popup.js create mode 100644 examples/tutorial/control/index.en.md create mode 100644 examples/tutorial/control/index.zh.md create mode 100644 examples/tutorial/data/demo/line.js create mode 100644 examples/tutorial/data/demo/meta.json create mode 100644 examples/tutorial/data/index.en.md create mode 100644 examples/tutorial/data/index.zh.md create mode 100644 examples/tutorial/map/demo/amap.js create mode 100644 examples/tutorial/map/demo/mapbox.js create mode 100644 examples/tutorial/map/demo/meta.json create mode 100644 examples/tutorial/map/index.en.md create mode 100644 examples/tutorial/map/index.zh.md delete mode 100644 packages/layers/src/point/shaders/extrude3_vert.glsl delete mode 100644 packages/layers/src/polygon/polygon3D.ts diff --git a/docs/api/scene.en.md b/docs/api/scene.en.md index 30b50482b5..c069eff70b 100644 --- a/docs/api/scene.en.md +++ b/docs/api/scene.en.md @@ -10,10 +10,10 @@ order: 2 ```javascript // Module 引用 import { Scene } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'dark', center: [ 110.770672, 34.159869 ], pitch: 45, @@ -23,7 +23,7 @@ const scene = new Scene({ // CDN 使用方法 const scene = new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', center: [ 110.770672, 34.159869 ], pitch: 45, @@ -58,7 +58,7 @@ const map = scene.map ```javascript const scene =new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', center: [ 110.770672, 34.159869 ], pitch: 45, diff --git a/docs/api/scene.zh.md b/docs/api/scene.zh.md index b27730d3b6..966cd71f84 100644 --- a/docs/api/scene.zh.md +++ b/docs/api/scene.zh.md @@ -10,10 +10,10 @@ order: 2 ```javascript // Module 引用 import { Scene } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'dark', center: [ 110.770672, 34.159869 ], pitch: 45, @@ -23,7 +23,7 @@ const scene = new Scene({ // CDN 使用方法 const scene = new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', center: [ 110.770672, 34.159869 ], pitch: 45, @@ -58,7 +58,7 @@ const map = scene.map ```javascript const scene =new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', center: [ 110.770672, 34.159869 ], pitch: 45, diff --git a/docs/tutorial/map/amap.en.md b/docs/tutorial/map/amap.en.md index 07c4190f2b..39d3dee816 100644 --- a/docs/tutorial/map/amap.en.md +++ b/docs/tutorial/map/amap.en.md @@ -1,5 +1,5 @@ --- -title: AMap BaseMap +title: GaodeMap BaseMap order: 0 --- @@ -35,7 +35,7 @@ order: 0 ``` javascript const scene = new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', // 样式URL center: [120.19382669582967, 30.258134], pitch: 0, @@ -111,7 +111,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json') const scene = new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', // 样式URL center: [120.19382669582967, 30.258134], pitch: 0, diff --git a/docs/tutorial/map/amap.zh.md b/docs/tutorial/map/amap.zh.md index 613319d507..7396f5b059 100644 --- a/docs/tutorial/map/amap.zh.md +++ b/docs/tutorial/map/amap.zh.md @@ -35,7 +35,7 @@ order: 0 ``` javascript const scene = new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', // 样式URL center: [120.19382669582967, 30.258134], pitch: 0, @@ -111,7 +111,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json') const scene = new L7.Scene({ id: 'map', - map: new L7.AMap({ + map: new L7.GaodeMap({ style: 'dark', // 样式URL center: [120.19382669582967, 30.258134], pitch: 0, diff --git a/docs/tutorial/quickstart.en.md b/docs/tutorial/quickstart.en.md index f9fb20845f..5907fa077d 100644 --- a/docs/tutorial/quickstart.en.md +++ b/docs/tutorial/quickstart.en.md @@ -47,7 +47,7 @@ yarn add --save @antv/l7@beta 然后就可以使用其中包含的场景和各类图层: ```typescript import { Scene, PolygonLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; (async function() { // 获取数据 @@ -59,7 +59,7 @@ import { AMap } from '@antv/l7-maps'; // 创建场景 const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ center: [110.19382669582967, 50.258134], pitch: 0, style: 'dark', @@ -93,7 +93,7 @@ import { AMap } from '@antv/l7-maps'; L7 目前的文档都通过这种方式使用,可以参考项目中的 stories: -* [高德地图](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/AMap.tsx) +* [高德地图](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/GaodeMap.tsx) * [Mapbox](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/Mapbox.tsx) @@ -102,10 +102,10 @@ L7 目前的文档都通过这种方式使用,可以参考项目中的 stories React 组件待开发,目前可以暂时以 Submodule 方式使用: ```tsx import { Scene, PolygonLayer} from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; import * as React from 'react'; -export default class AMap extends React.Component { +export default class GaodeMap extends React.Component { private scene: Scene; public componentWillUnmount() { @@ -118,7 +118,7 @@ export default class AMap extends React.Component { ); const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ center: [110.19382669582967, 50.258134], pitch: 0, style: 'dark', diff --git a/docs/tutorial/quickstart.zh.md b/docs/tutorial/quickstart.zh.md index 2a08556f6f..1b37860175 100644 --- a/docs/tutorial/quickstart.zh.md +++ b/docs/tutorial/quickstart.zh.md @@ -47,7 +47,7 @@ yarn add --save @antv/l7@beta 然后就可以使用其中包含的场景和各类图层: ```typescript import { Scene, PolygonLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; (async function() { // 获取数据 @@ -59,7 +59,7 @@ import { AMap } from '@antv/l7-maps'; // 创建场景 const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ center: [110.19382669582967, 50.258134], pitch: 0, style: 'dark', @@ -93,7 +93,7 @@ import { AMap } from '@antv/l7-maps'; L7 目前的文档都通过这种方式使用,可以参考项目中的 stories: -* [高德地图](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/AMap.tsx) +* [高德地图](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/GaodeMap.tsx) * [Mapbox](https://github.com/antvis/L7/blob/next/stories/MapAdaptor/components/Mapbox.tsx) @@ -102,10 +102,10 @@ L7 目前的文档都通过这种方式使用,可以参考项目中的 stories React 组件待开发,目前可以暂时以 Submodule 方式使用: ```tsx import { Scene, PolygonLayer} from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; import * as React from 'react'; -export default class AMap extends React.Component { +export default class GaodeMap extends React.Component { private scene: Scene; public componentWillUnmount() { @@ -118,7 +118,7 @@ export default class AMap extends React.Component { ); const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ center: [110.19382669582967, 50.258134], pitch: 0, style: 'dark', diff --git a/examples/gallery/basic/demo/column_dark.js b/examples/gallery/basic/demo/column_dark.js index 81c6c0989c..b2c3ea49fe 100644 --- a/examples/gallery/basic/demo/column_dark.js +++ b/examples/gallery/basic/demo/column_dark.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 35.210526315789465, style: 'dark', center: [ 104.288144, 31.239692 ], diff --git a/examples/gallery/basic/demo/normal.js b/examples/gallery/basic/demo/normal.js index 56a82a82b4..efddb8fd1a 100644 --- a/examples/gallery/basic/demo/normal.js +++ b/examples/gallery/basic/demo/normal.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ center: [ 121.417463, 31.215175 ], pitch: 0, zoom: 11 diff --git a/examples/gallery/basic/demo/point.js b/examples/gallery/basic/demo/point.js index 847d9875ee..f7943a9cc1 100644 --- a/examples/gallery/basic/demo/point.js +++ b/examples/gallery/basic/demo/point.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 64.88, style: 'dark', center: [ 114.060288, 22.53684 ], diff --git a/examples/heatmap/grid/demo/china.js b/examples/heatmap/grid/demo/china.js index 81a552fc25..91b2dcccd2 100644 --- a/examples/heatmap/grid/demo/china.js +++ b/examples/heatmap/grid/demo/china.js @@ -1,9 +1,9 @@ import { Scene, HeatmapLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'light', pitch: 0, center: [ 107.054293, 35.246265 ], diff --git a/examples/heatmap/grid/demo/grid1.js b/examples/heatmap/grid/demo/grid1.js index 1330db52b1..714214f22e 100644 --- a/examples/heatmap/grid/demo/grid1.js +++ b/examples/heatmap/grid/demo/grid1.js @@ -1,9 +1,9 @@ import { Scene, HeatmapLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'dark', pitch: 0, center: [ 110.097892, 33.853662 ], diff --git a/examples/heatmap/grid/demo/heatmap3.js b/examples/heatmap/grid/demo/heatmap3.js index 1a6672632b..53dda2e450 100644 --- a/examples/heatmap/grid/demo/heatmap3.js +++ b/examples/heatmap/grid/demo/heatmap3.js @@ -1,9 +1,9 @@ import { Scene, HeatmapLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'light', pitch: 0, center: [ 110.097892, 33.853662 ], diff --git a/examples/heatmap/grid/demo/world.js b/examples/heatmap/grid/demo/world.js index 3edbe12ae9..116fbed6f9 100644 --- a/examples/heatmap/grid/demo/world.js +++ b/examples/heatmap/grid/demo/world.js @@ -1,9 +1,9 @@ import { Scene, HeatmapLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'dark', pitch: 0, center: [ 110.097892, 33.853662 ], diff --git a/examples/heatmap/hexagon/demo/world.js b/examples/heatmap/hexagon/demo/world.js index ca207a79cb..261e44893c 100644 --- a/examples/heatmap/hexagon/demo/world.js +++ b/examples/heatmap/hexagon/demo/world.js @@ -1,9 +1,9 @@ import { Scene, HeatmapLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'light', pitch: 0, center: [ 104.995156, 31.450658 ], diff --git a/examples/line/isoline/demo/ele.js b/examples/line/isoline/demo/ele.js index 8328bcfaf2..bced2a4d0b 100644 --- a/examples/line/isoline/demo/ele.js +++ b/examples/line/isoline/demo/ele.js @@ -1,9 +1,9 @@ import { Scene, LineLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 53.6305, style: 'light', center: [ 102.600579, 23.114887 ], diff --git a/examples/line/isoline/demo/ele_dark.js b/examples/line/isoline/demo/ele_dark.js index 39e314adf5..e1381edb7d 100644 --- a/examples/line/isoline/demo/ele_dark.js +++ b/examples/line/isoline/demo/ele_dark.js @@ -1,9 +1,9 @@ import { Scene, LineLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 26.842105263157915, style: 'dark', center: [ 102.599436, 23.116371 ], diff --git a/examples/line/isoline/demo/isoline.js b/examples/line/isoline/demo/isoline.js index 4aab28dc97..feebbd0066 100644 --- a/examples/line/isoline/demo/isoline.js +++ b/examples/line/isoline/demo/isoline.js @@ -1,9 +1,9 @@ import { Scene, LineLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 104.117492, 36.492696 ], diff --git a/examples/line/line/demo/isoline.js b/examples/line/line/demo/isoline.js index 4aab28dc97..feebbd0066 100644 --- a/examples/line/line/demo/isoline.js +++ b/examples/line/line/demo/isoline.js @@ -1,9 +1,9 @@ import { Scene, LineLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 104.117492, 36.492696 ], diff --git a/examples/point/bubble/demo/color.js b/examples/point/bubble/demo/color.js index 29447298d0..47b8b8fa83 100644 --- a/examples/point/bubble/demo/color.js +++ b/examples/point/bubble/demo/color.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 121.435159, 31.256971 ], diff --git a/examples/point/bubble/demo/point.js b/examples/point/bubble/demo/point.js index de6dc15ab2..e167950498 100644 --- a/examples/point/bubble/demo/point.js +++ b/examples/point/bubble/demo/point.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, type: 'amap', style: 'light', diff --git a/examples/point/bubble/demo/scatter.js b/examples/point/bubble/demo/scatter.js index a36add58b7..f09afbfdce 100644 --- a/examples/point/bubble/demo/scatter.js +++ b/examples/point/bubble/demo/scatter.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'light', center: [ -121.24357, 37.58264 ], pitch: 0, diff --git a/examples/point/chart/demo/bar.js b/examples/point/chart/demo/bar.js index 3b6c849f8b..05c16e3507 100644 --- a/examples/point/chart/demo/bar.js +++ b/examples/point/chart/demo/bar.js @@ -1,10 +1,10 @@ import { Scene, Marker } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; import * as G2 from '@antv/g2'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'light', center: [ 2.6125016864608597, 49.359131 ], pitch: 0, diff --git a/examples/point/chart/demo/chart.js b/examples/point/chart/demo/chart.js index add9bef1a2..abe7a089fb 100644 --- a/examples/point/chart/demo/chart.js +++ b/examples/point/chart/demo/chart.js @@ -1,10 +1,10 @@ import { Scene, Marker } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; import * as G2 from '@antv/g2'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'light', center: [ 2.6125016864608597, 49.359131 ], pitch: 0, diff --git a/examples/point/column/demo/clumn_shape.js b/examples/point/column/demo/clumn_shape.js index 37d01b1122..a0d134a043 100644 --- a/examples/point/column/demo/clumn_shape.js +++ b/examples/point/column/demo/clumn_shape.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 66.02383, style: 'dark', center: [ 121.400257, 31.25287 ], diff --git a/examples/point/column/demo/column_dark.js b/examples/point/column/demo/column_dark.js index 81c6c0989c..b2c3ea49fe 100644 --- a/examples/point/column/demo/column_dark.js +++ b/examples/point/column/demo/column_dark.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 35.210526315789465, style: 'dark', center: [ 104.288144, 31.239692 ], diff --git a/examples/point/column/demo/column_light.js b/examples/point/column/demo/column_light.js index 2c5ce15fb8..e8470d47e7 100644 --- a/examples/point/column/demo/column_light.js +++ b/examples/point/column/demo/column_light.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 48.62562, style: 'light', center: [ 104.026043, 31.847 ], diff --git a/examples/point/image/demo/image.js b/examples/point/image/demo/image.js index 74d6db15db..0d1f731f61 100644 --- a/examples/point/image/demo/image.js +++ b/examples/point/image/demo/image.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 121.434765, 31.256735 ], diff --git a/examples/point/image/demo/locate.js b/examples/point/image/demo/locate.js index abc397cb5c..cffb6f6c25 100644 --- a/examples/point/image/demo/locate.js +++ b/examples/point/image/demo/locate.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 116.276227, 35.256776 ], diff --git a/examples/point/image/demo/weather.js b/examples/point/image/demo/weather.js index af08b0bbbb..2dea6c9f46 100644 --- a/examples/point/image/demo/weather.js +++ b/examples/point/image/demo/weather.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'dark', center: [ 120.5969, 29.7918 ], pitch: 35, diff --git a/examples/point/marker/demo/marker.js b/examples/point/marker/demo/marker.js index 037fbd2f48..fa523846d8 100644 --- a/examples/point/marker/demo/marker.js +++ b/examples/point/marker/demo/marker.js @@ -1,9 +1,9 @@ import { Scene, Marker } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'light', center: [ 105.790327, 36.495636 ], pitch: 0, diff --git a/examples/point/scatter/demo/normal.js b/examples/point/scatter/demo/normal.js index 5a57388163..154d3ff439 100644 --- a/examples/point/scatter/demo/normal.js +++ b/examples/point/scatter/demo/normal.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ style: 'dark', center: [ 121.417463, 31.215175 ], pitch: 0, diff --git a/examples/point/scatter/demo/normal2.js b/examples/point/scatter/demo/normal2.js index 847d9875ee..f7943a9cc1 100644 --- a/examples/point/scatter/demo/normal2.js +++ b/examples/point/scatter/demo/normal2.js @@ -1,9 +1,9 @@ import { Scene, PointLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 64.88, style: 'dark', center: [ 114.060288, 22.53684 ], diff --git a/examples/polygon/3d/demo/polygon.js b/examples/polygon/3d/demo/polygon.js index fc56c289d8..eb576e9911 100644 --- a/examples/polygon/3d/demo/polygon.js +++ b/examples/polygon/3d/demo/polygon.js @@ -1,9 +1,9 @@ import { Scene, PolygonLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'dark', center: [ 114.050008, 22.529272 ], diff --git a/examples/polygon/fill/demo/fill.js b/examples/polygon/fill/demo/fill.js index 74a28c40c7..c316b593e7 100644 --- a/examples/polygon/fill/demo/fill.js +++ b/examples/polygon/fill/demo/fill.js @@ -1,9 +1,9 @@ import { Scene, PolygonLayer, LineLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 116.368652, 39.93866 ], diff --git a/examples/polygon/fill/demo/polygon.js b/examples/polygon/fill/demo/polygon.js index 0b151bdd04..a5b2b9db05 100644 --- a/examples/polygon/fill/demo/polygon.js +++ b/examples/polygon/fill/demo/polygon.js @@ -1,9 +1,9 @@ import { Scene, PolygonLayer, LineLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 107.042225, 37.66565 ], diff --git a/examples/raster/basic/demo/image.js b/examples/raster/basic/demo/image.js index f851c4a8c4..3348b62c6f 100644 --- a/examples/raster/basic/demo/image.js +++ b/examples/raster/basic/demo/image.js @@ -1,9 +1,9 @@ import { Scene, ImageLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'light', center: [ 121.268, 30.3628 ], diff --git a/examples/raster/basic/demo/radar.js b/examples/raster/basic/demo/radar.js index d6e8e7ce3a..783c981251 100644 --- a/examples/raster/basic/demo/radar.js +++ b/examples/raster/basic/demo/radar.js @@ -1,9 +1,9 @@ import { Scene, ImageLayer } from '@antv/l7'; -import { AMap } from '@antv/l7-maps'; +import { GaodeMap } from '@antv/l7-maps'; const scene = new Scene({ id: 'map', - map: new AMap({ + map: new GaodeMap({ pitch: 0, style: 'dark', center: [ 115.5268, 34.3628 ], diff --git a/examples/tutorial/control/demo/amap.js b/examples/tutorial/control/demo/amap.js new file mode 100644 index 0000000000..9f0e2023c7 --- /dev/null +++ b/examples/tutorial/control/demo/amap.js @@ -0,0 +1,51 @@ +import { PointLayer, Scale, Scene, Layers, Zoom } from '@antv/l7'; +const scene = new Scene({ + id: 'map', + pitch: 0, + type: 'amap', + style: 'dark', + center: [ 121.40, 31.258134 ], + zoom: 14 +}); + +fetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json') + .then(res => res.json()) + .then(data => { + const pointLayer = + new PointLayer({ + }) + .source(data, { + parser: { + type: 'json', + x: 'longitude', + y: 'latitude' + } + }).shape('circle') + .size('unit_price', [ 5, 25 ]) + .color('name', [ '#49B5AD', '#5B8FF9' ]) + .style({ + opacity: 0.3, + strokeWidth: 1 + }); + + scene.addLayer(pointLayer); + const overlayers = { + 围栏填充: pointLayer + }; + const layersControl = new Layers({ + overlayers + }); + + scene.addControl(layersControl); + + }); + + +const zoomControl = new Zoom(); +const scaleControl = new Scale({ + position: 'bottomright' +}); + +scene.addControl(zoomControl); +scene.addControl(scaleControl); + diff --git a/examples/tutorial/control/demo/mapbox.js b/examples/tutorial/control/demo/mapbox.js new file mode 100644 index 0000000000..1c746f1046 --- /dev/null +++ b/examples/tutorial/control/demo/mapbox.js @@ -0,0 +1,17 @@ +import { Scale, Zoom, Scene } from '@antv/l7'; +const scene = new Scene({ + id: 'map', + pitch: 0, + type: 'mapbox', + style: 'light', + center: [ -97.119140625, 38.75408327579141 ], + zoom: 2 +}); + +const zoomControl = new Zoom(); +const scaleControl = new Scale({ + position: 'rightbottom' +}); +scene.addControl(zoomControl); +scene.addControl(scaleControl); + diff --git a/examples/tutorial/control/demo/meta.json b/examples/tutorial/control/demo/meta.json new file mode 100644 index 0000000000..d921629ac5 --- /dev/null +++ b/examples/tutorial/control/demo/meta.json @@ -0,0 +1,16 @@ +{ + "title": { + "zh": "地图", + "en": "Category" + }, + "demos": [ + { + "filename": "amap.js", + "title": "高德底图组件", + }, + { + "filename": "mapbox.js", + "title": "MapBox底图组件" + } + ] +} diff --git a/examples/tutorial/control/demo/popup.js b/examples/tutorial/control/demo/popup.js new file mode 100644 index 0000000000..e8aa232400 --- /dev/null +++ b/examples/tutorial/control/demo/popup.js @@ -0,0 +1,53 @@ +import { Scale, Zoom, Scene, Layers, PointLayer } from '@antv/l7'; +const scene = new Scene({ + id: 'map', + pitch: 0, + type: 'amap', + style: 'dark', + center: [ 121.40, 31.258134 ], + zoom: 5 +}); + +fetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json') + .then(res => res.json()) + .then(data => { + const pointLayer = + new PointLayer({ + }) + .source(data, { + parser: { + type: 'json', + x: 'longitude', + y: 'latitude' + } + }).shape('circle') + .size('unit_price', [ 5, 25 ]) + .color('name', [ '#49B5AD', '#5B8FF9' ]) + .style({ + opacity: 0.3, + strokeWidth: 1 + }); + + scene.addLayer(pointLayer); + const overlayers = { + 围栏填充: pointLayer + }; + const baseLayers = { + 基础地图: pointLayer + }; + const layersControl = new Layers({ + overlayers, + baseLayers + }); + + scene.addControl(layersControl); + + }); + + +const zoomControl = new Zoom(); +const scaleControl = new Scale(); + +scene.addControl(zoomControl); +scene.addControl(scaleControl); + diff --git a/examples/tutorial/control/index.en.md b/examples/tutorial/control/index.en.md new file mode 100644 index 0000000000..9dbd64200a --- /dev/null +++ b/examples/tutorial/control/index.en.md @@ -0,0 +1,4 @@ +--- +title: control +order: 2 +--- diff --git a/examples/tutorial/control/index.zh.md b/examples/tutorial/control/index.zh.md new file mode 100644 index 0000000000..53dd2eef6b --- /dev/null +++ b/examples/tutorial/control/index.zh.md @@ -0,0 +1,6 @@ +--- +title: 组件 +order: 2 +--- + + diff --git a/examples/tutorial/data/demo/line.js b/examples/tutorial/data/demo/line.js new file mode 100644 index 0000000000..21996e6ebe --- /dev/null +++ b/examples/tutorial/data/demo/line.js @@ -0,0 +1,37 @@ +import { LineLayer, Scene } from '@antv/l7'; +const scene = new Scene({ + id: 'map', + pitch: 0, + type: 'mapbox', + style: 'light', + center: [ 102.602992, 23.107329 ], + zoom: 13 +}); + +fetch('https://gw.alipayobjects.com/os/rmsportal/ZVfOvhVCzwBkISNsuKCc.json') + .then(res => res.json()) + .then(data => { + const layer = + new LineLayer({ + }) + .source(data) + .size(1) + .shape('line') + .color( + 'ELEV', + [ + '#E8FCFF', + '#CFF6FF', + '#A1E9ff', + '#65CEF7', + '#3CB1F0', + '#2894E0', + '#1772c2', + '#105CB3', + '#0D408C', + '#002466' + ].reverse() + ); + scene.addLayer(layer); + + }); diff --git a/examples/tutorial/data/demo/meta.json b/examples/tutorial/data/demo/meta.json new file mode 100644 index 0000000000..42812b23e6 --- /dev/null +++ b/examples/tutorial/data/demo/meta.json @@ -0,0 +1,13 @@ +{ + "title": { + "zh": "图库", + "en": "Gallery" + }, + "demos": [ + { + "filename": "line.js", + "title": "线图层", + "screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ" + } + ] +} diff --git a/examples/tutorial/data/index.en.md b/examples/tutorial/data/index.en.md new file mode 100644 index 0000000000..64087c814e --- /dev/null +++ b/examples/tutorial/data/index.en.md @@ -0,0 +1,4 @@ +--- +title: Data +order: 1 +--- diff --git a/examples/tutorial/data/index.zh.md b/examples/tutorial/data/index.zh.md new file mode 100644 index 0000000000..4ed5924b03 --- /dev/null +++ b/examples/tutorial/data/index.zh.md @@ -0,0 +1,4 @@ +--- +title: 数据 +order: 1 +--- diff --git a/examples/tutorial/map/demo/amap.js b/examples/tutorial/map/demo/amap.js new file mode 100644 index 0000000000..bb52d73b0a --- /dev/null +++ b/examples/tutorial/map/demo/amap.js @@ -0,0 +1,9 @@ +import { Scene } from '@antv/l7'; +new Scene({ + id: 'map', + pitch: 0, + type: 'amap', + style: 'dark', + center: [ 121.40, 31.258134 ], + zoom: 5 +}); diff --git a/examples/tutorial/map/demo/mapbox.js b/examples/tutorial/map/demo/mapbox.js new file mode 100644 index 0000000000..eb5e9d1bd3 --- /dev/null +++ b/examples/tutorial/map/demo/mapbox.js @@ -0,0 +1,10 @@ +import { Scene } from '@antv/l7'; +new Scene({ + id: 'map', + pitch: 0, + type: 'mapbox', + style: 'light', + center: [ -97.119140625, 38.75408327579141 ], + zoom: 2 +}); + diff --git a/examples/tutorial/map/demo/meta.json b/examples/tutorial/map/demo/meta.json new file mode 100644 index 0000000000..31bfd25527 --- /dev/null +++ b/examples/tutorial/map/demo/meta.json @@ -0,0 +1,18 @@ +{ + "title": { + "zh": "地图", + "en": "Category" + }, + "demos": [ + { + "filename": "amap.js", + "title": "高德底图", + "screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ" + }, + { + "filename": "mapbox.js", + "title": "MapBox底图", + "screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ" + } + ] +} diff --git a/examples/tutorial/map/index.en.md b/examples/tutorial/map/index.en.md new file mode 100644 index 0000000000..860c4ca494 --- /dev/null +++ b/examples/tutorial/map/index.en.md @@ -0,0 +1,6 @@ +--- +title: map +order: 0 +--- +初始 L7 地图实例 + diff --git a/examples/tutorial/map/index.zh.md b/examples/tutorial/map/index.zh.md new file mode 100644 index 0000000000..4fc3d4f1a5 --- /dev/null +++ b/examples/tutorial/map/index.zh.md @@ -0,0 +1,9 @@ +--- +title: 地图 +order: 0 +redirect_from: + - /zh/tutorial +--- +初始 L7 地图实例 + + diff --git a/packages/layers/src/point/models/extrude.ts b/packages/layers/src/point/models/extrude.ts index 8aa4ad3010..7562a42f00 100644 --- a/packages/layers/src/point/models/extrude.ts +++ b/packages/layers/src/point/models/extrude.ts @@ -1,7 +1,7 @@ import { AttributeType, gl, IEncodeFeature, IModel } from '@antv/l7-core'; import BaseModel from '../../core/BaseModel'; import { PointExtrudeTriangulation } from '../../core/triangulation'; -import pointExtrudeVert from '../shaders/extrude3_vert.glsl'; +import pointExtrudeVert from '../shaders/extrude_vert.glsl'; import pointExtrudeFrag from '../shaders/extrude_frag.glsl'; interface IPointLayerStyleOptions { opacity: number; diff --git a/packages/layers/src/point/shaders/extrude3_vert.glsl b/packages/layers/src/point/shaders/extrude3_vert.glsl deleted file mode 100644 index e59309e2e5..0000000000 --- a/packages/layers/src/point/shaders/extrude3_vert.glsl +++ /dev/null @@ -1,33 +0,0 @@ -precision highp float; - -#define ambientRatio 0.5 -#define diffuseRatio 0.3 -#define specularRatio 0.2 - -attribute vec3 a_Position; -attribute vec3 a_Pos; -attribute vec4 a_Color; -attribute vec3 a_Size; -attribute vec3 a_Normal; - -uniform mat4 u_ModelMatrix; -varying vec4 v_color; - -#pragma include "projection" -#pragma include "light" -#pragma include "picking" - -void main() { - vec3 size = a_Size * a_Position; - - vec2 offset = project_pixel(size.xy); - - vec4 project_pos = project_position(vec4(a_Pos.xy, 0, 1.0)); - vec4 pos = vec4(project_pos.xy + offset, project_pixel(size.z), 1.0); - - float lightWeight = calc_lighting(pos); - v_color =vec4(a_Color.rgb * lightWeight, a_Color.w); - - gl_Position = project_common_position_to_clipspace(pos); - setPickingColor(a_PickingColor); -} diff --git a/packages/layers/src/point/shaders/extrude_vert.glsl b/packages/layers/src/point/shaders/extrude_vert.glsl index a99a38a7d1..3586c80cda 100644 --- a/packages/layers/src/point/shaders/extrude_vert.glsl +++ b/packages/layers/src/point/shaders/extrude_vert.glsl @@ -26,24 +26,7 @@ void main() { vec4 pos = vec4(project_pos.xy + offset, project_pixel(size.z), 1.0); float lightWeight = calc_lighting(pos); - -// vec3 worldPos = vec3(pos * u_ModelMatrix); - -// vec3 worldNormal = vec3(vec4(a_Normal,1.0)); -// // //cal light weight -// vec3 viewDir = normalize(u_CameraPosition - worldPos); - -// vec3 lightDir = normalize(vec3(1, -10.5, 12)); - -// vec3 halfDir = normalize(viewDir+lightDir); -// // //lambert -// float lambert = dot(worldNormal, lightDir); -// //specular -// float specular = pow( max(0.0, dot(worldNormal, halfDir)), 32.0); -// //sum to light weight -// float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular; - - v_color =vec4(a_Color.rgb*lightWeight, a_Color.w); + v_color =vec4(a_Color.rgb * lightWeight, a_Color.w); gl_Position = project_common_position_to_clipspace(pos); setPickingColor(a_PickingColor); diff --git a/packages/layers/src/polygon/polygon3D.ts b/packages/layers/src/polygon/polygon3D.ts deleted file mode 100644 index a63decbe27..0000000000 --- a/packages/layers/src/polygon/polygon3D.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { AttributeType, gl, IEncodeFeature, ILayer } from '@antv/l7-core'; -import BaseLayer from '../core/BaseLayer'; -import { PolygonExtrudeTriangulation } from '../core/triangulation'; -import polygonExtrudeFrag from './shaders/polygon_extrude_frag.glsl'; -import polygonExtrudeVert from './shaders/polygon_extrude_vert.glsl'; -interface IPointLayerStyleOptions { - opacity: number; -} -export default class PolygonLayer extends BaseLayer { - public name: string = 'PolygonLayer'; - - protected getConfigSchema() { - return { - properties: { - opacity: { - type: 'number', - minimum: 0, - maximum: 1, - }, - }, - }; - } - - protected renderModels() { - const { opacity } = this.getLayerConfig(); - this.models.forEach((model) => - model.draw({ - uniforms: { - u_opacity: opacity || 1.0, - }, - }), - ); - return this; - } - - protected buildModels() { - this.registerBuiltinAttributes(); - this.models = [ - this.buildLayerModel({ - moduleName: 'polygonExtrude', - vertexShader: polygonExtrudeVert, - fragmentShader: polygonExtrudeFrag, - triangulation: PolygonExtrudeTriangulation, - }), - ]; - } - - private registerBuiltinAttributes() { - // point layer size; - this.styleAttributeService.registerStyleAttribute({ - name: 'normal', - type: AttributeType.Attribute, - descriptor: { - name: 'a_Normal', - buffer: { - // give the WebGL driver a hint that this buffer may change - usage: gl.STATIC_DRAW, - data: [], - type: gl.FLOAT, - }, - size: 3, - update: ( - feature: IEncodeFeature, - featureIdx: number, - vertex: number[], - attributeIdx: number, - normal: number[], - ) => { - return normal; - }, - }, - }); - - this.styleAttributeService.registerStyleAttribute({ - name: 'size', - type: AttributeType.Attribute, - descriptor: { - name: 'a_Size', - buffer: { - // give the WebGL driver a hint that this buffer may change - usage: gl.DYNAMIC_DRAW, - data: [], - type: gl.FLOAT, - }, - size: 1, - update: ( - feature: IEncodeFeature, - featureIdx: number, - vertex: number[], - attributeIdx: number, - ) => { - const { size } = feature; - return Array.isArray(size) ? [size[0]] : [size as number]; - }, - }, - }); - } -} diff --git a/packages/layers/src/polygon/shaders/polygon_extrude_vert.glsl b/packages/layers/src/polygon/shaders/polygon_extrude_vert.glsl index 41f18fab1d..0d886e06b0 100644 --- a/packages/layers/src/polygon/shaders/polygon_extrude_vert.glsl +++ b/packages/layers/src/polygon/shaders/polygon_extrude_vert.glsl @@ -13,6 +13,7 @@ uniform mat4 u_ModelMatrix; varying vec4 v_Color; #pragma include "projection" +#pragma include "light" #pragma include "picking" void main() { @@ -20,24 +21,9 @@ void main() { gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0)); - vec3 worldPos = vec3(project_pos * u_ModelMatrix); - - vec3 worldNormal = vec3(vec4(a_Normal,1.0) * u_ModelMatrix); - // vec3 worldNormal = project_normal(a_Normal); - // //cal light weight - vec3 viewDir = normalize(u_CameraPosition - worldPos); - - vec3 lightDir = normalize(vec3(1, -10.5, 12)); - - vec3 halfDir = normalize(viewDir+lightDir); - // //lambert - float lambert = dot(worldNormal, lightDir); - //specular - float specular = pow( max(0.0, dot(worldNormal, halfDir)), 16.0); - //sum to light weight - float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular; + float lightWeight = calc_lighting(pos); // v_Color = a_Color; - v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w); + v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w); setPickingColor(a_PickingColor); -} \ No newline at end of file +} diff --git a/packages/maps/src/index.ts b/packages/maps/src/index.ts index 849a775eff..980d870217 100644 --- a/packages/maps/src/index.ts +++ b/packages/maps/src/index.ts @@ -1,4 +1,4 @@ -import AMap from './amap/Wrapper'; +import GaodeMap from './amap/Wrapper'; import Mapbox from './mapbox/Wrapper'; -export { AMap, Mapbox }; +export { GaodeMap, Mapbox }; diff --git a/packages/renderer/src/regl/index.ts b/packages/renderer/src/regl/index.ts index af51e899bf..cd2a6af137 100644 --- a/packages/renderer/src/regl/index.ts +++ b/packages/renderer/src/regl/index.ts @@ -54,7 +54,6 @@ export default class ReglRendererService implements IRendererService { 'OES_element_index_uint', 'EXT_shader_texture_lod', // IBL 'OES_standard_derivatives', // wireframe - 'EXT_SRGB', // baseColor emmisive 'OES_texture_float', // shadow map 'WEBGL_depth_texture', 'angle_instanced_arrays',