question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PIXI.Spritesheet Throws Error with v6.5.8

See original GitHub issue

Previously 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
    );

image

image

asset.baseTexture returns Texture, it is not null or undefined.

  • pixi.js-legacy version: 6.5.8

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
bigtimebuddycommented, Oct 24, 2022

No worries. We are all learning. Thanks for confirming.

1reaction
talhaozdemircommented, Oct 24, 2022

You were right @bigtimebuddy I deleted node_modules folder and package-lock.json file and then run npm install. Now it is working. Thanks and I’m sorry for wasting your time.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found