Open Niclasp1501 opened 4 months ago
+1 for Foundry V12 verification
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.
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.
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.
https://github.com/user-attachments/assets/d385103f-7987-47c7-9194-c1d449d2a428
https://github.com/user-attachments/assets/cdf691bc-23c9-4614-be4f-7041992dab35
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.
https://github.com/user-attachments/assets/70aea4a9-4b41-48d7-b2af-dff418d407c9
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.
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.
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).
Hello. How's the progress going? Your module is great - wouldn't want to lose it in version 12.
Will there be an update for the module?
I'm back from vacation now, but still quite busy with work. I hope that I'll manage to do it this week :crossed_fingers:
any news? :P
Fixed in #765. Will do some more clean up and then make a release today.
Found that this is still taking effect even after the update.
@Tyberius2303 please provide more details about what exactly does not work as expected. In my own tests, everything seems to be fine.
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.
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 (
Could you provide the scene where this happens? That would help a lot with trying to reproduce it on my side.
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.
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.
I submitted PR #784 for a better approach to this issue.
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