boxclip
boxclip copied to clipboard
Stenciled platform entities
Implement a way to use a stencil entity with platforms (would be placed as a resizeable rectangle).
- stencil area occludes portions of the drawn platform to create a hole
- would add some additional detail/interesting geometry to a level
- does not affect collisions, as this would be intentionally used on the inside bounds of a platform entity.
local function stencil()
love.graphics.rectangle("fill", x,y, w, h, r, r)
end
love.graphics.stencil(stencil, "invert", 255)
love.graphics.setStencilTest("less", 255)
draw()