v8.20.0
Added 9
- Add WGSL shader overrides, depth-stencil formats, partial buffer updates and view caching
- Add geometry vertexCount property, WebGPU render bundles, depth-only targets and Safari WGSL fallback
- Add WebGPU-first RenderTarget attachment architecture and TextureView depth sampling
- Add copyDepthTexture for render targets supporting WebGPU and WebGL2
- Add opt-in flipY render-orientation toggle via RenderOptions.flipY to invert render Y orientation
- Add ability to copy depth into textures and expose resolved front-face orientation
- Add object-form bind and push methods with capturable bind state
- Export GPU shader layout helpers for advanced users
- Add persistentDeviceId to FederatedPointerEvent
Changed 1
- Replace `StructsAndGroups.isUniform` with `accessMode` property that describes both uniform and storage buffers
Fixed 9
- Apply render group world color and alpha to ParticleContainer so particles now inherit tint and alpha from ancestor render groups
- Fix WebGPU front-facing winding to match GLSL behavior so `front_facing` in WGSL shaders reports correctly with `clockwiseFrontFace`
- Align Polygon.strokeContains hit testing with the drawn stroke including proper stroke width and winding order handling
- Fix Rectangle.containsRect edge containment to return true for identical rectangles and rects flush against container edges
- Prevent Geometry.destroy from double-freeing the index buffer
- Support Chrome 150+ HTML-in-Canvas upload signatures
- Harden WebGPU render targets, bind groups and pipeline/texture caching
- Prevent double-destroy of render targets on teardown
- Release mask bindings when pooled AlphaMaskEffect returns to the pool
From pixijs
💾 Download
Installation:
npm install pixi.js@8.20.0
Development Build:
- https://cdn.jsdelivr.net/npm/pixi.js@8.20.0/dist/pixi.js
- https://cdn.jsdelivr.net/npm/pixi.js@8.20.0/dist/pixi.mjs
Production Build:
- https://cdn.jsdelivr.net/npm/pixi.js@8.20.0/dist/pixi.min.js
- https://cdn.jsdelivr.net/npm/pixi.js@8.20.0/dist/pixi.min.mjs
Documentation:
Changed
https://github.com/pixijs/pixijs/compare/v8.19.0...v8.20.0
🚨 Behavior Change
- feat: WGSL shader overrides, depth-stencil formats, partial buffer updates & view caching by @Zyie in https://github.com/pixijs/pixijs/pull/12089
StructsAndGroups.isUniformis replaced byaccessMode, which also describes storage buffers. This one fails quietly; the old property readsundefinedrather than throwing.
// before if (group.isUniform) { /* ... */ } // after if (group.accessMode === 'uniform') { /* ... */ } - fix: apply render group world color and alpha to ParticleContainer by @TheOnlyJason in https://github.com/pixijs/pixijs/pull/12132
ParticleContainerignored the tint and alpha of any ancestor render group, staying fully opaque while everything else faded. Particles now inherit both, so scenes with aParticleContainerunder a tinted or faded render group will look different. Remove any manual compensation you added.
- fix: WebGPU ignores clockwiseFrontFace by @koteelok in https://github.com/pixijs/pixijs/pull/12139
State.clockwiseFrontFacereached the WebGPU pipeline as a cull mode rather than a winding, so@builtin(front_facing)in WGSL reported the opposite ofgl_FrontFacingin GLSL. Which triangles survive culling is unchanged, but WGSL shaders branching onfront_facingwithclockwiseFrontFace: truenow take the other branch; revert any workaround that inverted it.
- fix: align Polygon.strokeContains with the drawn stroke by @Jaybhade in https://github.com/pixijs/pixijs/pull/12137
strokeContainssplit the stroke width on the squared width and ignored winding order, so at the defaultalignment: 0.5the hit area was ~41% wider than the drawn line, and at alignment 0 or 1 it sat on the opposite side of the edge. Hit testing now matches what's drawn.
const graphics = new Graphics() .poly([0, 0, 100, 0, 100, 100, 0, 100], true) .stroke({ width: 20, alignment: 0 }); graphics.containsPoint({ x: -10, y: 50 }); // now true, inside the drawn stroke graphics.containsPoint({ x: 10, y: 50 }); // now false, nothing is drawn there - fix: Rectangle containsRect edge containment by @cyphercodes in https://github.com/pixijs/pixijs/pull/12083
containsRecttested the right and bottom edges with a strict<, so identical rectangles reportedfalse. Identical rects, and any rect flush against the container's right or bottom edge, now returntrue. Code using it as a strict-interior test, or branching onfalseto mean "partially outside", now takes the other branch.
🎁 Added
- feat: WGSL shader overrides, depth-stencil formats, partial buffer updates & view caching by @Zyie in https://github.com/pixijs/pixijs/pull/12089
- feat: geometry vertexCount, WebGPU render bundles, depth-only targets & Safari WGSL fallback by @Zyie in https://github.com/pixijs/pixijs/pull/12090
- feat: WebGPU-first RenderTarget attachment architecture & TextureView depth sampling by @Zyie in https://github.com/pixijs/pixijs/pull/12091
- feat: copyDepthTexture for render targets (WebGPU/WebGL2) by @Zyie in https://github.com/pixijs/pixijs/pull/12092
- feat: add opt-in flipY render-orientation toggle by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12098
RenderOptions.flipYinverts a render's Y orientation, flipping the projection and the winding/cull inversion together. That lets you capture a scene into a texture in screen orientation, which is what 3D geometry UVs expect, without a per-material flip at sample time and with back-face culling still correct. Absent orfalseis a no-op on both backends.
import { Sprite, Texture, TextureSource } from 'pixi.js'; const texture = new Texture({ source: new TextureSource({ width: 256, height: 256 }) }); renderer.render({ container: mesh, target: texture, clear: true, flipY: true }); const sprite = new Sprite(texture); - feat: copy depth into textures and expose resolved front-face orientation by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12103
- feat(rendering): object-form bind/push and capturable bind state by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12104
- feat: export GPU shader layout helpers for advanced users by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12143
- feat(rendering): object-form bind/push and capturable bind state by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12104
- feat: geometry vertexCount, WebGPU render bundles, depth-only targets & Safari WGSL fallback by @Zyie in https://github.com/pixijs/pixijs/pull/12090
🐛 Fixed
- fix: stop Geometry.destroy from double-freeing the index buffer by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12144
- fix: support chrome 150+ HTML-in-Canvas upload signatures by @Zyie in https://github.com/pixijs/pixijs/pull/12077
- fix: harden WebGPU render targets, bind groups & pipeline/texture caching by @Zyie in https://github.com/pixijs/pixijs/pull/12093
- fix: prevent double-destroy of render targets on teardown by @Zyie in https://github.com/pixijs/pixijs/pull/12095
- fix: add persistentDeviceId to FederatedPointerEvent by @ShiKirill in https://github.com/pixijs/pixijs/pull/12102
- fix: release mask bindings when pooled AlphaMaskEffect returns to the pool by @shell362 in https://github.com/pixijs/pixijs/pull/12131
- fix: WebGPU sibling sprite masks rendering with each other's mask matrix by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12149
- fix: account for frame origin and rotation in graphics texture fills by @Zyie in https://github.com/pixijs/pixijs/pull/12123
- fix: handle missing base in bitmap font parsers by @Zyie in https://github.com/pixijs/pixijs/pull/12121
- fix: use the correct vertex for the first edge in Triangle.strokeContains by @spokodev in https://github.com/pixijs/pixijs/pull/12105
- fix: copy radius in RoundedRectangle.copyFrom by @spokodev in https://github.com/pixijs/pixijs/pull/12129
- fix: unregister GraphicsContext listeners on destroy by @Srinu520 in https://github.com/pixijs/pixijs/pull/12140
- fix: rebuild cached bind groups when the GC unloads uniform buffers by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12147
- fix: substitute Texture.EMPTY when a mask texture is destroyed while still in use by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/12148
- fix: prevent duplicate onRender registrations from same-parent reorders by @Zyie in https://github.com/pixijs/pixijs/pull/12120
🧹 Chores
- chore: tidy cube/mip handling in GPU & GL texture systems by @Zyie in https://github.com/pixijs/pixijs/pull/12088
- fix: make GCSystem lazy-hash-replacement tests independent of real elapsed time by @santichausis in https://github.com/pixijs/pixijs/pull/12124
- fix: raise pixelMatch threshold for html-text-stroke-anchor-tagged visual test by @santichausis in https://github.com/pixijs/pixijs/pull/12138
- fix: stop publish-branch job from poisoning the node_modules cache by @Zyie in https://github.com/pixijs/pixijs/pull/12152
- chore: remove dead https://pixijs.io/customize link in v7 migration guide by @sanjibani in https://github.com/pixijs/pixijs/pull/12094
- chore: export html-source module from docs index by @Zyie
New Contributors
- @ShiKirill made their first contribution in https://github.com/pixijs/pixijs/pull/12102
- @sanjibani made their first contribution in https://github.com/pixijs/pixijs/pull/12094
- @cyphercodes made their first contribution in https://github.com/pixijs/pixijs/pull/12083
- @spokodev made their first contribution in https://github.com/pixijs/pixijs/pull/12105
- @Jaybhade made their first contribution in https://github.com/pixijs/pixijs/pull/12137
- @Srinu520 made their first contribution in https://github.com/pixijs/pixijs/pull/12140
- @santichausis made their first contribution in https://github.com/pixijs/pixijs/pull/12124
- @shell362 made their first contribution in https://github.com/pixijs/pixijs/pull/12131
- @TheOnlyJason made their first contribution in https://github.com/pixijs/pixijs/pull/12132
Full Changelog: https://github.com/pixijs/pixijs/compare/v8.19.0...v8.20.0