Hi,
I am trying to understand Dynamic Image Selection of imageSheet. My Corona SDK version is 2511. My config.lua looks like this and my project is configured for landscape. The required version of imageSheets are generated by scaling down one bigimage using TexturePacker.
application =
{
content =
{
width = 320,
height = 480,
scale = “letterBox”,
fps = 30,
imageSuffix =
{
["@3x"] = 2.1,
}
},
}
#1: In the simulator, selecting the iPhone6 device displays from 3x imageSheet and iPhone4 display from un-prefixed imagesheet. However on the device both iPhone4 and iPhone6 are displaying from un-prefixed imagesheet. Couldn’t understand why this difference
#2: What is scale factor? The document says it is “display.pixelWidth / display.actualContentWidth” which turns out to be 1.3 for both iPhone4 and iphone6. As per #1, the image from un-prefixed imagesheet should be displayed whereas it selects @3x.
If my image suffix is
imageSuffix =
{
["@2x"] = 1.2,
["@3x"] = 2
}
As per the scale factor definition, then for both iPhone4 and iPhone6, the image from @2x suffix imageSheet should be chosen. However, the simulator displays from @3x suffix imageSheet
Need some clarification on this behaviour.
Thanks