Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoDetectRenderer no longer in v5? #5389

Closed
cjgammon opened this issue Jan 27, 2019 · 2 comments
Closed

autoDetectRenderer no longer in v5? #5389

cjgammon opened this issue Jan 27, 2019 · 2 comments

Comments

@cjgammon
Copy link
Contributor

@cjgammon cjgammon commented Jan 27, 2019

v5

Is PIXI.autoDetectRenderer() being removed in v5? It seems to still be in the documentation for v5 but no longer accessible in the current alpha.

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.

@bigtimebuddy

This comment has been minimized.

Copy link
Member

@bigtimebuddy bigtimebuddy commented Jan 27, 2019

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.

@cjgammon

This comment has been minimized.

Copy link
Contributor Author

@cjgammon cjgammon commented Jan 27, 2019

That is perfect, I kind of figured it was something along those lines, but was hard to tell from the code and documentation. Thanks so much for your help.

@cjgammon cjgammon closed this Jan 27, 2019
nikolas added a commit to nikolas/pixi.js that referenced this issue Feb 22, 2019
It seems this option is only available in pixi.js-legacy, and it
seems you can't use forceCanvas with pixi.js anymore. The docs should
state that.

* pixijs#5417
* pixijs#5389
nikolas added a commit to nikolas/pixi.js that referenced this issue Feb 22, 2019
It seems this option is only available in pixi.js-legacy, and it
seems you can't use forceCanvas with pixi.js anymore. The docs should
state that.

* pixijs#5417
* pixijs#5389
nikolas added a commit to nikolas/pixi.js that referenced this issue Feb 22, 2019
It seems this option is only available in pixi.js-legacy, and it
seems you can't use forceCanvas with pixi.js anymore. The docs should
state that.

* pixijs#5417
* pixijs#5389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.