Repository navigation
Palette API
Syntax-Sculptor edited this page Nov 24, 2026
·
2 revisions
Initializes Palette and registers multiple callbacks to handle the management of Particle Emitters.
This method should only be called once in your main.lua. Subsequent calls will result in an error.
Parameters
| Parameter | Type | Description |
|---|---|---|
mod |
ModReference |
Returns: nil
Example
local MyMod = RegisterMod("Palette Test", 1)
local Palette = include("palette_scripts.palette")
MyMod.Palette = Palette
Palette:Init(MyMod)Creates and returns a new Particle Emitter.
The provided texturePath must be a 32-bit PNG file. If an invalid texturePath is provided, an error will be thrown.
Parameters
| Parameter | Type | Description |
|---|---|---|
texturePath |
string | The path to the particle's texture. All particles emitted will use it. |
position |
Vector (optional) | The Particle Emitter's position. Default: (0, 0)
|
Returns: ParticleEmitter
- Palette API
- Particle Emitter API
- AlignToVelocity API
- ColorBySpeed API
- ColorOverLifetime API
- ForceOverLifetime API
- InheritVelocity API
- Keyframe API
- LimitVelocityOverLifetime API
- Noise API
- PaletteBurst API
- PaletteGradient API
- PaletteOverLifetime API
- RotationBySpeed API
- ScaleBySpeed API
- Shape API
- SpriteSheet API
- SubEmitterOptions API
- VelocityOverLifetime API