@antv/l7-layers 2.20.2 → 2.20.5

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.
@@ -1,32 +1,28 @@
1
- precision highp float;
2
-
3
1
  #define pi 3.1415926535
4
2
  #define ambientRatio 0.5
5
3
  #define diffuseRatio 0.3
6
4
  #define specularRatio 0.2
7
5
 
8
- attribute vec3 a_Position;
9
- attribute vec3 a_Pos;
10
- attribute vec4 a_Color;
11
- attribute vec3 a_Size;
12
- attribute vec3 a_Normal;
13
-
14
- uniform float u_heightfixed: 0.0; // 默认不固定
15
- uniform float u_r;
16
- uniform mat4 u_ModelMatrix;
17
-
18
- varying vec4 v_color;
19
- varying float v_lightWeight;
20
- varying float v_barLinearZ;
21
-
22
- uniform float u_opacity : 1;
23
- uniform float u_lightEnable: 1;
24
- uniform float u_opacitylinear: 0.0;
25
- uniform vec4 u_sourceColor;
26
- uniform vec4 u_targetColor;
27
- uniform float u_opacitylinear_dir: 1.0;
28
- uniform float u_linearColor: 0.0;
29
-
6
+ layout(location = 0) in vec3 a_Position;
7
+ layout(location = 1) in vec4 a_Color;
8
+ layout(location = 9) in vec3 a_Size;
9
+ layout(location = 11) in vec3 a_Extrude;
10
+ layout(location = 13) in vec3 a_Normal;
11
+
12
+ layout(std140) uniform commonUniforms {
13
+ float u_pickLight;
14
+ float u_heightfixed;
15
+ float u_r;
16
+ float u_linearColor;
17
+ vec4 u_sourceColor;
18
+ vec4 u_targetColor;
19
+ float u_opacitylinear;
20
+ float u_opacitylinear_dir;
21
+ float u_lightEnable;
22
+ };
23
+ out vec4 v_color;
24
+ out float v_lightWeight;
25
+ out float v_barLinearZ;
30
26
 
31
27
  #pragma include "projection"
32
28
  #pragma include "light"
@@ -72,7 +68,7 @@ void main() {
72
68
  }
73
69
 
74
70
 
75
- vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));
71
+ vec4 project_pos = project_position(vec4(a_Extrude.xy, 0., 1.0));
76
72
 
77
73
  // u_r 控制圆柱的生长
78
74
  vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);
@@ -91,9 +87,9 @@ void main() {
91
87
  // 设置圆柱的底色
92
88
  if(u_linearColor == 1.0) { // 使用渐变颜色
93
89
  v_color = mix(u_sourceColor, u_targetColor, a_Position.z);
94
- v_color.a = v_color.a * u_opacity;
90
+ v_color.a = v_color.a * opacity;
95
91
  } else {
96
- v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * u_opacity);
92
+ v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * opacity);
97
93
  }
98
94
 
99
95
  if(u_opacitylinear > 0.0) {
@@ -101,8 +97,6 @@ void main() {
101
97
  }
102
98
 
103
99
 
104
- // gl_Position = project_common_position_to_clipspace(pos);
105
-
106
100
  gl_Position = project_common_position_to_clipspace_v2(pos);
107
101
 
108
102
  setPickingColor(a_PickingColor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-layers",
3
- "version": "2.20.2",
3
+ "version": "2.20.5",
4
4
  "description": "L7's collection of built-in layers",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -27,10 +27,10 @@
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
29
  "@antv/async-hook": "^2.2.9",
30
- "@antv/l7-core": "2.20.2",
31
- "@antv/l7-maps": "2.20.2",
32
- "@antv/l7-source": "2.20.2",
33
- "@antv/l7-utils": "2.20.2",
30
+ "@antv/l7-core": "2.20.5",
31
+ "@antv/l7-maps": "2.20.5",
32
+ "@antv/l7-source": "2.20.5",
33
+ "@antv/l7-utils": "2.20.5",
34
34
  "@babel/runtime": "^7.7.7",
35
35
  "@mapbox/martini": "^0.2.0",
36
36
  "@turf/clone": "^6.5.0",
@@ -52,7 +52,7 @@
52
52
  "reflect-metadata": "^0.1.13"
53
53
  },
54
54
  "devDependencies": {
55
- "@antv/l7-test-utils": "2.20.2",
55
+ "@antv/l7-test-utils": "2.20.5",
56
56
  "@types/d3-array": "^2.0.0",
57
57
  "@types/d3-color": "^1.2.2",
58
58
  "@types/d3-interpolate": "1.1.6",
@@ -61,7 +61,7 @@
61
61
  "@types/gl-matrix": "^2.4.5",
62
62
  "@types/lodash": "^4.14.138"
63
63
  },
64
- "gitHead": "c0e21cc20d1530aa586623484a9511636800839f",
64
+ "gitHead": "9c6df5f2ef050d18102f4aa4ccbb598bc1b5ee4d",
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  }