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
function setup() {
//Create the `cat` sprite
var cat = new Sprite(resources["images/cat.png"].texture);
//Change the sprite's position
cat.x = 96;
cat.y = 96;
//Add the cat to the stage so you can see it
stage.addChild(cat);
//Render the stage
renderer.render(stage);
}
(Note: In this example, Sprite is an alias for PIXI.Sprite, TextureCache is an alias for PIXI.utils.TextureCache, and resources is an alias for PIXI.loader.resources as described earlier. I'll be using alias that follow this same format for all Pixi objects and methods in the example code from now on.)
Here you refer to an instance of TextureCache that isn't present in the example you use. It's also a bit unclear if we should be using TextureCache at all or not, as you DO use it during the tileset example.
The text was updated successfully, but these errors were encountered:
Here you refer to an instance of TextureCache that isn't present in the example you use. It's also a bit unclear if we should be using TextureCache at all or not, as you DO use it during the tileset example.
The text was updated successfully, but these errors were encountered: