I'm trying to implement my own caching system. I have a situation where I need multiple copies of an image, scaled to a particular value.
Doing this is slow:
1 2 3 4 5 | for i=1,10 do local image = display.newImageRect(imageName,width,height) image.y = (i-1)*(height+margin) group:insert(image) end |
I'm running into the same problem. Does anyone know how to (deep)copy a display object?