v8.16.0
Added
- Canvas renderer support with experimental status
- Tagged text feature for Text and HTMLText allowing custom tag styles
- SplitText now automatically regenerates when TextStyle changes via styleChanged()
- External texture support
- parseSync method for spritesheet
- Improved Pool typing for pool.get() method
- Cube texture support
- Mip level rendering support in the rendering system
- Render to array layer capability
Changed
- SplitText now more accurately splits Text across a wider range of TextStyle configurations, which may result in slight changes to character positioning
- SplitText.from now correctly transfers the source anchor to the new instance by mapping the anchor to pivot coordinates
- SplitBitmapText now correctly defaults to white fill, matching BitmapText behavior
- HTMLText now correctly respects breakWords and no longer cuts off words that exceed wordWrapWidth
- HTMLText now respects the alpha value of its fill and stroke
- Text now correctly aligns when using align: 'right' or align: 'center'
- Container.cullArea is now correctly interpreted in the container's local coordinate space and transformed to global coordinates before culling checks
- graphics.texture() will now correctly apply a black tint
Fixed
- Improve HTML text measurement accuracy
- GlGeometrySystem VAO cache is now preserved
- GC system now ensures render groups are marked as dirty
💾 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:
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