If you know the positions of the tile and the shapes, you can determine if the tile is inside the shape?
For example, with the SAT package, you have
SAT.testPolygonPolygon(a, b, response)
which looks if two polygons are in collision (tile and shape)
PS: I suggest you to create something like 'Community tutorials' tag on this forum, maybe soon I (and other users) could share few ideas
no worries, if you want to make tutorials, I can put in place