diff --git a/packages/g-camera-api/CHANGELOG.md b/packages/g-camera-api/CHANGELOG.md index a91a91679..39f007505 100644 --- a/packages/g-camera-api/CHANGELOG.md +++ b/packages/g-camera-api/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-camera-api +## 1.2.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.2.13 ### Patch Changes diff --git a/packages/g-camera-api/package.json b/packages/g-camera-api/package.json index 5a74c5b46..42ff97c9e 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.13", + "version": "1.2.14", "description": "A simple implementation of Camera API.", "keywords": [ "antv", diff --git a/packages/g-canvas/CHANGELOG.md b/packages/g-canvas/CHANGELOG.md index cf39e9cdd..ea7daa1ac 100644 --- a/packages/g-canvas/CHANGELOG.md +++ b/packages/g-canvas/CHANGELOG.md @@ -1,5 +1,18 @@ # @antv/g-canvas +## 1.11.18 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-plugin-canvas-renderer@1.9.15 + - @antv/g-lite@1.2.14 + - @antv/g-plugin-canvas-picker@1.10.15 + - @antv/g-plugin-canvas-path-generator@1.3.14 + - @antv/g-plugin-dom-interaction@1.9.14 + - @antv/g-plugin-html-renderer@1.9.17 + - @antv/g-plugin-image-loader@1.3.14 + ## 1.11.17 ### Patch Changes diff --git a/packages/g-canvas/package.json b/packages/g-canvas/package.json index 33cd41c41..e846466a8 100644 --- a/packages/g-canvas/package.json +++ b/packages/g-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-canvas", - "version": "1.11.17", + "version": "1.11.18", "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 f607b9e9e..fa4a1035c 100644 --- a/packages/g-canvaskit/CHANGELOG.md +++ b/packages/g-canvaskit/CHANGELOG.md @@ -1,5 +1,18 @@ # @antv/g-canvaskit +## 0.10.18 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-canvas-picker@1.10.15 + - @antv/g-plugin-canvas-path-generator@1.3.14 + - @antv/g-plugin-canvaskit-renderer@1.3.14 + - @antv/g-plugin-dom-interaction@1.9.14 + - @antv/g-plugin-html-renderer@1.9.17 + - @antv/g-plugin-image-loader@1.3.14 + ## 0.10.17 ### Patch Changes diff --git a/packages/g-canvaskit/package.json b/packages/g-canvaskit/package.json index 71a9ab4f9..e1ad4e10b 100644 --- a/packages/g-canvaskit/package.json +++ b/packages/g-canvaskit/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-canvaskit", - "version": "0.10.17", + "version": "0.10.18", "description": "A renderer implemented by CanvasKit", "keywords": [ "antv", diff --git a/packages/g-components/CHANGELOG.md b/packages/g-components/CHANGELOG.md index b736f609a..760bf1ef3 100644 --- a/packages/g-components/CHANGELOG.md +++ b/packages/g-components/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-components +## 1.9.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-components/package.json b/packages/g-components/package.json index f2e026558..2c8b1d5f4 100644 --- a/packages/g-components/package.json +++ b/packages/g-components/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-components", - "version": "1.9.13", + "version": "1.9.14", "description": "Components for g", "keywords": [ "antv", diff --git a/packages/g-dom-mutation-observer-api/CHANGELOG.md b/packages/g-dom-mutation-observer-api/CHANGELOG.md index 87f617f4e..ce62d4716 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.2.13 ### Patch Changes diff --git a/packages/g-dom-mutation-observer-api/package.json b/packages/g-dom-mutation-observer-api/package.json index 8fb354177..1aa564d49 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.13", + "version": "1.2.14", "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 832e251f1..ed5479fbf 100644 --- a/packages/g-gesture/CHANGELOG.md +++ b/packages/g-gesture/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-gesture +## 2.2.17 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 2.2.16 ### Patch Changes diff --git a/packages/g-gesture/package.json b/packages/g-gesture/package.json index ea2ab6ee7..6ff139a01 100644 --- a/packages/g-gesture/package.json +++ b/packages/g-gesture/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-gesture", - "version": "2.2.16", + "version": "2.2.17", "description": "G Gesture", "keywords": [ "antv", diff --git a/packages/g-image-exporter/CHANGELOG.md b/packages/g-image-exporter/CHANGELOG.md index 5ced4b965..e1f5c86f1 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 0.7.13 ### Patch Changes diff --git a/packages/g-image-exporter/package.json b/packages/g-image-exporter/package.json index c9658b001..4099ef584 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.13", + "version": "0.7.14", "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 ffebc139b..79f910432 100644 --- a/packages/g-lite/CHANGELOG.md +++ b/packages/g-lite/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-lite +## 1.2.14 + +### Patch Changes + +- 5e0de3dd: Add disableRenderHooks switch for WebGL renderer. + ## 1.2.13 ### Patch Changes diff --git a/packages/g-lite/package.json b/packages/g-lite/package.json index 663b99acf..ada4e7689 100644 --- a/packages/g-lite/package.json +++ b/packages/g-lite/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-lite", - "version": "1.2.13", + "version": "1.2.14", "description": "A core module for rendering engine implements DOM API.", "keywords": [ "antv", diff --git a/packages/g-lite/src/Canvas.ts b/packages/g-lite/src/Canvas.ts index 9bc95e789..239e017fe 100644 --- a/packages/g-lite/src/Canvas.ts +++ b/packages/g-lite/src/Canvas.ts @@ -15,7 +15,6 @@ import { CustomElementRegistry } from './dom/CustomElementRegistry'; import type { ICanvas } from './dom/interfaces'; import { runtime } from './global-runtime'; import { CullingPlugin } from './plugins/CullingPlugin'; -import { DirtyCheckPlugin } from './plugins/DirtyCheckPlugin'; import { EventPlugin } from './plugins/EventPlugin'; import { FrustumCullingStrategy } from './plugins/FrustumCullingStrategy'; import { PrepareRendererPlugin } from './plugins/PrepareRendererPlugin'; @@ -506,7 +505,7 @@ export class Canvas extends EventTarget implements ICanvas { this.context.renderingPlugins.push( new EventPlugin(), new PrepareRendererPlugin(), - new DirtyCheckPlugin(), + // new DirtyCheckPlugin(), new CullingPlugin([new FrustumCullingStrategy()]), ); diff --git a/packages/g-lite/src/services/EventService.ts b/packages/g-lite/src/services/EventService.ts index d1f40ce6e..48fa3f6d2 100644 --- a/packages/g-lite/src/services/EventService.ts +++ b/packages/g-lite/src/services/EventService.ts @@ -682,7 +682,7 @@ export class EventService { hitTest(position: EventPosition): IEventTarget | null { const { viewportX, viewportY } = position; - const { width, height } = this.context.config; + const { width, height, disableHitTesting } = this.context.config; // outside canvas if ( viewportX < 0 || @@ -694,7 +694,7 @@ export class EventService { } return ( - this.pickHandler(position) || + (!disableHitTesting && this.pickHandler(position)) || this.rootTarget || // return Document null ); diff --git a/packages/g-lite/src/services/RenderingService.ts b/packages/g-lite/src/services/RenderingService.ts index 743123526..4a009fd50 100644 --- a/packages/g-lite/src/services/RenderingService.ts +++ b/packages/g-lite/src/services/RenderingService.ts @@ -172,19 +172,27 @@ export class RenderingService { this.globalRuntime.sceneGraphService.triggerPendingEvents(); if (renderingContext.renderReasons.size && this.inited) { - this.renderDisplayObject( - renderingContext.root, - canvasConfig, - renderingContext, - ); + // @ts-ignore + renderingContext.dirtyRectangleRenderingDisabled = + this.disableDirtyRectangleRendering(); + + if (!canvasConfig.disableRenderHooks) { + this.renderDisplayObject( + renderingContext.root, + canvasConfig, + renderingContext, + ); + } this.hooks.beginFrame.call(); - renderingContext.renderListCurrentFrame.forEach((object) => { - this.hooks.beforeRender.call(object); - this.hooks.render.call(object); - this.hooks.afterRender.call(object); - }); + if (!canvasConfig.disableRenderHooks) { + renderingContext.renderListCurrentFrame.forEach((object) => { + this.hooks.beforeRender.call(object); + this.hooks.render.call(object); + this.hooks.afterRender.call(object); + }); + } this.hooks.endFrame.call(); renderingContext.renderListCurrentFrame = []; @@ -212,9 +220,14 @@ export class RenderingService { // TODO: relayout // dirtycheck first + const renderable = displayObject.renderable; const objectChanged = enableDirtyCheck - ? this.hooks.dirtycheck.call(displayObject) + ? // @ts-ignore + renderable.dirty || renderingContext.dirtyRectangleRenderingDisabled + ? displayObject + : null : displayObject; + if (objectChanged) { const objectToRender = enableCulling ? this.hooks.cull.call(objectChanged, this.context.camera) diff --git a/packages/g-lite/src/types.ts b/packages/g-lite/src/types.ts index 1e954f077..df5cea8da 100644 --- a/packages/g-lite/src/types.ts +++ b/packages/g-lite/src/types.ts @@ -467,6 +467,16 @@ export interface CanvasConfig { */ alwaysTriggerPointerEventOnCanvas?: boolean; + /** + * Enable event service + */ + disableHitTesting?: boolean; + + /** + * Skip triggering hooks.beforeRender/render/afterRender + */ + disableRenderHooks?: boolean; + /** * Should we account for CSS Transform applied on container? */ diff --git a/packages/g-lottie-player/CHANGELOG.md b/packages/g-lottie-player/CHANGELOG.md index fe4c4c8f9..e686e3653 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 0.2.13 ### Patch Changes diff --git a/packages/g-lottie-player/package.json b/packages/g-lottie-player/package.json index 43047b8cf..447e9bc40 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.13", + "version": "0.2.14", "description": "A lottie player for G", "keywords": [ "antv", diff --git a/packages/g-mobile-canvas-element/CHANGELOG.md b/packages/g-mobile-canvas-element/CHANGELOG.md index 5b07d0451..12eeabd30 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 0.8.13 ### Patch Changes diff --git a/packages/g-mobile-canvas-element/package.json b/packages/g-mobile-canvas-element/package.json index c9559e597..c7bca92f3 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.13", + "version": "0.8.14", "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 9529694b3..4847e010f 100644 --- a/packages/g-mobile-canvas/CHANGELOG.md +++ b/packages/g-mobile-canvas/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-mobile-canvas +## 0.11.6 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-plugin-canvas-renderer@1.9.15 + - @antv/g-lite@1.2.14 + - @antv/g-plugin-canvas-picker@1.10.15 + - @antv/g-plugin-canvas-path-generator@1.3.14 + - @antv/g-plugin-dragndrop@1.8.14 + - @antv/g-plugin-gesture@1.2.2 + - @antv/g-plugin-image-loader@1.3.14 + - @antv/g-plugin-mobile-interaction@0.9.14 + ## 0.11.5 ### Patch Changes diff --git a/packages/g-mobile-canvas/package.json b/packages/g-mobile-canvas/package.json index 782d4dcca..544580b4d 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.11.5", + "version": "0.11.6", "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 8a627a83b..2c5c4d036 100644 --- a/packages/g-mobile-svg/CHANGELOG.md +++ b/packages/g-mobile-svg/CHANGELOG.md @@ -1,5 +1,17 @@ # @antv/g-mobile-svg +## 0.10.17 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-dragndrop@1.8.14 + - @antv/g-plugin-gesture@1.2.2 + - @antv/g-plugin-mobile-interaction@0.9.14 + - @antv/g-plugin-svg-picker@1.9.16 + - @antv/g-plugin-svg-renderer@1.10.16 + ## 0.10.16 ### Patch Changes diff --git a/packages/g-mobile-svg/package.json b/packages/g-mobile-svg/package.json index d2680396d..845a542d9 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.16", + "version": "0.10.17", "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 fe7d00ec8..5b6f34b10 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.25 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-plugin-device-renderer@1.9.21 + - @antv/g-lite@1.2.14 + - @antv/g-plugin-dragndrop@1.8.14 + - @antv/g-plugin-gesture@1.2.2 + - @antv/g-plugin-html-renderer@1.9.17 + - @antv/g-plugin-image-loader@1.3.14 + - @antv/g-plugin-mobile-interaction@0.9.14 + ## 0.9.24 ### Patch Changes diff --git a/packages/g-mobile-webgl/package.json b/packages/g-mobile-webgl/package.json index 9a5c1833f..b121960a6 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.24", + "version": "0.9.25", "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 fa4611054..ea8ec877c 100644 --- a/packages/g-pattern/CHANGELOG.md +++ b/packages/g-pattern/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-pattern +## 1.2.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.2.13 ### Patch Changes diff --git a/packages/g-pattern/package.json b/packages/g-pattern/package.json index fafc7a175..b36e298fc 100644 --- a/packages/g-pattern/package.json +++ b/packages/g-pattern/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-pattern", - "version": "1.2.13", + "version": "1.2.14", "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 0708323e7..66ffd9e2f 100644 --- a/packages/g-plugin-3d/CHANGELOG.md +++ b/packages/g-plugin-3d/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-3d +## 1.9.21 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-plugin-device-renderer@1.9.21 + - @antv/g-lite@1.2.14 + ## 1.9.20 ### Patch Changes diff --git a/packages/g-plugin-3d/package.json b/packages/g-plugin-3d/package.json index 9ad6e673a..c82e93cfc 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.20", + "version": "1.9.21", "description": "Provide 3D extension for G", "keywords": [ "antv", diff --git a/packages/g-plugin-a11y/CHANGELOG.md b/packages/g-plugin-a11y/CHANGELOG.md index b34698744..03cea63c1 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 0.6.13 ### Patch Changes diff --git a/packages/g-plugin-a11y/package.json b/packages/g-plugin-a11y/package.json index 004390061..ed5ad496d 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.13", + "version": "0.6.14", "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 c1fcf5a4a..7662f0dde 100644 --- a/packages/g-plugin-annotation/CHANGELOG.md +++ b/packages/g-plugin-annotation/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-annotation +## 0.4.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 0.4.13 ### Patch Changes diff --git a/packages/g-plugin-annotation/package.json b/packages/g-plugin-annotation/package.json index 3d733e087..e4026020e 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.13", + "version": "0.4.14", "description": "A G plugin for annotation", "keywords": [ "antv", diff --git a/packages/g-plugin-box2d/CHANGELOG.md b/packages/g-plugin-box2d/CHANGELOG.md index f6ffbbb78..2ad369881 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-plugin-box2d/package.json b/packages/g-plugin-box2d/package.json index 3546fc325..b58ca1555 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.13", + "version": "1.9.14", "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 3a8950594..9ada69d77 100644 --- a/packages/g-plugin-canvas-path-generator/CHANGELOG.md +++ b/packages/g-plugin-canvas-path-generator/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-canvas-path-generator +## 1.3.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.3.13 ### Patch Changes diff --git a/packages/g-plugin-canvas-path-generator/package.json b/packages/g-plugin-canvas-path-generator/package.json index a69d33a16..a2df64a3d 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.13", + "version": "1.3.14", "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 28c62ba3f..d30a130e9 100644 --- a/packages/g-plugin-canvas-picker/CHANGELOG.md +++ b/packages/g-plugin-canvas-picker/CHANGELOG.md @@ -1,5 +1,14 @@ # @antv/g-plugin-canvas-picker +## 1.10.15 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-plugin-canvas-renderer@1.9.15 + - @antv/g-lite@1.2.14 + - @antv/g-plugin-canvas-path-generator@1.3.14 + ## 1.10.14 ### Patch Changes diff --git a/packages/g-plugin-canvas-picker/package.json b/packages/g-plugin-canvas-picker/package.json index 77307a5d9..3d22b3c2e 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.14", + "version": "1.10.15", "description": "A G plugin for picking in canvas", "keywords": [ "antv", diff --git a/packages/g-plugin-canvas-renderer/CHANGELOG.md b/packages/g-plugin-canvas-renderer/CHANGELOG.md index c7b2696a0..5180da6cb 100644 --- a/packages/g-plugin-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-canvas-renderer/CHANGELOG.md @@ -1,5 +1,15 @@ # @antv/g-plugin-canvas-renderer +## 1.9.15 + +### Patch Changes + +- 5e0de3dd: Add disableRenderHooks switch for WebGL renderer. +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-canvas-path-generator@1.3.14 + - @antv/g-plugin-image-loader@1.3.14 + ## 1.9.14 ### Patch Changes diff --git a/packages/g-plugin-canvas-renderer/package.json b/packages/g-plugin-canvas-renderer/package.json index 101f7f14a..cebc09096 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.14", + "version": "1.9.15", "description": "A G plugin of renderer implementation with Canvas2D API", "keywords": [ "antv", diff --git a/packages/g-plugin-canvas-renderer/src/CanvasRendererPlugin.ts b/packages/g-plugin-canvas-renderer/src/CanvasRendererPlugin.ts index 04c5b5b2e..de8da5710 100644 --- a/packages/g-plugin-canvas-renderer/src/CanvasRendererPlugin.ts +++ b/packages/g-plugin-canvas-renderer/src/CanvasRendererPlugin.ts @@ -460,11 +460,10 @@ export class CanvasRendererPlugin implements RenderingPlugin { const max = aabb.getMax(); // expand the rectangle a bit to avoid artifacts // @see https://www.yuque.com/antv/ou292n/bi8nix#ExvCu - const padding = 2; - const minX = Math.floor(min[0]) - padding; - const minY = Math.floor(min[1]) - padding; - const maxX = Math.ceil(max[0]) + padding; - const maxY = Math.ceil(max[1]) + padding; + const minX = Math.floor(min[0]); + const minY = Math.floor(min[1]); + const maxX = Math.ceil(max[0]); + const maxY = Math.ceil(max[1]); const width = maxX - minX; const height = maxY - minY; diff --git a/packages/g-plugin-canvaskit-renderer/CHANGELOG.md b/packages/g-plugin-canvaskit-renderer/CHANGELOG.md index e90aba112..83fc0d2e2 100644 --- a/packages/g-plugin-canvaskit-renderer/CHANGELOG.md +++ b/packages/g-plugin-canvaskit-renderer/CHANGELOG.md @@ -1,5 +1,13 @@ # @antv/g-plugin-canvaskit-renderer +## 1.3.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-image-loader@1.3.14 + ## 1.3.13 ### Patch Changes diff --git a/packages/g-plugin-canvaskit-renderer/package.json b/packages/g-plugin-canvaskit-renderer/package.json index bb80cfd96..e8e4503fe 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.13", + "version": "1.3.14", "description": "A G plugin of renderer implementation with CanvasKit", "keywords": [ "antv", diff --git a/packages/g-plugin-control/CHANGELOG.md b/packages/g-plugin-control/CHANGELOG.md index 549736bb5..2c022d822 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-plugin-control/package.json b/packages/g-plugin-control/package.json index 8eacfe6ef..381a35fe7 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.13", + "version": "1.9.14", "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 7176a94dd..aff4e9387 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-plugin-css-select/package.json b/packages/g-plugin-css-select/package.json index 62b958ef4..cb7873ee8 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.13", + "version": "1.9.14", "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 e90f327c6..83cf2db8e 100644 --- a/packages/g-plugin-device-renderer/CHANGELOG.md +++ b/packages/g-plugin-device-renderer/CHANGELOG.md @@ -1,5 +1,14 @@ # @antv/g-plugin-device-renderer +## 1.9.21 + +### Patch Changes + +- 5e0de3dd: Add disableRenderHooks switch for WebGL renderer. +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-image-loader@1.3.14 + ## 1.9.20 ### Patch Changes diff --git a/packages/g-plugin-device-renderer/package.json b/packages/g-plugin-device-renderer/package.json index 28f09496f..091ef7071 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.20", + "version": "1.9.21", "description": "A G plugin of renderer implementation with GPUDevice", "keywords": [ "antv", diff --git a/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts b/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts index df58cdba4..e195b5455 100644 --- a/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts +++ b/packages/g-plugin-device-renderer/src/RenderGraphPlugin.ts @@ -105,8 +105,9 @@ export class RenderGraphPlugin implements RenderingPlugin { apply(context: RenderingPluginContext) { this.context = context; - const { renderingService, renderingContext } = context; + const { renderingService, renderingContext, config } = context; const canvas = renderingContext.root.ownerDocument.defaultView; + config.disableRenderHooks = true; const handleMounted = (e: FederatedEvent) => { const object = e.target as DisplayObject; @@ -251,6 +252,8 @@ export class RenderGraphPlugin implements RenderingPlugin { this.device.destroy(); this.device.checkForLeaks(); + + config.disableRenderHooks = false; }); /** diff --git a/packages/g-plugin-dom-interaction/CHANGELOG.md b/packages/g-plugin-dom-interaction/CHANGELOG.md index 9b9a58e65..48c0cccec 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-plugin-dom-interaction/package.json b/packages/g-plugin-dom-interaction/package.json index d9e1421e8..d4e62c37c 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.13", + "version": "1.9.14", "description": "A G plugin", "keywords": [ "antv", diff --git a/packages/g-plugin-dragndrop/CHANGELOG.md b/packages/g-plugin-dragndrop/CHANGELOG.md index dc8f08f66..4974d500e 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.8.13 ### Patch Changes diff --git a/packages/g-plugin-dragndrop/package.json b/packages/g-plugin-dragndrop/package.json index 36d35e29c..7a738a91e 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.13", + "version": "1.8.14", "description": "A G plugin for Drag n Drop implemented with PointerEvents", "keywords": [ "antv", diff --git a/packages/g-plugin-gesture/CHANGELOG.md b/packages/g-plugin-gesture/CHANGELOG.md index f0411c5ef..13aa197c9 100644 --- a/packages/g-plugin-gesture/CHANGELOG.md +++ b/packages/g-plugin-gesture/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-gesture +## 1.2.2 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.2.1 ### Patch Changes diff --git a/packages/g-plugin-gesture/package.json b/packages/g-plugin-gesture/package.json index efb51cf3f..18c38e4a8 100644 --- a/packages/g-plugin-gesture/package.json +++ b/packages/g-plugin-gesture/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-gesture", - "version": "1.2.1", + "version": "1.2.2", "description": "A G plugin for Gesture implemented with PointerEvents", "keywords": [ "antv", diff --git a/packages/g-plugin-html-renderer/CHANGELOG.md b/packages/g-plugin-html-renderer/CHANGELOG.md index 71961445c..aa0e64724 100644 --- a/packages/g-plugin-html-renderer/CHANGELOG.md +++ b/packages/g-plugin-html-renderer/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-html-renderer +## 1.9.17 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.16 ### Patch Changes diff --git a/packages/g-plugin-html-renderer/package.json b/packages/g-plugin-html-renderer/package.json index 54178d6ea..43ea342e4 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.16", + "version": "1.9.17", "description": "A G plugin for rendering HTML", "keywords": [ "antv", diff --git a/packages/g-plugin-image-loader/CHANGELOG.md b/packages/g-plugin-image-loader/CHANGELOG.md index 0cab01c5a..42a7358f7 100644 --- a/packages/g-plugin-image-loader/CHANGELOG.md +++ b/packages/g-plugin-image-loader/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-image-loader +## 1.3.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.3.13 ### Patch Changes diff --git a/packages/g-plugin-image-loader/package.json b/packages/g-plugin-image-loader/package.json index 5a3214691..36b1f1ad2 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.13", + "version": "1.3.14", "description": "A G plugin for loading image", "keywords": [ "antv", diff --git a/packages/g-plugin-matterjs/CHANGELOG.md b/packages/g-plugin-matterjs/CHANGELOG.md index cbeadc0b1..1ad93cc75 100644 --- a/packages/g-plugin-matterjs/CHANGELOG.md +++ b/packages/g-plugin-matterjs/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-matterjs +## 1.9.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-plugin-matterjs/package.json b/packages/g-plugin-matterjs/package.json index 903cb5a37..ad6e7c149 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.13", + "version": "1.9.14", "description": "A G plugin for matter.js physics engine", "keywords": [ "antv", diff --git a/packages/g-plugin-mobile-interaction/CHANGELOG.md b/packages/g-plugin-mobile-interaction/CHANGELOG.md index 239b904b0..cdce3eee8 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 0.9.13 ### Patch Changes diff --git a/packages/g-plugin-mobile-interaction/package.json b/packages/g-plugin-mobile-interaction/package.json index e8b707bf4..06b5ea2e9 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.13", + "version": "0.9.14", "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 28ac96f02..99af7d0fa 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-plugin-physx/package.json b/packages/g-plugin-physx/package.json index d0d58d9b5..74702a8d1 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.13", + "version": "1.9.14", "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 a454b5c12..6b0b7e004 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.18 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-canvas@1.11.18 + ## 1.9.17 ### Patch Changes diff --git a/packages/g-plugin-rough-canvas-renderer/package.json b/packages/g-plugin-rough-canvas-renderer/package.json index 56e915498..051f9471c 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.17", + "version": "1.9.18", "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 718d33bfb..52e5ca672 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.17 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-svg@1.10.16 + ## 1.9.16 ### Patch Changes diff --git a/packages/g-plugin-rough-svg-renderer/package.json b/packages/g-plugin-rough-svg-renderer/package.json index 5b891e5d5..1633585a7 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.16", + "version": "1.9.17", "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 f3381f82f..9cd5661cf 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.16 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-svg-renderer@1.10.16 + ## 1.9.15 ### Patch Changes diff --git a/packages/g-plugin-svg-picker/package.json b/packages/g-plugin-svg-picker/package.json index 04aec2afc..f898df714 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.15", + "version": "1.9.16", "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 7ebc2e40a..cc85ce5a3 100644 --- a/packages/g-plugin-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-svg-renderer/CHANGELOG.md @@ -1,5 +1,12 @@ # @antv/g-plugin-svg-renderer +## 1.10.16 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.10.15 ### Patch Changes diff --git a/packages/g-plugin-svg-renderer/package.json b/packages/g-plugin-svg-renderer/package.json index 3f0a1f3fc..82aa45324 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.15", + "version": "1.10.16", "description": "A G plugin of renderer implementation with SVG", "keywords": [ "antv", diff --git a/packages/g-plugin-yoga/CHANGELOG.md b/packages/g-plugin-yoga/CHANGELOG.md index 32ad1363c..09068f75b 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.9.13 ### Patch Changes diff --git a/packages/g-plugin-yoga/package.json b/packages/g-plugin-yoga/package.json index 26bd9f4e9..8e7cba8be 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.13", + "version": "1.9.14", "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 ff4dbcad0..b48d69f00 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.18 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-canvas@1.11.18 + ## 1.2.17 ### Patch Changes diff --git a/packages/g-plugin-zdog-canvas-renderer/package.json b/packages/g-plugin-zdog-canvas-renderer/package.json index 66ca74463..8a0cc9a9c 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.17", + "version": "1.2.18", "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 c1e35933c..f0fb98d39 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.17 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-svg-renderer@1.10.16 + - @antv/g-svg@1.10.16 + ## 1.2.16 ### Patch Changes diff --git a/packages/g-plugin-zdog-svg-renderer/package.json b/packages/g-plugin-zdog-svg-renderer/package.json index b303739a7..93c0615ef 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.16", + "version": "1.2.17", "description": "A G plugin of renderer implementation with Zdog", "keywords": [ "antv", diff --git a/packages/g-svg/CHANGELOG.md b/packages/g-svg/CHANGELOG.md index 1cd761e50..4d34f7b9a 100644 --- a/packages/g-svg/CHANGELOG.md +++ b/packages/g-svg/CHANGELOG.md @@ -1,5 +1,15 @@ # @antv/g-svg +## 1.10.16 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-plugin-dom-interaction@1.9.14 + - @antv/g-plugin-svg-picker@1.9.16 + - @antv/g-plugin-svg-renderer@1.10.16 + ## 1.10.15 ### Patch Changes diff --git a/packages/g-svg/package.json b/packages/g-svg/package.json index 20074eaad..f6004a358 100644 --- a/packages/g-svg/package.json +++ b/packages/g-svg/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-svg", - "version": "1.10.15", + "version": "1.10.16", "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 61779f684..f485116aa 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.14 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + ## 1.2.13 ### Patch Changes diff --git a/packages/g-web-animations-api/package.json b/packages/g-web-animations-api/package.json index e5e76aa6c..3ee9da34e 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.13", + "version": "1.2.14", "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 45e990bb1..fe5c64214 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.24 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-canvas@1.11.18 + - @antv/g-webgl@1.9.24 + ## 1.9.23 ### Patch Changes diff --git a/packages/g-web-components/package.json b/packages/g-web-components/package.json index 68252f908..cf91b1784 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.23", + "version": "1.9.24", "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 98353cd44..d3781440d 100644 --- a/packages/g-webgl/CHANGELOG.md +++ b/packages/g-webgl/CHANGELOG.md @@ -1,5 +1,16 @@ # @antv/g-webgl +## 1.9.24 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-plugin-device-renderer@1.9.21 + - @antv/g-lite@1.2.14 + - @antv/g-plugin-dom-interaction@1.9.14 + - @antv/g-plugin-html-renderer@1.9.17 + - @antv/g-plugin-image-loader@1.3.14 + ## 1.9.23 ### Patch Changes diff --git a/packages/g-webgl/package.json b/packages/g-webgl/package.json index f291a817c..3533353c6 100644 --- a/packages/g-webgl/package.json +++ b/packages/g-webgl/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-webgl", - "version": "1.9.23", + "version": "1.9.24", "description": "A renderer implemented by WebGL1/2", "keywords": [ "antv", diff --git a/packages/g-webgpu/CHANGELOG.md b/packages/g-webgpu/CHANGELOG.md index f9d7609d2..79fda6e1e 100644 --- a/packages/g-webgpu/CHANGELOG.md +++ b/packages/g-webgpu/CHANGELOG.md @@ -1,5 +1,16 @@ # @antv/g-webgpu +## 1.9.24 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-plugin-device-renderer@1.9.21 + - @antv/g-lite@1.2.14 + - @antv/g-plugin-dom-interaction@1.9.14 + - @antv/g-plugin-html-renderer@1.9.17 + - @antv/g-plugin-image-loader@1.3.14 + ## 1.9.23 ### Patch Changes diff --git a/packages/g-webgpu/package.json b/packages/g-webgpu/package.json index f81f7dadd..5a290b437 100644 --- a/packages/g-webgpu/package.json +++ b/packages/g-webgpu/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-webgpu", - "version": "1.9.23", + "version": "1.9.24", "description": "A renderer implemented by WebGPU", "keywords": [ "antv", diff --git a/packages/g/CHANGELOG.md b/packages/g/CHANGELOG.md index ccc2673a1..95edc03dd 100644 --- a/packages/g/CHANGELOG.md +++ b/packages/g/CHANGELOG.md @@ -1,5 +1,15 @@ # @antv/g +## 5.18.15 + +### Patch Changes + +- Updated dependencies [5e0de3dd] + - @antv/g-lite@1.2.14 + - @antv/g-camera-api@1.2.14 + - @antv/g-dom-mutation-observer-api@1.2.14 + - @antv/g-web-animations-api@1.2.14 + ## 5.18.14 ### Patch Changes diff --git a/packages/g/package.json b/packages/g/package.json index 1904a1384..ced400e9e 100644 --- a/packages/g/package.json +++ b/packages/g/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g", - "version": "5.18.14", + "version": "5.18.15", "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 713fe310e..2f32c09db 100644 --- a/packages/react-g/CHANGELOG.md +++ b/packages/react-g/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/react-g +## 1.10.16 + +### Patch Changes + +- @antv/g@5.18.15 + ## 1.10.15 ### Patch Changes diff --git a/packages/react-g/package.json b/packages/react-g/package.json index faea1993d..64b51b052 100644 --- a/packages/react-g/package.json +++ b/packages/react-g/package.json @@ -1,6 +1,6 @@ { "name": "@antv/react-g", - "version": "1.10.15", + "version": "1.10.16", "description": "react render for @antv/g", "keywords": [ "react", diff --git a/site/examples/perf/webgl/demo/meta.json b/site/examples/perf/webgl/demo/meta.json index 826c09d47..a13ca2807 100644 --- a/site/examples/perf/webgl/demo/meta.json +++ b/site/examples/perf/webgl/demo/meta.json @@ -117,6 +117,14 @@ "en": "A large graph with 5.5w nodes" }, "screenshot": "https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*dwS2Rb3mq5IAAAAAAAAAAAAAARQnAQ" + }, + { + "filename": "nodes.js", + "title": { + "zh": "大量直线", + "en": "Instanced Lines" + }, + "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*GNRuTqpp6BAAAAAAAAAAAAAADmJ7AQ/original" } ] } diff --git a/site/examples/perf/webgl/demo/nodes.js b/site/examples/perf/webgl/demo/nodes.js new file mode 100644 index 000000000..43b9c5211 --- /dev/null +++ b/site/examples/perf/webgl/demo/nodes.js @@ -0,0 +1,185 @@ +import { Canvas, CanvasEvent, Circle, Line, Text, runtime } from '@antv/g'; +import { Renderer as WebGLRenderer } from '@antv/g-webgl'; +import { Plugin } from '@antv/g-plugin-dragndrop'; +import Stats from 'stats.js'; + +/** + * Compare with galaxyviz + * @see https://github.com/galaxybase/GalaxyVis/blob/main/examples/test_all.ts#L12 + */ + +runtime.enableCSSParsing = false; + +const NODE_NUM = 50000; +const EDGE_NUM = 50000; + +const webglRenderer = new WebGLRenderer(); +webglRenderer.registerPlugin( + new Plugin({ + isDocumentDraggable: true, + isDocumentDroppable: true, + dragstartDistanceThreshold: 10, + dragstartTimeThreshold: 100, + }), +); + +const canvas = new Canvas({ + container: 'container', + width: 600, + height: 500, + renderer: webglRenderer, +}); + +canvas.addEventListener(CanvasEvent.READY, () => { + let nodes = []; + let colors = [ + '#965E04', + '#C89435', + '#F7A456', + '#AFCF8A', + '#7B39DE', + '#B095C0', + '#D24556', + '#93C2FA', + '#9DB09E', + '#F8C821', + ]; + let num = Math.floor(Math.sqrt(NODE_NUM) + 0.5); + + const sourceMap = new WeakMap(); + const targetMap = new WeakMap(); + for (let i = 0; i < NODE_NUM; i++) { + const circle = new Circle({ + style: { + cx: (i % num) * 10, + cy: Math.floor(i / num) * 10, + fill: colors[Math.floor(Math.random() * colors.length) || 0], + r: 4, + }, + }); + nodes.push(circle); + sourceMap.set(circle, []); + } + + for (let i = 0; i < EDGE_NUM; i++) { + const source = nodes[Math.floor(Math.random() * NODE_NUM)]; + const target = nodes[Math.floor(Math.random() * NODE_NUM)]; + const line = new Line({ + style: { + x1: source.style.cx, + y1: source.style.cy, + x2: target.style.cx, + y2: target.style.cy, + lineWidth: 0.3, + stroke: 'grey', + }, + }); + + const sourceEdges = sourceMap.get(source); + // sourceEdges.push(line); + const targetEdges = targetMap.get(target); + // targetEdges.push(line); + + canvas.appendChild(line); + } + + nodes.forEach((circle) => { + canvas.appendChild(circle); + }); + + // stats + const stats = new Stats(); + stats.showPanel(0); + const $stats = stats.dom; + $stats.style.position = 'absolute'; + $stats.style.left = '0px'; + $stats.style.top = '0px'; + const $wrapper = document.getElementById('container'); + $wrapper.appendChild($stats); + const camera = canvas.getCamera(); + canvas.addEventListener(CanvasEvent.AFTER_RENDER, () => { + if (stats) { + stats.update(); + } + }); + + let shiftX = 0; + let shiftY = 0; + function moveAt(target, canvasX, canvasY) { + const x = canvasX - shiftX; + const y = canvasY - shiftY; + target.setPosition(x, y); + const sourceEdges = sourceMap.get(target); + const targetEdges = targetMap.get(target); + sourceEdges.forEach((edge) => { + edge.attr({ + x1: x, + y1: y, + }); + }); + targetEdges.forEach((edge) => { + edge.attr({ + x2: x, + y2: y, + }); + }); + } + + canvas.addEventListener('dragstart', function (e) { + canvas.getConfig().disableHitTesting = true; + + if (e.target === canvas.document) { + } else { + const [x, y] = e.target.getPosition(); + shiftX = e.canvasX - x; + shiftY = e.canvasY - y; + + moveAt(e.target, e.canvasX, e.canvasY); + } + }); + canvas.addEventListener('drag', function (e) { + if (e.target === canvas.document) { + camera.pan(-e.dx, -e.dy); + } else { + moveAt(e.target, e.canvasX, e.canvasY); + } + }); + canvas.addEventListener('dragend', function (e) { + console.log('dragend...'); + canvas.getConfig().disableHitTesting = false; + }); + + // handle mouse wheel event + const bindWheelHandler = () => { + // update Camera's zoom + // @see https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/OrbitControls.js + const minZoom = 0; + const maxZoom = Infinity; + canvas + .getContextService() + .getDomElement() // g-canvas/webgl 为 ,g-svg 为 + .addEventListener( + 'wheel', + (e) => { + canvas.getConfig().disableHitTesting = false; + + e.preventDefault(); + let zoom; + if (e.deltaY < 0) { + zoom = Math.max( + minZoom, + Math.min(maxZoom, camera.getZoom() / 0.95), + ); + } else { + zoom = Math.max( + minZoom, + Math.min(maxZoom, camera.getZoom() * 0.95), + ); + } + camera.setZoom(zoom); + }, + { passive: false }, + ); + }; + bindWheelHandler(); +});