So I really love the filter effects but just came across an issue that is stopping me in my tracks from using the effects on certain things…
So I have an imagesheet with some icons on it, and create a newImage using this imagesheet (or fill image on rect) doesn’t matter which one as they both do the same thing but for this example i will just use newImage.
local testImage = display.newImage(group, imageSheet, imageIndex) testImage.anchorX, testImage.anchorY = 0.5, 0.5 testImage.x, testImage.y = 0, 0
Now lets do a transition with a fill effect.
testImage.fill.effect = "filter.swirl" testImage.fill.effect.intensity = 0 transition.to(testImage.fill.effect, { time=2000, intensity=1 } )
Now run it and you will see that it rotates the “entire imagesheet” inside of the testImage content area (not just the selected index from the image).
I am guessing that when using a imageSheet it simply creates a mask and positions the sheet in the width/height of the object etc. which reduces the overhead of the opengl texture memory and thats great.
However what it should be doing is something like rotation does (rotates the object not the imagesheet).
This is a total show stopper in my book as you cannot use any effects on a image sheet without, even the linear gradients etc. are kind of messed up in above logic because the gradient etc. really doesn’t start where it should so you have to changes the effects values to get it to look right depending on where the image is inside of the image sheet… This one didn’t occur to me until i was using a mirror effect and was thinking i was on crack because some images had different values in the gradient effect if the image was at the top of the imagesheet the values were direction : 1, smoothness : 0.6, progress : 0.54 where if they were at the bottom of the sheet the values where direction : -0.2, smoothness : 0.6, progress : 0.54.
Please tell me you can resolve this, as it is a major issue for me.