Releases: pixijs/pixijs
v8.0.0-beta.8
ℹ️ INFO
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.7
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.6
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.4
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.2
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
💾 Download
Development Build:
Production Build:
- https://pixijs.download/v8.0.0-beta.8/pixi.min.js
- https://pixijs.download/v8.0.0-beta.8/pixi.min.mjs
Changed
🔥 Breaking
- Breaking: set default alpha mode to
premultiply-alpha-on-upload
by @GoodBoyDigital in #9821
This is a breaking change for anyone using v8, this change now matches how v7 handles premultiply alpha - Breaking: rename font parsers by @GoodBoyDigital in #9834
TextFormat
->bitmapFontTextParser
XMLStringFormat
->bitmapFontXMLStringParser
XMLFormat
->bitmapFontXMLParser
🎁 Added
- Added: add
setDataWithSize
toBuffer
by @GoodBoyDigital in #9818 - Added: optimisations for batcher by @GoodBoyDigital in #9824
- Added: support mask to null by @yungzhu in #9822
🐛 Fixed
- Fix: graphics transform bug by @GoodBoyDigital in #9819
- Fix: issue with font format not parsing if only id is provided by @GoodBoyDigital in #9808
- Fix: crazy WebGPU buffer switching with large graphics by @GoodBoyDigital in #9815
- Fix: xml parser for text by @GoodBoyDigital in #9825
🧹 Chores
- Chore: docs for geometry by @GoodBoyDigital in #9805
- Chore: docs for maths classes by @Zyie in #9813
- Chore: docs for maths classes by @Zyie in #9813
- Chore: docs for color and environment by @Zyie in #9795
- Chore: docs for events, filters, and extensions by @Zyie in #9804
- Chore: add extensions tests by @achamas-playco in #9810
- Chore: add filter tests by @achamas-playco in #9811
- Chore: add container mixin tests by @achamas-playco in #9812
- Chore: add asset tests by @achamas-playco in #9802
New Contributors
v8.0.0-beta.7
ℹ️ INFO
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.6
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.4
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.2
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
💾 Download
Development Build:
Production Build:
- https://pixijs.download/v8.0.0-beta.7/pixi.min.js
- https://pixijs.download/v8.0.0-beta.7/pixi.min.mjs
Changed
🔥 Breaking
-
Breaking: remove the texture listener on sprite view by @GoodBoyDigital in #9803
This PR removes the dynamic addition and removal of update events for textures for performance optimization. When swapping textures on a sprite, it was observed that about 70% of the rendering time was spent on managing these listeners.With this change any modifications to a texture (e.g., changing the frame) will not be immediately reflected in sprites using that texture. To see the changes, developers will need to either:
- Reassign the texture to the sprite, or
- Call onUpdate() manually.
This trade-off is justified as developers are more likely to swap textures on sprites every frame than to modify existing textures—modifying textures frequently is a discouraged practice.
🎁 Added
- Added: use the pixi cdn to get transcoders by @GoodBoyDigital in #9776
- Added: filterArea by @GoodBoyDigital in #9781
- Added: standard powerPreference and forceFallbackAdapter settings by @achamas-playco in #9783
🐛 Fixed
- Fix: adapt KTXWorker messageHandlers by @YunYouJun in #9784
- Fix: offscreen canvas bug in events @achamas-playco in #9792
- Fix: text style update bug by @GoodBoyDigital in #9797
- Fix: premultiply alpha issue with the white texture by @GoodBoyDigital in #9806
🧹 Chores
- Chore: add more accessibility tests by @achamas-playco in #9790
- Chore: add Shader docs by @GoodBoyDigital @Zyie in #9789
- Chore: add docs for accessibility, app, and assets by @Zyie in #9788
- Chore: add docs for shared systems up to B by @GoodBoyDigital in #9794
- Chore: add application tests @achamas-playco in #9792
- added SDF visual test by @GoodBoyDigital in #9796
Full Changelog: v8.0.0-beta.6...v8.0.0-beta.7
v8.0.0-beta.6
ℹ️ INFO
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
💾 Download
Development Build:
Production Build:
- https://pixijs.download/v8.0.0-beta.6/pixi.min.js
- https://pixijs.download/v8.0.0-beta.6/pixi.min.mjs
Changed
🔥 Breaking
- Breaking: Renamed
pixi.js/blendModes
topixi.js/advanced-blend-modes
🎁 Added
- Added: Add support for Webworker environment by @Zyie in #9757
import { DomAdapter, WebworkerAdapter, autodetectRenderer } from "pixi.js"; DomAdapter.set(WebworkerAdapter); await autodetectRenderer(); // sets up webworker environment
- Added: Compressed textures support KTX/DDS/Basis by @GoodBoyDigital @Zyie in #9768
🐛 Fixed
- Fix: SVG path parsing logic to close paths properly by @achamas-playco in #9764
- Fix: Issue with resolving preferred formats by @GoodBoyDigital in #9760
- Fix: blend mode not working for non-premultiplied-alpha by @GoodBoyDigital in #9763
Full Changelog: v8.0.0-beta.5...v8.0.0-beta.6
v7.3.2
💾 Download
Development Build:
- https://pixijs.download/v7.3.2/pixi.js
- https://pixijs.download/v7.3.2/pixi.mjs
- https://pixijs.download/v7.3.2/pixi-legacy.js
- https://pixijs.download/v7.3.2/pixi-legacy.mjs
- https://pixijs.download/v7.3.2/webworker.js
- https://pixijs.download/v7.3.2/webworker.mjs
Production Build:
- https://pixijs.download/v7.3.2/pixi.min.js
- https://pixijs.download/v7.3.2/pixi.min.mjs
- https://pixijs.download/v7.3.2/pixi-legacy.min.js
- https://pixijs.download/v7.3.2/pixi-legacy.min.mjs
- https://pixijs.download/v7.3.2/webworker.min.js
- https://pixijs.download/v7.3.2/webworker.min.mjs
Documentation:
Changed
🐛 Fixed
- Fix: Bump colord required version (#9726) @bigtimebuddy
- Fix: loadWebFont: Don't encodeURI if already valid (#9715) @SuperSodaSea
- Fix: detectAvif/Webp not working in Worker (#9703) @SuperSodaSea
- Fix resuming video playback not working (#9707) @dev7355608
- Fix: Handle getShaderPrecisionFormat error (#9748) @epaezrubio
- Fix: logical condition in code for adding interactive elements (#9750) @ouxuwen
- Fix: resolve the asset format with query parameters (#9772) @bigtimebuddy
🧹 Chores
- Chore: Update Assets docs (#9721) @Zyie
- Chore: change branding banner location (#9774) @bigtimebuddy
v8.0.0-beta.5
ℹ️ INFO
Hotfix for advance blend modes
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.4
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.2
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
v8.0.0-beta.4
ℹ️ INFO
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
💾 Download
Development Build:
Production Build:
- https://pixijs.download/v8.0.0-beta.4/pixi.min.js
- https://pixijs.download/v8.0.0-beta.4/pixi.min.mjs
Changed
🔥 Breaking
- Breaking: Remove settings object by @Zyie in #9737
// Can also be passed into the renderer directly e.g `autoDetectrenderer({resolution: 1})` settings.RESOLUTION -> AbstractRenderer.defaultOptions.resolution // Can also be passed into the renderer directly e.g `autoDetectrenderer({failIfMajorPerformanceCaveat: false})` setting.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT -> AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat settings.ADAPTER -> DOMAdapter.get()/DOMAdapter.set()
- Breaking: Application type now accepts Renderer instead of view by @Zyie in #9740
this also works with just initialising a renderer
const app = new Application<Renderer<HTMLCanvasElement>() app.canvas // HTMLCanvasElement
const webgl = new WebGLRenderer<HTMLCanvasElement>() const webgpu = new WebGPURenderer<HTMLCanvasElement>()
- Breaking: Adjust Texture.from by @Zyie in #9744
Texture.fromBuffer
removed, useTexture.from
Texture.from
can now generate a texture from resources such asHTMLCanvasElement
/HTMLImageElement
/HTMLVideoElement
- Breaking: Convert blend mode filters to extensions by @Zyie in #9745
- The new complex blendModes
e.g 'vivid-light
have been moved out into extensions to decrease bundle size - If you want access to the new blend mode you can do the following:
import 'pixi.js/blendModes' // adds all new blend modes // or import {extensions, VividLightBlend} from 'pixi.js' extensions.add(VividLightBlend) container.blendMode = 'vivid-light' // only this blend mode will be available
- The new complex blendModes
🎁 Added
- Added: HTML tagStyles by @GoodBoyDigital in #9734
-
HTMLText now has a new param called tagStyles were you can define custom tags in your text 👍
new Text({ text:'<red>Red</red>,<blue>Blue</blue>,<green>Green</green>', renderMode:'html', style:{ fontFamily: 'DM Sans', fill: 'white', fontSize:100, tagStyles:{ red:{ fill:'red', }, blue:{ fill:'blue', }, green:{ fill:'green', } } } });
-
🐛 Fixed
- Fix: rendering huge Graphics by @GoodBoyDigital in #9728
- Fix: tint type on container by @GoodBoyDigital in #9732
- Fix: text style type by @Zyie in #9731
- Fix: graphics not apply alpha from Color fill by @Zyie in #9739
- Fix: resolutionChange runner missing by @pagoru in #9736
🧹 Chores
New Contributors
Full Changelog: v8.0.0-beta.3...v8.0.0-beta.4
v8.0.0-beta.3
ℹ️ INFO
Hotfix for mixin types
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
v8.0.0-beta.2
ℹ️ INFO
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
💾 Download
Development Build:
Production Build:
- https://pixijs.download/v8.0.0-beta.2/pixi.min.js
- https://pixijs.download/v8.0.0-beta.2/pixi.min.mjs
Changed
🎁 Added
- Add: accessibility support by @achamas-playco in #9685
- Add: borders to texture by @Zyie in #9702
- Add: Constructor Options by @Zyie in #9710
- Add: Pixel Rounding by @GoodBoyDigital in #9714
- Add: Warning if load parser doesn't have a name by @Zyie in #9723
- Change element to canvas by @Zyie in #9718
🐛 Fixed
- Fix: v7 bug ports by @Zyie in #9720
- Fix: issue with tiling texture by @GoodBoyDigital in #9708
- Fix: webgpu blend mode by @GoodBoyDigital in #9698
- Fix: default event mode by @Zyie in #9700
- Fix: passive interaction by @Zyie in #9722
- Fix: Text premultiply alpha issue by @GoodBoyDigital in #9704
- Fix: text alignment issue for canvas text by @GoodBoyDigital in #9717
- Fix: padding issue with descender padding by @GoodBoyDigital in #9709
🧹 Chores
Full Changelog: v8.0.0-beta.1...v8.0.0-beta.2
v8.0.0-beta.1
ℹ️ INFO
Hotfix performance issue
See here for list of changes for PixiJS v8
https://github.com/pixijs/pixijs/releases/tag/v8.0.0-beta.0
v8.0.0-beta.0
🚨 WARNING 🚨
These beta releases are still subject to API changes
🎁 NEW 🎁
New Package Structure
-
No more "lerna," PixiJS is now just one package with one import root:
import {stuff} from ‘pixi.js’
. This change means we now have much better tree shaking during app compilation, reducing bundle size if not imported.Old:
import { Sprite } from "@pixi/sprite"; import { Graphic } from "@pixi/graphics";
New:
import { Sprite, Graphic } from "pixi.js";
Renderer Initialization Update
-
When initializing a renderer, this process is now asynchronous, serving two purposes:
- Identifying and loading the necessary renderer code (minimizing bundling).
- Allowing asynchronous initialization of webGPU.
-
We are using dynamic imports to correctly load the necessary renderer code, meaning you should only be loading the code you need!
import { Application, autoDetectRenderer } from "pixi.js"; const app = new Application(); (async () => { await app.init({ // application options }); // or const renderer = await autoDetectRenderer({}); // WebGL or WebGPU // do pixi things })();
WebGPU Renderer & New Architecture
- PixiJS now supports rendering using the WebGPU API. It gracefully falls back to the WebGL renderer if WebGPU is not available.
- RenderPipes:
- The renderer now uses a pipeline system to render objects. This allows for more flexibility and extensibility.
- This means that render logic is no longer within the Item (e.g., Sprite); it now relies on the renderer to handle changes in data.
- Pixi can render in two modes:
- 'Fast mode' when the scene structure remains unchanged between frames.
- 'Regular mode' for scenes that change.
- Scene changes include:
- Adding or removing a child element.
- Changing element visibility.
- Swapping a texture or blendMode on a batched element.
- Rebuilding a Graphics/Mesh that has been batched.
- Regular mode is as fast as or faster than v7's rendering methods in many cases.
- Pixi also now reactively renders the scene
- Only updates the transform of elements that have changed.
- The changes to the renderer have allowed us to make some significant performance improvements:
- In 'Fast' mode, v8 achieves up to 200% higher FPS than v7 in Chrome Canary.
- In 'Regular' mode, v8 achieves up to 50% higher FPS in Chrome Canary.
- We have also added a shader compiler that lets us build shaders lego style by stacking shader bits together to change functionality. This will give us a platform to take shaders to the next level.
DisplayObject Overhaul
DisplayObject
has been removed and replaced withContainer
.Container
now accepts aview
that allows it to render something to the screen. This won’t affect you as we still haveSprite
, ‘Mesh’ etc. Its just a little more organised under the hood- From v8, only
Container
's are allowed to have children. This means you can no longer dosprite.addChild(child)
. Instead you must docontainer.addChild(sprite, child)
.const wrapper = new Container(); const sprite = new Sprite(); const child = new Sprite(); wrapper.addChild(sprite, child);
- Layers:
Container
now has alayer
property. This allows you to group objects together and move them around without the cost of transforming the scene graph. - Blend modes are now inherited from the parent container.
- Tint is also inherited, allowing tinting of all children in a container.
- We have also added support for a wide range of Photoshop-like filters, including Vivid Light, Color Burn, and more.
- Bounds now calculated without affecting scene graph transforms
Texture Overhaul
- Textures have been completely rewritten and contain a lot less code than before. This has made it much easier for us to maintain compared to v7.
- A Texture now consist of
TextureSource
,TextureStyle
, andTextureLayout
- Added
antialias
option to all textures
Graphics Overhaul
- Graphics API has been changed to make it more intuitive and easier to use.
graphics .rect(50, 50, 100, 100) .fill(0xde3249);
- We added a
GraphicsContext
that powers all graphics now. These contexts can be shared between graphics - Added support for svg drawing
- Added gradient support
- Added
GraphicsPath
's that can be used to draw and share shapes.- also support svg paths! eg
new GraphicsPath('M 100 350 q 150 -300 300 0')
- also support svg paths! eg
- You can now build a geometry from a path using
buildGeometryFromPath(path)
- Dynamic graphics are much faster: up to 60% faster.
Text Overhaul
- Text has been completely rewritten and now uses a single class. You specify the rendering mode in the constructor
new Text({ text: "hello", renderMode: "canvas" }); new Text({ text: "hello", renderMode: "bitmap" }); new Text({ text: "hello", renderMode: "html" });
- Dynamic bitmap fonts will generate glyphs on the fly, so no need to build the font first
- bitmap font and canvas fonts layout almost identically now - so switching is much more trivial
- text style supports the same fill style as graphics objects
- bitmap text is now measured more efficiently
- HTML text will now handle font loading the same way you load any other kind of font with Assets. No need to load these fonts in separately anymore
Other Changes
- Options for all! We have tried to standardize all constructors of PixiJS objects using a single options param. This is great as it means we can easily add props in the future, and also unlocks the ability to mix object parameters.
🔥 Breaking Changes 🔥
Below is a non complete list of breaking changes. This will be updated fully before the official release
Application
-
PixiJS will now need to be initialised asynchronously. With the introduction of the WebGPU renderer PixiJS will now need to be awaited before being used
Old:import { Application } from "pixi.js"; const app = new Application(); // do pixi things
New:
import { Application } from "pixi.js"; const app = new Application(); (async () => { await app.init({ // application options }); // do pixi things })();
-
view
renamed tocanvas
Old:const app = new Application(); document.body.appendChild(app.view);
New:
const app = new Application({ canvas: myCanvas }); await app.init(); document.body.appendChild(app.canvas);
Renderer
-
Renderer.render()
now takes an object if passing multiple arguments
Old:renderer.render(stage); renderer.render(stage, renderTexture);
New:
renderer.render(stage); renderer.render({ stage, renderTexture });
-
Renderer
class no longer exists. Replaced withWebGLRenderer
&WebGPURenderer
.Renderer
as a type still exists
Old:const renderer = new Renderer();
New:
const renderer = new WebGLRenderer(); const renderer = new WebGPURenderer(); // or const renderer = autoDetectRenderer(); // WebGL or WebGPU
Scene
-
Only
Container
's are allowed to have children
Old:const sprite = new Sprite(); const child = new Sprite(); sprite.addChild(child);
New:
const wrapper = new Container(); const sprite = new Sprite(); const child = new Sprite(); wrapper.addChild(sprite, child);
-
Text
is now one unified class. You specify the rendering mode in the constructor
Old:new Text("hello"); new BitmapText("hello"); new HTMLText("hello");
New:
new Text({ text: "hello", renderMode: "canvas" }); new Text({ text: "hello", renderMode: "bitmap" }); new Text({ text: "hello", renderMode: "html" });
-
Text.dropShadow
is now an object
Old:text.dropShadow = true; text.dropShadowAlpha = 1; text.dropShadowAngle = Math.PI / 6; text.dropShadowBlur = 0; text.dropShadowColor = "black"; text.dropShadowDistance = 5;
New:
text.dropShadow = { alpha: 1, angle: Math.PI / 6, blur: 0, color: "black", distance: 5, };
-
Text.stroke
is now an object
Old:text.stroke = "black"; text.strokeThickness = 0;
New:
text.stroke = { color: "black", width: 2, };
-
NineSlicePlane
renamed toNineSliceSprite
and options converted to an object
Old:new NineSlicePlane(texture, 10, 10, 10, 10);
New:
new NineSliceSprite({ texture, leftWidth: 10, rightWidth: 10, topHeight: 10, bottomHeight: 10, });
-
MeshGeometry
&PlaneGeometry
options converted to an object
Old:new PlaneGeometry(100, 100, 10, 10); new MeshGeometry(vertices, uvs, indices);
New:
new PlaneGeometry({ width: 100, height: 100, verticesX: 10, verticesY: 10, }); new MeshGeometry({ positions: vertices, uvs, indices, });
-
Mesh
options converted to an object
Old:new Mesh(geometry, shader, state, drawMode);
New:
// `drawMode` is now `geometry.topology` geometry.topology = "triangle-strip"; new Mesh({ geometry, shader });
-
Mesh.material
has been removed useMesh.shader
instead
Graphics
- You no longer need to begin/end fills, you just draw the shape and fill it in one go.
Old:
graphics
.beginFill(0xDE3249)
.drawRect(50, 50, 100, 100);
.endFill();
New:
graphics
.rect(50, 5...