I just pushed an update to the repo that includes a quick explosion I knocked up. You’ll need the most recent version, because it uses a couple of new features.
Here’s the code:
[lua]
local vent = CBE.newVent({
preset = “flame”,
title = “explosion”,
positionType = “inRadius”,
color = {{1, 1, 0}, {1, 0.5, 0}, {0.2, 0.2, 0.2}},
particleProperties = {blendMode = “add”},
x = display.contentCenterX,
y = display.contentCenterY,
emissionNum = 5,
emitDelay = 5,
perEmit = 1,
inTime = 100,
lifeTime = 0,
outTime = 600,
onCreation = function(particle)
particle:changeColor({
color = {0.1, 0.1, 0.1},
time = 600
})
end,
onUpdate = function(particle)
particle:setCBEProperty(“scaleRateX”, particle:getCBEProperty(“scaleRateX”) * 0.998)
particle:setCBEProperty(“scaleRateY”, particle:getCBEProperty(“scaleRateY”) * 0.998)
end,
physics = {
velocity = 0,
gravityY = -0.035,
angles = {0, 360},
scaleRateX = 1.05,
scaleRateY = 1.05
}
})
[/lua]
Enjoy!