pixijs v8.20.0

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
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

From pixijs

💾 Download

Installation:

npm install pixi.js@8.20.0

Development Build:

Production Build:

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.isUniform is replaced by accessMode, which also describes storage buffers. This one fails quietly; the old property reads undefined rather 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
    • ParticleContainer ignored the tint and alpha of any ancestor render group, staying fully opaque while everything else faded. Particles now inherit both, so scenes with a ParticleContainer under 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.clockwiseFrontFace reached the WebGPU pipeline as a cull mode rather than a winding, so @builtin(front_facing) in WGSL reported the opposite of gl_FrontFacing in GLSL. Which triangles survive culling is unchanged, but WGSL shaders branching on front_facing with clockwiseFrontFace: true now 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
    • strokeContains split the stroke width on the squared width and ignored winding order, so at the default alignment: 0.5 the 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
    • containsRect tested the right and bottom edges with a strict <, so identical rectangles reported false. Identical rects, and any rect flush against the container's right or bottom edge, now return true. Code using it as a strict-interior test, or branching on false to mean "partially outside", now takes the other branch.
🎁 Added
🐛 Fixed
🧹 Chores
New Contributors

Full Changelog: https://github.com/pixijs/pixijs/compare/v8.19.0...v8.20.0

View original

Upgraded? How did it go?

Discussion