Skip to content

Palette API

Syntax-Sculptor edited this page Nov 24, 2026 · 2 revisions

Palette

Methods

Palette:Init(mod)

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)

Palette:CreateParticleEmitter(texturePath, position)

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

Clone this wiki locally