v8.8.0
💾 Download
Development Build:
Production Build:
Documentation:
Changed
🚨 Behavior Change 🚨
Since 8.0.0 PixiJS has been incorrectly applying gradients and graphics fill textures. Instead of using normalized "local space" coordinates (0–1), gradients were using "global space" values in pixels. This was an unintended change that made working with gradients/texture fills much harder. In this release, we have changed the default behavior back to "local space" to match v7.
For anyone who needs the old behavior, you can change the default options globally or you can control it individually as all APIs now accept a textureSpace
property that can be set to "global"
. For example:
FillGradient.defaultLinearOptions.textureSpace = 'global'
FillGradient.defaultRadialOptions.textureSpace = 'global'
// or individually
new FillGraident(0, 0, 100, 100, 'global')
GraphicsContext.defaultFillStyle.textureSpace = 'global'
GraphicsContext.defaultStrokeStyle.textureSpace = 'global'
// or individually
new Graphics().fill({ texture, textureSpace: 'global' })
new Graphics().stroke({ texture, textureSpace: 'global' })
🚨 Behavior Change 🚨
Since version 8.0.0, TilingSprite has returned negative values for tilingSprite.bounds.width
and tilingSprite.bounds.height
. This has been corrected in this release, and these properties now return positive values. If your code relies on bounds, you may need to adjust it accordingly.
🎁 Added
- feat: svg and textureSpace update by @GoodBoyDigital in #11074
- feat: add configurable props to
AnimatedSpriteOptions
by @trezy in #11241 - feat: add anchor to nine slice sprite by @GoodBoyDigital in #11233
- feat: enhance how gradients are applied to text objects by @GoodBoyDigital in #11075
- feat: support SVG non-zero fills by @GoodBoyDigital in #11080
- feat: allow for graphics.fill(texture) by @GoodBoyDigital in #11152
- feat: add
autoPlay
toAnimatedSprite
by @trezy in #11243 - feat: add returnTexture for CanvasTextSystem by @GoodBoyDigital in #11269
- feat: add mixins for leaf nodes by @Zyie in #11253
🐛 Fixed
- fix: texture space incorrectly set to global by @Zyie in #11246
- fix: texture update bug on mesh by @GoodBoyDigital in #11259
- fix: multiview rendering by @GoodBoyDigital in #11260
- fix: mask resetState bug by @GoodBoyDigital in #11261
- fix: measure bug in render layer by @GoodBoyDigital in #11262
- fix: tiling sprite and nine slice sprite bounds being negative by @Zyie in #11267
- fix: graphics prepare bug by @GoodBoyDigital in #11258
- fix: increase didViewChangeTick on removeChildren call by @dapi303 in #11245
- fix: texture options set for spritesheet aren't propagating to multipacked spritesheets by @sam007mac in #11270