Skip to content

Commit

Permalink
Update to Pixi 8.6.1
Browse files Browse the repository at this point in the history
(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)
  • Loading branch information
bhousel committed Nov 27, 2024
1 parent 31bc02d commit 8fc6c7a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
8 changes: 0 additions & 8 deletions modules/core/GraphicsSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
1 change: 0 additions & 1 deletion modules/pixi/PixiLayerLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions modules/pixi/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);


Expand Down
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8fc6c7a

Please sign in to comment.