PIXI.Spritesheet Throws Error with v6.5.8
See original GitHub issuePreviously below code working with no problem but today after I update pixi version to the latest I got following error:
Assets.add(key, imageFile);
const asset = await Assets.load(key);
if (atlasData.textures) {
atlasData.frames = atlasData.textures[0].frames;
atlasData.textures = null;
}
const sheet = new Spritesheet(
asset.baseTexture,
atlasData
);
asset.baseTexture
returns Texture, it is not null or undefined.
pixi.js-legacy
version: 6.5.8
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Error when creating sprite with spritesheet texture · Issue #8295
I am trying to create a sprite from a texture that I loaded from a spritesheet, but I am getting this error: Here...
Read more >Error when upgrading to > pixi-js-legacy@5.3.1 when creating ...
It seems to be caused by the instanceof check failing for Texture and BaseTexture objects specifically when trying to create a new spritesheet....
Read more >react-pixi-fiber/Lobby - Gitter
is anyone else having issues with fiber (v1.0.1) and nextjs - i keep getting this error: TypeError: Cannot read properties of undefined (reading...
Read more >Loading a spritesheet in Pixijs does not work - Stack Overflow
I had the same problem. The solution is to move spriteSheet.json with spriteSheet.png from assets to public folder.
Read more >Pixi.js: Pointer Events Part 3 - Sprites & Texture Swapping
Pixi.js: Pointer Events Part 3 - Sprites & Texture SwappingThis video is the last in my 3 part series on Pointer Events.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No worries. We are all learning. Thanks for confirming.
You were right @bigtimebuddy I deleted
node_modules
folder andpackage-lock.json
file and then runnpm install
. Now it is working. Thanks and I’m sorry for wasting your time.