Hi guys
I was playing with some kernels I found in an example of @StarCrunch.
So I’m trying to integrate it with an example code:
local function basic() --effetto che permette di mostrare gli oggetti non comprati completamente neri local kernel = {} kernel.language = "glsl" kernel.category = "filter" kernel.group = "circle" kernel.name = "basic" kernel.isTimeDependent = true kernel.fragment = [[#define SPHERE\_NO\_DISCARD P\_COLOR vec4 FragmentKernel (P\_UV vec2 uv) { uv = GetUV\_PhiDelta(2. \* uv - 1., -CoronaTotalTime / 7.); if (uv.s \< 0.) return vec4(0.); return CoronaColorScale(texture2D(CoronaSampler0, uv)); }]] graphics.defineEffect(kernel) end basic() -- -- local CX, CY = display.contentCenterX, display.contentCenterY -- local image = display.newCircle( CX, CY, 125) image.x, image.y = CX, CY image.fill = { type = "image", filename = "image.jpg" } image.fill.effect = "filter.circle.basic"
in this way my image becomes spherical but does not move.
I have two questions:
- How to solve this
2. Is it possible to make the rotation depend on the user’s touch?
In the example picture I would like to see better what I mean:
in point 1, the user moves his finger to the right
in step 2, drag the finger downwards
I would like to work for every direction naturally
I know the question is a bit specific but I think it could serve others