v8.16.0
PixiJS 8.16.0
Breaking Changes
SplitTextnow splits text more accurately acrossTextStyleconfigurations — character positioning may shiftSplitText.from()now correctly transfers anchor to pivot coordinates, changing layoutSplitBitmapTextnow defaults towhitefill (was transparent)Container.cullAreanow interpreted in local space and transformed to global — adjust if you were working around thisTextalignment (right,center) now correct — expect small positional adjustments
Features
- Canvas renderer (experimental):
app.init({ preference: 'canvas' }) - Tagged text for
Text/HTMLText:<bold>,<highlight>with per-tag styling viatagStylesconfig SplitTextnow auto-regenerates on style changes viastyleChanged()- External texture support
Spritesheet.parseSync()for synchronous parsing- Cube texture support
- Mip level rendering support
- Render to array layer
- Improved
Pool.get()typing
Fixes
HTMLTextnow respectsbreakWordsandwordWrapWidthcorrectlyHTMLTextnow respects alpha values for fill and strokegraphics.texture(texture, 0x000000)now applies black tint (was ignored)- HTML text measurement accuracy improved
- VAO cache preserved in
GlGeometrySystem - WebGPU MSDF shader now uses correct color uniform
- WGSL struct reflection preserves generic type parameters
- Better tree-shaking via optimized module imports
- Video loader now catches load errors
- Various shader and texture handling fixes
💾 Download
Installation:
npm install pixi.js@8.16.0
Development Build:
- https://cdn.jsdelivr.net/npm/pixi.js@8.16.0/dist/pixi.js
- https://cdn.jsdelivr.net/npm/pixi.js@8.16.0/dist/pixi.mjs
Production Build:
- https://cdn.jsdelivr.net/npm/pixi.js@8.16.0/dist/pixi.min.js
- https://cdn.jsdelivr.net/npm/pixi.js@8.16.0/dist/pixi.min.mjs
Documentation:
- https://pixijs.download/v8.16.0/docs/index.html
Changed
https://github.com/pixijs/pixijs/compare/v8.15.0...v8.16.0
🚨 Behavior Change
SplitTextnow more accurately splitsTextacross a wider range ofTextStyleconfigurations. This may result in slight changes to character positioning.- Using
SplitText.fromfrom an existingTextnow correctly transfers the source anchor to the new instance by mapping the anchor to pivot coordinates. This changes layout and positioning compared to previous behavior. SplitBitmapTextnow correctly defaults to awhitefill, matching the behavior ofBitmapText.HTMLTextnow correctly respectsbreakWordsand no longer cuts off words that exceedwordWrapWidth.HTMLTextnow respects the alpha value of its fill and stroke.Textnow correctly aligns when usingalign: 'right'oralign: 'center', resulting in a small positional adjustment.Container.cullAreais now correctly interpreted in the container’s local coordinate space and transformed to global coordinates before culling checks.// cullArea is defined in local space and transformed during culling container.cullArea = new Rectangle(0, 0, 100, 100);
graphics.texture(texture, 0x000000)will now correctly apply a black tint
🎁 Added
- feat: Canvas renderer by @krzys @Zyie in https://github.com/pixijs/pixijs/pull/11815
- Note: This feature is experimental, please let us know if you run into any issues.
await app.init({ preference: 'canvas' }); - feat: tagged text by @Zyie in https://github.com/pixijs/pixijs/pull/11827
- Note: Currently only works for
Text/HTMLText,BitmapTextsupport coming soon
const text = new Text({ text: '<bold>Important:</bold> This is <highlight>highlighted</highlight> text', style: { fontFamily: 'Arial', fontSize: 28, fill: 'white', tagStyles: { bold: { fontWeight: 'bold', fill: 'yellow' }, highlight: { fill: 'cyan', fontSize: 32 } } } }); - Note: Currently only works for
- feat: improve stability of SplitText by @Zyie in https://github.com/pixijs/pixijs/pull/11858
- SplitText now fully mirrors Text behavior and regenerates automatically when its TextStyle changes via
text.styleChanged()
splitText.style.fontSize = 32 splitText.styleChanged() - SplitText now fully mirrors Text behavior and regenerates automatically when its TextStyle changes via
- feat: external texture support by @astralarya @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11846 https://github.com/pixijs/pixijs/pull/11861
- feat: add parseSync to spritesheet by @jimhigson in https://github.com/pixijs/pixijs/pull/11794
- feat: improved Pool typing for pool.get() method by @unstoppablecarl in https://github.com/pixijs/pixijs/pull/11799
- feat: add cube texture by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11800
- by @GoodBoyDigital in
- feat: Implement mip level rendering support in the rendering system by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11801
- feat: render to array layer by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11803
🐛 Fixed
- fix: Improve HTML text measurement accuracy and add comprehensive test scenes by @Zyie in https://github.com/pixijs/pixijs/pull/11862
- fix: project container.cullArea from local to global coordinate space before doing cull check by @jujurocket in https://github.com/pixijs/pixijs/pull/11598
- fix: use vColor instead of localUniforms.uColor in WebGPU MSDF shader by @Riphal in https://github.com/pixijs/pixijs/pull/11848
- fix: preserve VAO cache in GlGeometrySystem by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11863
- fix: GC system to ensure render groups are marked as dirty by @Zyie in https://github.com/pixijs/pixijs/pull/11842
- fix: SplitBitmapText requires "fill: 'white'" by @GiorgiMaziashvili in https://github.com/pixijs/pixijs/pull/11721
- fix: preserve generic type parameters in WGSL struct reflection by @stargazer-2697 in https://github.com/pixijs/pixijs/pull/11855
- fix: improve extractAttributesFromGpuProgram to support struct-based inputs by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11796
- fix: improves tree-shaking by optimizing module imports by @Zyie in https://github.com/pixijs/pixijs/pull/11833
- fix: disambiguate falsey tint with black uint by @bigtimebuddy in https://github.com/pixijs/pixijs/pull/11831
- fix: BitmapFontManager getFont emitting TextStyle update event by @subhu339 in https://github.com/pixijs/pixijs/pull/11835
- fix: allow custom parsers to override src in Resolver (#11828) by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11849
- fix: recognise WGSL vertex attributes followed by closing parenthesis by @stargazer-2697 in https://github.com/pixijs/pixijs/pull/11854
- fix: Video Loader Not Catching Load Errors by @stargazer-2697 in https://github.com/pixijs/pixijs/pull/11856
🧹 Chores
- chore: add visual tests for text rendering features by @Zyie in https://github.com/pixijs/pixijs/pull/11825
- chore: Upgrades dependencies by @Zyie in https://github.com/pixijs/pixijs/pull/11806
- chore: guide to use envinfo to get environment information by @Typed SIGTERM in https://github.com/pixijs/pixijs/pull/11859
- chore: optimize fastCopy with waterfall typed array selection by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11798
- chore: use texImage2D instead of texSubImage2D for video in Safari by @GoodBoyDigital in https://github.com/pixijs/pixijs/pull/11867
New Contributors
- @subhu339 made their first contribution in https://github.com/pixijs/pixijs/pull/11835
- @stargazer-2697 made their first contribution in https://github.com/pixijs/pixijs/pull/11854
- @GiorgiMaziashvili made their first contribution in https://github.com/pixijs/pixijs/pull/11721
- @Riphal made their first contribution in https://github.com/pixijs/pixijs/pull/11848
- @jujurocket made their first contribution in https://github.com/pixijs/pixijs/pull/11598
- @krzys made their first contribution in https://github.com/pixijs/pixijs/pull/11815