Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Incompatibility with Foundry VTT Version 12 #718

Open
Niclasp1501 opened this issue Jun 4, 2024 · 20 comments
Open

Module Incompatibility with Foundry VTT Version 12 #718

Niclasp1501 opened this issue Jun 4, 2024 · 20 comments
Labels
confirmed enhancement New feature or request help wanted Extra attention is needed

Comments

@Niclasp1501
Copy link

Expected Behavior

Working on 12

Current Behavior

I have encountered an issue with the module, which does not function properly with the latest Foundry update. The module was working perfectly in previous versions but appears to be incompatible with the latest version.

Steps to Reproduce

Install V12

Context

No response

Version

latest

Foundry VTT Version

v12

Operating System

Linux

Browser / App

Chrome

Game System

DND5e 3.2

Relevant Modules

No response

@Niclasp1501 Niclasp1501 added bug Something isn't working to be confirmed labels Jun 4, 2024
@ghost91- ghost91- added enhancement New feature or request confirmed and removed bug Something isn't working to be confirmed labels Jun 10, 2024
@tslays
Copy link

tslays commented Jun 19, 2024

+1 for Foundry V12 verification

@ghost91-
Copy link
Contributor

Thanks for creating the issue. I'm aware that the module is incompatible with V12.

Unfortunately, I'm quite busy at the moment and I don't know when I will have time to make it compatible. If anybody is interested in working on this in the mean time, feel free to do so and create a PR.

@Aioros
Copy link
Contributor

Aioros commented Jul 30, 2024

I'm interested in taking a look, even if my PIXI-related knowledge is limited. A lot of the functionality seems to still be there for me, though, and it would be useful to have a few examples of what is not working. Pinging @Niclasp1501 and @tslays in case they have any.

@VirusNik21
Copy link

VirusNik21 commented Jul 31, 2024

The module works in V12, but probably with some errors. For example, I noticed this problem - for some reason, after loading the world, the weather mask is disabled. And to start it you need to either manually turn it on again in the necessary Label, or invert the mask twice through the toolbar on the left.

General.Invert.Mask.mp4
Label.mp4

@VirusNik21
Copy link

VirusNik21 commented Jul 31, 2024

The problem isn't just the scene reloading - the mask can only work on 1 scene at a time. You can see it in the video below
Actualy, any change in drawing properties causes the mask effect to be turned on.

Swich.Scenes.mp4

@Aioros
Copy link
Contributor

Aioros commented Jul 31, 2024

Thanks, that's useful. It seems that the canvasReady hook is not the right time to start checking for mask geometry anymore. The good thing is that it would explain all of the behavior shown here. The bad thing is that I need to research a bit to find what the right spot is. I'll try my best and create a PR if I find a reasonable solution.

@Aioros
Copy link
Contributor

Aioros commented Jul 31, 2024

Looks like the only change needed was to wrap the drawDrawingsMask call with a requestAnimationFrame(), so that the geometry's graphicsData would be available. This also maintains compatibility with v11. I created PR #751 with a couple of additional fixes here and there.

@ghost91-
Copy link
Contributor

ghost91- commented Aug 1, 2024

Thanks! I’m currently on vacation and don’t have a laptop with me. I’ll take a look as soon as I’m back (11.08.2024).

@VirusNik21
Copy link

Hello. How's the progress going? Your module is great - wouldn't want to lose it in version 12.

@Ginkgo85
Copy link

Will there be an update for the module?

@ghost91-
Copy link
Contributor

ghost91- commented Aug 26, 2024

I'm back from vacation now, but still quite busy with work. I hope that I'll manage to do it this week 🤞

@Fridan99
Copy link

Fridan99 commented Sep 7, 2024

any news? :P

@ghost91-
Copy link
Contributor

ghost91- commented Sep 8, 2024

Fixed in #765. Will do some more clean up and then make a release today.

@ghost91- ghost91- closed this as completed Sep 8, 2024
@Tyberius2303
Copy link

Found that this is still taking effect even after the update.

@ghost91-
Copy link
Contributor

ghost91- commented Sep 8, 2024

@Tyberius2303 please provide more details about what exactly does not work as expected. In my own tests, everything seems to be fine.

@Tyberius2303
Copy link

The problem isn't just the scene reloading - the mask can only work on 1 scene at a time. You can see it in the video below Actualy, any change in drawing properties causes the mask effect to be turned on.

Swich.Scenes.mp4

Identical as the original issue posted here.

Created the weather effects which sometimes start off being ignored by the Drawing tool with the ignore weather mask but when switching between scene's the mask needs to be reapplied to the drawing for the weather to be ignored.

FXM1

Apologies my screen record is having a fit but seems to report back with the error shown in the SS above.

Uncaught TypeError: undefined. Cannot read properties of undefined (reading 'shape')
[Detected 1 package: fxmaster(4.1.0)]
at drawShapeToMask (drawings-mask.js:75:56)
at drawings-mask.js:49:5
at Array.forEach ()
at createMask (drawings-mask.js:45:30)
at drawDrawingsMask (drawings-mask.js:37:48)

@ghost91-
Copy link
Contributor

ghost91- commented Sep 9, 2024

Could you provide the scene where this happens? That would help a lot with trying to reproduce it on my side.

@ghost91- ghost91- reopened this Sep 9, 2024
@Tyberius2303
Copy link

Sure thing,
fvtt-Scene-blue-water-inn-1f-YzI0NjdiYmU2MGI4.json
If you want me to test anything else out more than happy to give it a whirl.

@Aioros
Copy link
Contributor

Aioros commented Sep 23, 2024

Just wanted to report that I couldn't reproduce this either, but I suppose it's possible that the graphic data for the shape is still not ready even after waiting for the animation frame. I'll try to see if I can find a more reliable way to detect it.

@Aioros
Copy link
Contributor

Aioros commented Sep 24, 2024

I submitted PR #784 for a better approach to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants