Module party
A module for GPU accelerated particles.
Functions
draw (...) | Draws a system. |
update (dt) | Updates a system. |
texture (texture) | Attaches texture to system, or removes texture if nil. |
origin (xOrigin, yOrigin) | Sets the origin of the system. |
startColor (r, g, b[, a]) | Sets the starting color of the system. |
endColor (r, g, b[, a]) | Sets the ending color of the system. |
areaSpread (spawnWidth[, spawnHeight]) | Sets the spawning area. |
direction (direction) | Sets the spawn direction. |
spread (spread) | Sets the spawn direction spread |
linearAcceleration (minXLinAcc, minYLinAcc[, maxXLinAcc[, maxYLinAcc]]) | Sets the minimum and maximum linear acceleration. |
linearDamping (minLinearDamping[, maxLinearDamping]) | Sets minimum and maximum linear damping |
speed (minSpeed[, maxSpeed]) | Sets the minimum speed |
startAngle (minAngle[, maxAngle]) | Sets minimum spawn angle. |
spin (minSpin[, maxSpin]) | Sets the minimum and maximum constant rotation speed. |
lifetime (minLifetime[, maxLifetime]) | Sets the minimum and maximum lifetime of the particles. |
radius (minRadius[, maxRadius]) | Sets the minimum and maximum radius of the particles. |
setTime (time) | Sets the time used for vertex calculations. |
Functions
- draw (...)
-
Draws a system.
Can take any parameters that love.draw would normally.
Parameters:
- ... any draw parameters
- update (dt)
-
Updates a system.
Parameters:
- dt number time since last update
- texture (texture)
-
Attaches texture to system, or removes texture if nil.
Parameters:
- texture image/canvas texture
Returns:
-
system edited system
- origin (xOrigin, yOrigin)
-
Sets the origin of the system.
Parameters:
- xOrigin number X origin of system
- yOrigin number Y origin of system
Returns:
-
system edited system
- startColor (r, g, b[, a])
-
Sets the starting color of the system.
Color is linearly interpolated between the start and end color over it's lifetime.
Parameters:
- r number red color component
- g number green color component
- b number blue color component
- a number alpha color component (optional)
Returns:
-
system edited system
- endColor (r, g, b[, a])
-
Sets the ending color of the system.
Color is linearly interpolated between the start and end color over it's lifetime.
Parameters:
- r number red color component
- g number green color component
- b number blue color component
- a number alpha color component (optional)
Returns:
-
system edited system
- areaSpread (spawnWidth[, spawnHeight])
-
Sets the spawning area.
Parameters:
- spawnWidth number width of spawn area
- spawnHeight number height of spawn area (optional)
Returns:
-
system edited system
- direction (direction)
-
Sets the spawn direction.
Parameters:
- direction number spawn direction (radians)
Returns:
-
system edited system
- spread (spread)
-
Sets the spawn direction spread
Parameters:
- spread number direction spread (radians)
Returns:
-
system edited system
- linearAcceleration (minXLinAcc, minYLinAcc[, maxXLinAcc[, maxYLinAcc]])
-
Sets the minimum and maximum linear acceleration.
Parameters:
- minXLinAcc number minimum linear acceleration on the x axis
- minYLinAcc number minimum linear acceleration on the y axis
- maxXLinAcc number maximum linear acceleration on the x axis (optional)
- maxYLinAcc number maximum linear acceleration on the y axis (optional)
Returns:
-
system edited system
- linearDamping (minLinearDamping[, maxLinearDamping])
-
Sets minimum and maximum linear damping
Parameters:
- minLinearDamping number minimum linear damping
- maxLinearDamping number maximum linear damping (optional)
Returns:
-
system edited system
- speed (minSpeed[, maxSpeed])
-
Sets the minimum speed
Parameters:
- minSpeed number minimum speed
- maxSpeed number maximum speed (optional)
Returns:
-
system edited system
- startAngle (minAngle[, maxAngle])
-
Sets minimum spawn angle.
Parameters:
- minAngle number minimum starting angle
- maxAngle number maximum starting angle (optional)
Returns:
-
system edited system
- spin (minSpin[, maxSpin])
-
Sets the minimum and maximum constant rotation speed.
Parameters:
- minSpin number minimum rotation speed
- maxSpin number maximum rotation speed (optional)
Returns:
-
system edited system
- lifetime (minLifetime[, maxLifetime])
-
Sets the minimum and maximum lifetime of the particles.
Parameters:
- minLifetime number minimum lifetime
- maxLifetime number maximum lifetime (optional)
Returns:
-
system edited system
- radius (minRadius[, maxRadius])
-
Sets the minimum and maximum radius of the particles.
Parameters:
- minRadius number minimum radius
- maxRadius number maximum radius (optional)
Returns:
-
system edited system
- setTime (time)
-
Sets the time used for vertex calculations.
Parameters:
- time number time
Returns:
-
system edited system