From e629f562fae89375c8a95f1be8fc4b8a3fbfadba Mon Sep 17 00:00:00 2001 From: xiaoiver Date: Thu, 29 Jun 2023 10:46:13 +0800 Subject: [PATCH] Release (#1396) * fix: remove this syntax in g-math (#1394) * fix: remove spreadArray from SyncWaterfallHook to enhance perf * fix: remove this syntax in g-math since it use ESM now * chore: commit changesets * chore(release): bump version (#1395) Co-authored-by: github-actions[bot] --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] --- .eslintrc.js | 3 + packages/g-camera-api/CHANGELOG.md | 8 + packages/g-camera-api/package.json | 4 +- packages/g-canvas/CHANGELOG.md | 13 ++ packages/g-canvas/package.json | 2 +- packages/g-canvaskit/CHANGELOG.md | 13 ++ packages/g-canvaskit/package.json | 2 +- packages/g-components/CHANGELOG.md | 8 + packages/g-components/package.json | 4 +- .../g-dom-mutation-observer-api/CHANGELOG.md | 7 + .../g-dom-mutation-observer-api/package.json | 2 +- packages/g-gesture/CHANGELOG.md | 7 + packages/g-gesture/package.json | 2 +- packages/g-image-exporter/CHANGELOG.md | 7 + packages/g-image-exporter/package.json | 2 +- packages/g-lite/CHANGELOG.md | 8 + packages/g-lite/package.json | 4 +- .../src/utils/tapable/SyncWaterfallHook.ts | 5 +- packages/g-lottie-player/CHANGELOG.md | 7 + packages/g-lottie-player/package.json | 2 +- packages/g-math/CHANGELOG.md | 6 + packages/g-math/package.json | 4 +- packages/g-math/src/arc.ts | 4 +- packages/g-math/src/cubic.ts | 14 +- packages/g-math/src/ellipse.ts | 4 +- packages/g-math/src/line.ts | 2 +- packages/g-math/src/quadratic.ts | 2 +- packages/g-mobile-canvas-element/CHANGELOG.md | 7 + packages/g-mobile-canvas-element/package.json | 2 +- packages/g-mobile-canvas/CHANGELOG.md | 13 ++ packages/g-mobile-canvas/package.json | 2 +- packages/g-mobile-svg/CHANGELOG.md | 11 ++ packages/g-mobile-svg/package.json | 2 +- packages/g-mobile-webgl/CHANGELOG.md | 13 ++ packages/g-mobile-webgl/package.json | 2 +- packages/g-pattern/CHANGELOG.md | 7 + packages/g-pattern/package.json | 2 +- packages/g-plugin-3d/CHANGELOG.md | 10 ++ packages/g-plugin-3d/package.json | 4 +- packages/g-plugin-a11y/CHANGELOG.md | 7 + packages/g-plugin-a11y/package.json | 2 +- packages/g-plugin-annotation/CHANGELOG.md | 8 + packages/g-plugin-annotation/package.json | 4 +- packages/g-plugin-box2d/CHANGELOG.md | 7 + packages/g-plugin-box2d/package.json | 2 +- .../CHANGELOG.md | 8 + .../package.json | 2 +- packages/g-plugin-canvas-picker/CHANGELOG.md | 11 ++ packages/g-plugin-canvas-picker/package.json | 4 +- .../g-plugin-canvas-renderer/CHANGELOG.md | 11 ++ .../g-plugin-canvas-renderer/package.json | 4 +- .../g-plugin-canvaskit-renderer/CHANGELOG.md | 10 ++ .../g-plugin-canvaskit-renderer/package.json | 4 +- packages/g-plugin-control/CHANGELOG.md | 7 + packages/g-plugin-control/package.json | 2 +- packages/g-plugin-css-select/CHANGELOG.md | 7 + packages/g-plugin-css-select/package.json | 2 +- .../g-plugin-device-renderer/CHANGELOG.md | 11 ++ .../g-plugin-device-renderer/package.json | 4 +- .../src/PickingPlugin.ts | 1 + .../src/RenderGraphPlugin.ts | 22 ++- .../src/passes/FXAA.ts | 21 ++- .../src/platform/utils/states.ts | 6 +- .../src/render/RenderHelper.ts | 8 +- .../g-plugin-dom-interaction/CHANGELOG.md | 7 + .../g-plugin-dom-interaction/package.json | 2 +- packages/g-plugin-dragndrop/CHANGELOG.md | 7 + packages/g-plugin-dragndrop/package.json | 2 +- packages/g-plugin-gpgpu/CHANGELOG.md | 8 + packages/g-plugin-gpgpu/package.json | 2 +- packages/g-plugin-html-renderer/CHANGELOG.md | 8 + packages/g-plugin-html-renderer/package.json | 4 +- packages/g-plugin-image-loader/CHANGELOG.md | 8 + packages/g-plugin-image-loader/package.json | 4 +- packages/g-plugin-matterjs/CHANGELOG.md | 8 + packages/g-plugin-matterjs/package.json | 4 +- .../g-plugin-mobile-interaction/CHANGELOG.md | 7 + .../g-plugin-mobile-interaction/package.json | 2 +- packages/g-plugin-physx/CHANGELOG.md | 7 + packages/g-plugin-physx/package.json | 2 +- .../CHANGELOG.md | 8 + .../package.json | 2 +- .../g-plugin-rough-svg-renderer/CHANGELOG.md | 8 + .../g-plugin-rough-svg-renderer/package.json | 2 +- packages/g-plugin-svg-picker/CHANGELOG.md | 8 + packages/g-plugin-svg-picker/package.json | 2 +- packages/g-plugin-svg-renderer/CHANGELOG.md | 8 + packages/g-plugin-svg-renderer/package.json | 4 +- packages/g-plugin-webgl-device/CHANGELOG.md | 9 ++ packages/g-plugin-webgl-device/package.json | 2 +- .../src/platform/Device.ts | 32 ++-- packages/g-plugin-webgpu-device/CHANGELOG.md | 9 ++ packages/g-plugin-webgpu-device/package.json | 2 +- .../src/platform/Buffer.ts | 21 ++- .../src/platform/Device.ts | 3 +- .../src/platform/RenderPass.ts | 133 +++++++++++---- .../src/platform/utils.ts | 18 ++- packages/g-plugin-yoga/CHANGELOG.md | 7 + packages/g-plugin-yoga/package.json | 2 +- .../CHANGELOG.md | 8 + .../package.json | 2 +- .../g-plugin-zdog-svg-renderer/CHANGELOG.md | 9 ++ .../g-plugin-zdog-svg-renderer/package.json | 2 +- packages/g-shader-components/CHANGELOG.md | 6 + packages/g-shader-components/batch.vert | 6 +- packages/g-shader-components/package.json | 2 +- packages/g-svg/CHANGELOG.md | 10 ++ packages/g-svg/package.json | 2 +- packages/g-web-animations-api/CHANGELOG.md | 7 + packages/g-web-animations-api/package.json | 2 +- packages/g-web-components/CHANGELOG.md | 9 ++ packages/g-web-components/package.json | 2 +- packages/g-webgl/CHANGELOG.md | 12 ++ packages/g-webgl/package.json | 2 +- packages/g-webgpu/CHANGELOG.md | 12 ++ packages/g-webgpu/package.json | 2 +- packages/g/CHANGELOG.md | 10 ++ packages/g/package.json | 2 +- packages/react-g/CHANGELOG.md | 7 + packages/react-g/package.json | 4 +- pnpm-lock.yaml | 153 ++++++++---------- site/examples/3d/3d-basic/demo/webgpu.js | 34 ++-- site/package.json | 5 +- 123 files changed, 797 insertions(+), 271 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 871b1d99a..94358837c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,9 @@ module.exports = { globals: { G: true, + window: true, + document: true, + module: true, }, ignorePatterns: [ diff --git a/packages/g-camera-api/CHANGELOG.md b/packages/g-camera-api/CHANGELOG.md index 19e6c43cb..e23042e59 100644 --- a/packages/g-camera-api/CHANGELOG.md +++ b/packages/g-camera-api/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-camera-api +## 1.2.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.2.0 ### Minor Changes diff --git a/packages/g-camera-api/package.json b/packages/g-camera-api/package.json index 969fe66ef..6663c6104 100644 --- a/packages/g-camera-api/package.json +++ b/packages/g-camera-api/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-camera-api", - "version": "1.2.0", + "version": "1.2.1", "description": "A simple implementation of Camera API.", "keywords": [ "antv", @@ -43,7 +43,7 @@ "dependencies": { "@antv/g-lite": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-canvas/CHANGELOG.md b/packages/g-canvas/CHANGELOG.md index 6ea57b4da..acad9bc7a 100644 --- a/packages/g-canvas/CHANGELOG.md +++ b/packages/g-canvas/CHANGELOG.md @@ -1,5 +1,18 @@ # @antv/g-canvas +## 1.11.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-canvas-renderer@1.9.1 + - @antv/g-plugin-canvas-picker@1.10.1 + - @antv/g-plugin-html-renderer@1.9.1 + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-canvas-path-generator@1.3.1 + - @antv/g-plugin-dom-interaction@1.9.1 + ## 1.11.0 ### Minor Changes diff --git a/packages/g-canvas/package.json b/packages/g-canvas/package.json index 9f1860a3e..35215da72 100644 --- a/packages/g-canvas/package.json +++ b/packages/g-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-canvas", - "version": "1.11.0", + "version": "1.11.1", "description": "A renderer implemented by Canvas 2D API", "keywords": [ "antv", diff --git a/packages/g-canvaskit/CHANGELOG.md b/packages/g-canvaskit/CHANGELOG.md index add77698c..c343c250c 100644 --- a/packages/g-canvaskit/CHANGELOG.md +++ b/packages/g-canvaskit/CHANGELOG.md @@ -1,5 +1,18 @@ # @antv/g-canvaskit +## 0.10.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-canvaskit-renderer@1.3.1 + - @antv/g-plugin-canvas-picker@1.10.1 + - @antv/g-plugin-html-renderer@1.9.1 + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-canvas-path-generator@1.3.1 + - @antv/g-plugin-dom-interaction@1.9.1 + ## 0.10.0 ### Minor Changes diff --git a/packages/g-canvaskit/package.json b/packages/g-canvaskit/package.json index dc6f88433..0dbc60f04 100644 --- a/packages/g-canvaskit/package.json +++ b/packages/g-canvaskit/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-canvaskit", - "version": "0.10.0", + "version": "0.10.1", "description": "A renderer implemented by CanvasKit", "keywords": [ "antv", diff --git a/packages/g-components/CHANGELOG.md b/packages/g-components/CHANGELOG.md index 5b2a944a3..c0193b394 100644 --- a/packages/g-components/CHANGELOG.md +++ b/packages/g-components/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-components +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-components/package.json b/packages/g-components/package.json index 83b759b8a..f58929c4f 100644 --- a/packages/g-components/package.json +++ b/packages/g-components/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-components", - "version": "1.9.0", + "version": "1.9.1", "description": "Components for g", "keywords": [ "antv", @@ -41,7 +41,7 @@ "dependencies": { "@antv/g-lite": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "devDependencies": { diff --git a/packages/g-dom-mutation-observer-api/CHANGELOG.md b/packages/g-dom-mutation-observer-api/CHANGELOG.md index 18f0d9813..5372a11ba 100644 --- a/packages/g-dom-mutation-observer-api/CHANGELOG.md +++ b/packages/g-dom-mutation-observer-api/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-dom-mutation-observer-api +## 1.2.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.2.0 ### Minor Changes diff --git a/packages/g-dom-mutation-observer-api/package.json b/packages/g-dom-mutation-observer-api/package.json index 71235c5c2..5622f64cf 100644 --- a/packages/g-dom-mutation-observer-api/package.json +++ b/packages/g-dom-mutation-observer-api/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-dom-mutation-observer-api", - "version": "1.2.0", + "version": "1.2.1", "description": "A simple implementation of DOM MutationObserver API.", "keywords": [ "antv", diff --git a/packages/g-gesture/CHANGELOG.md b/packages/g-gesture/CHANGELOG.md index f6c57fdda..920883a37 100644 --- a/packages/g-gesture/CHANGELOG.md +++ b/packages/g-gesture/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-gesture +## 2.2.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 2.2.0 ### Minor Changes diff --git a/packages/g-gesture/package.json b/packages/g-gesture/package.json index 1060a9a63..b8a3810a3 100644 --- a/packages/g-gesture/package.json +++ b/packages/g-gesture/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-gesture", - "version": "2.2.0", + "version": "2.2.1", "description": "G Gesture", "keywords": [ "antv", diff --git a/packages/g-image-exporter/CHANGELOG.md b/packages/g-image-exporter/CHANGELOG.md index 3b4c6588a..db54d6d38 100644 --- a/packages/g-image-exporter/CHANGELOG.md +++ b/packages/g-image-exporter/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-image-exporter +## 0.7.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 0.7.0 ### Minor Changes diff --git a/packages/g-image-exporter/package.json b/packages/g-image-exporter/package.json index 748d98aaa..f7ecc6b93 100644 --- a/packages/g-image-exporter/package.json +++ b/packages/g-image-exporter/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-image-exporter", - "version": "0.7.0", + "version": "0.7.1", "description": "A image exporter for G using DOM API", "keywords": [ "antv", diff --git a/packages/g-lite/CHANGELOG.md b/packages/g-lite/CHANGELOG.md index 5647055e5..be0c2e76f 100644 --- a/packages/g-lite/CHANGELOG.md +++ b/packages/g-lite/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-lite +## 1.2.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-math@2.0.1 + ## 1.2.0 ### Minor Changes diff --git a/packages/g-lite/package.json b/packages/g-lite/package.json index a5dd1063d..2686c8f2a 100644 --- a/packages/g-lite/package.json +++ b/packages/g-lite/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-lite", - "version": "1.2.0", + "version": "1.2.1", "description": "A core module for rendering engine implements DOM API.", "keywords": [ "antv", @@ -45,7 +45,7 @@ "@antv/util": "^3.3.1", "d3-color": "^1.4.0", "eventemitter3": "^5.0.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "rbush": "^3.0.1", "tslib": "^2.5.3" }, diff --git a/packages/g-lite/src/utils/tapable/SyncWaterfallHook.ts b/packages/g-lite/src/utils/tapable/SyncWaterfallHook.ts index eca50dc61..eabbbf6ba 100644 --- a/packages/g-lite/src/utils/tapable/SyncWaterfallHook.ts +++ b/packages/g-lite/src/utils/tapable/SyncWaterfallHook.ts @@ -8,7 +8,10 @@ export class SyncWaterfallHook { call(...args: AsArray): R { if (this.callbacks.length) { - let result: R = this.callbacks[0](...args); + /* eslint-disable-next-line prefer-rest-params */ + const argsArr = arguments; + /* eslint-disable-next-line prefer-spread */ + let result: R = this.callbacks[0].apply(void 0, argsArr); for (let i = 0; i < this.callbacks.length - 1; i++) { const callback = this.callbacks[i]; // @ts-ignore diff --git a/packages/g-lottie-player/CHANGELOG.md b/packages/g-lottie-player/CHANGELOG.md index 871cd12ad..e25c2a88f 100644 --- a/packages/g-lottie-player/CHANGELOG.md +++ b/packages/g-lottie-player/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-lottie-player +## 0.2.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 0.2.0 ### Minor Changes diff --git a/packages/g-lottie-player/package.json b/packages/g-lottie-player/package.json index 2b41e76e4..f3715cc12 100644 --- a/packages/g-lottie-player/package.json +++ b/packages/g-lottie-player/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-lottie-player", - "version": "0.2.0", + "version": "0.2.1", "description": "A lottie player for G", "keywords": [ "antv", diff --git a/packages/g-math/CHANGELOG.md b/packages/g-math/CHANGELOG.md index 4c3d1b250..5d9922aed 100644 --- a/packages/g-math/CHANGELOG.md +++ b/packages/g-math/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-math +## 2.0.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now + ## 2.0.0 ### Major Changes diff --git a/packages/g-math/package.json b/packages/g-math/package.json index 030a47243..be6ed7c4c 100644 --- a/packages/g-math/package.json +++ b/packages/g-math/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-math", - "version": "2.0.0", + "version": "2.0.1", "description": "Geometry util", "keywords": [ "antv", @@ -39,7 +39,7 @@ }, "dependencies": { "@antv/util": "^3.3.1", - "gl-matrix": "^3.1.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-math/src/arc.ts b/packages/g-math/src/arc.ts index 48a6ec90f..40b663c76 100644 --- a/packages/g-math/src/arc.ts +++ b/packages/g-math/src/arc.ts @@ -216,7 +216,7 @@ export function pointDistance( x0: number, y0: number, ) { - const nearestPoint = this.nearestPoint( + const np = nearestPoint( cx, cy, rx, @@ -227,7 +227,7 @@ export function pointDistance( x0, y0, ); - return distance(nearestPoint.x, nearestPoint.y, x0, y0); + return distance(np.x, np.y, x0, y0); } export function pointAt( diff --git a/packages/g-math/src/cubic.ts b/packages/g-math/src/cubic.ts index 4ec8bb44c..8eae0c4ee 100644 --- a/packages/g-math/src/cubic.ts +++ b/packages/g-math/src/cubic.ts @@ -203,19 +203,7 @@ export function pointDistance( y0: number, length?: number, ) { - const point = this.nearestPoint( - x1, - y1, - x2, - y2, - x3, - y3, - x4, - y4, - x0, - y0, - length, - ); + const point = nearestPoint(x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length); return distance(point.x, point.y, x0, y0); } diff --git a/packages/g-math/src/ellipse.ts b/packages/g-math/src/ellipse.ts index 0a07d04bf..8d133097d 100644 --- a/packages/g-math/src/ellipse.ts +++ b/packages/g-math/src/ellipse.ts @@ -82,8 +82,8 @@ export function pointDistance( x0: number, y0: number, ) { - const nearestPoint = this.nearestPoint(x, y, rx, ry, x0, y0); - return distance(nearestPoint.x, nearestPoint.y, x0, y0); + const np = nearestPoint(x, y, rx, ry, x0, y0); + return distance(np.x, np.y, x0, y0); } export function pointAt( x: number, diff --git a/packages/g-math/src/line.ts b/packages/g-math/src/line.ts index 391a6ca53..453f4ce95 100644 --- a/packages/g-math/src/line.ts +++ b/packages/g-math/src/line.ts @@ -41,7 +41,7 @@ export function pointDistance( if (cross > lengthSquare) { return distance(x2, y2, x, y); } - return this.pointToLine(x1, y1, x2, y2, x, y); + return pointToLine(x1, y1, x2, y2, x, y); } export function pointToLine( diff --git a/packages/g-math/src/quadratic.ts b/packages/g-math/src/quadratic.ts index 82f82f2d4..889f7d936 100644 --- a/packages/g-math/src/quadratic.ts +++ b/packages/g-math/src/quadratic.ts @@ -149,7 +149,7 @@ export function pointDistance( x0: number, y0: number, ) { - const point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0); + const point = nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0); return distance(point.x, point.y, x0, y0); } diff --git a/packages/g-mobile-canvas-element/CHANGELOG.md b/packages/g-mobile-canvas-element/CHANGELOG.md index 0bda62527..1e1bb00df 100644 --- a/packages/g-mobile-canvas-element/CHANGELOG.md +++ b/packages/g-mobile-canvas-element/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-mobile-canvas-element +## 0.8.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 0.8.0 ### Minor Changes diff --git a/packages/g-mobile-canvas-element/package.json b/packages/g-mobile-canvas-element/package.json index 60122f03c..ce8fbb940 100644 --- a/packages/g-mobile-canvas-element/package.json +++ b/packages/g-mobile-canvas-element/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-mobile-canvas-element", - "version": "0.8.0", + "version": "0.8.1", "description": "Create a CanvasLike element from existed context in mobile environment", "keywords": [ "antv", diff --git a/packages/g-mobile-canvas/CHANGELOG.md b/packages/g-mobile-canvas/CHANGELOG.md index e04bc0e44..78179004c 100644 --- a/packages/g-mobile-canvas/CHANGELOG.md +++ b/packages/g-mobile-canvas/CHANGELOG.md @@ -1,5 +1,18 @@ # @antv/g-mobile-canvas +## 0.10.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-canvas-renderer@1.9.1 + - @antv/g-plugin-canvas-picker@1.10.1 + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-canvas-path-generator@1.3.1 + - @antv/g-plugin-dragndrop@1.8.1 + - @antv/g-plugin-mobile-interaction@0.9.1 + ## 0.10.0 ### Minor Changes diff --git a/packages/g-mobile-canvas/package.json b/packages/g-mobile-canvas/package.json index 2b2b71a95..7b4805f24 100644 --- a/packages/g-mobile-canvas/package.json +++ b/packages/g-mobile-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-mobile-canvas", - "version": "0.10.0", + "version": "0.10.1", "description": "A renderer implemented with Canvas2D API in mobile environment", "keywords": [ "antv", diff --git a/packages/g-mobile-svg/CHANGELOG.md b/packages/g-mobile-svg/CHANGELOG.md index 762691908..5e1f922f2 100644 --- a/packages/g-mobile-svg/CHANGELOG.md +++ b/packages/g-mobile-svg/CHANGELOG.md @@ -1,5 +1,16 @@ # @antv/g-mobile-svg +## 0.10.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-svg-renderer@1.10.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-svg-picker@1.9.1 + - @antv/g-plugin-dragndrop@1.8.1 + - @antv/g-plugin-mobile-interaction@0.9.1 + ## 0.10.0 ### Minor Changes diff --git a/packages/g-mobile-svg/package.json b/packages/g-mobile-svg/package.json index e95601439..412884ba1 100644 --- a/packages/g-mobile-svg/package.json +++ b/packages/g-mobile-svg/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-mobile-svg", - "version": "0.10.0", + "version": "0.10.1", "description": "A renderer implemented by SVG in mobile environment", "keywords": [ "antv", diff --git a/packages/g-mobile-webgl/CHANGELOG.md b/packages/g-mobile-webgl/CHANGELOG.md index 02788df73..d72dffc93 100644 --- a/packages/g-mobile-webgl/CHANGELOG.md +++ b/packages/g-mobile-webgl/CHANGELOG.md @@ -1,5 +1,18 @@ # @antv/g-mobile-webgl +## 0.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-device-renderer@1.9.1 + - @antv/g-plugin-html-renderer@1.9.1 + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-plugin-webgl-device@1.9.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-dragndrop@1.8.1 + - @antv/g-plugin-mobile-interaction@0.9.1 + ## 0.9.0 ### Minor Changes diff --git a/packages/g-mobile-webgl/package.json b/packages/g-mobile-webgl/package.json index 4233b11c5..8ce60f32d 100644 --- a/packages/g-mobile-webgl/package.json +++ b/packages/g-mobile-webgl/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-mobile-webgl", - "version": "0.9.0", + "version": "0.9.1", "description": "A renderer implemented by WebGL1/2 in mobile environment", "keywords": [ "antv", diff --git a/packages/g-pattern/CHANGELOG.md b/packages/g-pattern/CHANGELOG.md index 124ea4f48..f63251726 100644 --- a/packages/g-pattern/CHANGELOG.md +++ b/packages/g-pattern/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-pattern +## 1.2.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.2.0 ### Minor Changes diff --git a/packages/g-pattern/package.json b/packages/g-pattern/package.json index 41915a78b..bcdc68341 100644 --- a/packages/g-pattern/package.json +++ b/packages/g-pattern/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-pattern", - "version": "1.2.0", + "version": "1.2.1", "description": "A pattern libs for G", "keywords": [ "antv", diff --git a/packages/g-plugin-3d/CHANGELOG.md b/packages/g-plugin-3d/CHANGELOG.md index 5635ff9b9..b3e2c1433 100644 --- a/packages/g-plugin-3d/CHANGELOG.md +++ b/packages/g-plugin-3d/CHANGELOG.md @@ -1,5 +1,15 @@ # @antv/g-plugin-3d +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-plugin-device-renderer@1.9.1 + - @antv/g-shader-components@1.8.1 + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-3d/package.json b/packages/g-plugin-3d/package.json index a53cbd3b2..a0f95f19b 100644 --- a/packages/g-plugin-3d/package.json +++ b/packages/g-plugin-3d/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-3d", - "version": "1.9.0", + "version": "1.9.1", "description": "Provide 3D extension for G", "keywords": [ "antv", @@ -41,7 +41,7 @@ "@antv/g-lite": "workspace:*", "@antv/g-plugin-device-renderer": "workspace:*", "@antv/g-shader-components": "workspace:*", - "gl-matrix": "^3.1.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "devDependencies": { diff --git a/packages/g-plugin-a11y/CHANGELOG.md b/packages/g-plugin-a11y/CHANGELOG.md index b86109d20..9df7eb6fc 100644 --- a/packages/g-plugin-a11y/CHANGELOG.md +++ b/packages/g-plugin-a11y/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-a11y +## 0.6.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 0.6.0 ### Minor Changes diff --git a/packages/g-plugin-a11y/package.json b/packages/g-plugin-a11y/package.json index be66c1847..d231e067e 100644 --- a/packages/g-plugin-a11y/package.json +++ b/packages/g-plugin-a11y/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-a11y", - "version": "0.6.0", + "version": "0.6.1", "description": "A G plugin for accessibility", "keywords": [ "antv", diff --git a/packages/g-plugin-annotation/CHANGELOG.md b/packages/g-plugin-annotation/CHANGELOG.md index 2dd5a0d5c..bb78a8559 100644 --- a/packages/g-plugin-annotation/CHANGELOG.md +++ b/packages/g-plugin-annotation/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-annotation +## 0.4.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 0.4.0 ### Minor Changes diff --git a/packages/g-plugin-annotation/package.json b/packages/g-plugin-annotation/package.json index 80bbf3152..631723ebe 100644 --- a/packages/g-plugin-annotation/package.json +++ b/packages/g-plugin-annotation/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-annotation", - "version": "0.4.0", + "version": "0.4.1", "description": "A G plugin for annotation", "keywords": [ "antv", @@ -40,7 +40,7 @@ "dependencies": { "@antv/g-lite": "workspace:*", "eventemitter3": "^5.0.1", - "gl-matrix": "^3.1.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-plugin-box2d/CHANGELOG.md b/packages/g-plugin-box2d/CHANGELOG.md index f8936619c..7e0cd1699 100644 --- a/packages/g-plugin-box2d/CHANGELOG.md +++ b/packages/g-plugin-box2d/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-box2d +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-box2d/package.json b/packages/g-plugin-box2d/package.json index 81fa82f34..b33f472ae 100644 --- a/packages/g-plugin-box2d/package.json +++ b/packages/g-plugin-box2d/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-box2d", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for Box2D", "keywords": [ "antv", diff --git a/packages/g-plugin-canvas-path-generator/CHANGELOG.md b/packages/g-plugin-canvas-path-generator/CHANGELOG.md index ad7c0a3f0..ba2b576b3 100644 --- a/packages/g-plugin-canvas-path-generator/CHANGELOG.md +++ b/packages/g-plugin-canvas-path-generator/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-canvas-path-generator +## 1.3.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + - @antv/g-math@2.0.1 + ## 1.3.0 ### Minor Changes diff --git a/packages/g-plugin-canvas-path-generator/package.json b/packages/g-plugin-canvas-path-generator/package.json index 5e8a76116..bb66e006e 100644 --- a/packages/g-plugin-canvas-path-generator/package.json +++ b/packages/g-plugin-canvas-path-generator/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-canvas-path-generator", - "version": "1.3.0", + "version": "1.3.1", "description": "A G plugin of path generator with Canvas2D API", "keywords": [ "antv", diff --git a/packages/g-plugin-canvas-picker/CHANGELOG.md b/packages/g-plugin-canvas-picker/CHANGELOG.md index 0e901b9e5..235ecc216 100644 --- a/packages/g-plugin-canvas-picker/CHANGELOG.md +++ b/packages/g-plugin-canvas-picker/CHANGELOG.md @@ -1,5 +1,16 @@ # @antv/g-plugin-canvas-picker +## 1.10.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-plugin-canvas-renderer@1.9.1 + - @antv/g-lite@1.2.1 + - @antv/g-math@2.0.1 + - @antv/g-plugin-canvas-path-generator@1.3.1 + ## 1.10.0 ### Minor Changes diff --git a/packages/g-plugin-canvas-picker/package.json b/packages/g-plugin-canvas-picker/package.json index a0f3b8eb6..b347c3bf2 100644 --- a/packages/g-plugin-canvas-picker/package.json +++ b/packages/g-plugin-canvas-picker/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-canvas-picker", - "version": "1.10.0", + "version": "1.10.1", "description": "A G plugin for picking in canvas", "keywords": [ "antv", @@ -43,7 +43,7 @@ "@antv/g-plugin-canvas-path-generator": "workspace:*", "@antv/g-plugin-canvas-renderer": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-plugin-canvas-renderer/CHANGELOG.md b/packages/g-plugin-canvas-renderer/CHANGELOG.md index ac76d7182..dece53126 100644 --- a/packages/g-plugin-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-canvas-renderer/CHANGELOG.md @@ -1,5 +1,16 @@ # @antv/g-plugin-canvas-renderer +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-lite@1.2.1 + - @antv/g-math@2.0.1 + - @antv/g-plugin-canvas-path-generator@1.3.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-canvas-renderer/package.json b/packages/g-plugin-canvas-renderer/package.json index 3b161ddbb..c56569004 100644 --- a/packages/g-plugin-canvas-renderer/package.json +++ b/packages/g-plugin-canvas-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-canvas-renderer", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin of renderer implementation with Canvas2D API", "keywords": [ "antv", @@ -43,7 +43,7 @@ "@antv/g-plugin-canvas-path-generator": "workspace:*", "@antv/g-plugin-image-loader": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-plugin-canvaskit-renderer/CHANGELOG.md b/packages/g-plugin-canvaskit-renderer/CHANGELOG.md index a6f3dd8f9..99ccd73ce 100644 --- a/packages/g-plugin-canvaskit-renderer/CHANGELOG.md +++ b/packages/g-plugin-canvaskit-renderer/CHANGELOG.md @@ -1,5 +1,15 @@ # @antv/g-plugin-canvaskit-renderer +## 1.3.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-lite@1.2.1 + - @antv/g-math@2.0.1 + ## 1.3.0 ### Minor Changes diff --git a/packages/g-plugin-canvaskit-renderer/package.json b/packages/g-plugin-canvaskit-renderer/package.json index c78d995e7..886c499c1 100644 --- a/packages/g-plugin-canvaskit-renderer/package.json +++ b/packages/g-plugin-canvaskit-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-canvaskit-renderer", - "version": "1.3.0", + "version": "1.3.1", "description": "A G plugin of renderer implementation with CanvasKit", "keywords": [ "antv", @@ -43,7 +43,7 @@ "@antv/g-plugin-image-loader": "workspace:*", "@antv/util": "^3.3.1", "canvaskit-wasm": "^0.34.0", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-plugin-control/CHANGELOG.md b/packages/g-plugin-control/CHANGELOG.md index 271651bf1..aa945d31f 100644 --- a/packages/g-plugin-control/CHANGELOG.md +++ b/packages/g-plugin-control/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-control +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-control/package.json b/packages/g-plugin-control/package.json index f0e9e5f7e..9736a39b0 100644 --- a/packages/g-plugin-control/package.json +++ b/packages/g-plugin-control/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-control", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for orbit control", "keywords": [ "antv", diff --git a/packages/g-plugin-css-select/CHANGELOG.md b/packages/g-plugin-css-select/CHANGELOG.md index ae5834a4e..63bec8b05 100644 --- a/packages/g-plugin-css-select/CHANGELOG.md +++ b/packages/g-plugin-css-select/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-css-select +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-css-select/package.json b/packages/g-plugin-css-select/package.json index 1386bfca9..7b3dacd5d 100644 --- a/packages/g-plugin-css-select/package.json +++ b/packages/g-plugin-css-select/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-css-select", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for using CSS select syntax in query selector", "keywords": [ "antv", diff --git a/packages/g-plugin-device-renderer/CHANGELOG.md b/packages/g-plugin-device-renderer/CHANGELOG.md index e71ee9411..73fb53a6a 100644 --- a/packages/g-plugin-device-renderer/CHANGELOG.md +++ b/packages/g-plugin-device-renderer/CHANGELOG.md @@ -1,5 +1,16 @@ # @antv/g-plugin-device-renderer +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-shader-components@1.8.1 + - @antv/g-lite@1.2.1 + - @antv/g-math@2.0.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-device-renderer/package.json b/packages/g-plugin-device-renderer/package.json index b313bafe1..ccb447a26 100644 --- a/packages/g-plugin-device-renderer/package.json +++ b/packages/g-plugin-device-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-device-renderer", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin of renderer implementation with GPUDevice", "keywords": [ "antv", @@ -46,7 +46,7 @@ "@webgpu/types": "^0.1.6", "earcut": "^2.2.3", "eventemitter3": "^5.0.1", - "gl-matrix": "^3.1.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "devDependencies": { diff --git a/packages/g-plugin-device-renderer/src/PickingPlugin.ts b/packages/g-plugin-device-renderer/src/PickingPlugin.ts index f8e080352..6ed25ddaa 100644 --- a/packages/g-plugin-device-renderer/src/PickingPlugin.ts +++ b/packages/g-plugin-device-renderer/src/PickingPlugin.ts @@ -107,6 +107,7 @@ export class PickingPlugin implements RenderingPlugin { const yInDevicePixel = y * dpr; if ( + !this.renderHelper.renderGraph || xInDevicePixel > width || xInDevicePixel < 0 || yInDevicePixel > height || diff --git a/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts b/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts index 3a671f74b..0de67c12d 100644 --- a/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts +++ b/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts @@ -12,13 +12,18 @@ import { Renderable3D } from './components/Renderable3D'; import type { LightPool } from './LightPool'; import { Fog, Light } from './lights'; // import { pushFXAAPass } from './passes/FXAA'; -import type { Device, SwapChain, Texture, TextureDescriptor } from './platform'; +import { + Device, + SwapChain, + Texture, + TextureDescriptor, + TransparentWhite, +} from './platform'; import { BlendFactor, BlendMode, colorNewFromRGBA, setAttachmentStateSimple, - TransparentBlack, } from './platform'; import type { RGGraphBuilder, RenderHelper } from './render'; import { @@ -80,7 +85,7 @@ export class RenderGraphPlugin implements RenderingPlugin { private enableCapture: boolean; private captureOptions: Partial; - private capturePromise: Promise | undefined; + private capturePromise: Promise | undefined; private resolveCapturePromise: (dataURL: string) => void; getDevice(): Device { @@ -248,7 +253,7 @@ export class RenderGraphPlugin implements RenderingPlugin { (Number(backgroundColor.b) / 255) * Number(backgroundColor.alpha), Number(backgroundColor.alpha), ) - : TransparentBlack; + : TransparentWhite; // retrieve at each frame since canvas may resize const renderInput = { @@ -295,7 +300,12 @@ export class RenderGraphPlugin implements RenderingPlugin { // TODO: other post-processing passes // FXAA - // pushFXAAPass(this.builder, this.renderHelper, renderInput, mainColorTargetID); + // pushFXAAPass( + // this.builder, + // this.renderHelper, + // renderInput, + // mainColorTargetID, + // ); // output to screen this.builder.resolveRenderTargetToExternalTexture( @@ -318,7 +328,7 @@ export class RenderGraphPlugin implements RenderingPlugin { setAttachmentStateSimple( { depthWrite: true, - blendConstant: TransparentBlack, + blendConstant: TransparentWhite, }, { rgbBlendMode: BlendMode.Add, diff --git a/packages/g-plugin-device-renderer/src/passes/FXAA.ts b/packages/g-plugin-device-renderer/src/passes/FXAA.ts index f4a14868b..78c41b669 100644 --- a/packages/g-plugin-device-renderer/src/passes/FXAA.ts +++ b/packages/g-plugin-device-renderer/src/passes/FXAA.ts @@ -45,7 +45,8 @@ export function pushFXAAPass( pass.setDebugName('FXAA'); pass.attachRenderTargetID(RGAttachmentSlot.Color0, mainColorTargetID); - const mainColorResolveTextureID = builder.resolveRenderTarget(mainColorTargetID); + const mainColorResolveTextureID = + builder.resolveRenderTarget(mainColorTargetID); pass.attachResolveTexture(mainColorResolveTextureID); const renderInst = renderHelper.renderInstManager.newRenderInst(); @@ -59,7 +60,12 @@ export function pushFXAAPass( // since gl_VertexID is not available in GLSL 100, we need to use a geometry const offs = renderInst.allocateUniformBuffer(0, 4); const d = renderInst.mapUniformBufferF32(0); - fillVec4(d, offs, 1.0 / renderInput.backbufferWidth, 1.0 / renderInput.backbufferHeight); + fillVec4( + d, + offs, + 1.0 / renderInput.backbufferWidth, + 1.0 / renderInput.backbufferHeight, + ); const fxaaProgram = new FXAAProgram(); const program = renderHelper.renderCache.createProgram(fxaaProgram); @@ -81,11 +87,14 @@ export function pushFXAAPass( ], // rendering a fullscreen triangle instead of quad // @see https://www.saschawillems.de/blog/2016/08/13/vulkan-tutorial-on-rendering-a-fullscreen-quad-without-buffers/ - data: new Float32Array([-4, -4, 4, -4, 0, 4]), + // data: new Float32Array([-4, -4, 4, -4, 0, 4]), + data: new Float32Array([-1, -3, -1, 1, 3, -1]), }); geometry.vertexCount = 3; - inputLayout = renderHelper.getCache().createInputLayout(geometry.inputLayoutDescriptor); + inputLayout = renderHelper + .getCache() + .createInputLayout(geometry.inputLayoutDescriptor); inputState = renderHelper.getDevice().createInputState( inputLayout, @@ -99,7 +108,9 @@ export function pushFXAAPass( } pass.exec((passRenderer, scope) => { - textureMapping[0].texture = scope.getResolveTextureForID(mainColorResolveTextureID); + textureMapping[0].texture = scope.getResolveTextureForID( + mainColorResolveTextureID, + ); renderInst.setSamplerBindingsFromTextureMappings(textureMapping); renderInst.setInputLayoutAndState(inputLayout, inputState); renderInst.drawOnPass(renderHelper.renderCache, passRenderer); diff --git a/packages/g-plugin-device-renderer/src/platform/utils/states.ts b/packages/g-plugin-device-renderer/src/platform/utils/states.ts index 5b2c37106..553a431b1 100644 --- a/packages/g-plugin-device-renderer/src/platform/utils/states.ts +++ b/packages/g-plugin-device-renderer/src/platform/utils/states.ts @@ -15,7 +15,7 @@ import { StencilOp, TextureDimension, } from '../interfaces'; -import { colorCopy, colorNewCopy, TransparentBlack } from './color'; +import { colorCopy, colorNewCopy, TransparentWhite } from './color'; // import { reverseDepthForCompareMode } from './depth'; export function isPowerOfTwo(n: number): boolean { @@ -231,7 +231,7 @@ export const defaultMegaState: MegaStateDescriptor = { }, ], - blendConstant: colorNewCopy(TransparentBlack), + blendConstant: colorNewCopy(TransparentWhite), depthWrite: true, depthCompare: CompareMode.LessEqual, // depthCompare: reverseDepthForCompareMode(CompareMode.LessEqual), @@ -271,7 +271,7 @@ export function setAttachmentStateSimple( ); } - copyAttachmentStateFromSimple(dst.attachmentsState![0], simple); + copyAttachmentStateFromSimple(dst.attachmentsState[0], simple); return dst; } diff --git a/packages/g-plugin-device-renderer/src/render/RenderHelper.ts b/packages/g-plugin-device-renderer/src/render/RenderHelper.ts index aa9e2f70e..5f94c5140 100644 --- a/packages/g-plugin-device-renderer/src/render/RenderHelper.ts +++ b/packages/g-plugin-device-renderer/src/render/RenderHelper.ts @@ -48,8 +48,12 @@ export class RenderHelper { if (this.renderInstManager) { this.renderInstManager.destroy(); } - this.renderCache.destroy(); - this.renderGraph.destroy(); + if (this.renderCache) { + this.renderCache.destroy(); + } + if (this.renderGraph) { + this.renderGraph.destroy(); + } } // getDebugTextDrawer(): TextDrawer | null { diff --git a/packages/g-plugin-dom-interaction/CHANGELOG.md b/packages/g-plugin-dom-interaction/CHANGELOG.md index 7b86650bf..323801197 100644 --- a/packages/g-plugin-dom-interaction/CHANGELOG.md +++ b/packages/g-plugin-dom-interaction/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-dom-interaction +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-dom-interaction/package.json b/packages/g-plugin-dom-interaction/package.json index ecf4407cb..324ac3ff2 100644 --- a/packages/g-plugin-dom-interaction/package.json +++ b/packages/g-plugin-dom-interaction/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-dom-interaction", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin", "keywords": [ "antv", diff --git a/packages/g-plugin-dragndrop/CHANGELOG.md b/packages/g-plugin-dragndrop/CHANGELOG.md index 4bebccd5a..516b232c7 100644 --- a/packages/g-plugin-dragndrop/CHANGELOG.md +++ b/packages/g-plugin-dragndrop/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-dragndrop +## 1.8.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.8.0 ### Minor Changes diff --git a/packages/g-plugin-dragndrop/package.json b/packages/g-plugin-dragndrop/package.json index cb036a7ec..c9af3c422 100644 --- a/packages/g-plugin-dragndrop/package.json +++ b/packages/g-plugin-dragndrop/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-dragndrop", - "version": "1.8.0", + "version": "1.8.1", "description": "A G plugin for Drag n Drop implemented with PointerEvents", "keywords": [ "antv", diff --git a/packages/g-plugin-gpgpu/CHANGELOG.md b/packages/g-plugin-gpgpu/CHANGELOG.md index 23311e980..9e7af8121 100644 --- a/packages/g-plugin-gpgpu/CHANGELOG.md +++ b/packages/g-plugin-gpgpu/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-gpgpu +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + - @antv/g-webgpu@1.9.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-gpgpu/package.json b/packages/g-plugin-gpgpu/package.json index 679914ad2..bcab19ebc 100644 --- a/packages/g-plugin-gpgpu/package.json +++ b/packages/g-plugin-gpgpu/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-gpgpu", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for GPGPU based on WebGPU", "keywords": [ "webgpu", diff --git a/packages/g-plugin-html-renderer/CHANGELOG.md b/packages/g-plugin-html-renderer/CHANGELOG.md index 7a437d9b0..bfe2ba8e2 100644 --- a/packages/g-plugin-html-renderer/CHANGELOG.md +++ b/packages/g-plugin-html-renderer/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-html-renderer +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-html-renderer/package.json b/packages/g-plugin-html-renderer/package.json index 8582e9947..2a4f79d93 100644 --- a/packages/g-plugin-html-renderer/package.json +++ b/packages/g-plugin-html-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-html-renderer", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for rendering HTML", "keywords": [ "antv", @@ -40,7 +40,7 @@ "dependencies": { "@antv/g-lite": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-plugin-image-loader/CHANGELOG.md b/packages/g-plugin-image-loader/CHANGELOG.md index dbcda2933..8c9774ca5 100644 --- a/packages/g-plugin-image-loader/CHANGELOG.md +++ b/packages/g-plugin-image-loader/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-image-loader +## 1.3.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.3.0 ### Minor Changes diff --git a/packages/g-plugin-image-loader/package.json b/packages/g-plugin-image-loader/package.json index 9a160ba1e..c0e5026f3 100644 --- a/packages/g-plugin-image-loader/package.json +++ b/packages/g-plugin-image-loader/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-image-loader", - "version": "1.3.0", + "version": "1.3.1", "description": "A G plugin for loading image", "keywords": [ "antv", @@ -40,7 +40,7 @@ "dependencies": { "@antv/g-lite": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-plugin-matterjs/CHANGELOG.md b/packages/g-plugin-matterjs/CHANGELOG.md index 56abd3823..542afea69 100644 --- a/packages/g-plugin-matterjs/CHANGELOG.md +++ b/packages/g-plugin-matterjs/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-matterjs +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-matterjs/package.json b/packages/g-plugin-matterjs/package.json index 676e2a0ca..f8bc8bca2 100644 --- a/packages/g-plugin-matterjs/package.json +++ b/packages/g-plugin-matterjs/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-matterjs", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for matter.js physics engine", "keywords": [ "antv", @@ -39,7 +39,7 @@ }, "dependencies": { "@antv/g-lite": "workspace:*", - "gl-matrix": "^3.1.0", + "gl-matrix": "^3.4.3", "matter-js": "^0.18.0", "tslib": "^2.5.3" }, diff --git a/packages/g-plugin-mobile-interaction/CHANGELOG.md b/packages/g-plugin-mobile-interaction/CHANGELOG.md index b1a323992..ce5c817c0 100644 --- a/packages/g-plugin-mobile-interaction/CHANGELOG.md +++ b/packages/g-plugin-mobile-interaction/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-mobile-interaction +## 0.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 0.9.0 ### Minor Changes diff --git a/packages/g-plugin-mobile-interaction/package.json b/packages/g-plugin-mobile-interaction/package.json index 907a5ef3d..874ffd867 100644 --- a/packages/g-plugin-mobile-interaction/package.json +++ b/packages/g-plugin-mobile-interaction/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-mobile-interaction", - "version": "0.9.0", + "version": "0.9.1", "description": "A G plugin listening events in mobile environment", "keywords": [ "antv", diff --git a/packages/g-plugin-physx/CHANGELOG.md b/packages/g-plugin-physx/CHANGELOG.md index ca66abac1..1902390a8 100644 --- a/packages/g-plugin-physx/CHANGELOG.md +++ b/packages/g-plugin-physx/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-physx +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-physx/package.json b/packages/g-plugin-physx/package.json index 45011b26b..c9824706e 100644 --- a/packages/g-plugin-physx/package.json +++ b/packages/g-plugin-physx/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-physx", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for PhysX", "keywords": [ "antv", diff --git a/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md b/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md index 8ccffdf35..43abd112e 100644 --- a/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-rough-canvas-renderer +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + - @antv/g-canvas@1.11.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-rough-canvas-renderer/package.json b/packages/g-plugin-rough-canvas-renderer/package.json index 3cfd95182..d52b7a4ea 100644 --- a/packages/g-plugin-rough-canvas-renderer/package.json +++ b/packages/g-plugin-rough-canvas-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-rough-canvas-renderer", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin of renderer implementation with rough.js", "keywords": [ "antv", diff --git a/packages/g-plugin-rough-svg-renderer/CHANGELOG.md b/packages/g-plugin-rough-svg-renderer/CHANGELOG.md index 160afc6ab..6924b0c03 100644 --- a/packages/g-plugin-rough-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-rough-svg-renderer/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-rough-svg-renderer +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + - @antv/g-svg@1.10.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-rough-svg-renderer/package.json b/packages/g-plugin-rough-svg-renderer/package.json index 90ad5612f..755050fa7 100644 --- a/packages/g-plugin-rough-svg-renderer/package.json +++ b/packages/g-plugin-rough-svg-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-rough-svg-renderer", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin of renderer implementation with rough.js", "keywords": [ "antv", diff --git a/packages/g-plugin-svg-picker/CHANGELOG.md b/packages/g-plugin-svg-picker/CHANGELOG.md index 697219210..28efa20ba 100644 --- a/packages/g-plugin-svg-picker/CHANGELOG.md +++ b/packages/g-plugin-svg-picker/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-svg-picker +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-svg-renderer@1.10.1 + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-svg-picker/package.json b/packages/g-plugin-svg-picker/package.json index bd0de541c..8aa5759c5 100644 --- a/packages/g-plugin-svg-picker/package.json +++ b/packages/g-plugin-svg-picker/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-svg-picker", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for picking in SVG", "keywords": [ "antv", diff --git a/packages/g-plugin-svg-renderer/CHANGELOG.md b/packages/g-plugin-svg-renderer/CHANGELOG.md index 7ddc03ad4..30e891713 100644 --- a/packages/g-plugin-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-svg-renderer/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-svg-renderer +## 1.10.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.10.0 ### Minor Changes diff --git a/packages/g-plugin-svg-renderer/package.json b/packages/g-plugin-svg-renderer/package.json index 54f702ca3..1dfaa3d77 100644 --- a/packages/g-plugin-svg-renderer/package.json +++ b/packages/g-plugin-svg-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-svg-renderer", - "version": "1.10.0", + "version": "1.10.1", "description": "A G plugin of renderer implementation with SVG", "keywords": [ "antv", @@ -40,7 +40,7 @@ "dependencies": { "@antv/g-lite": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "tslib": "^2.5.3" }, "publishConfig": { diff --git a/packages/g-plugin-webgl-device/CHANGELOG.md b/packages/g-plugin-webgl-device/CHANGELOG.md index 036aa97d0..9956b27b2 100644 --- a/packages/g-plugin-webgl-device/CHANGELOG.md +++ b/packages/g-plugin-webgl-device/CHANGELOG.md @@ -1,5 +1,14 @@ # @antv/g-plugin-webgl-device +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-plugin-device-renderer@1.9.1 + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-webgl-device/package.json b/packages/g-plugin-webgl-device/package.json index cc8c6f783..aac713006 100644 --- a/packages/g-plugin-webgl-device/package.json +++ b/packages/g-plugin-webgl-device/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-webgl-device", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin implements GPUDevice interface with WebGL API", "keywords": [ "antv", diff --git a/packages/g-plugin-webgl-device/src/platform/Device.ts b/packages/g-plugin-webgl-device/src/platform/Device.ts index 464385cea..d0272a557 100644 --- a/packages/g-plugin-webgl-device/src/platform/Device.ts +++ b/packages/g-plugin-webgl-device/src/platform/Device.ts @@ -1,4 +1,4 @@ -import type { +import { AttachmentState, BindingLayoutDescriptor, Bindings, @@ -35,6 +35,7 @@ import type { SwapChain, Texture, TextureDescriptor, + TransparentWhite, VendorInfo, VertexBufferDescriptor, } from '@antv/g-plugin-device-renderer'; @@ -68,7 +69,6 @@ import { SamplerFormatKind, TextureDimension, TextureUsage, - TransparentBlack, VertexBufferFrequency, ViewportOrigin, } from '@antv/g-plugin-device-renderer'; @@ -474,7 +474,7 @@ export class Device_GL implements SwapChain, Device { } getOnscreenTexture(): Texture { - return this.scTexture!; + return this.scTexture; } beginFrame(): void {} @@ -538,33 +538,29 @@ export class Device_GL implements SwapChain, Device { case Format.U16_RGBA_5551: return GL.UNSIGNED_SHORT_5_5_5_1; case Format.BC1: - return this.WEBGL_compressed_texture_s3tc! - .COMPRESSED_RGBA_S3TC_DXT1_EXT; + return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT; case Format.BC1_SRGB: - return this.WEBGL_compressed_texture_s3tc_srgb! + return this.WEBGL_compressed_texture_s3tc_srgb .COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT; case Format.BC2: - return this.WEBGL_compressed_texture_s3tc! - .COMPRESSED_RGBA_S3TC_DXT3_EXT; + return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT; case Format.BC2_SRGB: - return this.WEBGL_compressed_texture_s3tc_srgb! + return this.WEBGL_compressed_texture_s3tc_srgb .COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT; case Format.BC3: - return this.WEBGL_compressed_texture_s3tc! - .COMPRESSED_RGBA_S3TC_DXT5_EXT; + return this.WEBGL_compressed_texture_s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT; case Format.BC3_SRGB: - return this.WEBGL_compressed_texture_s3tc_srgb! + return this.WEBGL_compressed_texture_s3tc_srgb .COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; case Format.BC4_UNORM: return this.EXT_texture_compression_rgtc!.COMPRESSED_RED_RGTC1_EXT; case Format.BC4_SNORM: - return this.EXT_texture_compression_rgtc! + return this.EXT_texture_compression_rgtc .COMPRESSED_SIGNED_RED_RGTC1_EXT; case Format.BC5_UNORM: - return this.EXT_texture_compression_rgtc! - .COMPRESSED_RED_GREEN_RGTC2_EXT; + return this.EXT_texture_compression_rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT; case Format.BC5_SNORM: - return this.EXT_texture_compression_rgtc! + return this.EXT_texture_compression_rgtc .COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT; case Format.D32F_S8: return isWebGL2(this.gl) @@ -2140,7 +2136,7 @@ export class Device_GL implements SwapChain, Device { gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorResolveTo.gl_texture, - 0, + this.currentColorResolveToLevels[i], ); } @@ -2409,7 +2405,7 @@ export class Device_GL implements SwapChain, Device { colorAttachment: [resolveFrom], colorResolveToLevel: [0], colorResolveTo: [resolveTo], - colorClearColor: [TransparentBlack], + colorClearColor: [TransparentWhite], colorStore: [true], colorAttachmentLevel: [0], depthStencilAttachment: null, diff --git a/packages/g-plugin-webgpu-device/CHANGELOG.md b/packages/g-plugin-webgpu-device/CHANGELOG.md index d1b0af1ef..14eb2a2d4 100644 --- a/packages/g-plugin-webgpu-device/CHANGELOG.md +++ b/packages/g-plugin-webgpu-device/CHANGELOG.md @@ -1,5 +1,14 @@ # @antv/g-plugin-webgpu-device +## 1.9.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now +- Updated dependencies [b0dd4788] + - @antv/g-plugin-device-renderer@1.9.1 + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-webgpu-device/package.json b/packages/g-plugin-webgpu-device/package.json index 3a428efdb..744c37cc8 100644 --- a/packages/g-plugin-webgpu-device/package.json +++ b/packages/g-plugin-webgpu-device/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-webgpu-device", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin implements GPUDevice interface with WebGPU API", "keywords": [ "antv", diff --git a/packages/g-plugin-webgpu-device/src/platform/Buffer.ts b/packages/g-plugin-webgpu-device/src/platform/Buffer.ts index 3e0f96027..f76ab8191 100644 --- a/packages/g-plugin-webgpu-device/src/platform/Buffer.ts +++ b/packages/g-plugin-webgpu-device/src/platform/Buffer.ts @@ -53,14 +53,23 @@ export class Buffer_WebGPU extends ResourceBase_WebGPU implements Buffer { this.size = isView(viewOrSize) ? viewOrSize.byteLength : viewOrSize * 4; this.view = isView(viewOrSize) ? viewOrSize : null; - this.gpuBuffer = this.device.device.createBuffer({ - usage: this.usage, - size: this.size, - mappedAtCreation: useMapRead ? mapBuffer : false, - }); if (isView(viewOrSize)) { - this.setSubData(0, new Uint8Array(viewOrSize.buffer)); + // this.setSubData(0, new Uint8Array(viewOrSize.buffer)); + this.gpuBuffer = this.device.device.createBuffer({ + usage: this.usage, + size: this.size, + mappedAtCreation: true, + }); + // @ts-ignore + new Uint8Array(this.gpuBuffer.getMappedRange()).set(viewOrSize); + this.gpuBuffer.unmap(); + } else { + this.gpuBuffer = this.device.device.createBuffer({ + usage: this.usage, + size: this.size, + mappedAtCreation: useMapRead ? mapBuffer : false, + }); } } diff --git a/packages/g-plugin-webgpu-device/src/platform/Device.ts b/packages/g-plugin-webgpu-device/src/platform/Device.ts index f5cae0b77..fcb07e9dc 100644 --- a/packages/g-plugin-webgpu-device/src/platform/Device.ts +++ b/packages/g-plugin-webgpu-device/src/platform/Device.ts @@ -243,6 +243,7 @@ export class Device_WebGPU implements SwapChain, IDevice_WebGPU { texture.sampleCount = 1; texture.gpuTexture = gpuTexture; texture.gpuTextureView = gpuTextureView; + texture.name = 'Onscreen'; return texture; } @@ -323,7 +324,7 @@ export class Device_WebGPU implements SwapChain, IDevice_WebGPU { texture.depthOrArrayLayers = 1; // @ts-ignore texture.type = ResourceType.RenderTarget; - return texture; + return texture as unknown as RenderTarget; } createRenderTargetFromTexture(texture: Texture): RenderTarget { diff --git a/packages/g-plugin-webgpu-device/src/platform/RenderPass.ts b/packages/g-plugin-webgpu-device/src/platform/RenderPass.ts index 8d8e20d9d..b345641f1 100644 --- a/packages/g-plugin-webgpu-device/src/platform/RenderPass.ts +++ b/packages/g-plugin-webgpu-device/src/platform/RenderPass.ts @@ -1,11 +1,17 @@ -import type { +import { Bindings, InputState, RenderPass, RenderPassDescriptor, RenderPipeline, + TransparentWhite, +} from '@antv/g-plugin-device-renderer'; +import { + assert, + assertExists, + FormatFlags, + getFormatFlags, } from '@antv/g-plugin-device-renderer'; -import { assert, assertExists } from '@antv/g-plugin-device-renderer'; import { isNil } from '@antv/util'; import type { Bindings_WebGPU } from './Bindings'; import { GPUTextureUsage } from './constants'; @@ -24,7 +30,9 @@ export class RenderPass_WebGPU implements RenderPass { private gpuColorAttachments: GPURenderPassColorAttachment[]; private gpuDepthStencilAttachment: GPURenderPassDepthStencilAttachment; private gfxColorAttachment: (TextureShared_WebGPU | null)[] = []; + private gfxColorAttachmentLevel: number[] = []; private gfxColorResolveTo: (TextureShared_WebGPU | null)[] = []; + private gfxColorResolveToLevel: number[] = []; private gfxDepthStencilAttachment: TextureShared_WebGPU | null = null; private gfxDepthStencilResolveTo: TextureShared_WebGPU | null = null; @@ -32,7 +40,7 @@ export class RenderPass_WebGPU implements RenderPass { this.gpuColorAttachments = []; this.gpuDepthStencilAttachment = { - view: null!, + view: null, depthLoadOp: 'load', depthStoreOp: 'store', stencilLoadOp: 'load', @@ -45,6 +53,19 @@ export class RenderPass_WebGPU implements RenderPass { }; } + private getTextureView( + target: TextureShared_WebGPU, + level: number, + ): GPUTextureView { + assert(level < target.numLevels); + if (target.numLevels === 1) return target.gpuTextureView; + else + return target.gpuTexture.createView({ + baseMipLevel: level, + mipLevelCount: 1, + }); + } + private setRenderPassDescriptor(descriptor: RenderPassDescriptor): void { this.descriptor = descriptor; @@ -55,7 +76,7 @@ export class RenderPass_WebGPU implements RenderPass { this.gfxColorResolveTo.length = numColorAttachments; for (let i = 0; i < descriptor.colorAttachment.length; i++) { let colorAttachment: TextureShared_WebGPU | null = descriptor - .colorAttachment[i] as Attachment_WebGPU; + .colorAttachment[i] as unknown as Attachment_WebGPU; let colorResolveTo: TextureShared_WebGPU | null = descriptor .colorResolveTo[i] as Texture_WebGPU; @@ -68,25 +89,35 @@ export class RenderPass_WebGPU implements RenderPass { this.gfxColorAttachment[i] = colorAttachment; this.gfxColorResolveTo[i] = colorResolveTo; + this.gfxColorAttachmentLevel[i] = descriptor.colorAttachmentLevel[i]; + this.gfxColorResolveToLevel[i] = descriptor.colorResolveToLevel[i]; + if (colorAttachment !== null) { if (this.gpuColorAttachments[i] === undefined) { this.gpuColorAttachments[i] = {} as GPURenderPassColorAttachment; } const dstAttachment = this.gpuColorAttachments[i]; - dstAttachment.view = colorAttachment.gpuTextureView; + dstAttachment.view = this.getTextureView( + colorAttachment, + this.gfxColorAttachmentLevel[i], + ); const clearColor = descriptor.colorClearColor[i]; if (clearColor === 'load') { dstAttachment.loadOp = 'load'; } else { dstAttachment.loadOp = 'clear'; + console.log(clearColor, TransparentWhite); dstAttachment.clearValue = clearColor; } dstAttachment.storeOp = descriptor.colorStore[i] ? 'store' : 'discard'; dstAttachment.resolveTarget = undefined; if (colorResolveTo !== null) { if (colorAttachment.sampleCount > 1) { - dstAttachment.resolveTarget = colorResolveTo.gpuTextureView; + dstAttachment.resolveTarget = this.getTextureView( + colorResolveTo, + this.gfxColorResolveToLevel[i], + ); } else { dstAttachment.storeOp = 'store'; } @@ -101,41 +132,62 @@ export class RenderPass_WebGPU implements RenderPass { } this.gfxDepthStencilAttachment = - descriptor.depthStencilAttachment as Attachment_WebGPU; + descriptor.depthStencilAttachment as unknown as Attachment_WebGPU; this.gfxDepthStencilResolveTo = descriptor.depthStencilResolveTo as Texture_WebGPU; if (descriptor.depthStencilAttachment !== null) { const dsAttachment = - descriptor.depthStencilAttachment as Attachment_WebGPU; + descriptor.depthStencilAttachment as unknown as Attachment_WebGPU; const dstAttachment = this.gpuDepthStencilAttachment; dstAttachment.view = dsAttachment.gpuTextureView; - if (descriptor.depthClearValue === 'load') { - dstAttachment.depthLoadOp = 'load'; + const hasDepth = !!( + getFormatFlags(dsAttachment.pixelFormat) & FormatFlags.Depth + ); + if (hasDepth) { + if (descriptor.depthClearValue === 'load') { + dstAttachment.depthLoadOp = 'load'; + } else { + dstAttachment.depthLoadOp = 'clear'; + dstAttachment.depthClearValue = descriptor.depthClearValue; + } + + if ( + descriptor.depthStencilStore || + this.gfxDepthStencilResolveTo !== null + ) + dstAttachment.depthStoreOp = 'store'; + else dstAttachment.depthStoreOp = 'discard'; } else { - dstAttachment.depthLoadOp = 'clear'; - dstAttachment.depthClearValue = descriptor.depthClearValue; + dstAttachment.depthLoadOp = undefined; + dstAttachment.depthStoreOp = undefined; } - if (descriptor.stencilClearValue === 'load') { - dstAttachment.stencilLoadOp = 'load'; + const hasStencil = !!( + getFormatFlags(dsAttachment.pixelFormat) & FormatFlags.Stencil + ); + if (hasStencil) { + if (descriptor.stencilClearValue === 'load') { + dstAttachment.stencilLoadOp = 'load'; + } else { + dstAttachment.stencilLoadOp = 'clear'; + dstAttachment.stencilClearValue = descriptor.stencilClearValue; + } + + if ( + descriptor.depthStencilStore || + this.gfxDepthStencilResolveTo !== null + ) + dstAttachment.stencilStoreOp = 'store'; + else dstAttachment.stencilStoreOp = 'discard'; } else { - dstAttachment.stencilLoadOp = 'clear'; - dstAttachment.stencilClearValue = descriptor.stencilClearValue; + dstAttachment.stencilLoadOp = undefined; + dstAttachment.stencilStoreOp = undefined; } - dstAttachment.depthStoreOp = descriptor.depthStencilStore - ? 'store' - : 'discard'; - dstAttachment.stencilStoreOp = descriptor.depthStencilStore - ? 'store' - : 'discard'; + this.gpuRenderPassDescriptor.depthStencilAttachment = this.gpuDepthStencilAttachment; - if (this.gfxDepthStencilResolveTo !== null) { - dstAttachment.depthStoreOp = 'store'; - dstAttachment.stencilStoreOp = 'store'; - } } else { this.gpuRenderPassDescriptor.depthStencilAttachment = undefined; } @@ -255,9 +307,9 @@ export class RenderPass_WebGPU implements RenderPass { endDebugGroup(): void { // FIREFOX MISSING - if (this.gpuRenderPassEncoder!.popDebugGroup === undefined) return; + if (this.gpuRenderPassEncoder.popDebugGroup === undefined) return; - this.gpuRenderPassEncoder!.popDebugGroup(); + this.gpuRenderPassEncoder.popDebugGroup(); } finish(): GPUCommandBuffer { @@ -274,7 +326,12 @@ export class RenderPass_WebGPU implements RenderPass { colorResolveTo !== null && colorAttachment.sampleCount === 1 ) { - this.copyAttachment(colorResolveTo, colorAttachment); + this.copyAttachment( + colorResolveTo, + this.gfxColorAttachmentLevel[i], + colorAttachment, + this.gfxColorResolveToLevel[i], + ); } } @@ -287,7 +344,9 @@ export class RenderPass_WebGPU implements RenderPass { } else { this.copyAttachment( this.gfxDepthStencilResolveTo, + 0, this.gfxDepthStencilAttachment, + 0, ); } } @@ -297,13 +356,21 @@ export class RenderPass_WebGPU implements RenderPass { private copyAttachment( dst: TextureShared_WebGPU, + dstLevel: number, src: TextureShared_WebGPU, + srcLevel: number, ): void { assert(src.sampleCount === 1); - const srcCopy: GPUImageCopyTexture = { texture: src.gpuTexture }; - const dstCopy: GPUImageCopyTexture = { texture: dst.gpuTexture }; - assert(src.width === dst.width); - assert(src.height === dst.height); + const srcCopy: GPUImageCopyTexture = { + texture: src.gpuTexture, + mipLevel: srcLevel, + }; + const dstCopy: GPUImageCopyTexture = { + texture: dst.gpuTexture, + mipLevel: dstLevel, + }; + assert(src.width >>> srcLevel === dst.width >>> dstLevel); + assert(src.height >>> srcLevel === dst.height >>> dstLevel); assert(!!(src.usage & GPUTextureUsage.COPY_SRC)); assert(!!(dst.usage & GPUTextureUsage.COPY_DST)); this.commandEncoder.copyTextureToTexture(srcCopy, dstCopy, [ diff --git a/packages/g-plugin-webgpu-device/src/platform/utils.ts b/packages/g-plugin-webgpu-device/src/platform/utils.ts index 66fd3a79a..9f820495b 100644 --- a/packages/g-plugin-webgpu-device/src/platform/utils.ts +++ b/packages/g-plugin-webgpu-device/src/platform/utils.ts @@ -52,10 +52,18 @@ export function translateTextureUsage( } export function translateTextureFormat(format: Format): GPUTextureFormat { - if (format === Format.U8_RGBA_RT) return 'bgra8unorm'; - else if (format === Format.U8_RGBA_NORM) return 'rgba8unorm'; + if (format === Format.U8_R_NORM) return 'r8unorm'; else if (format === Format.U8_RG_NORM) return 'rg8unorm'; + else if (format === Format.U8_RGBA_RT) return 'bgra8unorm'; + else if (format === Format.U8_RGBA_RT_SRGB) return 'bgra8unorm-srgb'; + else if (format === Format.U8_RGBA_NORM) return 'rgba8unorm'; + else if (format === Format.U8_RGBA_SRGB) return 'rgba8unorm-srgb'; + else if (format === Format.S8_R_NORM) return 'r8snorm'; + else if (format === Format.S8_RG_NORM) return 'rg8snorm'; + else if (format === Format.S8_RGBA_NORM) return 'rgba8snorm'; else if (format === Format.U32_R) return 'r32uint'; + else if (format === Format.F16_RGBA) return 'rgba16float'; + else if (format === Format.F32_RGBA) return 'rgba32float'; else if (format === Format.D24) return 'depth24plus'; else if (format === Format.D24_S8) return 'depth24plus-stencil8'; else if (format === Format.D32F) return 'depth32float'; @@ -70,15 +78,15 @@ export function translateTextureFormat(format: Format): GPUTextureFormat { else if (format === Format.BC4_UNORM) return 'bc4-r-unorm'; else if (format === Format.BC5_SNORM) return 'bc5-rg-snorm'; else if (format === Format.BC5_UNORM) return 'bc5-rg-unorm'; - else throw new Error('whoops'); + else throw 'whoops'; } export function translateTextureDimension( dimension: TextureDimension, ): GPUTextureDimension { if (dimension === TextureDimension.n2D) return '2d'; - else if (dimension === TextureDimension.Cube) return '3d'; - else if (dimension === TextureDimension.n2DArray) return '3d'; + else if (dimension === TextureDimension.Cube) return '2d'; + else if (dimension === TextureDimension.n2DArray) return '2d'; else if (dimension === TextureDimension.n3D) return '3d'; else throw new Error('whoops'); } diff --git a/packages/g-plugin-yoga/CHANGELOG.md b/packages/g-plugin-yoga/CHANGELOG.md index e3d0118a1..188f5f569 100644 --- a/packages/g-plugin-yoga/CHANGELOG.md +++ b/packages/g-plugin-yoga/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-yoga +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-plugin-yoga/package.json b/packages/g-plugin-yoga/package.json index a1e4d459b..cfdb546fa 100644 --- a/packages/g-plugin-yoga/package.json +++ b/packages/g-plugin-yoga/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-yoga", - "version": "1.9.0", + "version": "1.9.1", "description": "A G plugin for Yoga layout engine", "keywords": [ "antv", diff --git a/packages/g-plugin-zdog-canvas-renderer/CHANGELOG.md b/packages/g-plugin-zdog-canvas-renderer/CHANGELOG.md index ce59662fc..5bb699cf4 100644 --- a/packages/g-plugin-zdog-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-zdog-canvas-renderer/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-zdog-canvas-renderer +## 1.2.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + - @antv/g-canvas@1.11.1 + ## 1.2.0 ### Minor Changes diff --git a/packages/g-plugin-zdog-canvas-renderer/package.json b/packages/g-plugin-zdog-canvas-renderer/package.json index d8db16afd..ea1597e12 100644 --- a/packages/g-plugin-zdog-canvas-renderer/package.json +++ b/packages/g-plugin-zdog-canvas-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-zdog-canvas-renderer", - "version": "1.2.0", + "version": "1.2.1", "description": "A G plugin of renderer implementation with Zdog", "keywords": [ "antv", diff --git a/packages/g-plugin-zdog-svg-renderer/CHANGELOG.md b/packages/g-plugin-zdog-svg-renderer/CHANGELOG.md index 93c432e01..804cd586f 100644 --- a/packages/g-plugin-zdog-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-zdog-svg-renderer/CHANGELOG.md @@ -1,5 +1,14 @@ # @antv/g-plugin-zdog-svg-renderer +## 1.2.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-svg-renderer@1.10.1 + - @antv/g-lite@1.2.1 + - @antv/g-svg@1.10.1 + ## 1.2.0 ### Minor Changes diff --git a/packages/g-plugin-zdog-svg-renderer/package.json b/packages/g-plugin-zdog-svg-renderer/package.json index 71399df41..69af0f329 100644 --- a/packages/g-plugin-zdog-svg-renderer/package.json +++ b/packages/g-plugin-zdog-svg-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-zdog-svg-renderer", - "version": "1.2.0", + "version": "1.2.1", "description": "A G plugin of renderer implementation with Zdog", "keywords": [ "antv", diff --git a/packages/g-shader-components/CHANGELOG.md b/packages/g-shader-components/CHANGELOG.md index c9b0c4c59..ecc63ffa2 100644 --- a/packages/g-shader-components/CHANGELOG.md +++ b/packages/g-shader-components/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-shader-components +## 1.8.1 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now + ## 1.8.0 ### Minor Changes diff --git a/packages/g-shader-components/batch.vert b/packages/g-shader-components/batch.vert index 962979af2..16591d708 100644 --- a/packages/g-shader-components/batch.vert +++ b/packages/g-shader-components/batch.vert @@ -18,6 +18,6 @@ v_StrokeColor = a_StrokeColor; v_StylePacked1 = a_StylePacked1; v_StylePacked2 = a_StylePacked2; -#ifdef CLIPSPACE_NEAR_ZERO - gl_Position.z = gl_Position.z * 0.5 + 0.5; -#endif \ No newline at end of file +// #ifdef CLIPSPACE_NEAR_ZERO +// gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5; +// #endif \ No newline at end of file diff --git a/packages/g-shader-components/package.json b/packages/g-shader-components/package.json index a2c387b3e..bee1a202c 100644 --- a/packages/g-shader-components/package.json +++ b/packages/g-shader-components/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-shader-components", - "version": "1.8.0", + "version": "1.8.1", "description": "Shader components based on glslify", "keywords": [ "antv", diff --git a/packages/g-svg/CHANGELOG.md b/packages/g-svg/CHANGELOG.md index c2c5bd0e0..9c235b7eb 100644 --- a/packages/g-svg/CHANGELOG.md +++ b/packages/g-svg/CHANGELOG.md @@ -1,5 +1,15 @@ # @antv/g-svg +## 1.10.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-svg-renderer@1.10.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-svg-picker@1.9.1 + - @antv/g-plugin-dom-interaction@1.9.1 + ## 1.10.0 ### Minor Changes diff --git a/packages/g-svg/package.json b/packages/g-svg/package.json index 046b39148..a8c3d5dbc 100644 --- a/packages/g-svg/package.json +++ b/packages/g-svg/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-svg", - "version": "1.10.0", + "version": "1.10.1", "description": "A renderer implemented by SVG", "keywords": [ "antv", diff --git a/packages/g-web-animations-api/CHANGELOG.md b/packages/g-web-animations-api/CHANGELOG.md index e4bd98539..d473c4dbd 100644 --- a/packages/g-web-animations-api/CHANGELOG.md +++ b/packages/g-web-animations-api/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-web-animations-api +## 1.2.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + ## 1.2.0 ### Minor Changes diff --git a/packages/g-web-animations-api/package.json b/packages/g-web-animations-api/package.json index efb1a149a..cc9439b90 100644 --- a/packages/g-web-animations-api/package.json +++ b/packages/g-web-animations-api/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-web-animations-api", - "version": "1.2.0", + "version": "1.2.1", "description": "A simple implementation of Web Animations API.", "keywords": [ "antv", diff --git a/packages/g-web-components/CHANGELOG.md b/packages/g-web-components/CHANGELOG.md index 5a5f57373..dece3c61d 100644 --- a/packages/g-web-components/CHANGELOG.md +++ b/packages/g-web-components/CHANGELOG.md @@ -1,5 +1,14 @@ # @antv/g-web-components +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-lite@1.2.1 + - @antv/g-canvas@1.11.1 + - @antv/g-webgl@1.9.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-web-components/package.json b/packages/g-web-components/package.json index 0b1b5e8dd..0ca51b99d 100644 --- a/packages/g-web-components/package.json +++ b/packages/g-web-components/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-web-components", - "version": "1.9.0", + "version": "1.9.1", "description": "A declarative usage for G implemented with WebComponents", "keywords": [ "antv", diff --git a/packages/g-webgl/CHANGELOG.md b/packages/g-webgl/CHANGELOG.md index e2aac230f..b8833b2ba 100644 --- a/packages/g-webgl/CHANGELOG.md +++ b/packages/g-webgl/CHANGELOG.md @@ -1,5 +1,17 @@ # @antv/g-webgl +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-device-renderer@1.9.1 + - @antv/g-plugin-html-renderer@1.9.1 + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-plugin-webgl-device@1.9.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-dom-interaction@1.9.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-webgl/package.json b/packages/g-webgl/package.json index f45e7bb66..abcf30fd6 100644 --- a/packages/g-webgl/package.json +++ b/packages/g-webgl/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-webgl", - "version": "1.9.0", + "version": "1.9.1", "description": "A renderer implemented by WebGL1/2", "keywords": [ "antv", diff --git a/packages/g-webgpu/CHANGELOG.md b/packages/g-webgpu/CHANGELOG.md index 16c501d71..c414ba503 100644 --- a/packages/g-webgpu/CHANGELOG.md +++ b/packages/g-webgpu/CHANGELOG.md @@ -1,5 +1,17 @@ # @antv/g-webgpu +## 1.9.1 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-plugin-device-renderer@1.9.1 + - @antv/g-plugin-html-renderer@1.9.1 + - @antv/g-plugin-webgpu-device@1.9.1 + - @antv/g-plugin-image-loader@1.3.1 + - @antv/g-lite@1.2.1 + - @antv/g-plugin-dom-interaction@1.9.1 + ## 1.9.0 ### Minor Changes diff --git a/packages/g-webgpu/package.json b/packages/g-webgpu/package.json index f3a939d54..47ace800b 100644 --- a/packages/g-webgpu/package.json +++ b/packages/g-webgpu/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-webgpu", - "version": "1.9.0", + "version": "1.9.1", "description": "A renderer implemented by WebGPU", "keywords": [ "antv", diff --git a/packages/g/CHANGELOG.md b/packages/g/CHANGELOG.md index 2338661a0..88d5f16f4 100644 --- a/packages/g/CHANGELOG.md +++ b/packages/g/CHANGELOG.md @@ -1,5 +1,15 @@ # @antv/g +## 5.18.2 + +### Patch Changes + +- Updated dependencies [b0dd4788] + - @antv/g-camera-api@1.2.1 + - @antv/g-lite@1.2.1 + - @antv/g-dom-mutation-observer-api@1.2.1 + - @antv/g-web-animations-api@1.2.1 + ## 5.18.1 ### Patch Changes diff --git a/packages/g/package.json b/packages/g/package.json index a7eae244c..d14353868 100644 --- a/packages/g/package.json +++ b/packages/g/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g", - "version": "5.18.1", + "version": "5.18.2", "description": "A core module for rendering engine implements DOM API.", "keywords": [ "antv", diff --git a/packages/react-g/CHANGELOG.md b/packages/react-g/CHANGELOG.md index e7f13ded4..53276c206 100644 --- a/packages/react-g/CHANGELOG.md +++ b/packages/react-g/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/react-g +## 1.10.2 + +### Patch Changes + +- b0dd4788: Remove this syntax in @antv/g-math since it's already an ESM now + - @antv/g@5.18.2 + ## 1.10.1 ### Patch Changes diff --git a/packages/react-g/package.json b/packages/react-g/package.json index 1d40ce642..f57149f84 100644 --- a/packages/react-g/package.json +++ b/packages/react-g/package.json @@ -1,6 +1,6 @@ { "name": "@antv/react-g", - "version": "1.10.1", + "version": "1.10.2", "description": "react render for @antv/g", "keywords": [ "react", @@ -41,7 +41,7 @@ "dependencies": { "@antv/g": "workspace:*", "@antv/util": "^3.3.1", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "react-reconciler": "^0.26.2", "scheduler": "^0.20.2", "tslib": "^2.5.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2984f94e0..e84efb239 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -162,10 +162,10 @@ importers: version: link:../g-lite '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -251,10 +251,10 @@ importers: version: link:../g-lite '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -307,7 +307,7 @@ importers: version: link:../g-math '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) d3-color: specifier: ^1.4.0 version: 1.4.0 @@ -315,8 +315,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 rbush: specifier: ^3.0.1 version: 3.0.1 @@ -353,10 +353,10 @@ importers: dependencies: '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.1.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -496,8 +496,8 @@ importers: specifier: workspace:* version: link:../g-shader-components gl-matrix: - specifier: ^3.1.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -530,8 +530,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 gl-matrix: - specifier: ^3.1.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -579,10 +579,10 @@ importers: version: link:../g-plugin-canvas-renderer '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -603,10 +603,10 @@ importers: version: link:../g-plugin-image-loader '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -624,13 +624,13 @@ importers: version: link:../g-plugin-image-loader '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) canvaskit-wasm: specifier: ^0.34.0 version: 0.34.0 gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -683,7 +683,7 @@ importers: version: link:../g-shader-components '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) '@webgpu/types': specifier: ^0.1.6 version: 0.1.33 @@ -694,8 +694,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 gl-matrix: - specifier: ^3.1.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -756,10 +756,10 @@ importers: version: link:../g-lite '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -771,10 +771,10 @@ importers: version: link:../g-lite '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -785,8 +785,8 @@ importers: specifier: workspace:* version: link:../g-lite gl-matrix: - specifier: ^3.1.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 matter-js: specifier: ^0.18.0 version: 0.18.0 @@ -871,10 +871,10 @@ importers: version: link:../g-lite '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 tslib: specifier: ^2.5.3 version: 2.5.3 @@ -1120,10 +1120,10 @@ importers: version: link:../g '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 react: specifier: ^16.13.1 version: 16.13.1 @@ -1152,6 +1152,15 @@ importers: site: dependencies: + '@antv/g-components': + specifier: ^1.9.0 + version: link:../packages/g-components + '@antv/g-plugin-dragndrop': + specifier: ^1.8.0 + version: link:../packages/g-plugin-dragndrop + '@antv/g-svg': + specifier: ^1.10.0 + version: link:../packages/g-svg '@antv/g6': specifier: ^4.5.2 version: 4.5.2 @@ -1160,10 +1169,10 @@ importers: version: link:../packages/react-g '@antv/util': specifier: ^3.3.1 - version: 3.3.1(gl-matrix@3.3.0) + version: 3.3.1(gl-matrix@3.4.3) '@antv/webgpu-graph': specifier: ^1.0.0 - version: 1.0.0(@antv/g-lite@packages+g-lite)(@antv/g-webgpu@packages+g-webgpu)(gl-matrix@3.3.0) + version: 1.0.0(@antv/g-lite@packages+g-lite)(@antv/g-webgpu@packages+g-webgpu)(gl-matrix@3.4.3) '@naoak/workerize-transferable': specifier: ^0.1.0 version: 0.1.0(workerize-loader@2.0.2) @@ -1195,8 +1204,8 @@ importers: specifier: ^3.2.3 version: 3.2.3 gl-matrix: - specifier: ^3.3.0 - version: 3.3.0 + specifier: ^3.4.3 + version: 3.4.3 hammer-touchemulator: specifier: ^0.0.2 version: 0.0.2 @@ -1661,18 +1670,6 @@ packages: tslib: 2.5.3 dev: false - /@antv/g-plugin-image-loader@1.1.54(@antv/g-lite@packages+g-lite)(gl-matrix@3.3.0): - resolution: {integrity: sha512-3udyGozFpE4mjsLOxegikYNNfb0RpHmSbvrZj5psTX4UVFB3V2eopKoRF2JYa3kUjnRzLJ3sDh0przr2K01tvg==} - peerDependencies: - '@antv/g-lite': ^1.0.0 - dependencies: - '@antv/g-lite': link:packages/g-lite - '@antv/util': 3.3.1(gl-matrix@3.3.0) - tslib: 2.5.3 - transitivePeerDependencies: - - gl-matrix - dev: false - /@antv/g-plugin-image-loader@1.1.54(@antv/g-lite@packages+g-lite)(gl-matrix@3.4.3): resolution: {integrity: sha512-3udyGozFpE4mjsLOxegikYNNfb0RpHmSbvrZj5psTX4UVFB3V2eopKoRF2JYa3kUjnRzLJ3sDh0przr2K01tvg==} peerDependencies: @@ -1685,7 +1682,7 @@ packages: - gl-matrix dev: false - /@antv/g-plugin-webgl-device@1.7.54(@antv/g-lite@packages+g-lite)(@antv/g-plugin-device-renderer@1.7.70)(gl-matrix@3.3.0): + /@antv/g-plugin-webgl-device@1.7.54(@antv/g-lite@packages+g-lite)(@antv/g-plugin-device-renderer@1.7.70)(gl-matrix@3.4.3): resolution: {integrity: sha512-1Bnf+eb5HcK7plBYSBAKQDc+KWW0VZ3paFv8rEfJCnp7nTt4kHH2j9wdjwHztft4eOaxdRH1hdV1Aom05sahqg==} peerDependencies: '@antv/g-lite': ^1.0.0 @@ -1693,7 +1690,7 @@ packages: dependencies: '@antv/g-lite': link:packages/g-lite '@antv/g-plugin-device-renderer': 1.7.70(@antv/g-lite@packages+g-lite) - '@antv/util': 3.3.1(gl-matrix@3.3.0) + '@antv/util': 3.3.1(gl-matrix@3.4.3) eventemitter3: 4.0.7 tslib: 2.5.3 transitivePeerDependencies: @@ -1714,18 +1711,18 @@ packages: tslib: 2.5.3 dev: false - /@antv/g-web-animations-api@1.0.39(@antv/g-lite@1.0.70)(gl-matrix@3.3.0): + /@antv/g-web-animations-api@1.0.39(@antv/g-lite@1.0.70)(gl-matrix@3.4.3): resolution: {integrity: sha512-0QXVzjk8kKrVokxHLLphkJsMPvbhLgcQN8/eVUdPaj+A0Yf6Cpg/hquYaGBBuqzwoMVB0ROUsIvwXgRtoXQONA==} peerDependencies: '@antv/g-lite': ^1.0.0 dependencies: '@antv/g-lite': 1.0.70 - '@antv/util': 3.3.1(gl-matrix@3.3.0) + '@antv/util': 3.3.1(gl-matrix@3.4.3) transitivePeerDependencies: - gl-matrix dev: false - /@antv/g-webgl@1.7.74(@antv/g-lite@packages+g-lite)(gl-matrix@3.3.0): + /@antv/g-webgl@1.7.74(@antv/g-lite@packages+g-lite)(gl-matrix@3.4.3): resolution: {integrity: sha512-efi5NjuUWcIQt1kxp9kQSPIC9xwVzHbKiXSjrl6SkZ7rXWekBWfPsfnRca0zEzZQ91M90/F0jvdRLe6uXXqrIQ==} peerDependencies: '@antv/g-lite': ^1.0.0 @@ -1734,9 +1731,9 @@ packages: '@antv/g-plugin-device-renderer': 1.7.70(@antv/g-lite@packages+g-lite) '@antv/g-plugin-dom-interaction': 1.7.52(@antv/g-lite@packages+g-lite) '@antv/g-plugin-html-renderer': 1.7.56(@antv/g-lite@packages+g-lite) - '@antv/g-plugin-image-loader': 1.1.54(@antv/g-lite@packages+g-lite)(gl-matrix@3.3.0) - '@antv/g-plugin-webgl-device': 1.7.54(@antv/g-lite@packages+g-lite)(@antv/g-plugin-device-renderer@1.7.70)(gl-matrix@3.3.0) - '@antv/util': 3.3.1(gl-matrix@3.3.0) + '@antv/g-plugin-image-loader': 1.1.54(@antv/g-lite@packages+g-lite)(gl-matrix@3.4.3) + '@antv/g-plugin-webgl-device': 1.7.54(@antv/g-lite@packages+g-lite)(@antv/g-plugin-device-renderer@1.7.70)(gl-matrix@3.4.3) + '@antv/util': 3.3.1(gl-matrix@3.4.3) transitivePeerDependencies: - gl-matrix dev: false @@ -1853,7 +1850,7 @@ packages: '@antv/g6-pc': 0.5.2 dev: false - /@antv/g@5.16.33(gl-matrix@3.3.0): + /@antv/g@5.16.33(gl-matrix@3.4.3): resolution: {integrity: sha512-11F82JsrXeJZTZSREiaPhnILkzoHqajkebA4fkPQ4XXjpoAcpIEow//NF8LbJOr3c1hogTyDh+aofwFeY+JnMw==} dependencies: '@antv/g-camera-api': 1.0.40(@antv/g-lite@1.0.70) @@ -1861,7 +1858,7 @@ packages: '@antv/g-css-typed-om-api': 1.0.38(@antv/g-lite@1.0.70) '@antv/g-dom-mutation-observer-api': 1.0.38(@antv/g-lite@1.0.70) '@antv/g-lite': 1.0.70 - '@antv/g-web-animations-api': 1.0.39(@antv/g-lite@1.0.70)(gl-matrix@3.3.0) + '@antv/g-web-animations-api': 1.0.39(@antv/g-lite@1.0.70)(gl-matrix@3.4.3) transitivePeerDependencies: - gl-matrix dev: false @@ -1920,16 +1917,6 @@ packages: tslib: 2.5.3 dev: false - /@antv/util@3.3.1(gl-matrix@3.3.0): - resolution: {integrity: sha512-9p2SLovz4iBo6OsAdV1MU9lShwqCez2CMLCL0voIXNsIDxG2t17l8EN8/hoADCTH5AigC2U3ru9/HdD5YtOiQg==} - peerDependencies: - gl-matrix: ^3.3.0 - dependencies: - fast-deep-equal: 3.1.3 - gl-matrix: 3.3.0 - tslib: 2.5.3 - dev: false - /@antv/util@3.3.1(gl-matrix@3.4.3): resolution: {integrity: sha512-9p2SLovz4iBo6OsAdV1MU9lShwqCez2CMLCL0voIXNsIDxG2t17l8EN8/hoADCTH5AigC2U3ru9/HdD5YtOiQg==} peerDependencies: @@ -1939,12 +1926,12 @@ packages: gl-matrix: 3.4.3 tslib: 2.5.3 - /@antv/webgpu-graph@1.0.0(@antv/g-lite@packages+g-lite)(@antv/g-webgpu@packages+g-webgpu)(gl-matrix@3.3.0): + /@antv/webgpu-graph@1.0.0(@antv/g-lite@packages+g-lite)(@antv/g-webgpu@packages+g-webgpu)(gl-matrix@3.4.3): resolution: {integrity: sha512-zE9lyg+uJkOe/1O7EdfOesuqD6svKRhQCNMocpFwA7cka4jdBY5h6iE60FiHNGPza6/Cy7mXVDYuGT/t+8/F1g==} dependencies: - '@antv/g': 5.16.33(gl-matrix@3.3.0) + '@antv/g': 5.16.33(gl-matrix@3.4.3) '@antv/g-plugin-gpgpu': 1.7.50(@antv/g-lite@packages+g-lite)(@antv/g-webgpu@packages+g-webgpu) - '@antv/g-webgl': 1.7.74(@antv/g-lite@packages+g-lite)(gl-matrix@3.3.0) + '@antv/g-webgl': 1.7.74(@antv/g-lite@packages+g-lite)(gl-matrix@3.4.3) '@types/offscreencanvas': 2019.6.4 '@webgpu/types': 0.1.33 tslib: 2.5.3 @@ -10580,10 +10567,6 @@ packages: resolution: {integrity: sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==} dev: true - /gl-matrix@3.3.0: - resolution: {integrity: sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==} - dev: false - /gl-matrix@3.4.3: resolution: {integrity: sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==} diff --git a/site/examples/3d/3d-basic/demo/webgpu.js b/site/examples/3d/3d-basic/demo/webgpu.js index 7bba3ebea..10d42d9ad 100644 --- a/site/examples/3d/3d-basic/demo/webgpu.js +++ b/site/examples/3d/3d-basic/demo/webgpu.js @@ -1,4 +1,4 @@ -import { Canvas, CanvasEvent, Circle, Image } from '@antv/g'; +import { Canvas, CanvasEvent, Circle } from '@antv/g'; import { Renderer as WebGPURenderer } from '@antv/g-webgpu'; import Stats from 'stats.js'; @@ -10,33 +10,33 @@ const webgpuRenderer = new WebGPURenderer({ // create a canvas const canvas = new Canvas({ container: 'container', - width: 600, + width: 500, height: 500, renderer: webgpuRenderer, - background: 'red', + // background: 'gray', }); const circle = new Circle({ style: { - x: 200, - y: 200, - r: 50, + x: 250, + y: 250, + r: 250, fill: 'green', cursor: 'pointer', }, }); -const icon = new Image({ - style: { - x: 200, - y: 200, - z: 0, - width: 200, - height: 200, - src: 'https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ', - isBillboard: true, - }, -}); +// const icon = new Image({ +// style: { +// x: 200, +// y: 200, +// z: 0, +// width: 200, +// height: 200, +// src: 'https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ', +// isBillboard: true, +// }, +// }); canvas.addEventListener(CanvasEvent.READY, () => { canvas.appendChild(circle); diff --git a/site/package.json b/site/package.json index cbe5f32e8..6030c9449 100644 --- a/site/package.json +++ b/site/package.json @@ -24,6 +24,9 @@ "start": "npm run site:dev" }, "dependencies": { + "@antv/g-components": "^1.9.0", + "@antv/g-plugin-dragndrop": "^1.8.0", + "@antv/g-svg": "^1.10.0", "@antv/g6": "^4.5.2", "@antv/react-g": "^1.8.79", "@antv/util": "^3.3.1", @@ -38,7 +41,7 @@ "d3-force-3d": "^3.0.3", "d3-svg-annotation": "^2.5.0", "gh-pages": "^3.2.3", - "gl-matrix": "^3.3.0", + "gl-matrix": "^3.4.3", "hammer-touchemulator": "^0.0.2", "hammerjs": "^2.0.8", "interactjs": "^1.10.11",