Closed 0tomdev closed 2 years ago
This is not a loading error, it's a syntax issue:
let s = Sprite(this.sheet.textures[tName]);
Should be this
let s = new Sprite(this.sheet.textures[tName]);
// or
let s = Sprite.from(this.sheet.textures[tName]);
Sorry I should have realized that silly mistake. I was up late writing the code. 🙃 Thank you for the help.
No problem, it happens. Good luck with your project.
I am trying to create a sprite from a texture that I loaded from a spritesheet, but I am getting this error:
Here is where I load the spritesheet:
Here is where I try to create the sprite:
If it helps, here is a the
Texture
object I am passing into theSprite
constructor:Here is the error message again:
I have searched online but I could not find this particular error. All the files I mentioned and the spritesheets are in this repository.
pixi.js
version: v6.3.0