@antv/l7-layers 2.9.23 → 2.9.25
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/Geometry/models/plane.d.ts +1 -0
- package/es/citybuliding/building.js +1 -1
- package/es/core/BaseLayer.js +10 -3
- package/es/core/interface.d.ts +26 -48
- package/es/core/interface.js +3 -0
- package/es/core/schema.d.ts +3 -3
- package/es/core/triangulation.d.ts +4 -3
- package/es/core/triangulation.js +54 -39
- package/es/heatmap/models/heatmap.js +1 -1
- package/es/image/models/image.js +7 -1
- package/es/line/index.js +4 -1
- package/es/line/models/arc.js +1 -1
- package/es/line/models/simpleLine.js +1 -1
- package/es/line/shaders/line_arc_vert.glsl +5 -3
- package/es/line/shaders/simple/simpleline_vert.glsl +1 -0
- package/es/plugins/FeatureScalePlugin.js +0 -1
- package/es/point/index.js +3 -1
- package/es/point/models/fill.js +5 -2
- package/es/point/models/fillmage.js +9 -3
- package/es/point/models/image.js +8 -2
- package/es/point/models/radar.js +2 -3
- package/es/point/models/tile.js +1 -1
- package/es/point/shaders/fill_vert.glsl +13 -6
- package/es/point/shaders/image/fillImage_vert.glsl +13 -5
- package/es/point/shaders/image_vert.glsl +17 -8
- package/es/polygon/index.js +4 -1
- package/es/raster/index.js +3 -1
- package/es/tile/manager/tileLayerManager.d.ts +3 -2
- package/es/tile/manager/tileLayerManager.js +5 -2
- package/es/tile/models/tileModel.js +4 -3
- package/es/tile/tileFactory/base.d.ts +1 -1
- package/es/tile/tileFactory/base.js +32 -5
- package/es/tile/tileFactory/vectorLayer.d.ts +3 -1
- package/es/tile/tileFactory/vectorLayer.js +22 -1
- package/es/tile/tileLayer/baseTileLayer.d.ts +1 -1
- package/es/tile/tileLayer/baseTileLayer.js +3 -2
- package/es/tile/utils.d.ts +2 -0
- package/es/tile/utils.js +5 -1
- package/lib/Geometry/index.js +114 -77
- package/lib/Geometry/models/billboard.js +232 -181
- package/lib/Geometry/models/index.js +18 -34
- package/lib/Geometry/models/plane.js +407 -278
- package/lib/Geometry/models/sprite.js +291 -189
- package/lib/canvas/index.js +101 -66
- package/lib/canvas/models/canvas.js +207 -140
- package/lib/canvas/models/index.js +12 -30
- package/lib/citybuliding/building.js +98 -63
- package/lib/citybuliding/models/build.js +192 -146
- package/lib/core/BaseLayer.js +1331 -809
- package/lib/core/BaseModel.js +457 -279
- package/lib/core/interface.js +40 -53
- package/lib/core/schema.js +21 -39
- package/lib/core/shape/Path.js +67 -79
- package/lib/core/shape/extrude.js +132 -91
- package/lib/core/triangulation.js +412 -213
- package/lib/earth/index.js +100 -62
- package/lib/earth/models/atmosphere.js +146 -112
- package/lib/earth/models/base.js +210 -150
- package/lib/earth/models/bloomsphere.js +146 -112
- package/lib/earth/utils.js +111 -91
- package/lib/heatmap/index.js +149 -92
- package/lib/heatmap/models/grid.js +118 -91
- package/lib/heatmap/models/grid3d.js +155 -123
- package/lib/heatmap/models/heatmap.js +475 -338
- package/lib/heatmap/models/hexagon.js +121 -92
- package/lib/heatmap/models/index.js +22 -37
- package/lib/heatmap/triangulation.js +31 -47
- package/lib/image/index.js +111 -74
- package/lib/image/models/dataImage.js +232 -174
- package/lib/image/models/image.js +175 -123
- package/lib/image/models/index.js +15 -32
- package/lib/index.js +263 -97
- package/lib/line/index.js +131 -83
- package/lib/line/models/arc.js +352 -237
- package/lib/line/models/arc_3d.js +334 -228
- package/lib/line/models/earthArc_3d.js +336 -228
- package/lib/line/models/great_circle.js +291 -200
- package/lib/line/models/half.js +286 -201
- package/lib/line/models/index.js +42 -50
- package/lib/line/models/line.js +428 -299
- package/lib/line/models/linearline.js +277 -203
- package/lib/line/models/simpleLine.js +239 -175
- package/lib/line/models/tile.js +348 -237
- package/lib/line/models/wall.js +327 -235
- package/lib/line/shaders/line_arc_vert.glsl +5 -3
- package/lib/line/shaders/simple/simpleline_vert.glsl +1 -0
- package/lib/mask/index.js +92 -59
- package/lib/mask/models/fill.js +134 -82
- package/lib/mask/models/index.js +12 -30
- package/lib/plugins/DataMappingPlugin.js +342 -224
- package/lib/plugins/DataSourcePlugin.js +102 -87
- package/lib/plugins/FeatureScalePlugin.js +330 -241
- package/lib/plugins/LayerAnimateStylePlugin.js +61 -55
- package/lib/plugins/LayerModelPlugin.js +80 -73
- package/lib/plugins/LayerStylePlugin.js +48 -51
- package/lib/plugins/LightingPlugin.js +80 -68
- package/lib/plugins/MultiPassRendererPlugin.js +91 -65
- package/lib/plugins/PixelPickingPlugin.js +150 -109
- package/lib/plugins/RegisterStyleAttributePlugin.js +110 -110
- package/lib/plugins/ShaderUniformPlugin.js +118 -99
- package/lib/plugins/UpdateModelPlugin.js +40 -47
- package/lib/plugins/UpdateStyleAttributePlugin.js +93 -75
- package/lib/point/index.js +226 -148
- package/lib/point/models/earthExtrude.js +279 -201
- package/lib/point/models/earthFill.js +287 -202
- package/lib/point/models/extrude.js +299 -203
- package/lib/point/models/fill.js +406 -273
- package/lib/point/models/fillmage.js +365 -252
- package/lib/point/models/image.js +241 -164
- package/lib/point/models/index.js +46 -52
- package/lib/point/models/normal.js +183 -134
- package/lib/point/models/radar.js +304 -212
- package/lib/point/models/simplePoint.js +194 -142
- package/lib/point/models/text.js +608 -385
- package/lib/point/models/tile.js +314 -223
- package/lib/point/shaders/fill_vert.glsl +13 -6
- package/lib/point/shaders/image/fillImage_vert.glsl +13 -5
- package/lib/point/shaders/image_vert.glsl +17 -8
- package/lib/point/shape/extrude.js +56 -52
- package/lib/polygon/index.js +154 -100
- package/lib/polygon/models/extrude.js +311 -223
- package/lib/polygon/models/fill.js +215 -153
- package/lib/polygon/models/index.js +46 -52
- package/lib/polygon/models/ocean.js +244 -173
- package/lib/polygon/models/tile.js +144 -100
- package/lib/polygon/models/water.js +222 -153
- package/lib/raster/buffers/triangulation.js +27 -40
- package/lib/raster/index.js +115 -74
- package/lib/raster/models/index.js +16 -33
- package/lib/raster/models/raster.js +178 -135
- package/lib/raster/raster.js +187 -132
- package/lib/tile/interface.js +4 -16
- package/lib/tile/manager/tileConfigManager.js +125 -86
- package/lib/tile/manager/tileLayerManager.js +314 -227
- package/lib/tile/manager/tilePickerManager.js +192 -123
- package/lib/tile/models/tileModel.js +71 -51
- package/lib/tile/tileFactory/base.js +433 -292
- package/lib/tile/tileFactory/index.js +51 -49
- package/lib/tile/tileFactory/line.js +65 -50
- package/lib/tile/tileFactory/point.js +65 -50
- package/lib/tile/tileFactory/polygon.js +65 -50
- package/lib/tile/tileFactory/raster.js +66 -54
- package/lib/tile/tileFactory/rasterData.js +88 -76
- package/lib/tile/tileFactory/rasterDataLayer.js +97 -62
- package/lib/tile/tileFactory/vectorLayer.js +169 -95
- package/lib/tile/tileLayer/baseTileLayer.js +420 -220
- package/lib/tile/tmsTileLayer.js +110 -67
- package/lib/tile/utils.js +113 -87
- package/lib/utils/blend.js +59 -79
- package/lib/utils/collision-index.js +107 -64
- package/lib/utils/dataMappingStyle.js +105 -60
- package/lib/utils/extrude_polyline.js +600 -398
- package/lib/utils/grid-index.js +163 -111
- package/lib/utils/layerData.js +130 -99
- package/lib/utils/multiPassRender.js +49 -41
- package/lib/utils/polylineNormal.js +148 -96
- package/lib/utils/simpleLine.js +100 -85
- package/lib/utils/symbol-layout.js +219 -116
- package/lib/utils/updateShape.js +15 -41
- package/lib/wind/index.js +109 -71
- package/lib/wind/models/index.js +12 -30
- package/lib/wind/models/utils.js +144 -105
- package/lib/wind/models/wind.js +333 -224
- package/lib/wind/models/windRender.js +329 -218
- package/lib/wind/models/windShader.js +23 -181
- package/package.json +7 -6
package/lib/line/models/wall.js
CHANGED
|
@@ -1,253 +1,345 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
|
|
22
|
-
// src/line/models/wall.ts
|
|
23
|
-
var wall_exports = {};
|
|
24
|
-
__export(wall_exports, {
|
|
25
|
-
default: () => LineWallModel
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
26
7
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
|
|
16
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
+
|
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
+
|
|
20
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
+
|
|
22
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
+
|
|
24
|
+
var _l7Core = require("@antv/l7-core");
|
|
25
|
+
|
|
26
|
+
var _l7Utils = require("@antv/l7-utils");
|
|
27
|
+
|
|
28
|
+
var _lodash = require("lodash");
|
|
29
|
+
|
|
30
|
+
var _BaseModel2 = _interopRequireDefault(require("../../core/BaseModel"));
|
|
31
|
+
|
|
32
|
+
var _triangulation = require("../../core/triangulation");
|
|
33
|
+
|
|
34
|
+
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); }; }
|
|
35
|
+
|
|
36
|
+
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; } }
|
|
37
|
+
|
|
38
|
+
/* babel-plugin-inline-import '../shaders/wall_frag.glsl' */
|
|
39
|
+
var line_frag = "#define Animate 0.0\n#define LineTexture 1.0\n\nuniform float u_opacity : 1.0;\nuniform float u_textureBlend;\nuniform float u_iconStepCount;\n\nvarying vec4 v_color;\n\n// line texture\nuniform float u_line_texture;\nuniform sampler2D u_texture;\nuniform vec2 u_textSize;\n\nvarying vec2 v_iconMapUV;\nvarying float v_blur;\n\nuniform float u_linearColor: 0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\n\n#pragma include \"picking\"\n\nuniform float u_time;\nuniform vec4 u_aimate: [ 0, 2., 1.0, 0.2 ]; // \u63A7\u5236\u8FD0\u52A8\n\nvarying mat4 styleMappingMat;\n// [animate, duration, interval, trailLength],\nvoid main() {\n float opacity = styleMappingMat[0][0];\n float animateSpeed = 0.0; // \u8FD0\u52A8\u901F\u5EA6\n float d_distance_ratio = styleMappingMat[3].r; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n float v = styleMappingMat[3].a;\n\n if(u_linearColor == 1.0) { // \u4F7F\u7528\u6E10\u53D8\u989C\u8272\n gl_FragColor = mix(u_sourceColor, u_targetColor, v);\n } else { // \u4F7F\u7528 color \u65B9\u6CD5\u4F20\u5165\u7684\u989C\u8272\n gl_FragColor = v_color;\n }\n\n gl_FragColor.a *= opacity; // \u5168\u5C40\u900F\u660E\u5EA6\n if(u_aimate.x == Animate) {\n animateSpeed = u_time / u_aimate.y;\n float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_aimate.z)* (1.0/ u_aimate.z) + animateSpeed);\n alpha = (alpha + u_aimate.w -1.0) / u_aimate.w;\n alpha = smoothstep(0., 1., alpha);\n gl_FragColor.a *= alpha;\n }\n\n if(u_line_texture == LineTexture) { // while load texture\n float aDistance = styleMappingMat[3].g; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB\n float d_texPixelLen = styleMappingMat[3].b; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E\n float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed);\n float v = styleMappingMat[3].a; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C\n\n // \u8BA1\u7B97\u7EB9\u7406\u95F4\u9694 start\n float flag = 0.0;\n if(u > 1.0/u_iconStepCount) {\n flag = 1.0;\n }\n u = fract(u*u_iconStepCount);\n // \u8BA1\u7B97\u7EB9\u7406\u95F4\u9694 end\n\n vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\n vec4 pattern = texture2D(u_texture, uv);\n\n // Tip: \u5224\u65AD\u7EB9\u7406\u95F4\u9694\n if(flag > 0.0) {\n pattern = vec4(0.0);\n }\n\n if(u_textureBlend == 0.0) { // normal\n pattern.a = 0.0;\n gl_FragColor = filterColor(gl_FragColor + pattern);\n } else { // replace\n pattern.a *= opacity;\n if(gl_FragColor.a <= 0.0) {\n pattern.a = 0.0;\n }\n gl_FragColor = filterColor(pattern);\n }\n }\n \n\n // blur - AA\n if(v < v_blur) {\n gl_FragColor.a = mix(0.0, gl_FragColor.a, v/v_blur);\n } else if(v > 1.0 - v_blur) {\n gl_FragColor.a = mix(gl_FragColor.a, 0.0, (v - (1.0 - v_blur))/v_blur);\n }\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n";
|
|
40
|
+
|
|
41
|
+
/* babel-plugin-inline-import '../shaders/wall_vert.glsl' */
|
|
42
|
+
var line_vert = "#define Animate 0.0\n\nattribute float a_Miter;\nattribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\nattribute vec2 a_iconMapUV;\n\nattribute float a_Total_Distance;\nattribute float a_Distance;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform vec4 u_aimate: [ 0, 2., 1.0, 0.2 ];\nuniform float u_icon_step: 100;\nuniform float u_heightfixed;\n\n#pragma include \"projection\"\n#pragma include \"light\"\n#pragma include \"picking\"\n\nvarying vec4 v_color;\nvarying float v_blur;\n\n// texV \u7EBF\u56FE\u5C42 - \u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\uFF08\u7EBF\u7684\u5BBD\u5EA6\u65B9\u5411\uFF09\nvarying vec2 v_iconMapUV;\n\nuniform float u_linearColor: 0;\n\nuniform float u_opacity: 1.0;\nvarying mat4 styleMappingMat; // \u7528\u4E8E\u5C06\u5728\u9876\u70B9\u7740\u8272\u5668\u4E2D\u8BA1\u7B97\u597D\u7684\u6837\u5F0F\u503C\u4F20\u9012\u7ED9\u7247\u5143\n\n#pragma include \"styleMapping\"\n#pragma include \"light\"\n#pragma include \"styleMappingCalOpacity\"\n\nvoid main() {\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n styleMappingMat = mat4(\n 0.0, 0.0, 0.0, 0.0, // opacity - strokeOpacity - strokeWidth - empty\n 0.0, 0.0, 0.0, 0.0, // strokeR - strokeG - strokeB - strokeA\n 0.0, 0.0, 0.0, 0.0, // offsets[0] - offsets[1]\n 0.0, 0.0, 0.0, 0.0 // distance_ratio/distance/pixelLen/texV\n );\n\n float rowCount = u_cellTypeLayout[0][0]; // \u5F53\u524D\u7684\u6570\u636E\u7EB9\u7406\u6709\u51E0\u884C\n float columnCount = u_cellTypeLayout[0][1]; // \u5F53\u770B\u5230\u6570\u636E\u7EB9\u7406\u6709\u51E0\u5217\n float columnWidth = 1.0/columnCount; // \u5217\u5BBD\n float rowHeight = 1.0/rowCount; // \u884C\u9AD8\n float cellCount = calCellCount(); // opacity - strokeOpacity - strokeWidth - stroke - offsets\n float id = a_vertexId; // \u7B2Cn\u4E2A\u9876\u70B9\n float cellCurrentRow = floor(id * cellCount / columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u884C\n float cellCurrentColumn = mod(id * cellCount, columnCount) + 1.0; // \u8D77\u59CB\u70B9\u5728\u7B2C\u51E0\u5217\n \n // cell \u56FA\u5B9A\u987A\u5E8F opacity -> strokeOpacity -> strokeWidth -> stroke ... \n // \u6309\u987A\u5E8F\u4ECE cell \u4E2D\u53D6\u503C\u3001\u82E5\u6CA1\u6709\u5219\u81EA\u52A8\u5F80\u4E0B\u53D6\u503C\n float textureOffset = 0.0; // \u5728 cell \u4E2D\u53D6\u503C\u7684\u504F\u79FB\u91CF\n\n vec2 opacityAndOffset = calOpacityAndOffset(cellCurrentRow, cellCurrentColumn, columnCount, textureOffset, columnWidth, rowHeight);\n styleMappingMat[0][0] = opacityAndOffset.r;\n textureOffset = opacityAndOffset.g;\n // cal style mapping - \u6570\u636E\u7EB9\u7406\u6620\u5C04\u90E8\u5206\u7684\u8BA1\u7B97\n\n float d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n float d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E\n\n v_iconMapUV = a_iconMapUV;\n if(u_heightfixed < 1.0) { // \u9AD8\u5EA6\u968F zoom \u8C03\u6574\n d_texPixelLen = project_pixel(u_icon_step);\n } else {\n d_texPixelLen = u_icon_step;\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n d_texPixelLen *= 10.0;\n }\n\n if(u_aimate.x == Animate || u_linearColor == 1.0) {\n d_distance_ratio = a_Distance / a_Total_Distance;\n }\n\n float miter = (a_Miter + 1.0)/2.0;\n // \u8BBE\u7F6E\u6570\u636E\u96C6\u7684\u53C2\u6570\n styleMappingMat[3][0] = d_distance_ratio; // \u5F53\u524D\u70B9\u4F4D\u8DDD\u79BB\u5360\u7EBF\u603B\u957F\u7684\u6BD4\u4F8B\n styleMappingMat[3][1] = a_Distance; // \u5F53\u524D\u9876\u70B9\u7684\u8DDD\u79BB\n styleMappingMat[3][2] = d_texPixelLen; // \u8D34\u56FE\u7684\u50CF\u7D20\u957F\u5EA6\uFF0C\u6839\u636E\u5730\u56FE\u5C42\u7EA7\u7F29\u653E\n styleMappingMat[3][3] = miter; // \u7EBF\u56FE\u5C42\u8D34\u56FE\u90E8\u5206\u7684 v \u5750\u6807\u503C 0 - 1\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n float originSize = a_Size.x; // \u56FA\u5B9A\u9AD8\u5EA6\n if(u_heightfixed < 1.0) { // \u9AD8\u5EA6\u968F zoom \u8C03\u6574\n originSize = project_float_pixel(a_Size.x);\n }\n\n float wallHeight = originSize * miter;\n float lightWeight = calc_lighting(vec4(project_pos.xy, wallHeight, 1.0));\n\n v_blur = min(project_float_pixel(2.0) / originSize, 0.05);\n\n v_color = vec4(a_Color.rgb * lightWeight, a_Color.w);\n // v_color = a_Color;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy, wallHeight, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, wallHeight, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n";
|
|
43
|
+
|
|
44
|
+
var LineWallModel = /*#__PURE__*/function (_BaseModel) {
|
|
45
|
+
(0, _inherits2.default)(LineWallModel, _BaseModel);
|
|
46
|
+
|
|
47
|
+
var _super = _createSuper(LineWallModel);
|
|
48
|
+
|
|
49
|
+
function LineWallModel() {
|
|
50
|
+
var _this;
|
|
51
|
+
|
|
52
|
+
(0, _classCallCheck2.default)(this, LineWallModel);
|
|
53
|
+
|
|
54
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
|
+
args[_key] = arguments[_key];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
59
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateTexture", function () {
|
|
60
|
+
var createTexture2D = _this.rendererService.createTexture2D;
|
|
61
|
+
|
|
62
|
+
if (_this.texture) {
|
|
63
|
+
_this.texture.update({
|
|
64
|
+
data: _this.iconService.getCanvas()
|
|
43
65
|
});
|
|
44
|
-
|
|
66
|
+
|
|
67
|
+
_this.layer.render();
|
|
68
|
+
|
|
45
69
|
return;
|
|
46
70
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
71
|
+
|
|
72
|
+
_this.texture = createTexture2D({
|
|
73
|
+
data: _this.iconService.getCanvas(),
|
|
74
|
+
mag: _l7Core.gl.NEAREST,
|
|
75
|
+
min: _l7Core.gl.NEAREST,
|
|
51
76
|
premultiplyAlpha: false,
|
|
52
77
|
width: 1024,
|
|
53
|
-
height:
|
|
78
|
+
height: _this.iconService.canvasHeight || 128
|
|
54
79
|
});
|
|
55
|
-
};
|
|
80
|
+
});
|
|
81
|
+
return _this;
|
|
56
82
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
|
|
84
|
+
(0, _createClass2.default)(LineWallModel, [{
|
|
85
|
+
key: "getUninforms",
|
|
86
|
+
value: function getUninforms() {
|
|
87
|
+
var _ref = this.layer.getLayerConfig(),
|
|
88
|
+
_ref$opacity = _ref.opacity,
|
|
89
|
+
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity,
|
|
90
|
+
sourceColor = _ref.sourceColor,
|
|
91
|
+
targetColor = _ref.targetColor,
|
|
92
|
+
_ref$textureBlend = _ref.textureBlend,
|
|
93
|
+
textureBlend = _ref$textureBlend === void 0 ? 'normal' : _ref$textureBlend,
|
|
94
|
+
_ref$heightfixed = _ref.heightfixed,
|
|
95
|
+
heightfixed = _ref$heightfixed === void 0 ? false : _ref$heightfixed,
|
|
96
|
+
_ref$lineTexture = _ref.lineTexture,
|
|
97
|
+
lineTexture = _ref$lineTexture === void 0 ? false : _ref$lineTexture,
|
|
98
|
+
_ref$iconStep = _ref.iconStep,
|
|
99
|
+
iconStep = _ref$iconStep === void 0 ? 100 : _ref$iconStep,
|
|
100
|
+
_ref$iconStepCount = _ref.iconStepCount,
|
|
101
|
+
iconStepCount = _ref$iconStepCount === void 0 ? 1 : _ref$iconStepCount;
|
|
102
|
+
|
|
103
|
+
if (this.rendererService.getDirty()) {
|
|
104
|
+
this.texture.bind();
|
|
105
|
+
} // 转化渐变色
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
var useLinearColor = 0; // 默认不生效
|
|
109
|
+
|
|
110
|
+
var sourceColorArr = [0, 0, 0, 0];
|
|
111
|
+
var targetColorArr = [0, 0, 0, 0];
|
|
112
|
+
|
|
113
|
+
if (sourceColor && targetColor) {
|
|
114
|
+
sourceColorArr = (0, _l7Utils.rgb2arr)(sourceColor);
|
|
115
|
+
targetColorArr = (0, _l7Utils.rgb2arr)(targetColor);
|
|
116
|
+
useLinearColor = 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (this.dataTextureTest && this.dataTextureNeedUpdate({
|
|
120
|
+
opacity: opacity
|
|
121
|
+
})) {
|
|
122
|
+
this.judgeStyleAttributes({
|
|
123
|
+
opacity: opacity
|
|
124
|
+
});
|
|
125
|
+
var encodeData = this.layer.getEncodedData();
|
|
126
|
+
|
|
127
|
+
var _this$calDataFrame = this.calDataFrame(this.cellLength, encodeData, this.cellProperties),
|
|
128
|
+
data = _this$calDataFrame.data,
|
|
129
|
+
width = _this$calDataFrame.width,
|
|
130
|
+
height = _this$calDataFrame.height;
|
|
131
|
+
|
|
132
|
+
this.rowCount = height; // 当前数据纹理有多少行
|
|
133
|
+
|
|
134
|
+
this.dataTexture = this.cellLength > 0 && data.length > 0 ? this.createTexture2D({
|
|
135
|
+
flipY: true,
|
|
136
|
+
data: data,
|
|
137
|
+
format: _l7Core.gl.LUMINANCE,
|
|
138
|
+
type: _l7Core.gl.FLOAT,
|
|
139
|
+
width: width,
|
|
140
|
+
height: height
|
|
141
|
+
}) : this.createTexture2D({
|
|
142
|
+
flipY: true,
|
|
143
|
+
data: [1],
|
|
144
|
+
format: _l7Core.gl.LUMINANCE,
|
|
145
|
+
type: _l7Core.gl.FLOAT,
|
|
146
|
+
width: 1,
|
|
147
|
+
height: 1
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return {
|
|
152
|
+
u_heightfixed: Number(heightfixed),
|
|
153
|
+
u_dataTexture: this.dataTexture,
|
|
154
|
+
// 数据纹理 - 有数据映射的时候纹理中带数据,若没有任何数据映射时纹理是 [1]
|
|
155
|
+
u_cellTypeLayout: this.getCellTypeLayout(),
|
|
156
|
+
u_opacity: (0, _lodash.isNumber)(opacity) ? opacity : 1.0,
|
|
157
|
+
u_textureBlend: textureBlend === 'normal' ? 0.0 : 1.0,
|
|
158
|
+
// 纹理支持参数
|
|
159
|
+
u_texture: this.texture,
|
|
160
|
+
// 贴图
|
|
161
|
+
u_line_texture: lineTexture ? 1.0 : 0.0,
|
|
162
|
+
// 传入线的标识
|
|
163
|
+
u_iconStepCount: iconStepCount,
|
|
164
|
+
u_icon_step: iconStep,
|
|
165
|
+
u_textSize: [1024, this.iconService.canvasHeight || 128],
|
|
166
|
+
// 渐变色支持参数
|
|
167
|
+
u_linearColor: useLinearColor,
|
|
168
|
+
u_sourceColor: sourceColorArr,
|
|
169
|
+
u_targetColor: targetColorArr
|
|
170
|
+
};
|
|
70
171
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
172
|
+
}, {
|
|
173
|
+
key: "getAnimateUniforms",
|
|
174
|
+
value: function getAnimateUniforms() {
|
|
175
|
+
var _ref2 = this.layer.getLayerConfig(),
|
|
176
|
+
animateOption = _ref2.animateOption;
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
u_aimate: this.animateOption2Array(animateOption),
|
|
180
|
+
u_time: this.layer.getLayerAnimateTime()
|
|
181
|
+
};
|
|
78
182
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
85
|
-
flipY: true,
|
|
86
|
-
data,
|
|
87
|
-
format: import_l7_core.gl.LUMINANCE,
|
|
88
|
-
type: import_l7_core.gl.FLOAT,
|
|
89
|
-
width,
|
|
90
|
-
height
|
|
91
|
-
}) : this.createTexture2D({
|
|
92
|
-
flipY: true,
|
|
93
|
-
data: [1],
|
|
94
|
-
format: import_l7_core.gl.LUMINANCE,
|
|
95
|
-
type: import_l7_core.gl.FLOAT,
|
|
96
|
-
width: 1,
|
|
97
|
-
height: 1
|
|
98
|
-
});
|
|
183
|
+
}, {
|
|
184
|
+
key: "initModels",
|
|
185
|
+
value: function initModels(callbackModel) {
|
|
186
|
+
this.updateTexture();
|
|
187
|
+
this.iconService.on('imageUpdate', this.updateTexture);
|
|
188
|
+
this.buildModels(callbackModel);
|
|
99
189
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
u_aimate: this.animateOption2Array(animateOption),
|
|
120
|
-
u_time: this.layer.getLayerAnimateTime()
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
initModels(callbackModel) {
|
|
124
|
-
this.updateTexture();
|
|
125
|
-
this.iconService.on("imageUpdate", this.updateTexture);
|
|
126
|
-
this.buildModels(callbackModel);
|
|
127
|
-
}
|
|
128
|
-
clearModels() {
|
|
129
|
-
var _a, _b;
|
|
130
|
-
(_a = this.texture) == null ? void 0 : _a.destroy();
|
|
131
|
-
(_b = this.dataTexture) == null ? void 0 : _b.destroy();
|
|
132
|
-
this.iconService.off("imageUpdate", this.updateTexture);
|
|
133
|
-
}
|
|
134
|
-
buildModels(callbackModel) {
|
|
135
|
-
this.layer.buildLayerModel({
|
|
136
|
-
moduleName: "lineWall",
|
|
137
|
-
vertexShader: import_wall_vert.default,
|
|
138
|
-
fragmentShader: import_wall_frag.default,
|
|
139
|
-
triangulation: import_triangulation.LineTriangulation,
|
|
140
|
-
depth: { enable: false },
|
|
141
|
-
blend: this.getBlend()
|
|
142
|
-
}).then((model) => {
|
|
143
|
-
callbackModel([model]);
|
|
144
|
-
}).catch((err) => {
|
|
145
|
-
console.warn(err);
|
|
146
|
-
callbackModel([]);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
registerBuiltinAttributes() {
|
|
150
|
-
this.styleAttributeService.registerStyleAttribute({
|
|
151
|
-
name: "distance",
|
|
152
|
-
type: import_l7_core.AttributeType.Attribute,
|
|
153
|
-
descriptor: {
|
|
154
|
-
name: "a_Distance",
|
|
155
|
-
buffer: {
|
|
156
|
-
usage: import_l7_core.gl.STATIC_DRAW,
|
|
157
|
-
data: [],
|
|
158
|
-
type: import_l7_core.gl.FLOAT
|
|
190
|
+
}, {
|
|
191
|
+
key: "clearModels",
|
|
192
|
+
value: function clearModels() {
|
|
193
|
+
var _this$texture, _this$dataTexture;
|
|
194
|
+
|
|
195
|
+
(_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.destroy();
|
|
196
|
+
(_this$dataTexture = this.dataTexture) === null || _this$dataTexture === void 0 ? void 0 : _this$dataTexture.destroy();
|
|
197
|
+
this.iconService.off('imageUpdate', this.updateTexture);
|
|
198
|
+
}
|
|
199
|
+
}, {
|
|
200
|
+
key: "buildModels",
|
|
201
|
+
value: function buildModels(callbackModel) {
|
|
202
|
+
this.layer.buildLayerModel({
|
|
203
|
+
moduleName: 'lineWall',
|
|
204
|
+
vertexShader: line_vert,
|
|
205
|
+
fragmentShader: line_frag,
|
|
206
|
+
triangulation: _triangulation.LineTriangulation,
|
|
207
|
+
depth: {
|
|
208
|
+
enable: false
|
|
159
209
|
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
210
|
+
blend: this.getBlend()
|
|
211
|
+
}).then(function (model) {
|
|
212
|
+
callbackModel([model]);
|
|
213
|
+
}).catch(function (err) {
|
|
214
|
+
console.warn(err);
|
|
215
|
+
callbackModel([]);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
key: "registerBuiltinAttributes",
|
|
220
|
+
value: function registerBuiltinAttributes() {
|
|
221
|
+
var _this2 = this;
|
|
222
|
+
|
|
223
|
+
this.styleAttributeService.registerStyleAttribute({
|
|
224
|
+
name: 'distance',
|
|
225
|
+
type: _l7Core.AttributeType.Attribute,
|
|
226
|
+
descriptor: {
|
|
227
|
+
name: 'a_Distance',
|
|
228
|
+
buffer: {
|
|
229
|
+
// give the WebGL driver a hint that this buffer may change
|
|
230
|
+
usage: _l7Core.gl.STATIC_DRAW,
|
|
231
|
+
data: [],
|
|
232
|
+
type: _l7Core.gl.FLOAT
|
|
233
|
+
},
|
|
234
|
+
size: 1,
|
|
235
|
+
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
236
|
+
return [vertex[3]];
|
|
237
|
+
}
|
|
163
238
|
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
239
|
+
});
|
|
240
|
+
this.styleAttributeService.registerStyleAttribute({
|
|
241
|
+
name: 'total_distance',
|
|
242
|
+
type: _l7Core.AttributeType.Attribute,
|
|
243
|
+
descriptor: {
|
|
244
|
+
name: 'a_Total_Distance',
|
|
245
|
+
buffer: {
|
|
246
|
+
// give the WebGL driver a hint that this buffer may change
|
|
247
|
+
usage: _l7Core.gl.STATIC_DRAW,
|
|
248
|
+
data: [],
|
|
249
|
+
type: _l7Core.gl.FLOAT
|
|
250
|
+
},
|
|
251
|
+
size: 1,
|
|
252
|
+
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
253
|
+
return [vertex[5]];
|
|
254
|
+
}
|
|
179
255
|
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
256
|
+
});
|
|
257
|
+
this.styleAttributeService.registerStyleAttribute({
|
|
258
|
+
name: 'size',
|
|
259
|
+
type: _l7Core.AttributeType.Attribute,
|
|
260
|
+
descriptor: {
|
|
261
|
+
name: 'a_Size',
|
|
262
|
+
buffer: {
|
|
263
|
+
// give the WebGL driver a hint that this buffer may change
|
|
264
|
+
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
265
|
+
data: [],
|
|
266
|
+
type: _l7Core.gl.FLOAT
|
|
267
|
+
},
|
|
268
|
+
size: 2,
|
|
269
|
+
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
270
|
+
var _feature$size = feature.size,
|
|
271
|
+
size = _feature$size === void 0 ? 1 : _feature$size;
|
|
272
|
+
return Array.isArray(size) ? [size[0], size[1]] : [size, 0];
|
|
273
|
+
}
|
|
196
274
|
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
275
|
+
}); // point layer size;
|
|
276
|
+
|
|
277
|
+
this.styleAttributeService.registerStyleAttribute({
|
|
278
|
+
name: 'normal',
|
|
279
|
+
type: _l7Core.AttributeType.Attribute,
|
|
280
|
+
descriptor: {
|
|
281
|
+
name: 'a_Normal',
|
|
282
|
+
buffer: {
|
|
283
|
+
// give the WebGL driver a hint that this buffer may change
|
|
284
|
+
usage: _l7Core.gl.STATIC_DRAW,
|
|
285
|
+
data: [],
|
|
286
|
+
type: _l7Core.gl.FLOAT
|
|
287
|
+
},
|
|
288
|
+
size: 3,
|
|
289
|
+
// @ts-ignore
|
|
290
|
+
update: function update(feature, featureIdx, vertex, attributeIdx, normal) {
|
|
291
|
+
return normal;
|
|
292
|
+
}
|
|
212
293
|
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
294
|
+
});
|
|
295
|
+
this.styleAttributeService.registerStyleAttribute({
|
|
296
|
+
name: 'miter',
|
|
297
|
+
type: _l7Core.AttributeType.Attribute,
|
|
298
|
+
descriptor: {
|
|
299
|
+
name: 'a_Miter',
|
|
300
|
+
buffer: {
|
|
301
|
+
// give the WebGL driver a hint that this buffer may change
|
|
302
|
+
usage: _l7Core.gl.STATIC_DRAW,
|
|
303
|
+
data: [],
|
|
304
|
+
type: _l7Core.gl.FLOAT
|
|
305
|
+
},
|
|
306
|
+
size: 1,
|
|
307
|
+
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
308
|
+
return [vertex[4]];
|
|
309
|
+
}
|
|
228
310
|
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
311
|
+
});
|
|
312
|
+
this.styleAttributeService.registerStyleAttribute({
|
|
313
|
+
name: 'uv',
|
|
314
|
+
type: _l7Core.AttributeType.Attribute,
|
|
315
|
+
descriptor: {
|
|
316
|
+
name: 'a_iconMapUV',
|
|
317
|
+
buffer: {
|
|
318
|
+
// give the WebGL driver a hint that this buffer may change
|
|
319
|
+
usage: _l7Core.gl.DYNAMIC_DRAW,
|
|
320
|
+
data: [],
|
|
321
|
+
type: _l7Core.gl.FLOAT
|
|
322
|
+
},
|
|
323
|
+
size: 2,
|
|
324
|
+
update: function update(feature, featureIdx, vertex, attributeIdx) {
|
|
325
|
+
var iconMap = _this2.iconService.getIconMap();
|
|
326
|
+
|
|
327
|
+
var texture = feature.texture;
|
|
328
|
+
|
|
329
|
+
var _ref3 = iconMap[texture] || {
|
|
330
|
+
x: 0,
|
|
331
|
+
y: 0
|
|
332
|
+
},
|
|
333
|
+
x = _ref3.x,
|
|
334
|
+
y = _ref3.y;
|
|
335
|
+
|
|
336
|
+
return [x, y];
|
|
337
|
+
}
|
|
247
338
|
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}]);
|
|
342
|
+
return LineWallModel;
|
|
343
|
+
}(_BaseModel2.default);
|
|
344
|
+
|
|
345
|
+
exports.default = LineWallModel;
|
|
@@ -52,7 +52,8 @@ vec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {
|
|
|
52
52
|
// return mid;
|
|
53
53
|
}
|
|
54
54
|
float getSegmentRatio(float index) {
|
|
55
|
-
return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
|
|
55
|
+
// return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));
|
|
56
|
+
return index / (segmentNumber - 1.);
|
|
56
57
|
}
|
|
57
58
|
vec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {
|
|
58
59
|
// if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation
|
|
@@ -130,8 +131,9 @@ void main() {
|
|
|
130
131
|
styleMappingMat[3].b = d_distance_ratio;
|
|
131
132
|
|
|
132
133
|
// styleMappingMat[0][1] - arcThetaOffset
|
|
133
|
-
|
|
134
|
-
vec4
|
|
134
|
+
float arcThetaOffset = styleMappingMat[0][1];
|
|
135
|
+
vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, arcThetaOffset), 0.0, 1.0));
|
|
136
|
+
vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, arcThetaOffset), 0.0, 1.0));
|
|
135
137
|
// v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);
|
|
136
138
|
//unProjCustomCoord
|
|
137
139
|
|