Extends
Members
defaultOptions ShockwaveFilterOptions & FilterOptions<Partial> staticreadonly
Default shockwave filter options
Properties:
Name | Type | Default | Description |
---|---|---|---|
amplitude |
number | 30 |
The amplitude of the shockwave |
brightness |
number | 1 |
The brightness of the shockwave |
center |
The |
||
radius |
number | -1 |
The maximum radius of shockwave. less than |
speed |
number | 500 |
The speed about the shockwave ripples out. The unit is |
wavelength |
number | 160 |
The wavelength of the shockwave |
The amplitude of the shockwave
- Default Value:
- 30
The brightness of the shockwave
- Default Value:
- 1
center PointData
The x
and y
center coordinates to change the position of the center of the circle of effect.
- Default Value:
- [0,0]
Sets the center of the effect in normalized screen coords on the x
axis
- Default Value:
- 0
Sets the center of the effect in normalized screen coords on the y
axis
- Default Value:
- 0
The maximum radius of shockwave. less than 0
means the max is an infinite distance
- Default Value:
- -1
The speed about the shockwave ripples out. The unit is pixel-per-second
- Default Value:
- 500
Sets the elapsed time of the shockwave. It could control the current size of shockwave.
The wavelength of the shockwave
- Default Value:
- 160
Inherited Properties
From class Filter
antialias FilterAntialias inherited
should the filter use antialiasing?
- Default Value:
- inherit
blendMode BLEND_MODES inherited overrides
Get the blend mode of the filter.
- Default Value:
- "normal"
blendRequired boolean inherited
Whether or not this filter requires the previous render texture for blending.
- Default Value:
- false
enabled boolean inherited
If enabled is true the filter is applied, if false it will not.
- Default Value:
- true
padding number inherited
The padding of the filter. Some filters require extra space to breath such as a blur. Increasing this will add extra width and height to the bounds of the object that the filter is applied to.
- Default Value:
- 0
resolution number inherited
The resolution of the filter. Setting this to be lower will lower the quality but increase the performance of the filter.
- Default Value:
- 1
From class Shader
compatibleRenderers number readonly inherited
A number that uses two bits on whether the shader is compatible with the WebGL renderer and/or the WebGPU renderer. 0b00 - not compatible with either 0b01 - compatible with WebGL 0b10 - compatible with WebGPU This is automatically set based on if a GlProgram or {@link GpuProgram} is provided.
An instance of the GL program used by the WebGL renderer
gpuProgram GpuProgram inherited
An instance of the GPU program used by the WebGPU renderer
resources Record<string, any> inherited
A record of the resources used by the shader.
Inherited Methods
From class Filter
apply (filterManager, input, output, clearMode) void inherited
Applies the filter
Name | Type | Description |
---|---|---|
filterManager |
FilterSystem |
The renderer to retrieve the filter from |
input |
core |
The input render target. |
output |
RenderSurface |
The target to output to. |
clearMode |
boolean |
Should the output be cleared before rendering to it |
From class Shader
addResource (name, groupIndex, bindIndex) void inherited
Sometimes a resource group will be provided later (for example global uniforms) In such cases, this method can be used to let the shader know about the group.
Name | Type | Description |
---|---|---|
name |
string |
the name of the resource group |
groupIndex |
number |
the index of the group (should match the webGPU shader group location) |
bindIndex |
number |
the index of the bind point (should match the webGPU shader bind point) |
destroy (destroyPrograms) void inherited
Use to destroy the shader when its not longer needed. It will destroy the resources and remove listeners.
Name | Type | Default | Description |
---|---|---|---|
destroyPrograms |
boolean | false |
if the programs should be destroyed as well. Make sure its not being used by other shaders! |