This function sets a scale control point that controls a particle's scale over the course of its life.
- AddScaleControlPoint(number time, number scale)
- time: - a float between 0.0 and 1.0 with 0 being the particle's birth and 1 being the particle's death.
- scale: - a value between 0.0 and 1.0 stating the scale value at given time. 0 being tiny and 1 being equal to Max Scale.
Scale control points work by interpolation from control point to control point over a particles lifetime. So if there is a control point at 0.0 with a scale of 0.0 and a control point at 1.0 with a scale of 1.0 the particle will gradual grow larger over time.
--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
camera = Camera:Create()
local light = DirectionalLight:Create()
--Create an emitter
emitter = Emitter:Create(100)
emitter:ClearAlphaControlPoints() --Remove default control points
emitter:AddScaleControlPoint(0,0) --at spawn the particle will have a scale of 0
emitter:AddScaleControlPoint(.5,1) --halfway through the particle's lifetime its be equal to max scale
emitter:AddScaleControlPoint(1,0) --at death the particle will have a scale of 0
while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end