Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: beta sync master #2529

Merged
merged 51 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9f03717
refactor: 重构高德地图 V2 以视口进行同步 (#2387)
lvisei Apr 17, 2024
6a1d703
Merge branch 'master' into beta
lvisei Apr 17, 2024
6ffc717
wip: data shake case
lvisei Apr 19, 2024
5c82d3a
Merge branch 'master' into fix/data-shake
lvisei Apr 24, 2024
6166750
Merge branch 'master' into beta
lvisei Apr 24, 2024
33f505d
fix: 新版高德大于 21 级别抖动问题
lvisei Apr 28, 2024
a44d34e
Merge branch 'fix/amap-data-shake' into beta
lvisei Apr 28, 2024
0913661
fix: Mapbox/Maplibre 20 层级以上数据偏移问题 (#2416)
lvisei Apr 30, 2024
21ec03a
Merge branch 'master' into beta
lvisei Apr 30, 2024
46efdc5
chore: set to beta version
lvisei Apr 30, 2024
969b533
refactor: remove old amap v1 and v2 (#2435)
lvisei May 6, 2024
048c203
chore: add changeset
lvisei May 6, 2024
3f508ff
fix: type EventEmitter
lvisei May 6, 2024
18db6f7
chore: set changeset
lvisei May 6, 2024
4a73001
chore: version (beta) (#2442)
github-actions[bot] May 6, 2024
d408bdb
fix: mapbox 下部分面数据图层绘制异常 (#2453)
lvisei May 15, 2024
e9b9583
Merge branch 'master' into beta
lvisei May 16, 2024
ed86b03
Merge branch 'master' into beta
lvisei May 16, 2024
7e3b672
fix: 修复 WebGPU 模式渲染问题 (#2450)
lvisei May 16, 2024
3e33888
fix: mapbox 线图层的贴图变形 (#2474)
lvisei May 16, 2024
05dd5cc
refactor: set default renderer to device (#2477)
lvisei May 16, 2024
37b72bd
chore: set changeset
lvisei May 16, 2024
c4c6004
chore: version (beta) (#2480)
github-actions[bot] May 16, 2024
f68e1be
revert: use cache for createInputLayout
lvisei May 17, 2024
87a7e8b
chore: set changesets
lvisei May 17, 2024
5e4a474
chore: type throttle
lvisei May 17, 2024
34aaaf1
chore: version (beta) (#2482)
github-actions[bot] May 17, 2024
ef91217
test: 应用调试工程 (#2494)
lvisei May 24, 2024
49c1b7e
Merge branch 'master' into beta
lvisei May 24, 2024
356a956
test: raster layer
lvisei May 24, 2024
a7bbef5
test: line dash
lvisei May 24, 2024
0754eeb
fix: 修复热力蜂窝图层渲染空白 (#2500)
lvisei May 24, 2024
9060f49
chore: version (beta) (#2502)
github-actions[bot] May 24, 2024
aca779d
fix: 无地图与 MapLibre 模式移动 Marker 出错 (#2509)
lvisei May 29, 2024
a5f57ed
fix: 在 WebGL2 拾取事件冒泡延迟问题 (#2511)
lvisei May 29, 2024
f5f24d3
chore: version (beta) (#2512)
github-actions[bot] May 29, 2024
cca16a3
fix: 天地图 setCenter 方法缺失 (#2513)
lvisei May 31, 2024
100fd87
chore: version (beta) (#2514)
github-actions[bot] May 31, 2024
8939e9b
fix: 修复在 Map 上使用组件事件穿透到图层上的问题 (#2518)
lvisei Jun 4, 2024
958f5d1
chore: version (beta) (#2519)
github-actions[bot] Jun 4, 2024
67647e9
fix: 解决 GeometryLayer 在不同底图上的渲染不一致情况 (#2523)
lvisei Jun 5, 2024
7e38a83
refactor: 升级新版一方地图交互事件机制,解决抖动问题 (#2521)
lvisei Jun 5, 2024
a3cbd49
chore: type
lvisei Jun 5, 2024
7ca84b8
chore: change MapNext to Map
lvisei Jun 5, 2024
663667c
chore: import right map type
lvisei Jun 5, 2024
7c78b4a
chore: version (beta) (#2524)
github-actions[bot] Jun 5, 2024
1797625
fix: 顶点着色器与片元着色器 varying 变量顺序不一致 (#2527)
lvisei Jun 7, 2024
3aa0f32
fix: 修复 bindings 缓存在 WebGPU 的问题 (#2526)
lvisei Jun 7, 2024
428b5ea
chore: version (beta) (#2528)
github-actions[bot] Jun 7, 2024
1113315
chore: exit beta
lvisei Jun 11, 2024
cc6687e
chore: update changeset
lvisei Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/clean-beers-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-layers': patch
---

fix: mapbox 线图层的贴图变形
5 changes: 5 additions & 0 deletions .changeset/cyan-badgers-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-layers': patch
---

fix: 解决 GeometryLayer 在不同底图上的渲染不一致情况
5 changes: 5 additions & 0 deletions .changeset/famous-geese-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-renderer': patch
---

fix: 修复 bindings 缓存在 WebGPU 的问题
5 changes: 5 additions & 0 deletions .changeset/five-singers-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-component': patch
---

fix: 无地图与 MapLibre 模式移动 Marker 出错
5 changes: 5 additions & 0 deletions .changeset/gold-fans-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-maps': patch
---

fix: 修复在 Map 上使用组件事件穿透到图层上的问题
5 changes: 5 additions & 0 deletions .changeset/honest-schools-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-layers': patch
---

fix: 修复热力蜂窝图层渲染空白
5 changes: 5 additions & 0 deletions .changeset/large-pumas-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-map': patch
---

refactor: 升级新版一方地图交互事件机制,解决抖动问题
5 changes: 5 additions & 0 deletions .changeset/polite-apples-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-core': patch
---

fix: 在 WebGL2 拾取事件冒泡延迟问题
35 changes: 35 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"mode": "exit",
"tag": "beta",
"initialVersions": {
"@antv/l7-component": "2.21.10",
"@antv/l7-core": "2.21.10",
"@antv/l7": "2.21.10",
"@antv/l7-layers": "2.21.10",
"@antv/l7-map": "2.21.10",
"@antv/l7-maps": "2.21.10",
"@antv/l7-renderer": "2.21.10",
"@antv/l7-scene": "2.21.10",
"@antv/l7-source": "2.21.10",
"@antv/l7-test-utils": "2.21.10",
"@antv/l7-three": "2.21.10",
"@antv/l7-utils": "2.21.10",
"@antv/l7-site": "2.21.3"
},
"changesets": [
"clean-beers-try",
"cyan-badgers-argue",
"famous-geese-know",
"five-singers-rush",
"gold-fans-dream",
"honest-schools-relate",
"large-pumas-provide",
"polite-apples-rule",
"proud-flies-change",
"rude-crabs-cheer",
"slimy-starfishes-joke",
"sour-dodos-bake",
"sour-lemons-perform",
"tiny-seas-camp"
]
}
5 changes: 5 additions & 0 deletions .changeset/rude-crabs-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-maps': patch
---

fix: 天地图 setCenter 方法缺失
9 changes: 9 additions & 0 deletions .changeset/slimy-starfishes-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@antv/l7-layers': patch
'@antv/l7-core': patch
'@antv/l7-maps': patch
---

fix: Mapbox/Maplibre 20 层级以上数据偏移问题
fix: 修复点图层部分 shape 中心点计算有误
fix: 修复立体面图层光照计算有误
5 changes: 5 additions & 0 deletions .changeset/sour-dodos-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-scene': patch
---

feat: 设置默认的渲染引擎为 g-device,优先使用 WebGL2
5 changes: 5 additions & 0 deletions .changeset/sour-lemons-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-maps': minor
---

refactor: 高德地图联动升级
5 changes: 5 additions & 0 deletions .changeset/tiny-seas-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/l7-layers': patch
---

fix: mapbox 下部分面数据图层绘制异常
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ jobs:
# use xvfb-run run in ubuntu
run: xvfb-run pnpm test-cover

- name: Upload test coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload test coverage
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

integration-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ site/.dumi/tmp-production/
site/public/
site/public_site/

# examples for data
examples/data/
8 changes: 6 additions & 2 deletions __tests__/integration/gallery.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { generateCanvasTestCases } from './utils/generator';
const TEST_CASES = [
{
name: 'fujian',
sleepTime: 500,
sleepTime: 1000,
},
{
name: 'variFlight',
sleepTime: 1000,
},
];

describe('Gallery Snapshot', () => {
generateCanvasTestCases('Gallery', TEST_CASES);
generateCanvasTestCases('gallery', TEST_CASES);
});
17 changes: 17 additions & 0 deletions __tests__/integration/heatmap.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { generateCanvasTestCases } from './utils/generator';

const TEST_CASES = [
{
name: 'normal',
},
{
name: 'grid',
},
{
name: 'hexagon',
},
];

describe('Heatmap Snapshot', () => {
generateCanvasTestCases('heatmap', TEST_CASES);
});
25 changes: 15 additions & 10 deletions __tests__/integration/line.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,33 @@ import { generateCanvasTestCases } from './utils/generator';

const TEST_CASES = [
{
name: 'arc',
sleepTime: 500,
name: 'simple',
},
{
name: 'arc_plane',
sleepTime: 500,
name: 'normal',
},

{
name: 'flow',
sleepTime: 800,
name: 'dash',
snapshot: false,
},
{
name: 'wall',
},
{
name: 'arc',
sleepTime: 600,
},
{
name: 'dash',
name: 'arc3D',
},
{
name: 'greatcircle',
},
{
name: 'flow',
sleepTime: 500,
},
];

describe('Line Snapshot', () => {
generateCanvasTestCases('Line', TEST_CASES);
generateCanvasTestCases('line', TEST_CASES);
});
2 changes: 1 addition & 1 deletion __tests__/integration/mask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ const TEST_CASES = [
];

describe('Mask Snapshot', () => {
generateCanvasTestCases('Mask', TEST_CASES);
generateCanvasTestCases('mask', TEST_CASES);
});
15 changes: 10 additions & 5 deletions __tests__/integration/point.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ const TEST_CASES = [
name: 'column',
},
{
name: 'fill_image',
name: 'dot',
snapshot: false,
},
{
name: 'fill',
},
// {
// name: 'image',
// },
{
name: 'fillImage',
},
{
name: 'image',
snapshot: false,
},
{
name: 'text',
},
];

describe('Point Snapshot', () => {
generateCanvasTestCases('Point', TEST_CASES);
generateCanvasTestCases('point', TEST_CASES);
});
13 changes: 9 additions & 4 deletions __tests__/integration/polygon.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@ import { generateCanvasTestCases } from './utils/generator';
const TEST_CASES = [
{
name: 'extrude',
sleepTime: 500,
},
{
name: 'extrusion',
sleepTime: 500,
},
{
name: 'fill',
},
{
name: 'ocean',
snapshots: false,
snapshot: false,
},
{
name: 'texture',
snapshots: false,
snapshot: false,
},
{
name: 'water',
snapshots: false,
snapshot: false,
},
];

describe('Polygon Snapshot', () => {
generateCanvasTestCases('Polygon', TEST_CASES);
generateCanvasTestCases('polygon', TEST_CASES);
});
Binary file removed __tests__/integration/snapshots/Gallery_fujian.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Line_arc.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Line_arc_plane.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Line_dash.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Line_flow.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Mask_multi.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Mask_single.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Point_billboard.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Point_column.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Point_fill.png
Binary file not shown.
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Point_text.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Polygon_extrude.png
Binary file not shown.
Binary file removed __tests__/integration/snapshots/Polygon_fill.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __tests__/integration/snapshots/line_arc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __tests__/integration/snapshots/line_arc3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __tests__/integration/snapshots/line_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __tests__/integration/snapshots/line_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __tests__/integration/snapshots/line_simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added __tests__/integration/snapshots/line_wall.png
Binary file added __tests__/integration/snapshots/mask_multi.png
Binary file added __tests__/integration/snapshots/mask_single.png
Binary file added __tests__/integration/snapshots/point_column.png
Binary file added __tests__/integration/snapshots/point_fill.png
Binary file added __tests__/integration/snapshots/point_text.png
Binary file added __tests__/integration/snapshots/polygon_fill.png
28 changes: 20 additions & 8 deletions __tests__/integration/utils/generator.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import type { Browser, BrowserContext, Page } from 'playwright';
import type { Browser, BrowserContext } from 'playwright';
import { chromium, devices } from 'playwright';
import { sleep } from './sleep';
import './useSnapshotMatchers';

export function generateCanvasTestCases(
namespace: string,
tests: { name: string; sleepTime?: number; snapshots?: boolean }[],
tests: { name: string; sleepTime?: number; snapshot?: boolean }[],
) {
const port = (globalThis as any).PORT;
let browser: Browser, context: BrowserContext, page: Page;
let browser: Browser, context: BrowserContext;

beforeAll(async () => {
// Setup
browser = await chromium.launch({
args: ['--headless', '--no-sandbox'],
});
context = await browser.newContext(devices['Desktop Chrome']);
page = await context.newPage();
await context.exposeFunction('screenshot', () => {});
});

afterAll(async () => {
Expand All @@ -26,15 +24,29 @@ export function generateCanvasTestCases(
});

tests
.filter((test) => test.snapshots !== false)
.filter((test) => test.snapshot !== false)
.map((test) => {
const { name, sleepTime = 200 } = test;
const key = `${namespace}_${name}`;

it(key, async () => {
const page = await context.newPage();

let resolveReady: () => void;
const readyPromise = new Promise<void>((resolve) => {
resolveReady = () => {
resolve();
};
});

await page.exposeFunction('screenshot', async () => {
resolveReady();
});

// Go to test page served by vite devServer.
const url = `http://localhost:${port}/?type=${namespace}&name=${name}`;
const url = `http://localhost:${port}/?namespace=${namespace}&name=${name}&snapshot=true`;
await page.goto(url);
await readyPromise;
await sleep(sleepTime);

// Chart already rendered, capture into buffer.
Expand All @@ -45,7 +57,7 @@ export function generateCanvasTestCases(
try {
expect(buffer).toMatchCanvasSnapshot(dir, key, { maxError });
} finally {
//
page.close();
}
});
});
Expand Down
3 changes: 3 additions & 0 deletions __tests__/unit/preset/environment.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
(window as any).URL.createObjectURL = jest.fn;
(window as any).ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
}));
25 changes: 15 additions & 10 deletions examples/constants.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import type { RenderDemoMap, RenderDemoOptions } from './types';
import type { GUIOptions, TestCaseBasemap } from './types';

export const MAP_TYPES: RenderDemoMap[] = [
export const DEFAULT_GUI_OPTIONS: GUIOptions = {
map: 'Map',
renderer: 'device',
animate: false,
enableWebGPU: false,
};

export const SEARCH_PARAMS_KEYS = ['namespace', 'name', 'snapshot'].concat(
Object.keys(DEFAULT_GUI_OPTIONS),
);

export const MAP_TYPES: TestCaseBasemap[] = [
'Map',
'GaodeMap',
'BaiduMap',
'Mapbox',
'MapLibre',
'BaiduMap',
'TencentMap',
'Mapbox',
'TMap',
'GoogleMap',
] as const;

export const DEFAULT_RENDER_OPTIONS: RenderDemoOptions = {
map: 'Map',
renderer: 'device',
animate: false,
};
Loading
Loading