v6.0.0
💥 Breaking Changes
This version is largely compatible with v5 except for a few subtle differences:
Stricter Typings
TypeScript types have been completely re-generated and work for all packages. There are likely subtle differences between v5 types where the new types are much more exact. Also, we have removed the use of PIXI
global namespace in typings. If you were previously using that you'll need to convert to module typings.
Removed v4 & v5 Deprecations
Deprecations from v4 and v5 have been removed. It's recommended that you fix all deprecation warnings using the latest v5 release before upgrading.
Change Renderer's Default alpha
The alpha
property on the Renderer & Application options is true now by default. For the majority of uses, this change will not have any visible affect (but may improve performance b/c non-alpha mode emulation in software is expensive).
Change failIfMajorPerformanceCaveat
Default
PIXI.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
is now false
by default. See #7054 for more context.
SVG Images Load Type
The default load type with Loader for SVG images is now text instead of an HTMLImageElement. SVG images loaded with Loader are now SVGResource types instead of ImageResource.
Moved drawStar
Method
Graphics drawStar
method has been moved to @pixi/graphics-extras
, if you're using that, you need to use this optional package (not included in pixi.js or pixi.js-legacy by default). This method was added before graphics-extras and belongs with those optional drawing functions.
Changed Default cacheAsBitmap
Resolution Behavior
Prior to v6, the only want to change the resolution on something with cacheAsBitmap
set to true
was to change PIXI.settings.RESOLUTION
. This is no longer the case. cacheAsBitmap
now uses the Renderer's resolution by default with an optional local override cacheAsBitmapResolution
🚐 Migration
If you're using TypeScript, make sure the follow is added to your tsconfig.json:
{
"compilerOptions": {
"moduleResolution": "node",
// Required for importing 3rd-party dependencies like EventEmitter3
"esModuleInterop": true,
// Loaders needs this to use the more strict mini-signal types
"paths": {
"mini-signals": [
"node_modules/resource-loader/typings/mini-signals.d.ts"
]
},
"baseUrl": "./",
}
}
💾 Download
Development Build:
- https://pixijs.download/v6.0.0/pixi.js
- https://pixijs.download/v6.0.0/pixi.js.map
- https://pixijs.download/v6.0.0/pixi.mjs
- https://pixijs.download/v6.0.0/pixi.mjs.map
Production Build:
- https://pixijs.download/v6.0.0/pixi.min.js
- https://pixijs.download/v6.0.0/pixi.min.js.map
- https://pixijs.download/v6.0.0/pixi.min.mjs
- https://pixijs.download/v6.0.0/pixi.min.mjs.map
Documentation:
Changed
🎁 Added
- Upgrade to Earcut v2.2.2 (#6802)
- Add support for depth mask (#6753)
- Add in uint mappings (#6768)
- Add Browser Module Bundles (#6832)
- Allow
string2hex
to work with css named colors (#6829) - Add ability to prefix to a
pixiid
to textures and base textures, to help track them (#6761) - Add TexturePacker's multi pack loading to SpritesheetLoader (#6773)
- Documentation for Renderer systems (#6875)
- Add docs table describing frames used by RenderTextureSystem (#6874)
- Generate kerning information for BitmapFonts (#6888)
- Add more
@pixi/display
documentation (#6893) - Add
@pixi/basis
and@pixi/compressed-textures
packages (#6796, #6911, #6945, #7020) - Use
@pixi-build-tools/api-extractor-lerna-monorepo
for typings (#6849, #6984, #6999) - Formalize Debug and Production Builds (#6947)
- Add toString methods for debugging (#6960)
- Support text alignment 'justify' in BitmapText (#6968)
- Enable scissor mask support by default (#6983)
- Add overridable
TextMetrics.isBreakingSpace
for better CJK plugin support (#7023) - Add
TextMetrics.HEIGHT_MULTIPLIER
setting (#7031) - Add strict engines support (#7065)
- Allow passing BaseTexture options to Loader (#7183)
- Add Generics to Texture, BaseTexture for Resource types (#7246)
- Add unit-testing support for specific packages (#7128)
- Add
cacheAsBitmapResolution
property for local resolution ofcacheAsBitmap
(#7262)
✏️ Changed
- Deprecate JSDoc & use Webdoc for documentation generation (#6700, #6985)
- Remove JSDoc typings generation, support to Node 12 (#6848)
- Deprecate core's
systems
andresources
internal namespaces (#6857) - Removes all legacy deprecations, better deprecation strategy for v6 (#7061, #7182)
- Deprecate Renderer's
transparent
option, addsuseContextAlpha
andbackgroundAlpha
instead (#7062, #7067, #7072, #7135) FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
switched to false by default (#7068)- Use
@pixi/eslint-config
for common style rules across PixiJS projects (#7124) - Move
drawStar
to graphics-extras (#7257) - Resolution for
cacheAsBitmap
is now the Renderer's resolution and notPIXI.settings.RESOLUTION
(#7262) - Convert the render functions to take options instead of args (#7260)
🐛 Fixed
- Fix documentation (#6816, #6852, #6879, #6895, #6905, #6919, #6915, #6916, #6935, #6930, #6950, #7025, #7057, #7051, #7084, #7083, #7082, #7085, #7086, #7087, #7088, #7089, #7090, #7091, #7092, #7075, #7112, #7117, #7129, #7135, #7113, #7160, #7149, #7169, #7199, #7218, #7226, #7256)
- Fix typings (#6843, #7015, #7006, #7045, #7059, #7116, #7120, #7121, #7114, #7133, #7135, #7142, #7145, #7146, #7151, #7248)
- Fixes missed dependencies for canvas-graphics, canvas-mesh, canvas-sprite and canvas-text (#6799)
- Support Transform's pivot when decomposing Matrix (#6820)
- Handle y-flipping when rendering to screen in RenderTextureSystem (#6873, #6927)
- Account for scaling between sourceFrame → destinationFrame in ScissorSystem (#6867)
- Make AnimatedSprite event functions optional (#6906)
- Fix rendering tinted Spines (#6923)
- Clear partial texture using scissor test, fix regression in y-flipping PR in cases of resolution multiples (#6892)
- Upgrade Rollup and Promise Polyfill, Remove Deprecations from Prod Builds (#6961, #7010)
- Fix to support running in WebWorker (#6880)
- Use frame.x|y in getImageData call for CanvasExtract (#6949)
- Call framebuffer.blit in StencilSystem.push (#6868)
- Fix: Clear full texture in filter system (#7074)
- Fix fillGradientStops descending ordered (#7081)
- Fix bug with TilingSpriteRenderer reseting default UVs (#7108)
- Fix bounds integration test circle radius (#7118)
- Fix RenderTextures being destroyed on unload plugin (#7228)
- Fix types for Mesh to support Shader and MeshMaterial (#7240)
- Rename pixi-webdoc-template package (#7172)
- Fix instances of
.to.be.notnull
in tests (#7227) - Remove unused extractUniformsFromSrc (#7223)
- Fix for AnimatedSprite not stopping with autoUpdate disabled (#7211)
👏 Contributors: 32
- @jamesplease
- @SerG-Y
- @mudcube
- @jnsmalm
- @Mason-Chou
- @JetLua
- @SukantPal
- @eXponenta
- @bigtimebuddy
- @themoonrat
- @flashist
- @miltoncandelero
- @dumganhar
- @Bouh
- @irongaze
- @dranitski
- @GoodBoyDigital
- @trickstival
- @EIA
- @arthuro555
- @joshuahhh
- @H34D
- @shaise
- @IvanZatravkin
- @Zyie
- @andrewstart
- @teoxoy
- @huang-yuwei
- @dev7355608
- @ayamada
- @jflcarvalho
- @jasonsturges
- @ivanpopelyshev