Releases: caewok/fvtt-elevated-vision
Token vision
Working prototype for token vision and lights. Corrections to the calculation of the shadow polygons and better use of Clipper to union shadows for a given source.
When viewing the vision from a token, areas are shaded if partially obscured by a wall lower than the token. Other tokens elevated above the wall can be seen. Some visual artifacts when moving tokens around but not too bad.
Lights currently add shadows at the lighting layer level, which is not ideal but works for now. Future work needed to mask individual lights properly.
Prototype light sources
Working prototype for ambient light sources. When the wall height is less than the light source elevation, one or more shadow polygons are constructed representing how the light is obscured by the wall. For now, shadows are just drawn on the canvas.
Change module name
Change module name to no dash.
Token hiding
Wrap testVisibility in order to hide a token based on elevation.
Given one or more points of vision to a token:
- test for intersection with an Enhanced Terrain Layer polygon.
- Test if the token can be seen from the point(s) of vision, assuming 3-D elevation for the token, wall, and point(s) of vision.
- Hide token as necessary
Also adds a log debug flag using the devMode module, and currently sets a debug flag to visualize the terrain polygons and intersections.
Initial alpha release.
Initial framework.