Auto Shadow Tiles via Region ID

Discussion in 'JS Plugin Requests' started by Rink27, Aug 14, 2018.

  1. Rink27

    Rink27 Veteran Veteran

    Likes Received:
    First Language:
    Primarily Uses:
    Hello. I am trying to figure out - as close as possible - if it is possible to have a dynamic shadow system that varies using a variable (example: time) based on the shadow pen tool we have within the editor.

    From this thread:
    I saw that there are functions related to the draw shadow tool:-

    Tilemap.prototype._drawShadow = function(bitmap, shadowBits, dx, dy) { };
     ShaderTilemap.prototype._drawShadow = function(layer, shadowBits, dx, dy) { };
    So I'm curious if it will be possible to achieve the dynamic shadow system using the following logic:

    If (Region ID = X and Time = A) draw shadow on left-half of tile.
    If (Region ID = X and Time = B ) draw shadow on entirety of tile.
    If (Region ID = X and Time = C) draw no shadow on tile.

    * Similar logic for drawing shadows for the upper/right/lower-halves of tiles. *

    Besides using the shadow tool, I'm curious if it's alternatively possible to have those specific areas' tint lowered to achieve a similar effect (Unless that's what the shadow pen tool actually does).

Share This Page