Hi,
First of all, thanks for this lovely package. For the sake of learning, I tried to make a effect from scratch with this code but it yields runtime error on physics.addBody in Particle Helper. Here is my main.lua file:
local CBE = require("CBEffects.Library") local mrand=math.random local function buildSparks() local size=mrand(10,20) -- return display.newImageRect("star.png", size, size) return display.newImageRect("star.png", 10, 10) end local function velNil() return 0, 0 end local kos = CBE.VentGroup { { title="stars", isActive=true, build= buildSparks, x=display.contentCenterX, y=display.contentCenterY, color={{255,255,255},{230,230,255}}, iterateColor=false, curColor=1, emitDelay=1000, perEmit=6, emissionNum=0, lifeSpan=1000, alpha=1, startAlpha=0, endAlpha=0, onCreation=function() end, onDeath= function(p,v) v.perEmit=math.random(5,15) end, propertyTable={}, scale=1.0, lifeStart=0, fadeInTime=300, iteratePoint=false, curPoint=1, lineDensity="total", pointList={{0,0},{1,1}}, positionType="inRadius", posRadius=30, posInner=1, point1={100,display.contentHeight}, point2={display.contentWidth-100,display.contentHeight}, rectLeft=0, rectTop=0, rectWidth=display.contentWidth, rectHeight=display.contentHeight, onUpdate=function() end, physics={xDamping=0,yDamping=0,density=1,velocity=5,angularVelocity=0.04,angularDamping=0,velFunction=velNil,useFunction=false,autoAngle=true,angles={{0,360}},preCalculate=true,sizeX=0,sizeY=0,minX=0.1,minY=0.1,maxX=100,maxY=100,relativeToSize=true,gravityX=0,gravityY=9.8}, rotation={towardVel=false,offset=0} } } --kos:start("stars") kos:startMaster()
I basically copied one of the presets and wanted to compile and run then try to change values to get what I want but it won’t run.
Thanks.