SetAnimationColumns

This function specifies the number of columns in an animated particle sheet.

Syntax

Parameters

Remarks

For smoother particle animations use the particle animation shader.

Example

--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
camera = Camera:Create()
camera:Move(0,0,-2)

--Create an emitter
emitter = Emitter:Create(1)

local material = Material:Load("Materials/Effects/explosion.mat")
if(material) then emitter:SetMaterial(material) end
emitter:SetVelocity(0,0,0,0)
emitter:SetDuration(900)
emitter:SetEmissionVolume(0,0,0)
emitter:SetMaxScale(10.0)
emitter:SetAnimationRows(2)
emitter:SetAnimationColumns(5)

while true do

if window:Closed() or window:KeyHit(Key.Escape) then return false end

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

context:SetBlendMode(Blend.Alpha)
context:DrawText("Rows: " ..emitter:GetAnimationRows() .. " Columns: " ..emitter:GetAnimationColumns() ,0,0)
context:Sync()
end