diff --git a/.changeset/five-rules-shop.md b/.changeset/five-rules-shop.md deleted file mode 100644 index 0bd7e435c..000000000 --- a/.changeset/five-rules-shop.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@antv/g-plugin-device-renderer': patch -'@antv/g-plugin-annotation': patch -'@antv/g-shader-components': patch -'@antv/g-plugin-box2d': patch -'@antv/g-lite': patch ---- - -Fix points type in Polyline & Polygon. diff --git a/__tests__/unit/canvas.multiple-canvases-in-one-container.spec.ts b/__tests__/unit/canvas.multiple-canvases-in-one-container.spec.ts new file mode 100644 index 000000000..2bc881afc --- /dev/null +++ b/__tests__/unit/canvas.multiple-canvases-in-one-container.spec.ts @@ -0,0 +1,43 @@ +import { Canvas } from '../../packages/g/src'; +import { Renderer as CanvasRenderer } from '../../packages/g-canvas/src'; + +const $container = document.createElement('div'); +$container.id = 'container'; +document.body.prepend($container); + +const renderer = new CanvasRenderer(); + +// create a canvas +const canvas1 = new Canvas({ + container: 'container', + width: 600, + height: 500, + renderer, + supportsMutipleCanvasesInOneContainer: true, +}); +const canvas2 = new Canvas({ + container: 'container', + width: 600, + height: 500, + renderer, + supportsMutipleCanvasesInOneContainer: true, +}); + +describe('Canvas', () => { + afterEach(() => { + canvas1.destroyChildren(); + canvas2.destroyChildren(); + }); + + afterAll(() => { + canvas1.destroy(); + canvas2.destroy(); + }); + + it('should contain multiple canvases in the same container', async () => { + await canvas1.ready; + await canvas2.ready; + + expect($container.childNodes.length).toBe(2); + }); +}); diff --git a/packages/g-camera-api/CHANGELOG.md b/packages/g-camera-api/CHANGELOG.md index 06e894b5e..e53b6b39d 100644 --- a/packages/g-camera-api/CHANGELOG.md +++ b/packages/g-camera-api/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-camera-api +## 1.2.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.2.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.2.8 ### Patch Changes diff --git a/packages/g-camera-api/package.json b/packages/g-camera-api/package.json index 9cb5ae901..f79e2cbc2 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.8", + "version": "1.2.10", "description": "A simple implementation of Camera API.", "keywords": [ "antv", diff --git a/packages/g-canvas/CHANGELOG.md b/packages/g-canvas/CHANGELOG.md index 8e71a1b73..6a19f1c8a 100644 --- a/packages/g-canvas/CHANGELOG.md +++ b/packages/g-canvas/CHANGELOG.md @@ -1,5 +1,31 @@ # @antv/g-canvas +## 1.11.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-canvas-renderer@1.9.10 + - @antv/g-lite@1.2.10 + - @antv/g-plugin-canvas-picker@1.10.10 + - @antv/g-plugin-canvas-path-generator@1.3.10 + - @antv/g-plugin-dom-interaction@1.9.10 + - @antv/g-plugin-html-renderer@1.9.11 + - @antv/g-plugin-image-loader@1.3.10 + +## 1.11.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-canvas-path-generator@1.3.9 + - @antv/g-plugin-canvas-picker@1.10.9 + - @antv/g-plugin-canvas-renderer@1.9.9 + - @antv/g-plugin-dom-interaction@1.9.9 + - @antv/g-plugin-html-renderer@1.9.10 + - @antv/g-plugin-image-loader@1.3.9 + ## 1.11.9 ### Patch Changes diff --git a/packages/g-canvas/package.json b/packages/g-canvas/package.json index e99eaf555..727b324af 100644 --- a/packages/g-canvas/package.json +++ b/packages/g-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-canvas", - "version": "1.11.9", + "version": "1.11.11", "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 128579c18..9bff07f08 100644 --- a/packages/g-canvaskit/CHANGELOG.md +++ b/packages/g-canvaskit/CHANGELOG.md @@ -1,5 +1,31 @@ # @antv/g-canvaskit +## 0.10.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-canvas-picker@1.10.10 + - @antv/g-plugin-canvas-path-generator@1.3.10 + - @antv/g-plugin-canvaskit-renderer@1.3.10 + - @antv/g-plugin-dom-interaction@1.9.10 + - @antv/g-plugin-html-renderer@1.9.11 + - @antv/g-plugin-image-loader@1.3.10 + +## 0.10.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-canvas-path-generator@1.3.9 + - @antv/g-plugin-canvas-picker@1.10.9 + - @antv/g-plugin-canvaskit-renderer@1.3.9 + - @antv/g-plugin-dom-interaction@1.9.9 + - @antv/g-plugin-html-renderer@1.9.10 + - @antv/g-plugin-image-loader@1.3.9 + ## 0.10.9 ### Patch Changes diff --git a/packages/g-canvaskit/package.json b/packages/g-canvaskit/package.json index 3b04841be..0679ec1fc 100644 --- a/packages/g-canvaskit/package.json +++ b/packages/g-canvaskit/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-canvaskit", - "version": "0.10.9", + "version": "0.10.11", "description": "A renderer implemented by CanvasKit", "keywords": [ "antv", diff --git a/packages/g-components/CHANGELOG.md b/packages/g-components/CHANGELOG.md index 9a76a5e37..40d27c25f 100644 --- a/packages/g-components/CHANGELOG.md +++ b/packages/g-components/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-components +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-components/package.json b/packages/g-components/package.json index fb8e09003..720cf78c2 100644 --- a/packages/g-components/package.json +++ b/packages/g-components/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-components", - "version": "1.9.8", + "version": "1.9.10", "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 3f2ade022..5baf72f2b 100644 --- a/packages/g-dom-mutation-observer-api/CHANGELOG.md +++ b/packages/g-dom-mutation-observer-api/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-dom-mutation-observer-api +## 1.2.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.2.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.2.8 ### Patch Changes diff --git a/packages/g-dom-mutation-observer-api/package.json b/packages/g-dom-mutation-observer-api/package.json index f79b9ab4a..f157826f6 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.8", + "version": "1.2.10", "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 6a7547970..c5de250d5 100644 --- a/packages/g-gesture/CHANGELOG.md +++ b/packages/g-gesture/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-gesture +## 2.2.12 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 2.2.11 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 2.2.10 ### Patch Changes diff --git a/packages/g-gesture/package.json b/packages/g-gesture/package.json index 906edd803..4ec471416 100644 --- a/packages/g-gesture/package.json +++ b/packages/g-gesture/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-gesture", - "version": "2.2.10", + "version": "2.2.12", "description": "G Gesture", "keywords": [ "antv", diff --git a/packages/g-image-exporter/CHANGELOG.md b/packages/g-image-exporter/CHANGELOG.md index 1b13a3d65..aa679ee56 100644 --- a/packages/g-image-exporter/CHANGELOG.md +++ b/packages/g-image-exporter/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-image-exporter +## 0.7.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 0.7.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 0.7.8 ### Patch Changes diff --git a/packages/g-image-exporter/package.json b/packages/g-image-exporter/package.json index 777ee4fe3..d49e65c73 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.8", + "version": "0.7.10", "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 8cd5480d8..b0cd5de93 100644 --- a/packages/g-lite/CHANGELOG.md +++ b/packages/g-lite/CHANGELOG.md @@ -1,5 +1,17 @@ # @antv/g-lite +## 1.2.10 + +### Patch Changes + +- 414d08d9: Support multiple canvases in one container. + +## 1.2.9 + +### Patch Changes + +- 3856560c: Fix points type in Polyline & Polygon. + ## 1.2.8 ### Patch Changes diff --git a/packages/g-lite/package.json b/packages/g-lite/package.json index 8b80bc62e..d0c8ec072 100644 --- a/packages/g-lite/package.json +++ b/packages/g-lite/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-lite", - "version": "1.2.8", + "version": "1.2.10", "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 404f14af1..9bc95e789 100644 --- a/packages/g-lite/src/Canvas.ts +++ b/packages/g-lite/src/Canvas.ts @@ -164,13 +164,16 @@ export class Canvas extends EventTarget implements ICanvas { supportsPointerEvents, supportsTouchEvents, supportsCSSTransform, + supportsMutipleCanvasesInOneContainer, useNativeClickEvent, alwaysTriggerPointerEventOnCanvas, isTouchEvent, isMouseEvent, } = config; - cleanExistedCanvas(container, this); + if (!supportsMutipleCanvasesInOneContainer) { + cleanExistedCanvas(container, this); + } let canvasWidth = width; let canvasHeight = height; diff --git a/packages/g-lite/src/types.ts b/packages/g-lite/src/types.ts index e543390ce..1e954f077 100644 --- a/packages/g-lite/src/types.ts +++ b/packages/g-lite/src/types.ts @@ -472,6 +472,11 @@ export interface CanvasConfig { */ supportsCSSTransform?: boolean; + /** + * One container can have multiple canvases inside. + */ + supportsMutipleCanvasesInOneContainer?: boolean; + /** * 画布宽度 */ diff --git a/packages/g-lottie-player/CHANGELOG.md b/packages/g-lottie-player/CHANGELOG.md index fd12c693b..8636bd015 100644 --- a/packages/g-lottie-player/CHANGELOG.md +++ b/packages/g-lottie-player/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-lottie-player +## 0.2.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 0.2.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 0.2.8 ### Patch Changes diff --git a/packages/g-lottie-player/package.json b/packages/g-lottie-player/package.json index 31f3f1ce1..22e930237 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.8", + "version": "0.2.10", "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 1149a541d..0b1cead9a 100644 --- a/packages/g-mobile-canvas-element/CHANGELOG.md +++ b/packages/g-mobile-canvas-element/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-mobile-canvas-element +## 0.8.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 0.8.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 0.8.8 ### Patch Changes diff --git a/packages/g-mobile-canvas-element/package.json b/packages/g-mobile-canvas-element/package.json index 63b660e7f..ad81c7004 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.8", + "version": "0.8.10", "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 81c429a84..eb5c40c60 100644 --- a/packages/g-mobile-canvas/CHANGELOG.md +++ b/packages/g-mobile-canvas/CHANGELOG.md @@ -1,5 +1,31 @@ # @antv/g-mobile-canvas +## 0.10.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-canvas-renderer@1.9.10 + - @antv/g-lite@1.2.10 + - @antv/g-plugin-canvas-picker@1.10.10 + - @antv/g-plugin-canvas-path-generator@1.3.10 + - @antv/g-plugin-dragndrop@1.8.10 + - @antv/g-plugin-image-loader@1.3.10 + - @antv/g-plugin-mobile-interaction@0.9.10 + +## 0.10.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-canvas-path-generator@1.3.9 + - @antv/g-plugin-canvas-picker@1.10.9 + - @antv/g-plugin-canvas-renderer@1.9.9 + - @antv/g-plugin-dragndrop@1.8.9 + - @antv/g-plugin-image-loader@1.3.9 + - @antv/g-plugin-mobile-interaction@0.9.9 + ## 0.10.8 ### Patch Changes diff --git a/packages/g-mobile-canvas/package.json b/packages/g-mobile-canvas/package.json index 963db6fd1..754652061 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.8", + "version": "0.10.10", "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 648d8fd15..9eaefc6c7 100644 --- a/packages/g-mobile-svg/CHANGELOG.md +++ b/packages/g-mobile-svg/CHANGELOG.md @@ -1,5 +1,27 @@ # @antv/g-mobile-svg +## 0.10.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-dragndrop@1.8.10 + - @antv/g-plugin-mobile-interaction@0.9.10 + - @antv/g-plugin-svg-picker@1.9.10 + - @antv/g-plugin-svg-renderer@1.10.10 + +## 0.10.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-dragndrop@1.8.9 + - @antv/g-plugin-mobile-interaction@0.9.9 + - @antv/g-plugin-svg-picker@1.9.9 + - @antv/g-plugin-svg-renderer@1.10.9 + ## 0.10.8 ### Patch Changes diff --git a/packages/g-mobile-svg/package.json b/packages/g-mobile-svg/package.json index 8be93af31..2b1feef45 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.8", + "version": "0.10.10", "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 a6ebf6428..13ea68279 100644 --- a/packages/g-mobile-webgl/CHANGELOG.md +++ b/packages/g-mobile-webgl/CHANGELOG.md @@ -1,5 +1,31 @@ # @antv/g-mobile-webgl +## 0.9.13 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-device-renderer@1.9.12 + - @antv/g-lite@1.2.10 + - @antv/g-plugin-webgl-device@1.9.12 + - @antv/g-plugin-dragndrop@1.8.10 + - @antv/g-plugin-html-renderer@1.9.11 + - @antv/g-plugin-image-loader@1.3.10 + - @antv/g-plugin-mobile-interaction@0.9.10 + +## 0.9.12 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-plugin-device-renderer@1.9.11 + - @antv/g-lite@1.2.9 + - @antv/g-plugin-webgl-device@1.9.11 + - @antv/g-plugin-dragndrop@1.8.9 + - @antv/g-plugin-html-renderer@1.9.10 + - @antv/g-plugin-image-loader@1.3.9 + - @antv/g-plugin-mobile-interaction@0.9.9 + ## 0.9.11 ### Patch Changes diff --git a/packages/g-mobile-webgl/package.json b/packages/g-mobile-webgl/package.json index cb22177a3..ec5771782 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.11", + "version": "0.9.13", "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 d4641adb4..eced7d99e 100644 --- a/packages/g-pattern/CHANGELOG.md +++ b/packages/g-pattern/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-pattern +## 1.2.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.2.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.2.8 ### Patch Changes diff --git a/packages/g-pattern/package.json b/packages/g-pattern/package.json index 061aeed07..5b9bacc2c 100644 --- a/packages/g-pattern/package.json +++ b/packages/g-pattern/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-pattern", - "version": "1.2.8", + "version": "1.2.10", "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 c3317f1ff..1c14c244a 100644 --- a/packages/g-plugin-3d/CHANGELOG.md +++ b/packages/g-plugin-3d/CHANGELOG.md @@ -1,5 +1,22 @@ # @antv/g-plugin-3d +## 1.9.12 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-device-renderer@1.9.12 + - @antv/g-lite@1.2.10 + +## 1.9.11 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-plugin-device-renderer@1.9.11 + - @antv/g-shader-components@1.8.4 + - @antv/g-lite@1.2.9 + ## 1.9.10 ### Patch Changes diff --git a/packages/g-plugin-3d/package.json b/packages/g-plugin-3d/package.json index df8f52fdd..82eca0a1f 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.10", + "version": "1.9.12", "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 a3438054a..68c311f4e 100644 --- a/packages/g-plugin-a11y/CHANGELOG.md +++ b/packages/g-plugin-a11y/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-a11y +## 0.6.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 0.6.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 0.6.8 ### Patch Changes diff --git a/packages/g-plugin-a11y/package.json b/packages/g-plugin-a11y/package.json index 011295337..c4dbeca33 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.8", + "version": "0.6.10", "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 30651f9d4..76a08b28a 100644 --- a/packages/g-plugin-annotation/CHANGELOG.md +++ b/packages/g-plugin-annotation/CHANGELOG.md @@ -1,5 +1,20 @@ # @antv/g-plugin-annotation +## 0.4.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 0.4.9 + +### Patch Changes + +- 3856560c: Fix points type in Polyline & Polygon. +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 0.4.8 ### Patch Changes diff --git a/packages/g-plugin-annotation/package.json b/packages/g-plugin-annotation/package.json index cc8760930..839875ad7 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.8", + "version": "0.4.10", "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 e8c3e9c68..d88aab977 100644 --- a/packages/g-plugin-box2d/CHANGELOG.md +++ b/packages/g-plugin-box2d/CHANGELOG.md @@ -1,5 +1,20 @@ # @antv/g-plugin-box2d +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- 3856560c: Fix points type in Polyline & Polygon. +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-box2d/package.json b/packages/g-plugin-box2d/package.json index c1833e4e5..0055251e2 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.8", + "version": "1.9.10", "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 8d982b30e..2b9125337 100644 --- a/packages/g-plugin-canvas-path-generator/CHANGELOG.md +++ b/packages/g-plugin-canvas-path-generator/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-canvas-path-generator +## 1.3.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.3.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.3.8 ### Patch Changes diff --git a/packages/g-plugin-canvas-path-generator/package.json b/packages/g-plugin-canvas-path-generator/package.json index 41944087f..67f71ab24 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.8", + "version": "1.3.10", "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 c5d7b1fd9..c4c5f7897 100644 --- a/packages/g-plugin-canvas-picker/CHANGELOG.md +++ b/packages/g-plugin-canvas-picker/CHANGELOG.md @@ -1,5 +1,23 @@ # @antv/g-plugin-canvas-picker +## 1.10.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-canvas-renderer@1.9.10 + - @antv/g-lite@1.2.10 + - @antv/g-plugin-canvas-path-generator@1.3.10 + +## 1.10.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-canvas-path-generator@1.3.9 + - @antv/g-plugin-canvas-renderer@1.9.9 + ## 1.10.8 ### Patch Changes diff --git a/packages/g-plugin-canvas-picker/package.json b/packages/g-plugin-canvas-picker/package.json index 93ab91ec4..63b72cb6c 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.8", + "version": "1.10.10", "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 eea48caff..468100ed7 100644 --- a/packages/g-plugin-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-canvas-renderer/CHANGELOG.md @@ -1,5 +1,24 @@ # @antv/g-plugin-canvas-renderer +## 1.9.10 + +### Patch Changes + +- 414d08d9: Support multiple canvases in one container. +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-canvas-path-generator@1.3.10 + - @antv/g-plugin-image-loader@1.3.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-canvas-path-generator@1.3.9 + - @antv/g-plugin-image-loader@1.3.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-canvas-renderer/package.json b/packages/g-plugin-canvas-renderer/package.json index d38bba06d..08ad8dfe3 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.8", + "version": "1.9.10", "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 e05687b27..de8da5710 100644 --- a/packages/g-plugin-canvas-renderer/src/CanvasRendererPlugin.ts +++ b/packages/g-plugin-canvas-renderer/src/CanvasRendererPlugin.ts @@ -137,9 +137,9 @@ export class CanvasRendererPlugin implements RenderingPlugin { renderingService.hooks.destroy.tap(CanvasRendererPlugin.tag, () => { canvas.removeEventListener(ElementEvent.UNMOUNTED, handleUnmounted); canvas.removeEventListener(ElementEvent.CULLED, handleCulled); - // this.renderQueue = []; - // this.removedRBushNodeAABBs = []; - // this.restoreStack = []; + this.renderQueue = []; + this.removedRBushNodeAABBs = []; + this.restoreStack = []; }); renderingService.hooks.beginFrame.tap(CanvasRendererPlugin.tag, () => { diff --git a/packages/g-plugin-canvaskit-renderer/CHANGELOG.md b/packages/g-plugin-canvaskit-renderer/CHANGELOG.md index 2069e27ef..9928e5280 100644 --- a/packages/g-plugin-canvaskit-renderer/CHANGELOG.md +++ b/packages/g-plugin-canvaskit-renderer/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-canvaskit-renderer +## 1.3.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-image-loader@1.3.10 + +## 1.3.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-image-loader@1.3.9 + ## 1.3.8 ### Patch Changes diff --git a/packages/g-plugin-canvaskit-renderer/package.json b/packages/g-plugin-canvaskit-renderer/package.json index de3fcbc96..5fe574f22 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.8", + "version": "1.3.10", "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 375798358..d85574703 100644 --- a/packages/g-plugin-control/CHANGELOG.md +++ b/packages/g-plugin-control/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-control +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-control/package.json b/packages/g-plugin-control/package.json index 80b0942d7..5f68319be 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.8", + "version": "1.9.10", "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 b1d668bdb..7eb99add0 100644 --- a/packages/g-plugin-css-select/CHANGELOG.md +++ b/packages/g-plugin-css-select/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-css-select +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-css-select/package.json b/packages/g-plugin-css-select/package.json index ec933a687..3006956b2 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.8", + "version": "1.9.10", "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 610b70875..4efe0bbf0 100644 --- a/packages/g-plugin-device-renderer/CHANGELOG.md +++ b/packages/g-plugin-device-renderer/CHANGELOG.md @@ -1,5 +1,24 @@ # @antv/g-plugin-device-renderer +## 1.9.12 + +### Patch Changes + +- 414d08d9: Support multiple canvases in one container. +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-image-loader@1.3.10 + +## 1.9.11 + +### Patch Changes + +- 3856560c: Fix points type in Polyline & Polygon. +- Updated dependencies [3856560c] + - @antv/g-shader-components@1.8.4 + - @antv/g-lite@1.2.9 + - @antv/g-plugin-image-loader@1.3.9 + ## 1.9.10 ### Patch Changes diff --git a/packages/g-plugin-device-renderer/package.json b/packages/g-plugin-device-renderer/package.json index 9f1345d00..86d1cfd96 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.10", + "version": "1.9.12", "description": "A G plugin of renderer implementation with GPUDevice", "keywords": [ "antv", diff --git a/packages/g-plugin-device-renderer/src/PickingPlugin.ts b/packages/g-plugin-device-renderer/src/PickingPlugin.ts index bc97bf2b5..975d53493 100644 --- a/packages/g-plugin-device-renderer/src/PickingPlugin.ts +++ b/packages/g-plugin-device-renderer/src/PickingPlugin.ts @@ -76,6 +76,7 @@ export class PickingPlugin implements RenderingPlugin { renderingService.hooks.destroy.tap(PickingPlugin.tag, () => { canvas.removeEventListener(ElementEvent.MOUNTED, handleMounted); + this.pickingIdGenerator.reset(); }); /** diff --git a/packages/g-plugin-dom-interaction/CHANGELOG.md b/packages/g-plugin-dom-interaction/CHANGELOG.md index d51f80292..9661298af 100644 --- a/packages/g-plugin-dom-interaction/CHANGELOG.md +++ b/packages/g-plugin-dom-interaction/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-dom-interaction +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-dom-interaction/package.json b/packages/g-plugin-dom-interaction/package.json index 90134861f..c7892798a 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.8", + "version": "1.9.10", "description": "A G plugin", "keywords": [ "antv", diff --git a/packages/g-plugin-dragndrop/CHANGELOG.md b/packages/g-plugin-dragndrop/CHANGELOG.md index 62c53075b..a9debff75 100644 --- a/packages/g-plugin-dragndrop/CHANGELOG.md +++ b/packages/g-plugin-dragndrop/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-dragndrop +## 1.8.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.8.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.8.8 ### Patch Changes diff --git a/packages/g-plugin-dragndrop/package.json b/packages/g-plugin-dragndrop/package.json index b75d91cc1..e8f454651 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.8", + "version": "1.8.10", "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 195e84a5e..880af4969 100644 --- a/packages/g-plugin-gpgpu/CHANGELOG.md +++ b/packages/g-plugin-gpgpu/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-gpgpu +## 1.9.13 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-webgpu@1.9.13 + +## 1.9.12 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-webgpu@1.9.12 + ## 1.9.11 ### Patch Changes diff --git a/packages/g-plugin-gpgpu/package.json b/packages/g-plugin-gpgpu/package.json index cffb11b70..591890901 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.11", + "version": "1.9.13", "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 0cc8f4e54..8554d1bc9 100644 --- a/packages/g-plugin-html-renderer/CHANGELOG.md +++ b/packages/g-plugin-html-renderer/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-html-renderer +## 1.9.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.9 ### Patch Changes diff --git a/packages/g-plugin-html-renderer/package.json b/packages/g-plugin-html-renderer/package.json index d3d26e399..e7b2b9363 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.9", + "version": "1.9.11", "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 d7a4c66b9..a23674973 100644 --- a/packages/g-plugin-image-loader/CHANGELOG.md +++ b/packages/g-plugin-image-loader/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-image-loader +## 1.3.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.3.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.3.8 ### Patch Changes diff --git a/packages/g-plugin-image-loader/package.json b/packages/g-plugin-image-loader/package.json index 8bf8683de..4e8698956 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.8", + "version": "1.3.10", "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 c2c300cf3..4f962d8f4 100644 --- a/packages/g-plugin-matterjs/CHANGELOG.md +++ b/packages/g-plugin-matterjs/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-matterjs +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-matterjs/package.json b/packages/g-plugin-matterjs/package.json index a97323583..93a9fbb91 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.8", + "version": "1.9.10", "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 5afee90f6..1266efcf7 100644 --- a/packages/g-plugin-mobile-interaction/CHANGELOG.md +++ b/packages/g-plugin-mobile-interaction/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-mobile-interaction +## 0.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 0.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 0.9.8 ### Patch Changes diff --git a/packages/g-plugin-mobile-interaction/package.json b/packages/g-plugin-mobile-interaction/package.json index 2188fdc80..dc2f70b51 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.8", + "version": "0.9.10", "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 193a36607..adedbc9f0 100644 --- a/packages/g-plugin-physx/CHANGELOG.md +++ b/packages/g-plugin-physx/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-physx +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-physx/package.json b/packages/g-plugin-physx/package.json index 1cc2f3cd7..976ad500b 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.8", + "version": "1.9.10", "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 68b66dc1d..7a2869b52 100644 --- a/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-rough-canvas-renderer +## 1.9.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-canvas@1.11.11 + +## 1.9.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-canvas@1.11.10 + ## 1.9.9 ### Patch Changes diff --git a/packages/g-plugin-rough-canvas-renderer/package.json b/packages/g-plugin-rough-canvas-renderer/package.json index ce4fb0614..ca488d70c 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.9", + "version": "1.9.11", "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 b1338f770..4cf3416fe 100644 --- a/packages/g-plugin-rough-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-rough-svg-renderer/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-rough-svg-renderer +## 1.9.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-svg@1.10.10 + +## 1.9.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-svg@1.10.9 + ## 1.9.9 ### Patch Changes diff --git a/packages/g-plugin-rough-svg-renderer/package.json b/packages/g-plugin-rough-svg-renderer/package.json index 8cc59a23d..5ac85ec36 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.9", + "version": "1.9.11", "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 4aadf9c66..2d1cff947 100644 --- a/packages/g-plugin-svg-picker/CHANGELOG.md +++ b/packages/g-plugin-svg-picker/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-svg-picker +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-svg-renderer@1.10.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-svg-renderer@1.10.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-svg-picker/package.json b/packages/g-plugin-svg-picker/package.json index a8fe48051..176f2de7c 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.8", + "version": "1.9.10", "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 e0af02d49..a7e8cbe91 100644 --- a/packages/g-plugin-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-svg-renderer/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-svg-renderer +## 1.10.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.10.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.10.8 ### Patch Changes diff --git a/packages/g-plugin-svg-renderer/package.json b/packages/g-plugin-svg-renderer/package.json index 4187c05eb..569a9cb8e 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.8", + "version": "1.10.10", "description": "A G plugin of renderer implementation with SVG", "keywords": [ "antv", diff --git a/packages/g-plugin-webgl-device/CHANGELOG.md b/packages/g-plugin-webgl-device/CHANGELOG.md index e7be88ed9..3875cd75a 100644 --- a/packages/g-plugin-webgl-device/CHANGELOG.md +++ b/packages/g-plugin-webgl-device/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-webgl-device +## 1.9.12 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-device-renderer@1.9.12 + - @antv/g-lite@1.2.10 + +## 1.9.11 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-plugin-device-renderer@1.9.11 + - @antv/g-lite@1.2.9 + ## 1.9.10 ### Patch Changes diff --git a/packages/g-plugin-webgl-device/package.json b/packages/g-plugin-webgl-device/package.json index 9b484aa18..99e1c5089 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.10", + "version": "1.9.12", "description": "A G plugin implements GPUDevice interface with WebGL API", "keywords": [ "antv", diff --git a/packages/g-plugin-webgpu-device/CHANGELOG.md b/packages/g-plugin-webgpu-device/CHANGELOG.md index eae6692e3..bb226c69e 100644 --- a/packages/g-plugin-webgpu-device/CHANGELOG.md +++ b/packages/g-plugin-webgpu-device/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-webgpu-device +## 1.9.12 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-device-renderer@1.9.12 + - @antv/g-lite@1.2.10 + +## 1.9.11 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-plugin-device-renderer@1.9.11 + - @antv/g-lite@1.2.9 + ## 1.9.10 ### Patch Changes diff --git a/packages/g-plugin-webgpu-device/package.json b/packages/g-plugin-webgpu-device/package.json index 2e34ae487..f1cf99f29 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.10", + "version": "1.9.12", "description": "A G plugin implements GPUDevice interface with WebGPU API", "keywords": [ "antv", diff --git a/packages/g-plugin-yoga/CHANGELOG.md b/packages/g-plugin-yoga/CHANGELOG.md index f8fc394b5..c38cc728d 100644 --- a/packages/g-plugin-yoga/CHANGELOG.md +++ b/packages/g-plugin-yoga/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-plugin-yoga +## 1.9.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.9.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.9.8 ### Patch Changes diff --git a/packages/g-plugin-yoga/package.json b/packages/g-plugin-yoga/package.json index eacf7e1d5..1a7e4edb6 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.8", + "version": "1.9.10", "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 6a781765f..0b14f4824 100644 --- a/packages/g-plugin-zdog-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-zdog-canvas-renderer/CHANGELOG.md @@ -1,5 +1,21 @@ # @antv/g-plugin-zdog-canvas-renderer +## 1.2.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-canvas@1.11.11 + +## 1.2.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-canvas@1.11.10 + ## 1.2.9 ### Patch Changes diff --git a/packages/g-plugin-zdog-canvas-renderer/package.json b/packages/g-plugin-zdog-canvas-renderer/package.json index b8d913b79..fde35c4f1 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.9", + "version": "1.2.11", "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 0e37fda02..54a7beed3 100644 --- a/packages/g-plugin-zdog-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-zdog-svg-renderer/CHANGELOG.md @@ -1,5 +1,23 @@ # @antv/g-plugin-zdog-svg-renderer +## 1.2.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-svg-renderer@1.10.10 + - @antv/g-svg@1.10.10 + +## 1.2.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-svg-renderer@1.10.9 + - @antv/g-svg@1.10.9 + ## 1.2.9 ### Patch Changes diff --git a/packages/g-plugin-zdog-svg-renderer/package.json b/packages/g-plugin-zdog-svg-renderer/package.json index 29d7829c7..6c30c8759 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.9", + "version": "1.2.11", "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 43400c86d..3dc6e6f11 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.4 + +### Patch Changes + +- 3856560c: Fix points type in Polyline & Polygon. + ## 1.8.3 ### Patch Changes diff --git a/packages/g-shader-components/package.json b/packages/g-shader-components/package.json index b96b57986..812820cef 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.3", + "version": "1.8.4", "description": "Shader components based on glslify", "keywords": [ "antv", diff --git a/packages/g-svg/CHANGELOG.md b/packages/g-svg/CHANGELOG.md index da3631f11..bc9e45171 100644 --- a/packages/g-svg/CHANGELOG.md +++ b/packages/g-svg/CHANGELOG.md @@ -1,5 +1,25 @@ # @antv/g-svg +## 1.10.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-plugin-dom-interaction@1.9.10 + - @antv/g-plugin-svg-picker@1.9.10 + - @antv/g-plugin-svg-renderer@1.10.10 + +## 1.10.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-plugin-dom-interaction@1.9.9 + - @antv/g-plugin-svg-picker@1.9.9 + - @antv/g-plugin-svg-renderer@1.10.9 + ## 1.10.8 ### Patch Changes diff --git a/packages/g-svg/package.json b/packages/g-svg/package.json index 7f1f3ee0c..5d581aec1 100644 --- a/packages/g-svg/package.json +++ b/packages/g-svg/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-svg", - "version": "1.10.8", + "version": "1.10.10", "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 872188cec..b6547bdaa 100644 --- a/packages/g-web-animations-api/CHANGELOG.md +++ b/packages/g-web-animations-api/CHANGELOG.md @@ -1,5 +1,19 @@ # @antv/g-web-animations-api +## 1.2.10 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + +## 1.2.9 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + ## 1.2.8 ### Patch Changes diff --git a/packages/g-web-animations-api/package.json b/packages/g-web-animations-api/package.json index baf3323d0..f98a49f1e 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.8", + "version": "1.2.10", "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 b0accb3f1..96ff1fe0b 100644 --- a/packages/g-web-components/CHANGELOG.md +++ b/packages/g-web-components/CHANGELOG.md @@ -1,5 +1,23 @@ # @antv/g-web-components +## 1.9.13 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-canvas@1.11.11 + - @antv/g-webgl@1.9.13 + +## 1.9.12 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-webgl@1.9.12 + - @antv/g-canvas@1.11.10 + ## 1.9.11 ### Patch Changes diff --git a/packages/g-web-components/package.json b/packages/g-web-components/package.json index ba2b47dba..0b866bd61 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.11", + "version": "1.9.13", "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 e4c95e0d6..3d9b2c519 100644 --- a/packages/g-webgl/CHANGELOG.md +++ b/packages/g-webgl/CHANGELOG.md @@ -1,5 +1,29 @@ # @antv/g-webgl +## 1.9.13 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-device-renderer@1.9.12 + - @antv/g-lite@1.2.10 + - @antv/g-plugin-webgl-device@1.9.12 + - @antv/g-plugin-dom-interaction@1.9.10 + - @antv/g-plugin-html-renderer@1.9.11 + - @antv/g-plugin-image-loader@1.3.10 + +## 1.9.12 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-plugin-device-renderer@1.9.11 + - @antv/g-lite@1.2.9 + - @antv/g-plugin-webgl-device@1.9.11 + - @antv/g-plugin-dom-interaction@1.9.9 + - @antv/g-plugin-html-renderer@1.9.10 + - @antv/g-plugin-image-loader@1.3.9 + ## 1.9.11 ### Patch Changes diff --git a/packages/g-webgl/package.json b/packages/g-webgl/package.json index 57bfc7565..29b4b3ffc 100644 --- a/packages/g-webgl/package.json +++ b/packages/g-webgl/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-webgl", - "version": "1.9.11", + "version": "1.9.13", "description": "A renderer implemented by WebGL1/2", "keywords": [ "antv", diff --git a/packages/g-webgpu/CHANGELOG.md b/packages/g-webgpu/CHANGELOG.md index 5b10e1baa..e7046d34a 100644 --- a/packages/g-webgpu/CHANGELOG.md +++ b/packages/g-webgpu/CHANGELOG.md @@ -1,5 +1,29 @@ # @antv/g-webgpu +## 1.9.13 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-plugin-device-renderer@1.9.12 + - @antv/g-lite@1.2.10 + - @antv/g-plugin-webgpu-device@1.9.12 + - @antv/g-plugin-dom-interaction@1.9.10 + - @antv/g-plugin-html-renderer@1.9.11 + - @antv/g-plugin-image-loader@1.3.10 + +## 1.9.12 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-plugin-device-renderer@1.9.11 + - @antv/g-lite@1.2.9 + - @antv/g-plugin-webgpu-device@1.9.11 + - @antv/g-plugin-dom-interaction@1.9.9 + - @antv/g-plugin-html-renderer@1.9.10 + - @antv/g-plugin-image-loader@1.3.9 + ## 1.9.11 ### Patch Changes diff --git a/packages/g-webgpu/package.json b/packages/g-webgpu/package.json index 384a33ea7..79dd923d4 100644 --- a/packages/g-webgpu/package.json +++ b/packages/g-webgpu/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-webgpu", - "version": "1.9.11", + "version": "1.9.13", "description": "A renderer implemented by WebGPU", "keywords": [ "antv", diff --git a/packages/g/CHANGELOG.md b/packages/g/CHANGELOG.md index 617f91c9f..0677e0aec 100644 --- a/packages/g/CHANGELOG.md +++ b/packages/g/CHANGELOG.md @@ -1,5 +1,25 @@ # @antv/g +## 5.18.11 + +### Patch Changes + +- Updated dependencies [414d08d9] + - @antv/g-lite@1.2.10 + - @antv/g-camera-api@1.2.10 + - @antv/g-dom-mutation-observer-api@1.2.10 + - @antv/g-web-animations-api@1.2.10 + +## 5.18.10 + +### Patch Changes + +- Updated dependencies [3856560c] + - @antv/g-lite@1.2.9 + - @antv/g-camera-api@1.2.9 + - @antv/g-dom-mutation-observer-api@1.2.9 + - @antv/g-web-animations-api@1.2.9 + ## 5.18.9 ### Patch Changes diff --git a/packages/g/package.json b/packages/g/package.json index aa260e0ac..aad9efdbd 100644 --- a/packages/g/package.json +++ b/packages/g/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g", - "version": "5.18.9", + "version": "5.18.11", "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 31b176220..1eaf1855a 100644 --- a/packages/react-g/CHANGELOG.md +++ b/packages/react-g/CHANGELOG.md @@ -1,5 +1,17 @@ # @antv/react-g +## 1.10.11 + +### Patch Changes + +- @antv/g@5.18.11 + +## 1.10.10 + +### Patch Changes + +- @antv/g@5.18.10 + ## 1.10.9 ### Patch Changes diff --git a/packages/react-g/package.json b/packages/react-g/package.json index 0598bd5d2..eb3976b11 100644 --- a/packages/react-g/package.json +++ b/packages/react-g/package.json @@ -1,6 +1,6 @@ { "name": "@antv/react-g", - "version": "1.10.9", + "version": "1.10.11", "description": "react render for @antv/g", "keywords": [ "react", diff --git a/site/docs/api/canvas/options.en.md b/site/docs/api/canvas/options.en.md index 1f92cffe2..7dbfaf32a 100644 --- a/site/docs/api/canvas/options.en.md +++ b/site/docs/api/canvas/options.en.md @@ -129,7 +129,7 @@ canvas.setCursor('crosshair'); ## Special platform adaptations -On some special runtime platforms (e.g. applets), it is not possible to use global variables like [globalThis](https://developer.mozilla.org/en-US/Web/JavaScript/Reference/Global_Objects/ globalThis), and internally we need to rely on it to create images (`new globalThis.Image()`), determine if a TouchEvent is supported (`'ontouchstart' in globalThis`), and so on. Therefore, users of these particular platforms need to manually pass in the specific creation and determination methods. +On some special runtime platforms (e.g. applets), it is not possible to use global variables like [globalThis]( globalThis), and internally we need to rely on it to create images (`new globalThis.Image()`), determine if a TouchEvent is supported (`'ontouchstart' in globalThis`), and so on. Therefore, users of these particular platforms need to manually pass in the specific creation and determination methods. ### document @@ -207,6 +207,12 @@ const canvas = new Canvas({ }); ``` +### supportsMutipleCanvasesInOneContainer + +Optional. If or not support multiple canvases under one container, default is false. + +[Example](/en/examples/canvas/container/#shared-container) + ## Modify the initialization configuration When initializing the canvas we pass in the canvas size, renderer and other configurations, which may be modified subsequently, so we provide the following API. @@ -244,7 +250,7 @@ if (tooManyShapes) { 方法签名如下: -``` +```js setRenderer(renderer: Renderer): Promise; ``` diff --git a/site/docs/api/canvas/options.zh.md b/site/docs/api/canvas/options.zh.md index f07d66096..20f8541aa 100644 --- a/site/docs/api/canvas/options.zh.md +++ b/site/docs/api/canvas/options.zh.md @@ -213,6 +213,12 @@ const canvas = new Canvas({ }); ``` +### supportsMutipleCanvasesInOneContainer + +可选。是否支持一个 container 下容纳多个画布,默认为 false。 + +[示例](/zh/examples/canvas/container/#shared-container) + ## 修改初始化配置 在初始化画布时我们传入了画布尺寸、渲染器等配置,后续可能对它们进行修改,因此我们提供了以下 API。 @@ -221,7 +227,7 @@ const canvas = new Canvas({ 有时我们需要在初始化之后调整画布尺寸,传入新的画布宽度和高度。方法签名如下: -``` +```js resize(width: number, height: number): void; ``` @@ -256,7 +262,7 @@ if (tooManyShapes) { 方法签名如下: -``` +```js setRenderer(renderer: Renderer): Promise; ``` diff --git a/site/examples/canvas/container/demo/meta.json b/site/examples/canvas/container/demo/meta.json index 933f924b4..b77885414 100644 --- a/site/examples/canvas/container/demo/meta.json +++ b/site/examples/canvas/container/demo/meta.json @@ -8,6 +8,13 @@ }, "screenshot": "https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*FfHBTr2ACAkAAAAAAAAAAABkARQnAQ" }, + { + "filename": "shared-container.js", + "title": { + "zh": "共享同一个 container", + "en": "Multiple canvases share the same container" + } + }, { "filename": "user-defined-canvas.js", "title": { diff --git a/site/examples/canvas/container/demo/shared-container.js b/site/examples/canvas/container/demo/shared-container.js new file mode 100644 index 000000000..8c9b51f0a --- /dev/null +++ b/site/examples/canvas/container/demo/shared-container.js @@ -0,0 +1,118 @@ +import { Canvas, CanvasEvent, Circle } from '@antv/g'; +import { Renderer as CanvasRenderer } from '@antv/g-canvas'; +import { Renderer as SVGRenderer } from '@antv/g-svg'; +import { Renderer as WebGLRenderer } from '@antv/g-webgl'; +import * as lil from 'lil-gui'; +import Stats from 'stats.js'; + +// create a renderer +const canvasRenderer1 = new CanvasRenderer(); +const webglRenderer1 = new WebGLRenderer(); +const svgRenderer1 = new SVGRenderer(); +const canvasRenderer2 = new CanvasRenderer(); +const webglRenderer2 = new WebGLRenderer(); +const svgRenderer2 = new SVGRenderer(); + +// create a canvas +const canvas1 = new Canvas({ + container: 'container', + width: 500, + height: 500, + renderer: canvasRenderer1, + supportsMutipleCanvasesInOneContainer: true, +}); + +const canvas2 = new Canvas({ + container: 'container', + width: 500, + height: 500, + renderer: canvasRenderer2, + supportsMutipleCanvasesInOneContainer: true, +}); + +canvas1.addEventListener(CanvasEvent.READY, () => { + // create a circle + const circle1 = new Circle({ + id: 'circle1', + style: { + cx: 300, + cy: 200, + r: 100, + fill: '#1890FF', + stroke: '#F04864', + lineWidth: 4, + }, + }); + canvas1.appendChild(circle1); + circle1.addEventListener('mouseenter', () => { + circle1.attr('fill', '#2FC25B'); + }); + + circle1.addEventListener('mouseleave', () => { + circle1.attr('fill', '#1890FF'); + }); +}); + +canvas2.addEventListener(CanvasEvent.READY, () => { + const circle2 = new Circle({ + id: 'circle2', + style: { + cx: 300, + cy: 200, + r: 100, + fill: '#1890FF', + stroke: '#F04864', + lineWidth: 4, + }, + }); + canvas2.appendChild(circle2); + circle2.addEventListener('mouseenter', () => { + circle2.attr('fill', '#2FC25B'); + }); + + circle2.addEventListener('mouseleave', () => { + circle2.attr('fill', '#1890FF'); + }); +}); + +// 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); +canvas1.addEventListener(CanvasEvent.AFTER_RENDER, () => { + if (stats) { + stats.update(); + } +}); + +// GUI +const gui = new lil.GUI({ autoPlace: false }); +$wrapper.appendChild(gui.domElement); +const rendererFolder = gui.addFolder('renderer'); +const rendererConfig = { + renderer: 'canvas', +}; +rendererFolder + .add(rendererConfig, 'renderer', ['canvas', 'webgl', 'svg']) + .onChange((renderer) => { + canvas1.setRenderer( + renderer === 'canvas' + ? canvasRenderer1 + : renderer === 'webgl' + ? webglRenderer1 + : svgRenderer1, + ); + canvas2.setRenderer( + renderer === 'canvas' + ? canvasRenderer2 + : renderer === 'webgl' + ? webglRenderer2 + : svgRenderer2, + ); + }); +rendererFolder.open();