Skip to content

Commit

Permalink
Release (#1428)
Browse files Browse the repository at this point in the history
* fix: enhance perf of Text when fontSize changed in webgl (#1424)

* fix: enhance perf of Text when fontSize changed in webgl #1422

* chore: commit changeset

* fix: draw 1px sub-pixel line correctly in webgl #1425

* chore: commit changeset

* chore: add testcase for sub-pixel line #1425

* fix: convertToPath should account for Rect with undefined x/y

* chore: commit changeset

* fix: make FillMesh instanced to enhance perf #1359

* chore: commit changeset

* fix: make textBaseline in SVG the same with Canvas #1313

* chore: commit changeset

* fix: add a fixed offset for Text in webgl #1380

* chore: commit changeset

* fix: convertToPath should be compatible with empty coords

* chore: commit changeset

* chore(release): bump version (#1427)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 21, 2023
1 parent 0e5ba2c commit c0f3d84
Show file tree
Hide file tree
Showing 146 changed files with 2,337 additions and 1,410 deletions.
8 changes: 7 additions & 1 deletion __tests__/integration/__node__tests__/canvas/line.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ describe('Render <Line> with g-canvas', () => {

const line7 = line.cloneNode();
line7.style.stroke = 'linear-gradient(90deg, blue, green 40%, red)';
line7.setPosition(150, 0);
line7.setPosition(180, 0);
canvas.appendChild(line7);

// lineWidth less than 1px
const line8 = line.cloneNode();
line8.style.lineWidth = 0.5;
line8.setPosition(10, 80);
canvas.appendChild(line8);

await sleep(300);

await new Promise((resolve) => {
Expand Down
Binary file modified __tests__/integration/__node__tests__/canvas/snapshots/line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion __tests__/integration/__node__tests__/webgl/line.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,15 @@ describe('Render <Line> with g-webgl', () => {

const line7 = line.cloneNode();
line7.style.stroke = 'linear-gradient(90deg, blue, green 40%, red)';
line7.setPosition(150, 0);
line7.setPosition(180, 0);
canvas.appendChild(line7);

// lineWidth less than 1px
const line8 = line.cloneNode();
line8.style.lineWidth = 0.5;
line8.setPosition(10, 80);
canvas.appendChild(line8);

await sleep(200);

const pixels = new Uint8Array(width * height * 4);
Expand Down
14 changes: 14 additions & 0 deletions __tests__/integration/__node__tests__/webgl/path.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,20 @@ describe('Render <Path> with g-webgl', () => {
});
canvas.appendChild(path3);

const path4 = new Path({
style: {
path: [['M', -6, -6], ['L', 6, -6], ['L', 6, 6], ['L', -6, 6], ['Z']],
lineWidth: 0,
fill: '#5AD8A6',
fillOpacity: 1,
stroke: '',
visibility: 'visible',
},
});
path4.translate(100, 100);
path4.scale(2);
canvas.appendChild(path4);

await sleep(200);

const pixels = new Uint8Array(width * height * 4);
Expand Down
Binary file modified __tests__/integration/__node__tests__/webgl/snapshots/circle.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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __tests__/integration/__node__tests__/webgl/snapshots/ellipse.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 modified __tests__/integration/__node__tests__/webgl/snapshots/line.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 modified __tests__/integration/__node__tests__/webgl/snapshots/marker.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 modified __tests__/integration/__node__tests__/webgl/snapshots/path.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 modified __tests__/integration/__node__tests__/webgl/snapshots/text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions packages/g-camera-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @antv/g-camera-api

## 1.2.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6

## 1.2.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-camera-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-camera-api",
"version": "1.2.5",
"version": "1.2.6",
"description": "A simple implementation of Camera API.",
"keywords": [
"antv",
Expand Down
17 changes: 17 additions & 0 deletions packages/g-canvas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @antv/g-canvas

## 1.11.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6
- @antv/g-plugin-canvas-path-generator@1.3.6
- @antv/g-plugin-canvas-picker@1.10.6
- @antv/g-plugin-canvas-renderer@1.9.6
- @antv/g-plugin-dom-interaction@1.9.6
- @antv/g-plugin-html-renderer@1.9.6
- @antv/g-plugin-image-loader@1.3.6

## 1.11.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvas",
"version": "1.11.5",
"version": "1.11.6",
"description": "A renderer implemented by Canvas 2D API",
"keywords": [
"antv",
Expand Down
17 changes: 17 additions & 0 deletions packages/g-canvaskit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @antv/g-canvaskit

## 0.10.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6
- @antv/g-plugin-canvas-path-generator@1.3.6
- @antv/g-plugin-canvas-picker@1.10.6
- @antv/g-plugin-canvaskit-renderer@1.3.6
- @antv/g-plugin-dom-interaction@1.9.6
- @antv/g-plugin-html-renderer@1.9.6
- @antv/g-plugin-image-loader@1.3.6

## 0.10.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-canvaskit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvaskit",
"version": "0.10.5",
"version": "0.10.6",
"description": "A renderer implemented by CanvasKit",
"keywords": [
"antv",
Expand Down
11 changes: 11 additions & 0 deletions packages/g-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @antv/g-components

## 1.9.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6

## 1.9.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-components",
"version": "1.9.5",
"version": "1.9.6",
"description": "Components for g",
"keywords": [
"antv",
Expand Down
11 changes: 11 additions & 0 deletions packages/g-dom-mutation-observer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @antv/g-dom-mutation-observer-api

## 1.2.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6

## 1.2.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-dom-mutation-observer-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-dom-mutation-observer-api",
"version": "1.2.5",
"version": "1.2.6",
"description": "A simple implementation of DOM MutationObserver API.",
"keywords": [
"antv",
Expand Down
11 changes: 11 additions & 0 deletions packages/g-gesture/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @antv/g-gesture

## 2.2.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6

## 2.2.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-gesture/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-gesture",
"version": "2.2.5",
"version": "2.2.6",
"description": "G Gesture",
"keywords": [
"antv",
Expand Down
11 changes: 11 additions & 0 deletions packages/g-image-exporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @antv/g-image-exporter

## 0.7.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6

## 0.7.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-image-exporter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-image-exporter",
"version": "0.7.5",
"version": "0.7.6",
"description": "A image exporter for G using DOM API",
"keywords": [
"antv",
Expand Down
10 changes: 10 additions & 0 deletions packages/g-lite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @antv/g-lite

## 1.2.6

### Patch Changes

- 1b0901ba: Make FillMesh instanced to enhance perf.
- 1b0901ba: ConvertToPath should account for Rect with undefined x/y.
- 1b0901ba: Make textBaseline in SVG the same with Canvas.
- 1b0901ba: Add a fixed offset for Text.
- 1b0901ba: ConvertToPath should be compatible with empty coords.

## 1.2.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-lite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-lite",
"version": "1.2.5",
"version": "1.2.6",
"description": "A core module for rendering engine implements DOM API.",
"keywords": [
"antv",
Expand Down
19 changes: 15 additions & 4 deletions packages/g-lite/src/utils/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -854,16 +854,21 @@ export function convertToPath(
let commands: AbsoluteArray = [] as unknown as AbsoluteArray;
switch (object.nodeName) {
case Shape.LINE:
const { x1, y1, x2, y2 } = (object as Line).parsedStyle;
const { x1 = 0, y1 = 0, x2 = 0, y2 = 0 } = (object as Line).parsedStyle;
commands = lineToCommands(x1, y1, x2, y2);
break;
case Shape.CIRCLE: {
const { r, cx, cy } = (object as Circle).parsedStyle;
const { r = 0, cx = 0, cy = 0 } = (object as Circle).parsedStyle;
commands = ellipseToCommands(r, r, cx, cy);
break;
}
case Shape.ELLIPSE: {
const { rx, ry, cx, cy } = (object as Ellipse).parsedStyle;
const {
rx = 0,
ry = 0,
cx = 0,
cy = 0,
} = (object as Ellipse).parsedStyle;
commands = ellipseToCommands(rx, ry, cx, cy);
break;
}
Expand All @@ -876,7 +881,13 @@ export function convertToPath(
);
break;
case Shape.RECT:
const { width, height, x, y, radius } = (object as Rect).parsedStyle;
const {
width = 0,
height = 0,
x = 0,
y = 0,
radius,
} = (object as Rect).parsedStyle;

const hasRadius = radius && radius.some((r) => r !== 0);
commands = rectToCommands(
Expand Down
11 changes: 11 additions & 0 deletions packages/g-lottie-player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @antv/g-lottie-player

## 0.2.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6

## 0.2.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-lottie-player/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-lottie-player",
"version": "0.2.5",
"version": "0.2.6",
"description": "A lottie player for G",
"keywords": [
"antv",
Expand Down
11 changes: 11 additions & 0 deletions packages/g-mobile-canvas-element/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @antv/g-mobile-canvas-element

## 0.8.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6

## 0.8.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-mobile-canvas-element/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-canvas-element",
"version": "0.8.5",
"version": "0.8.6",
"description": "Create a CanvasLike element from existed context in mobile environment",
"keywords": [
"antv",
Expand Down
17 changes: 17 additions & 0 deletions packages/g-mobile-canvas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @antv/g-mobile-canvas

## 0.10.6

### Patch Changes

- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- Updated dependencies [1b0901ba]
- @antv/g-lite@1.2.6
- @antv/g-plugin-canvas-path-generator@1.3.6
- @antv/g-plugin-canvas-picker@1.10.6
- @antv/g-plugin-canvas-renderer@1.9.6
- @antv/g-plugin-dragndrop@1.8.6
- @antv/g-plugin-image-loader@1.3.6
- @antv/g-plugin-mobile-interaction@0.9.6

## 0.10.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/g-mobile-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-canvas",
"version": "0.10.5",
"version": "0.10.6",
"description": "A renderer implemented with Canvas2D API in mobile environment",
"keywords": [
"antv",
Expand Down
Loading

0 comments on commit c0f3d84

Please sign in to comment.