League-of-Foundry-Developers / fvtt-module-theatre

GNU General Public License v3.0
30 stars 39 forks source link

Module doesn't work on Foundry v11 #121

Closed ZwS closed 1 year ago

ZwS commented 1 year ago

There is no particular error messages in the console, but once module is enabled screen become black.

action-jay commented 1 year ago

Caught this too. There is an error message once you try to add a character to the stage:


Theatre.js:2949
Uncaught TypeError: undefined. Cannot read properties of undefined (reading 'shared') [Detected 1 package: theatre] at Theatre._addSpritesToPixi (Theatre.js:2949:28) at Theatre.stageInsertById (Theatre.js:3078:8) at Theatre.addToNavBar (Theatre.js:8196:20) at Object.callback (theatre_main.js:507:34) at #onClickItem (foundry.js:64006:11) at HTMLElement.dispatch (jquery.min.js:2:43184) at y.handle (jquery.min.js:2:41168)
  | _addSpritesToPixi | @ | Theatre.js:2949 -- | -- | -- | --   | stageInsertById | @ | Theatre.js:3078   | addToNavBar | @ | Theatre.js:8196   | callback | @ | theatre_main.js:507   | #onClickItem | @ | foundry.js:64006   | dispatch | @ | jquery.min.js:2   | y.handle | @ | jquery.min.js:2
rukaiko commented 1 year ago

Yes, same problem here. There is no way to make it work?

SolarizedRed commented 1 year ago

Foundry v11 updated to use Pixi.JS v7, which has replaced PIXI.Loader. It looks like the module needs to be updated to use Assets instead.

megahead11 commented 1 year ago

Indeed. The japanese foundry community is scrounging up funds to commission updates and fixes for v11, but without outside support, it is difficult.

For other's information, I simply maintain the repo for pulls requests and such, but we haven't had someone updating the module for a while. The last update for v9 to v10 was pretty big for the module but this one might be a big breaker because of the further pixi changes, and the weight of the old cold is showing.

Nolt-Appley commented 1 year ago

How much would it cost to commission this module to be updated properly?

megahead11 commented 1 year ago

Last time there was an update, it was about 200+ USD, but it could be different this time. Brother Sharp (on discord) is the main person funding the updates through his own money and the Japanese foundry patreon. No definites yet, but I would contact them in case you wanted to contribute (Brother Sharp#6921)

strongpauly commented 1 year ago

I've had a go at converting to use PIXI.Assets with the open PR. Still not working, but I thought it was worth a punt.

megahead11 commented 1 year ago

I've had a go at converting to use PIXI.Assets with the open PR. Still not working, but I thought it was worth a punt.

What happened? Does it still break the canvas?

strongpauly commented 1 year ago

It still prevents scenes from being loaded, without any discernible error - although the Theatre itself seemed to work. I'll try and have another look soon.

strongpauly commented 1 year ago

The canvas wasn't broken, it was just hidden behind the Theatre canvas. Changing from passing transparent: true to backgroundAlpha: 0 appears to have fixed it.

rukaiko commented 1 year ago

May I ask where did you change those options?

megahead11 commented 1 year ago

I will verify if this works when i get home. If it does, I'll merge the PR with a bump for version compatibility and push a release.

megahead11 commented 1 year ago

The canvas wasn't broken, it was just hidden behind the Theatre canvas. Changing from passing transparent: true to backgroundAlpha: 0 appears to have fixed it.

I've given it a try with the PR fixes, and the module is useable enough for v11, but has a minor bug from what I can see (could be unrelated to the PIXI.Assets change). It seems if you unstage an actor that had an emote active, then restage it, it'll toss this error:

image

Kind of a minor bug, as turning off the emote and restaging will fix it, but I know someone is likely to bring it up.

Aside from this, I think this should suffice for v11 compatibility with this bug aside. If you think you can do anything about that, let me know, otherwise I can just merge the PR as is.

strongpauly commented 1 year ago

May I ask where did you change those options?

Inside _initTheatreDockCanvas where it creates the PIXI.Application.

strongpauly commented 1 year ago

The canvas wasn't broken, it was just hidden behind the Theatre canvas. Changing from passing transparent: true to backgroundAlpha: 0 appears to have fixed it.

I've given it a try with the PR fixes, and the module is useable enough for v11, but has a minor bug from what I can see (could be unrelated to the PIXI.Assets change). It seems if you unstage an actor that had an emote active, then restage it, it'll toss this error:

image

Kind of a minor bug, as turning off the emote and restaging will fix it, but I know someone is likely to bring it up.

Aside from this, I think this should suffice for v11 compatibility with this bug aside. If you think you can do anything about that, let me know, otherwise I can just merge the PR as is.

Probably best to merge and create another issue for the error. Just had a quick look and it would probably take me awhile to figure out what's going on.

megahead11 commented 1 year ago

Okay, I'll mark this resolved (for now). It's been merged ^^