Hi Team,
Is it possible to show nice stars sparkles. I want to show it at the end of the game to celebrate the result.
Thanks
Abdul
Hi Team,
Is it possible to show nice stars sparkles. I want to show it at the end of the game to celebrate the result.
Thanks
Abdul
Yep, it’s completely possible. Basically, you just create particles that don’t move and alpha them in and out.
Here’s a simple example:
[lua]
local math_random = math.random
local display_newImageRect = display.newImageRect
local vent = CBE.newVent({
radius = 120,
lifeSpan = 500,
fadeInTime = 200,
startAlpha = 0,
perEmit = 3,
emitDelay = 100,
color = {255, 255, 0},
build = function()
local size = math_random(30, 60)
return display_newImageRect(“CBEffects/textures/glow.png”, size, size)
end,
physics = {
velocity = 0 – Not moving
}
})
vent:start()
[/lua]
You’ll no doubt want to change the image to a sparkle image, and maybe the positionType to a rectangle, but that’s the basic idea.
By the way, I just added the sparkle effect to the samples in the CBEffects repository (samples/ExampleEffects/Sparkle.lua)
Thanks Man for your quick response to this matter, i really appreciate that…
Abdul
No problem
Yep, it’s completely possible. Basically, you just create particles that don’t move and alpha them in and out.
Here’s a simple example:
[lua]
local math_random = math.random
local display_newImageRect = display.newImageRect
local vent = CBE.newVent({
radius = 120,
lifeSpan = 500,
fadeInTime = 200,
startAlpha = 0,
perEmit = 3,
emitDelay = 100,
color = {255, 255, 0},
build = function()
local size = math_random(30, 60)
return display_newImageRect(“CBEffects/textures/glow.png”, size, size)
end,
physics = {
velocity = 0 – Not moving
}
})
vent:start()
[/lua]
You’ll no doubt want to change the image to a sparkle image, and maybe the positionType to a rectangle, but that’s the basic idea.
By the way, I just added the sparkle effect to the samples in the CBEffects repository (samples/ExampleEffects/Sparkle.lua)
Thanks Man for your quick response to this matter, i really appreciate that…
Abdul
No problem
Hi @Caleb P,
Is there any way to achieve glow effect on outside borders of an image by using graphical effects in corona?
Thanks in advance
If you know the edges of the image, you should be able to make particles appear at them. Then, scale/fade/whatever your particles. Know, however, that that’s not going to look like a “real” glow: for that, you should probably use snapshots and a bloom filter. If you’re looking for that, it would be best to post a new topic in the graphics subforum.
Hi @Caleb P,
Thank you for your answer, yeah i open another topic and got very good solutions,
but still what i am looking for seems to be complicated, because my image is red and i want the edges glow to be thick dark yellow that fades after to white. Bloom filter creates a black/white shadow
Regards
Hi @Caleb P,
Is there any way to achieve glow effect on outside borders of an image by using graphical effects in corona?
Thanks in advance
If you know the edges of the image, you should be able to make particles appear at them. Then, scale/fade/whatever your particles. Know, however, that that’s not going to look like a “real” glow: for that, you should probably use snapshots and a bloom filter. If you’re looking for that, it would be best to post a new topic in the graphics subforum.
Hi @Caleb P,
Thank you for your answer, yeah i open another topic and got very good solutions,
but still what i am looking for seems to be complicated, because my image is red and i want the edges glow to be thick dark yellow that fades after to white. Bloom filter creates a black/white shadow
Regards