-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: #107 - fixed renderer for foundry v11 #110
feat: #107 - fixed renderer for foundry v11 #110
Conversation
Nice! Thank you for investigating! Instead of changing the composite function so that it only works with v11, could you do something like an if statement to determine if v11, do the new way, vs if v10 use the old method? Something like
|
…ped version number
Yes of course! Done. Added the clause and bumped the version number |
Due to increasing demand of this fix I uploaded a temporary release to my repository that can be downloaded and manually installed. Beware that I will delete this release as soon as the PR I opened for this fix is merged back to the main repository. |
This patched version seems to have a problem, I cant select single tokens by clicking when its active in the latest foundry v11. |
Have you tested this in combination with other modules or alone? If not alone, I would suggest using Find the Culprit to help narrow down if this is a combination of modules or SimpleFog itself, but.. well.. this issue stops that. You could still attempt to do the process manually though |
This is the only module active when testing. While the module works just fine manipulating the fog, when its active, tokens cant be manipulated moved or selected. Its like there's some kind of layer over the tokens that I can't see. Some errors from the console when I activate it : Foundry VTT | Drawing the SimplefogHUDControlLayer canvas layer |
The fix does not erase existing underlying problems. It only makes it work with Foundry 11 again, so you can actually use it at all. |
@macskay In your testing, are you experiencing the problems in #107 (comment) ? The testing I did yet was exhibiting this, and I haven't been able to come up with an obvious problem. Since moving the SimpleFogLayer zIndex to below the Token layer allows selection of the token, it makes me think it's something with transparent areas of the SimpleFogLayer not propagating click events down to the token layer. Mouseover seems to be propagating since the cursor changes to a finger-pointer and the token gets a surround. I don't see anything different between the v10 and v11 InteractiveCanvasLayer, so I don't think it's that. |
This makes sure that simplefog can be used with Foundry v11. Foundry now uses Pixi.js v7 and due to that change the MaskLayer.ts needs an update on how to call the Renderer's render function.
Release Note 11.293 for Pixi.js v7: https://foundryvtt.com/releases/11.293 Can be found under Web Workers Upgrading Our PIXIes
API Documentation of latest PIXI.CanvasRenderer of latest release can be found under:
https://pixijs.download/release/docs/PIXI.CanvasRenderer.html#render
For this purpose I moved the options to their own object and passed in the newly created options object to the render function. Now simplefog works again.
Proof:
This affects issue #107
Tested with Version 11.301