* feat: 增加 bloomPass1.0、修改渲染流程,让 multiPass 有正确的渲染顺序

* style: lint style

* feat: 取消 bloom 在 postprocessor 中的多次渲染(没有明显优化)

* feat: polygon extrude 模式支持配置固定高度

* style: lint style

* feat: 优化后处理 bloom 的效果

* feat: 修改交替绘制 bloom 的写法

* style: lint style

* feat: 完善 iconService 加载渲染和销毁

* style: lint style

* feat: 补全 mapbox 模式下等面积点

* style: lint style

* fix: 修复 pointLayer animate 模式 opacity 失效

* style: lint style

* feat: 拆分 pointLayer 的 shader

* style: lint sytle

* feat: 拆分 lineLayer 的 linear 模式

* style: lint style

* feat: 优化点击的拾取判断

* style: lint style

* feat: 取消圆柱 shader 中的三元表达式、增强健壮性

* feat: 点图层圆柱体支持固定高度配置 heightfixed

* feat: 点图层圆柱体支持拾取高亮颜色的光照计算

* style: lint style

* style: lint style

* feat: 拆分 lintLayer line 模式下的 dash line

* style: lint style

* feat: lineLayer simpleline 的 linear shader 代码拆分

* style: lint style

* feat: 拆分 lineLayer arcLine linear shader  代码

* style: line style

* feat: lineLayer arc line 在 shader 中移除 linear 部分计算

* feat: 拆分 lineLayer arc dash 虚线的 shader 代码

* style: lint style

* feat: 拆分 lineLayer arc3d linear 部分的 shader 代码

* style: lint style

* style: lint style

* feat: 完善 isMiniAli 的判断,兼容 smallfish H5+ 的模式

* style: lint style

* style: adjust mulpass demo

* feat: 提供 getScale 方法

* style: lint style

* feat:     修复支付宝小程序h5+开发模式下引入l7样式失效问题

* feat: 修改 l7hammerjs 的导入

* chore: update version 2.7.16 -> 2.7.17

* fix: 恢复原有的 picking shader 代码,解决移动端高亮存在冲突破面的情况
This commit is contained in:
YiQianYao 2022-02-17 17:54:16 +08:00 committed by GitHub
parent 8ce0a624bf
commit 989094ff7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 89 additions and 81 deletions

View File

@ -14,7 +14,7 @@
"message": "chore: publish"
}
},
"version": "2.7.16",
"version": "2.7.17",
"npmClient": "yarn",
"useWorkspaces": true,
"publishConfig": {

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-component",
"version": "2.7.16",
"version": "2.7.17",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
@ -25,8 +25,8 @@
"author": "lzxue",
"license": "ISC",
"dependencies": {
"@antv/l7-core": "^2.7.16",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-core": "^2.7.17",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7",
"eventemitter3": "^4.0.0",
"inversify": "^5.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-core",
"version": "2.7.16",
"version": "2.7.17",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
@ -24,7 +24,7 @@
"license": "ISC",
"dependencies": {
"@antv/async-hook": "^2.1.0",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7",
"ajv": "^6.10.2",
"element-resize-event": "^3.0.3",

View File

@ -1,7 +1,8 @@
import { $window, isMini } from '@antv/l7-utils';
import EventEmitter from 'eventemitter3';
import { inject, injectable } from 'inversify';
import Hammer from 'l7hammerjs'; // l7 - mini
// import Hammer from 'l7hammerjs'; // l7 - mini
import * as Hammer from 'l7hammerjs';
import 'reflect-metadata';
// @ts-ignore
import { TYPES } from '../../types';

View File

@ -18,14 +18,16 @@ uniform float u_activeMix: 0;
* Returns highlight color if this item is selected.
*/
vec4 filterHighlightColor(vec4 color, float weight) {
float selected = v_PickingResult.a;
// float selected = v_PickingResult.a;
bool selected = bool(v_PickingResult.a);
if (selected == SELECT) {
// 点击选中状态
vec4 selectColor = u_SelectColor * COLOR_SCALE;
return selectColor;
} else if (selected == HIGHLIGHT) {
// hover 高亮状态
// if (selected == SELECT) {
if (selected) {
// // 点击选中状态
// vec4 selectColor = u_SelectColor * COLOR_SCALE;
// return selectColor;
// } else if (selected == HIGHLIGHT) {
// // hover 高亮状态
vec4 highLightColor = u_HighlightColor * COLOR_SCALE;
float highLightAlpha = highLightColor.a;

View File

@ -40,15 +40,18 @@ void setPickingColor(vec3 pickingColor) {
return;
}
// compares only in highlight stage
if (u_EnableSelect == 1.0 && u_PickingStage == PICKING_HIGHLIGHT && isVertexSelected(pickingColor)) {
// 选中态
v_PickingResult.a = SELECT;
} else if (u_PickingStage == PICKING_HIGHLIGHT && isVertexPicked(pickingColor)) {
// 高亮态
v_PickingResult.a = HIGHLIGHT;
} else {
v_PickingResult.a = NORMAL;
}
v_PickingResult.a = float((u_PickingStage == PICKING_HIGHLIGHT) && isVertexPicked(pickingColor));
// if (u_EnableSelect == 1.0 && u_PickingStage == PICKING_HIGHLIGHT && isVertexSelected(pickingColor)) {
// // 选中态
// v_PickingResult.a = SELECT;
// } else if (u_PickingStage == PICKING_HIGHLIGHT && isVertexPicked(pickingColor)) {
// // 高亮态
// v_PickingResult.a = HIGHLIGHT;
// } else {
// v_PickingResult.a = NORMAL;
// }
// Stores the picking color so that the fragment shader can render it during picking
v_PickingResult.rgb = pickingColor * COLOR_SCALE;

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7",
"version": "2.7.16",
"version": "2.7.17",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "lib/index.js",
"module": "es/index.js",
@ -25,13 +25,13 @@
"author": "antv",
"license": "MIT",
"dependencies": {
"@antv/l7-component": "^2.7.16",
"@antv/l7-core": "^2.7.16",
"@antv/l7-layers": "^2.7.16",
"@antv/l7-maps": "^2.7.16",
"@antv/l7-scene": "^2.7.16",
"@antv/l7-source": "^2.7.16",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-component": "^2.7.17",
"@antv/l7-core": "^2.7.17",
"@antv/l7-layers": "^2.7.17",
"@antv/l7-maps": "^2.7.17",
"@antv/l7-scene": "^2.7.17",
"@antv/l7-source": "^2.7.17",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7"
},
"gitHead": "684ba4eb806a798713496d3fc0b4d1e17517dc31",

View File

@ -1,2 +1,2 @@
const version = '2.7.16';
const version = '2.7.17';
export { version };

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-layers",
"version": "2.7.16",
"version": "2.7.17",
"description": "L7's collection of built-in layers",
"main": "lib/index.js",
"module": "es/index.js",
@ -24,9 +24,9 @@
"license": "ISC",
"dependencies": {
"@antv/geo-coord": "^1.0.8",
"@antv/l7-core": "^2.7.16",
"@antv/l7-source": "^2.7.16",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-core": "^2.7.17",
"@antv/l7-source": "^2.7.17",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7",
"@mapbox/martini": "^0.2.0",
"@turf/meta": "^6.0.2",

View File

@ -84,36 +84,37 @@ export default class PixelPickingPlugin implements ILayerPlugin {
layer.hooks.beforeHighlight.tap(
'PixelPickingPlugin',
(pickedColor: number[]) => {
const {
highlightColor,
activeMix = 0,
enableSelect,
} = layer.getLayerConfig();
const { highlightColor, activeMix = 0 } = layer.getLayerConfig();
// const {
// highlightColor,
// activeMix = 0,
// enableSelect,
// } = layer.getLayerConfig();
const highlightColorInArray =
typeof highlightColor === 'string'
? rgb2arr(highlightColor)
: highlightColor || [1, 0, 0, 1];
const { selectColor } = layer.getLayerConfig();
const selectColorInArray =
typeof selectColor === 'string'
? rgb2arr(selectColor)
: selectColor || [1, 0, 0, 1];
// const { selectColor } = layer.getLayerConfig();
// const selectColorInArray =
// typeof selectColor === 'string'
// ? rgb2arr(selectColor)
// : selectColor || [1, 0, 0, 1];
layer.updateLayerConfig({
pickedFeatureID: decodePickingColor(new Uint8Array(pickedColor)),
});
const currentSelectedId = layer.getCurrentSelectedId();
// const currentSelectedId = layer.getCurrentSelectedId();
layer.models.forEach((model) =>
model.addUniforms({
u_PickingStage: PickingStage.HIGHLIGHT,
u_PickingColor: pickedColor,
u_HighlightColor: highlightColorInArray.map((c) => c * 255),
u_activeMix: activeMix,
u_CurrentSelectedId: currentSelectedId
? encodePickingColor(layer.getCurrentSelectedId()!)
: [0, 0, 0],
u_SelectColor: selectColorInArray.map((c) => c * 255),
u_EnableSelect: +(enableSelect || false),
// u_CurrentSelectedId: currentSelectedId
// ? encodePickingColor(layer.getCurrentSelectedId()!)
// : [0, 0, 0],
// u_SelectColor: selectColorInArray.map((c) => c * 255),
// u_EnableSelect: +(enableSelect || false),
}),
);
},

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-map",
"version": "2.7.16",
"version": "2.7.17",
"description": "l7 map",
"keywords": [],
"author": "thinkinggis <lzx199065@gmail.com>",
@ -37,7 +37,7 @@
},
"homepage": "https://github.com/antvis/L7#readme",
"dependencies": {
"@antv/l7-utils": "^2.7.16",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7",
"@mapbox/point-geometry": "^0.1.0",
"@mapbox/unitbezier": "^0.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-maps",
"version": "2.7.16",
"version": "2.7.17",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
@ -27,9 +27,9 @@
"license": "ISC",
"dependencies": {
"@amap/amap-jsapi-loader": "^0.0.3",
"@antv/l7-core": "^2.7.16",
"@antv/l7-map": "^2.7.16",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-core": "^2.7.17",
"@antv/l7-map": "^2.7.17",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7",
"@types/amap-js-api": "^1.4.6",
"@types/mapbox-gl": "^1.11.2",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-mini",
"version": "2.7.16",
"version": "2.7.17",
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
"main": "lib/index.js",
"module": "es/index.js",
@ -25,11 +25,11 @@
"author": "antv",
"license": "MIT",
"dependencies": {
"@antv/l7-core": "^2.7.16",
"@antv/l7-layers": "^2.7.16",
"@antv/l7-maps": "^2.7.16",
"@antv/l7-scene": "^2.7.16",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-core": "^2.7.17",
"@antv/l7-layers": "^2.7.17",
"@antv/l7-maps": "^2.7.17",
"@antv/l7-scene": "^2.7.17",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7"
},
"gitHead": "684ba4eb806a798713496d3fc0b4d1e17517dc31",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-renderer",
"version": "2.7.16",
"version": "2.7.17",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
@ -26,7 +26,7 @@
"gl": "^4.4.0"
},
"dependencies": {
"@antv/l7-core": "^2.7.16",
"@antv/l7-core": "^2.7.17",
"@babel/runtime": "^7.7.7",
"inversify": "^5.0.1",
"l7regl": "^0.0.17",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-scene",
"version": "2.7.16",
"version": "2.7.17",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
@ -23,12 +23,12 @@
"author": "xiaoiver",
"license": "ISC",
"dependencies": {
"@antv/l7-component": "^2.7.16",
"@antv/l7-core": "^2.7.16",
"@antv/l7-layers": "^2.7.16",
"@antv/l7-maps": "^2.7.16",
"@antv/l7-renderer": "^2.7.16",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-component": "^2.7.17",
"@antv/l7-core": "^2.7.17",
"@antv/l7-layers": "^2.7.17",
"@antv/l7-maps": "^2.7.17",
"@antv/l7-renderer": "^2.7.17",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7",
"inversify": "^5.0.1",
"mapbox-gl": "^1.2.1",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-source",
"version": "2.7.16",
"version": "2.7.17",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",
@ -26,8 +26,8 @@
"license": "ISC",
"dependencies": {
"@antv/async-hook": "^2.1.0",
"@antv/l7-core": "^2.7.16",
"@antv/l7-utils": "^2.7.16",
"@antv/l7-core": "^2.7.17",
"@antv/l7-utils": "^2.7.17",
"@babel/runtime": "^7.7.7",
"@mapbox/geojson-rewind": "^0.4.0",
"@turf/helpers": "^6.1.4",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-three",
"version": "2.7.16",
"version": "2.7.17",
"description": "three for L7 ",
"keywords": [
"3D",
@ -44,9 +44,9 @@
},
"homepage": "https://github.com/antvis/L7#readme",
"dependencies": {
"@antv/l7-core": "^2.7.16",
"@antv/l7-layers": "^2.7.16",
"@antv/l7-scene": "^2.7.16",
"@antv/l7-core": "^2.7.17",
"@antv/l7-layers": "^2.7.17",
"@antv/l7-scene": "^2.7.17",
"@babel/runtime": "^7.7.7",
"inversify": "^5.0.1",
"reflect-metadata": "^0.1.13",

View File

@ -1,6 +1,6 @@
{
"name": "@antv/l7-utils",
"version": "2.7.16",
"version": "2.7.17",
"description": "",
"main": "lib/index.js",
"module": "es/index.js",

View File

@ -122,6 +122,7 @@ export default class GaodeMapComponent extends React.Component {
// // type: 'www'
// })
// .animate(true)
.select(true)
.active({ color: '#00f' })
.style({
heightfixed: true,