Skip to content

MoonLiveEffect

Source: MoonLiveEffect.h

MoonLiveEffect

class MoonLiveEffect
src/light/moonlive/MoonLiveEffect.h:19

Inherits: EffectBase

The thin binding between the MoonLive engine and a first-class EffectBase.

Public Methods

virtual inline const char * tags() const override : The tags the script declares, or the scripted-module mark when it declares none.

virtual inline Dim dimensions() const override : The axes this script paints, which a silent script leaves at two.

virtual inline void defineControls() override : Publish the script name, and every control the script declares.

virtual inline bool affectsPrepare(const char * controlName) const override : Whether a control change needs the prepare sweep.

virtual inline void prepare() override : Compile the script if the file changed, then surface whatever it declares.

virtual inline void tick() override : The hot tick, which by default ticks every enabled child and times each.

virtual inline void release() override : Drop the compiled program, the trail planes and the particle pool.

inline void setScript(const char * name) : Replace the script, which the next prepare compiles by the path a UI edit takes.

More info

The effect names a script file, prepare compiles it, and tick runs the emitted native code over this effect's own buffer. A source edit recompiles live, and a parse error shows in the module status while the layer renders dark.