Skip to content

Commit

Permalink
Fixed issue with padding not being adding to the quad's position for …
Browse files Browse the repository at this point in the history
…dynamic atlases
  • Loading branch information
EngineerSmith committed Nov 28, 2021
1 parent 9af11ba commit 66ed68f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion treeNode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ treeNode.draw = function(self, quads, width, height, extrude, padding)
local iwidth, iheight = img:getDimensions()
local extrudeQuad = lg.newQuad(-extrude, -extrude, iwidth+extrude*2, iheight+extrude*2, iwidth, iheight)
lg.draw(img, extrudeQuad, self.x + padding, self.y + padding)
quads[self.image.id] = lg.newQuad(self.x+extrude, self.y+extrude, iwidth, iheight, width, height)
quads[self.image.id] = lg.newQuad(self.x+extrude+padding, self.y+extrude+padding, iwidth, iheight, width, height)
elseif self[1] --[[ and self[2] ]] then
self[1]:draw(quads, width, height, extrude, padding)
self[2]:draw(quads, width, height, extrude, padding)
Expand Down

0 comments on commit 66ed68f

Please sign in to comment.