From cb626e6f59f4d531a2117da59a9ab5fb12e4b3ce Mon Sep 17 00:00:00 2001
From: 2912401452 <2912401452@qq.com>
Date: Mon, 21 Jun 2021 11:13:18 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=B7=E5=BC=8F=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E6=98=A0=E5=B0=84=201.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.vscode/settings.json | 1 +
.../core/src/services/layer/ILayerService.ts | 1 -
.../services/shader/ShaderModuleService.ts | 2 +
.../src/shaders/styleTextureMapping_frag.glsl | 0
packages/l7/demo/circle.html | 74 ++--
packages/l7/demo/dot.html | 2 +-
packages/l7/demo/heatmap.html | 261 +++++++++++++
packages/l7/demo/heatmap3d.html | 87 +++++
packages/l7/demo/image.html | 4 +-
packages/l7/demo/text.html | 4 +-
packages/l7/demo/text2.html | 80 ++++
packages/layers/src/core/BaseLayer.ts | 28 +-
packages/layers/src/core/BaseModel.ts | 53 +++
.../plugins/RegisterStyleAttributePlugin.ts | 40 +-
packages/layers/src/point/models/fill.ts | 364 ++++++++++++++----
.../layers/src/point/shaders/fill_frag.glsl | 46 +--
.../layers/src/point/shaders/fill_vert.glsl | 187 ++++++++-
packages/layers/src/utils/dataMappingStyle.ts | 231 ++++++++---
packages/renderer/src/regl/ReglModel.ts | 1 -
packages/utils/src/color.ts | 4 +
stories/Map/components/amap2demo.tsx | 144 +++++--
21 files changed, 1332 insertions(+), 282 deletions(-)
create mode 100644 packages/core/src/shaders/styleTextureMapping_frag.glsl
create mode 100644 packages/l7/demo/heatmap.html
create mode 100644 packages/l7/demo/heatmap3d.html
create mode 100644 packages/l7/demo/text2.html
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 0db3279e44..595893fc4f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,3 +1,4 @@
{
+ "liveServer.settings.port": 5501
}
diff --git a/packages/core/src/services/layer/ILayerService.ts b/packages/core/src/services/layer/ILayerService.ts
index 0ed0b7b5be..00c59a5706 100644
--- a/packages/core/src/services/layer/ILayerService.ts
+++ b/packages/core/src/services/layer/ILayerService.ts
@@ -141,7 +141,6 @@ export interface ILayer {
scale(field: string | number | IScaleOptions, cfg?: IScale): ILayer;
size(field: StyleAttrField, value?: StyleAttributeOption): ILayer;
color(field: StyleAttrField, value?: StyleAttributeOption): ILayer;
- // opacity(field: StyleAttrField, value?: StyleAttributeOption): ILayer;
texture(field: StyleAttrField, value?: StyleAttributeOption): ILayer;
shape(field: StyleAttrField, value?: StyleAttributeOption): ILayer;
label(field: StyleAttrField, value?: StyleAttributeOption): ILayer;
diff --git a/packages/core/src/services/shader/ShaderModuleService.ts b/packages/core/src/services/shader/ShaderModuleService.ts
index f35163ab03..b2d9727512 100644
--- a/packages/core/src/services/shader/ShaderModuleService.ts
+++ b/packages/core/src/services/shader/ShaderModuleService.ts
@@ -12,6 +12,7 @@ import pickingVert from '../../shaders/picking.vert.glsl';
import project from '../../shaders/project.glsl';
import projection from '../../shaders/projection.glsl';
import sdf2d from '../../shaders/sdf_2d.glsl';
+// import styleTextureMapping_frag from '../../shaders/styleTextureMapping_frag.glsl'
const precisionRegExp = /precision\s+(high|low|medium)p\s+float/;
const globalDefaultprecision =
@@ -33,6 +34,7 @@ export default class ShaderModuleService implements IShaderModuleService {
this.registerModule('lighting', { vs: lighting, fs: '' });
this.registerModule('light', { vs: light, fs: '' });
this.registerModule('picking', { vs: pickingVert, fs: pickingFrag });
+ // this.registerModule('styleTextureMapping_frag', { vs: '', fs: styleTextureMapping_frag });
}
public registerModule(moduleName: string, moduleParams: IModuleParams) {
diff --git a/packages/core/src/shaders/styleTextureMapping_frag.glsl b/packages/core/src/shaders/styleTextureMapping_frag.glsl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/l7/demo/circle.html b/packages/l7/demo/circle.html
index 711578b928..70eacb0edc 100644
--- a/packages/l7/demo/circle.html
+++ b/packages/l7/demo/circle.html
@@ -30,10 +30,16 @@
+
+
+
+
+