let app = new PIXI.Application({
width: 256,
height: 256,
antialias: true,
transparent: false,
resolution: 1
}
);
If you're happy with Pixi's default settings, you don't need to set any of these options, except of course the width and height (But, if you need to, see Pixi's documentation on PIXI.Application
What do those options do? antialias smoothes the edges of fonts and graphic primitives. (WebGL anti-aliasing isn’t available on all platforms, so you’ll need to test this on your game’s target platform.) transparent makes the canvas background transparent. resolution makes it easier to work with displays of varying resolutions and pixel densities. Setting the resolutions is a little outside the scope of this tutorial, but check out Mat Grove's explanation about how to use resolution for all the details. But usually, just keep resolution at 1 for most projects and you'll be fine.
Based on the PIXI.Application documentation, I think it makes sense to mention that transparent and resolution are set to false and 1, respectively, by default. Moreover, it is not required to set width and height because they default to 800 and 600, respectively.
I am sorry for nitpicking. I just think that the phrasing can be improved. Thanks a lot for this masterpiece 👏 🙌
Based on the
PIXI.Application
documentation, I think it makes sense to mention thattransparent
andresolution
are set tofalse
and1
, respectively, by default. Moreover, it is not required to setwidth
andheight
because they default to800
and600
, respectively.I am sorry for nitpicking. I just think that the phrasing can be improved. Thanks a lot for this masterpiece 👏 🙌