Skip to content

Class: effector

Script-controlled post-process effector.

Source

C++ class effector

Custom Constructor

effector

Remarks

Subclass it from script and override process. The effector is tied to the actor camera stack.

Extends

Constructors

Constructor

ts
new effector(type: number, time: number): effector;

Parameters

ParameterTypeDescription
typenumberUnique post-process effector type id.
timenumberEffector lifetime in seconds.

Returns

effector

Remarks

Use a stable custom type id. finish removes the active effector by this type.

Overrides

EngineBinding.constructor

Methods

finish()

ts
finish(): void;

Remove the effector from the actor camera stack.

Returns

void

Remarks

Removes by effector type, so sharing a type id with another active effector can remove the wrong effect.


process()

ts
process(params: effector_params): boolean;

Update post-process parameters for the current frame.

Parameters

ParameterTypeDescription
paramseffector_paramsMutable post-process parameters.

Returns

boolean

Whether the effector should continue running.

Remarks

Override this in script. Mutate params for the current frame and return false to stop the effector.


start()

ts
start(): void;

Add the effector to the actor camera stack.

Returns

void

Remarks

Requires an active actor. This is intended for in-game actor post-processing, not menu/editor code.

Properties

__name

ts
readonly __name: string;

LuaBind instance constructor name.

Inherited from

EngineBinding.__name


__name

ts
readonly static __name: string;

LuaBind class constructor name.

Inherited from

EngineBinding.__name