Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
autoDetectRenderer no longer in v5? #5389
Also, I'm planning on doing something with PIXI in the near future and would like to leverage v5, is there a roadmap of the key API differences? They seem pretty similar, but it's hard to tell how final the alpha is. I looked at the project status on github and it seems like there may still be more stuff to be done. Any insight would be greatly appreciated.
The short answer is we didn’t remove it, but some context about v5:
We have decided to make context2d rendering a second-class citizen in the Pixi world. In v4, WebGL and Canvas we’re pretty equal because of the legacy browser support many developers required. In the future, Canvas might be deprecated or turned into an external plugin because browser support has improved and support for canvas has held us back. For Pixi, the future is more about WebGL 1 vs 2, than canvas vs WebGL.
That said, for v5 not a lot has changed. We created two “bundles” of pixi: one with canvas and one without. The one with canvas is called “pixi.js-legacy” and the webgl only is “pixi.js”.
Back to your original question, the autoDetectRenderer is only in pixi.js-legacy and not in the default bundle. We haven’t figured out the best way to indicate this in the docs, but we will fix hopefully before v5 releases (PRs welcome!)
Also, we are very close to releasing a RC for v5, which could be sometime in the next few weeks. I’d hold off adopting v5 until that drops or use what’s in the dev branch. The majority of the APIs have remained the same: Sprite, Container, DisplayObject, Text are largely the same. Most of what is changing in v5 is the introduction of a mid-level API for people wanting to do stuff closer to WebGL or create their own custom rendering.
Hope that helps explain.