Jump to content

Spritesheet loading error since update to 5.2.3


onewittygrassblade
 Share

Recommended Posts

Howdy,

I just updated pixi.js in my project from 5.2.1 to 5.2.4, and am now encountering the following issue when attempting to load a spritesheet JSON.

Line causing the issue:

PIXI.Loader.shared.add("images/spritesheet.json");

Error:

Uncaught TypeError: Cannot read property 'baseTexture' of null
    at new Spritesheet (spritesheet.es.js:60)
    at onImageLoad (spritesheet.es.js:403)
    at MiniSignal.dispatch (mini-signals.js:93)
    at eval (resource-loader.esm.js:2266)
    at next (resource-loader.esm.js:57)
    at Loader.use (spritesheet.es.js:380)
    at eval (resource-loader.esm.js:2264)
    at eval (resource-loader.esm.js:65)

It looks like the error comes from here: https://github.com/pixijs/pixi.js/blob/7b93fdba90b1ea54469621c30ff1d6b8849e514c/packages/spritesheet/src/Spritesheet.js#L63. Although texture seems to correctly be an instance of Texture, the check in https://github.com/pixijs/pixi.js/blob/7b93fdba90b1ea54469621c30ff1d6b8849e514c/packages/spritesheet/src/Spritesheet.js#L57 fails.

It looks like this change was introduced in 5.2.3 (https://github.com/pixijs/pixi.js/compare/v5.2.2...v5.2.3).

Anyone able to shed some light?

Thanks.

Link to comment
Share on other sites

Two requests:

1. Could you please post all code errors to https://github.com/pixijs/pixi.js that more helpful to track and resolve issues than forums.

2. We need a reproduction of your error (code that we can run, preferably jsfiddle, codepen, etc). We have examples and test cases that cover basic loading of spite sheets so without some code to run, this is difficult to diagnose.

-Matt

 

Link to comment
Share on other sites

1 hour ago, onewittygrassblade said:

Well, issue went away after deleting and reinstalling all packages (I use NPM). Apologies for the useless post, your requests were noted for future reference.

Best

Yep, thats usual "npm juggling" we have in pixi when we update pixi :) Its not useless, now we know that the problem is still there

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...