fantasycalendar / FoundryVTT-Sequencer

This module implements a basic pipeline that can be used for managing the flow of a set of functions, effects, sounds, and macros.
Other
47 stars 24 forks source link

Use `sortLayer` instead of elevation for effect layer ordering #246

Closed Codas closed 3 months ago

Codas commented 3 months ago

This PR changes the way how belowTokens and belowTiles work in FoundryVTT V12. Instead of changing the elevation to fixed offsets, which in V12 could easily render effects in unexpected order, especially on maps that make heavy use of elevations. These functions now instead set the sortLayer property on the effect canvas Object. This sortLayer value is used in v12 to tie-break the render order of objects within the same elevation, which now sort objects first by elevation, secondarily by sortLayer and finally by the sort property, which is named zIndex in sequencer.

Haxxer commented 3 months ago

Very nice, thank you for this!