Class: MockEffector
Mock of a generic X-Ray engine effector class for jest/node.
Remarks
Methods are declared on the prototype rather than as own jest.fn fields on purpose. The engine class is meant to be subclassed with MockEffector.process overridden, and own instance fields would shadow such an override and leave super.process undefined. Use jest.spyOn when call assertions are needed.
Implements
effector
Constructors
Constructor
new MockEffector(type: number, time: number): MockEffector;Parameters
| Parameter | Type |
|---|---|
type | number |
time | number |
Returns
MockEffector
Methods
finish()
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.
Implementation of
effector.finishprocess()
process(params: effector_params): boolean;Update post-process parameters for the current frame.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | effector_params | Mutable 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.
Implementation of
effector.processstart()
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.
Implementation of
effector.startcreate()
static create(type: number, time: number): MockEffector;Parameters
| Parameter | Type |
|---|---|
type | number |
time | number |
Returns
MockEffector
mock()
static mock(type: number, time: number): effector;Parameters
| Parameter | Type |
|---|---|
type | number |
time | number |
Returns
effector
Properties
__name
__name: string = "effector";LuaBind instance constructor name.
Implementation of
effector.__nametime
time: number;type
type: number;