ClearScaleControlPoints

This function removes all scale control points.

Syntax

Example

--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
camera = Camera:Create()
camera:Move(0,0,-3)
local light = DirectionalLight:Create()
light:SetRotation(35,35,0)

--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

Time:Update()
world:Update()
world:Render()

--if the space key is pressed all scale control points are removed
if (window:KeyDown(Key.Space)) then emitter:ClearScaleControlPoints() end

context:Sync()
end