1681-engine / postfx / BloomFilter
Class: BloomFilter ​
Defined in: src/postfx/BloomFilter.ts:43
Bright things glow: the pixels above a threshold are blurred and added back over the picture. Three passes (bright, blur, combine) on textures from Pixi's pool; costlier than the one-pass effects, so give it a filterArea or put it on the world layer only.
Extends ​
Constructors ​
Constructor ​
new BloomFilter(options?): BloomFilter;Defined in: src/postfx/BloomFilter.ts:47
Parameters ​
| Parameter | Type |
|---|---|
options | BloomOptions |
Returns ​
BloomFilter
Overrides ​
Properties ​
fxName ​
readonly fxName: string;Defined in: src/postfx/fxShader.ts:132
Inherited from ​
Accessors ​
blur ​
Get Signature ​
get blur(): number;Defined in: src/postfx/BloomFilter.ts:73
Returns ​
number
Set Signature ​
set blur(v): void;Defined in: src/postfx/BloomFilter.ts:76
Parameters ​
| Parameter | Type |
|---|---|
v | number |
Returns ​
void
intensity ​
Get Signature ​
get intensity(): number;Defined in: src/postfx/BloomFilter.ts:61
Returns ​
number
Set Signature ​
set intensity(v): void;Defined in: src/postfx/BloomFilter.ts:64
Parameters ​
| Parameter | Type |
|---|---|
v | number |
Returns ​
void
threshold ​
Get Signature ​
get threshold(): number;Defined in: src/postfx/BloomFilter.ts:67
Returns ​
number
Set Signature ​
set threshold(v): void;Defined in: src/postfx/BloomFilter.ts:70
Parameters ​
| Parameter | Type |
|---|---|
v | number |
Returns ​
void
Methods ​
apply() ​
apply(
filterManager,
input,
output,
clearMode
): void;Defined in: src/postfx/BloomFilter.ts:80
Applies the filter
Parameters ​
| Parameter | Type | Description |
|---|---|---|
filterManager | FilterSystem | The renderer to retrieve the filter from |
input | Texture | The input render target. |
output | RenderSurface | The target to output to. |
clearMode | boolean | Should the output be cleared before rendering to it |
Returns ​
void
Overrides ​
FxFilter.applydestroy() ​
destroy(): void;Defined in: src/postfx/BloomFilter.ts:91
Use to destroy the shader when its not longer needed. It will destroy the resources and remove listeners.
Returns ​
void
Overrides ​
FxFilter.destroyget() ​
get(name): number | Float32Array<ArrayBufferLike>;Defined in: src/postfx/fxShader.ts:153
A uniform's value (a number, or the live array of a vector).
Parameters ​
| Parameter | Type |
|---|---|
name | string |
Returns ​
number | Float32Array<ArrayBufferLike>
Inherited from ​
num() ​
protected num(name): number;Defined in: src/postfx/fxShader.ts:169
A number uniform, for the subclasses' getters.
Parameters ​
| Parameter | Type |
|---|---|
name | string |
Returns ​
number
Inherited from ​
set() ​
set(name, ...values): this;Defined in: src/postfx/fxShader.ts:158
Sets a number uniform, or the components of a vector one.
Parameters ​
| Parameter | Type |
|---|---|
name | string |
...values | number[] |
Returns ​
this