You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really a feature request, more just a suggestion to consider improving an area of the docs.
In the Replaces Loader with Assets of the v7 migration docs, the example "from" and "to" dont really give a like-for-like comparison. The concept of adding resources to the loader before loading them appears to no longer exist, and the docs doesnt really highlight the alternative approach to use.
If so, I think it would be useful to include this in the docs. If not, then the docs should deffo be improved here as the alternative approach in v7 is not clear.
The text was updated successfully, but these errors were encountered:
After some more reading, I've stumbled on this example, which probably more accurately describes a v7 alternative to to the v6 example above.
PIXI.Assets.add('flowerTop','https://pixijs.com/assets/flowerTop.png');PIXI.Assets.add('eggHead','https://pixijs.com/assets/eggHead.png');// Load the assets and get a resolved promise once both are loadedconsttexturesPromise=PIXI.Assets.load(['flowerTop','eggHead']);// => Promise<{flowerTop: Texture, eggHead: Texture}>// When the promise resolves, we have the texture!texturesPromise.then((textures)=>{// create a new Sprite from the resolved loaded Texturesconstflower=PIXI.Sprite.from(textures.flowerTop);// ...});
However note that this implementation of PIXI.Assets.add is deprecated, and the alternative appears to be:
Description
Not really a feature request, more just a suggestion to consider improving an area of the docs.
In the Replaces Loader with Assets of the v7 migration docs, the example "from" and "to" dont really give a like-for-like comparison. The concept of adding resources to the loader before loading them appears to no longer exist, and the docs doesnt really highlight the alternative approach to use.
I'm assuming that given the old approach of:
The new approach would be:
Is this assumption correct?
If so, I think it would be useful to include this in the docs. If not, then the docs should deffo be improved here as the alternative approach in v7 is not clear.
The text was updated successfully, but these errors were encountered: