League-of-Foundry-Developers / simplefog

A module for FoundryVTT that lets you draw fog of war manually
MIT License
18 stars 15 forks source link

Provide option to disable the border on image as fog #74

Open UranusBytes opened 2 years ago

UranusBytes commented 2 years ago

When an image is used as fog layer, a border is draw to show what is visible. Provide an option to disable this border. The use case is that the fog layer is a map without labels or other items, but the fog layer is progressively removed to show the labels/whatever on the background.

Derinzed commented 2 years ago

Thank you for this, sorry for not getting back to you quickly.

UranusBytes commented 2 years ago

This effect is caused by the tint (Player Fog Color) applied to the canvas layer. If you set the Player Fog Settings Color to a value of #FFFFFF this doesn't actually set the tint to white, but removes the tint effect. https://pixijs.download/dev/docs/PIXI.Sprite.html#tint

Note that even with the tint set to #FFFFFF, any grids added to the map will still only be shown on the unmasked portion of the image, so if a grid line happens to be behind a masked area, players could still deduce that there was masked map content there.

Player Fog Color of #000000

image

Player Fog Color of #FFFFFF

image
Derinzed commented 2 years ago

I seem to still end up with a white border when using #FFFFFF:

image

Settings: image

is there another setting that I've configured improperly?

UranusBytes commented 2 years ago

No, you are correct. I was mistaken in the previous testing I'd done. I can confirm that setting to FFFFFF still shows as white. I had a code fix prototyped earlier. Let me resurrect it...

UranusBytes commented 2 years ago

Same as #46