Replies: 1 comment 1 reply
-
Great question. Going from v4 to v5 is a much bigger leap than going from v5 to v6 (mostly because we just launched v6 and there are fewer breaking changes). In v5, we not only introduced sub-packages to separate concerns more clearly and made PixiJS more composable, but we also introduced a new low-level API (that replaced v4's pixi-gl-core)--just the essential bits if you want to create your own WebGL renderer. The biggest performance improvement going from v4 to v5 is that we now batch meshes, graphics AND sprites. In v4, we only batched sprites and if you tried to use meshes or graphics your performance would degrade. Overall, we think that real world applications will improve with this batching strategy but our bunny-mark test suffers slightly under v5 by comparison. Also, we now transpile Pixi's source code from TypeScript/ES6 and we pay a minor performance tax for that at the expense of a more maintainable code-base. We feel like this were suitable trade-offs. In v4 WebGL & Canvas renderers were basically peers. They had equal weight and importance in Pixi. Both were relatively fast. In v5 as browsers have evolved a lot, we have demoted the CanvasRenderer and made it second class. It does not get as many performance improvements or the level of scrutiny as in v4. We do not measure performance on this renderer regularly, but I suspect it has probably degraded over time, especially if you're using advanced features like meshes, graphics texture fills, etc which have been introduced more recently. Overall, v6 right now is basically just v5 but with much better TypeScript definitions. We also added some new features like compressed-texture support, which previously was only possible with the pixi-compressed-textures plugin. Lastly, we are not actively adding features to v4 or v5 (but we'll fix critical or major bugs and memory leaks when appropriate). For that reason, it's helpful to stay as close to current release as possible. Hope that helps clarify. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone!
I used to use Pixi.js a lot, latest around version 4.7.
What are the biggest changes/improvements with the new versions 5 and 6? Is performance better or worse?
As far as I know some big changes are: separated legacy/webgl renderers, smaller bundle size TypeScript typings for dev.
Beta Was this translation helpful? Give feedback.
All reactions