I am working on a simple free plugin for Corona, to try out the plugin creation before releasing my shadow plugin, but I seem to have run into an issue with repeating fills when using image sheets.
In the plugin, the user can select between using image sheet based or individual image based repeating fills. However, using image sheet does not properly repeat the fill, so I thought to ask here if someone can point out what my mistake is, or if the issue lies within Corona or TexturePacker.
I have attached a simple project with the necessary code, image and sheet that demonstrate my issue, but here’s the code as well:
display.setDefault( "textureWrapX", "repeat" ) -- by using an image local imageTexture = { type = "image", filename = "window1/top.png" } local object1 = display.newRect( 160, 160, 256, 16 ) object1.fill = imageTexture object1.fill.scaleX = 0.0625 ------------------------------------------------- -- by using an imagesheet local sheetInfo = require("sheets.window1") local myImageSheet = graphics.newImageSheet( "sheets/window1.png", sheetInfo:getSheet() ) local imagesheetTexture = { type = "image", sheet = myImageSheet, frame = 9 } local object2 = display.newRect( 160, 200, 256, 16 ) object2.fill = imagesheetTexture object2.fill.scaleX = 0.0625
In the image, there are two objects. The one above is created using an individual image and the one below is created using an image sheet.