When instantiating CRTFilter, you can pass a CRTFilterOptions object. The following options are available (defaults are provided if omitted):
| Option | Type | Default | Description |
|---|
curvature | number | 1 | Bend of interlaced lines; higher values increase bend. |
lineWidth | number | 1 | Width of the interlaced lines. |
lineContrast | number | 0.25 | Contrast of the interlaced lines. |
verticalLine | boolean | false | true for vertical lines, false for horizontal lines. |
time | number | 0 | Used for animating interlaced lines. |
noise | number | 0.3 | Opacity/intensity of the noise effect (range 0 to 1). |
noiseSize | number | 1 | The size of the noise particles. |
seed | number | 0 | A seed value for random noise generation. |
vignetting | number | 0.3 | Radius of the vignette effect; smaller values produce a smaller vignette. |
vignettingAlpha | number | 1 | Amount of opacity on the vignette. |
vignettingBlur | number | 0.3 | Blur intensity of the vignette. |
const options: CRTFilterOptions = {
curvature: 1.0,
lineWidth: 1.0,
lineContrast: 0.25,
verticalLine: false,
noise: 0.0,
noiseSize: 1.0,
vignetting: 0.3,
vignettingAlpha: 1.0,
vignettingBlur: 0.3,
time: 0.0,
seed: 0.0,
};
const filter = new CRTFilter(options);