From 8fc6c7a02f77c7748d8c1bbd2e9048a1f6d9383a Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 27 Nov 2024 12:29:41 -0500 Subject: [PATCH] Update to Pixi 8.6.1 (re: #1614) - Removes the workaround for canvas resizing re: multiview rendering - Updated `buildLine` function signature - Don't specify `resolution` when creating BitmapText (BitmapFont controls it - adding `resolution` generates a warning now) --- modules/core/GraphicsSystem.js | 8 -------- modules/pixi/PixiLayerLabels.js | 1 - modules/pixi/helpers.js | 7 ++----- package-lock.json | 6 ++++-- package.json | 2 +- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/modules/core/GraphicsSystem.js b/modules/core/GraphicsSystem.js index b8658a36f..c9f0a7b50 100644 --- a/modules/core/GraphicsSystem.js +++ b/modules/core/GraphicsSystem.js @@ -619,14 +619,6 @@ export class GraphicsSystem extends AbstractSystem { // Resize pixi canvas const renderer = this.pixi.renderer; renderer.resize(w, h); - - // needed for multiview? - // If we are using the WebGL renderer and have multiView enabled, - // Pixi will render to a different canvas before copying to the target canvas. - // The render canvas may need a resize too. - if (renderer.type === PIXI.RendererType.WEBGL && renderer.context.multiView) { - renderer.context.ensureCanvasSize(this.surface); - } } // Let's go! diff --git a/modules/pixi/PixiLayerLabels.js b/modules/pixi/PixiLayerLabels.js index c98d7020e..aaecbba5c 100644 --- a/modules/pixi/PixiLayerLabels.js +++ b/modules/pixi/PixiLayerLabels.js @@ -443,7 +443,6 @@ export class PixiLayerLabels extends AbstractLayer { if (/^[\x20-\x7E]*$/.test(feature.label)) { // is it in the printable ASCII range? labelObj = new PIXI.BitmapText({ text: feature.label, - resolution: 2, style: { fontFamily: 'label-normal', fontSize: 12 diff --git a/modules/pixi/helpers.js b/modules/pixi/helpers.js index 54f9bd419..6e2cdbb75 100644 --- a/modules/pixi/helpers.js +++ b/modules/pixi/helpers.js @@ -78,12 +78,9 @@ export function lineToPoly(flatPoints, lineStyle = {}) { flatPoints, lineStyle, false, // flipAlignment - isClosed, // closed + isClosed, graphicsGeometry.verts, - undefined, // _verticesStride - unused - undefined, // _verticesOffset - unused - graphicsGeometry.indices, - undefined // _indicesOffset - unused + graphicsGeometry.indices ); diff --git a/package-lock.json b/package-lock.json index 9cf8fc523..d1285b91d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "pannellum": "^2.5.6", "pbf": "^4.0.1", "pixi-filters": "^6.0.5", - "pixi.js": "8.4.1", + "pixi.js": "8.6.1", "pmtiles": "^3.2.1", "polyclip-ts": "~0.16.6", "prop-types": "^15.8.1", @@ -7184,7 +7184,9 @@ } }, "node_modules/pixi.js": { - "version": "8.4.1", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.6.1.tgz", + "integrity": "sha512-8l1TCoByuy/ZTeqttQnFw470MrMX7lufJyygqrkZFo7hFjfIcKnTYiID/30g8HgRghEGjiU/W89lonVQEDH+6g==", "license": "MIT", "dependencies": { "@pixi/colord": "^2.9.6", diff --git a/package.json b/package.json index bc667b5c5..ad0456c4c 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "pannellum": "^2.5.6", "pbf": "^4.0.1", "pixi-filters": "^6.0.5", - "pixi.js": "8.4.1", + "pixi.js": "8.6.1", "pmtiles": "^3.2.1", "polyclip-ts": "~0.16.6", "prop-types": "^15.8.1",