Filter

Filters can be applied in two ways:

  1. As an element attribute (filterAgent) - affects a specific image or video element
  2. As a standalone element (effect array with type: "Filter") - applies to the entire canvas

Both methods support optional region masking to limit the filter effect to a specific area.

PropTypeRequiredExampleValue RangeDescription
typestringtruePixelatePixelate | Ascii | CRT | Glitch | Bloom | RGB Split | Old Film | Dot | Emboss | Hatch | Basic Blur | Motion Blur | TiltShift | Zoom | Glow | Progressive blur | Noise | Vignette | Koda | Polaroid | Sepia | Lsd | Desaturate | Saturate | Duotone | Gradient Map | Hologram | 3D bulge/pinch | Waves | Mirror | Replicate | Noise Fill | Pattern | Reflective surface | Chromatic aberrationThe type of filter applied to the element.
optionsarrayfalse--An array of filter-specific options. Optional for filters with default values.
regionobjectfalse--Optional region configuration to limit the filter effect to a specific area of the canvas or element. See the Region documentation for details.

Filter Categories

Stylize

  • Pixelate: Pixelates the image with configurable block size (default: size: 8)
  • Ascii: Converts image to ASCII art (default: size: 8, color: 0xffffff, replaceColor: 0)
  • Dot: Halftone dot effect (default: scale: 120)
  • Emboss: Creates an embossed appearance (default: strength: 1.5)
  • Hatch: Cross-hatch drawing effect (default: density: 80)
  • Chromatic aberration: Color channel separation effect (default: offset: 0.005, angle: 0)

Blur

  • Basic Blur: Simple Gaussian blur (default: radius: 2)
  • Motion Blur: Directional motion blur (default: radius: 6, direction: 0)
  • TiltShift: Tilt-shift blur effect (default: radius: 4)
  • Zoom: Radial zoom blur (default: strength: 0.1)
  • Progressive blur: Graduated blur effect (default: strength: 1.0, direction: 0)

Distort

  • RGB Split: Separates RGB channels (default: offset: 0.0025)
  • Glitch: Digital glitch effect (default: slices: 5, offset: 0.02, direction: 0)
  • CRT: CRT monitor simulation (no parameters)
  • 3D bulge/pinch: 3D distortion effect (default: center: [0.5, 0.5], radius: 0.4, strength: 0.5)
  • Waves: Wave distortion (default: frequencyX: 10.0, frequencyY: 10.0, amplitudeX: 0.02, amplitudeY: 0.02)

Grading (Color Adjustment)

  • Sepia: Sepia tone effect
  • Saturate: Increases color saturation
  • Desaturate: Decreases color saturation (grayscale when fully applied)
  • Duotone: Two-color gradient mapping
  • Gradient Map: Maps luminance to custom color gradients
  • Hologram: Holographic visual effect
  • Koda, Polaroid, Lsd: Preset color grading styles

Effects

  • Bloom: Glow/bloom lighting effect
  • Glow: Neon glow effect
  • Noise: Film grain/noise overlay (default: amount: 0.1)
  • Vignette: Edge darkening effect (default: amount: 0.5, power: 2.0)

Composite (Multiple Filters Combined)

  • Old Film: Combines sepia, noise, and vignette for vintage film look

Misc

  • Mirror: Mirror reflection along an axis (default: axis: 0, position: 0.5)
  • Replicate: Tile/repeat the image (default: countX: 2.0, countY: 2.0)
  • Noise Fill: Procedural noise fill (default: scale: 10.0, intensity: 1.0, colorful: 0)
  • Pattern: Procedural pattern generation (default: scale: 10.0, patternType: 0)
  • Reflective surface: Simulates reflective materials (default: intensity: 0.5, roughness: 0.2)

Filter Application Order

When multiple effects are applied to an element, they are processed in this order:

  1. Tone adjustments (brightness, contrast, saturation, etc.)
  2. LUT (Lookup Table) color grading
  3. Filters (filterAgent)

Effects in the effect array are applied in order of their trackIndex and start time.

Examples

Filter as Element Attribute

Apply a filter directly to a specific element using the filterAgent property:

imageWithFilter.json
1{ 2"type": "", 3"width": 1920, 4"height": 1080, 5"fill": "#000000", 6"view": [ 7 { 8 "id": "6b91fbc5-a69c-4783-8216-395b8feac9b2", 9 "type": "Image", 10 "start": 0, 11 "duration": 5, 12 "trackIndex": 1, 13 "x": 0, 14 "y": 0, 15 "blendMode": "normal", 16 "anchorX": 1310.5, 17 "anchorY": 1965.5, 18 "rotation": 0, 19 "scaleX": 0.27473925209870265, 20 "scaleY": 0.27473925209870265, 21 "alpha": 1, 22 "skewX": 0, 23 "skewY": 0, 24 "keyframes": [], 25 "filterAgent": { 26 "type": "RGB Split" 27 }, 28 "externalUrl": "https://images.pexels.com/photos/30473423/pexels-photo-30473423.jpeg", 29 "ext": "jpeg" 30 } 31], 32"audio": [], 33"effect": [], 34"transition": [], 35"version": 0, 36"duration": 5 37} 38

Filter as Canvas Effect

Apply a filter to the entire canvas by adding it to the effect array:

canvasFilter.json
1{ 2"type": "", 3"width": 1920, 4"height": 1080, 5"fill": "#000000", 6"view": [ 7 { 8 "id": "6b91fbc5-a69c-4783-8216-395b8feac9b2", 9 "type": "Image", 10 "start": 0, 11 "duration": 5, 12 "trackIndex": 1, 13 "x": 0, 14 "y": 0, 15 "blendMode": "normal", 16 "anchorX": 1310.5, 17 "anchorY": 1965.5, 18 "rotation": 0, 19 "scaleX": 0.27473925209870265, 20 "scaleY": 0.27473925209870265, 21 "alpha": 1, 22 "skewX": 0, 23 "skewY": 0, 24 "keyframes": [], 25 "externalUrl": "https://images.pexels.com/photos/30473423/pexels-photo-30473423.jpeg", 26 "ext": "jpeg" 27 } 28], 29"audio": [], 30"effect": [ 31 { 32 "id": "87043853-c68d-4553-a7cb-6f4d503e9f17", 33 "start": 0, 34 "duration": 5, 35 "trackIndex": 0, 36 "filterAgent": { 37 "type": "Pixelate", 38 "options": [{ "key": "size", "value": 8, "min": 1, "max": 100 }] 39 }, 40 "type": "Filter" 41 } 42], 43"transition": [], 44"version": 0, 45"duration": 5 46} 47

Filter with Region Masking

Apply a filter only to a circular region in the center:

filterWithRegion.json
1{ 2"id": "87043853-c68d-4553-a7cb-6f4d503e9f17", 3"start": 0, 4"duration": 5, 5"trackIndex": 0, 6"filterAgent": { 7 "type": "Pixelate", 8 "options": [{ "key": "size", "value": 16 }], 9 "region": { 10 "type": "circle", 11 "enabled": true, 12 "invert": false, 13 "centerX": 0.5, 14 "centerY": 0.5, 15 "width": 0.4, 16 "height": 0.4, 17 "feather": 0.05 18 } 19}, 20"type": "Filter" 21} 22

Common Filter Parameters

Filter TypeOption KeyTypeDefaultDescription
Pixelatesizenumber8Pixel block size (1-100)
Asciisizenumber8Character size
Asciicolornumber0xffffffText color
AsciireplaceColornumber0Background replacement mode
Basic Blurradiusnumber2Blur radius
Motion Blurradiusnumber6Blur amount
Motion Blurdirectionnumber0Blur direction in radians
TiltShiftradiusnumber4Blur radius
Zoomstrengthnumber0.1Zoom blur intensity
Progressive blurstrengthnumber1.0Blur strength
Progressive blurdirectionnumber0Gradient direction
RGB Splitoffsetnumber0.0025Channel separation amount
Glitchslicesnumber5Number of glitch slices
Glitchoffsetnumber0.02Displacement amount
Glitchdirectionnumber0Glitch direction
Dotscalenumber120Dot pattern scale
Embossstrengthnumber1.5Emboss intensity
Hatchdensitynumber80Line density
Chromatic aberrationoffsetnumber0.005Aberration offset
Chromatic aberrationanglenumber0Aberration angle
3D bulge/pinchcenterarray[0.5, 0.5]Effect center [x, y]
3D bulge/pinchradiusnumber0.4Effect radius
3D bulge/pinchstrengthnumber0.5Distortion strength
WavesfrequencyXnumber10.0Horizontal wave frequency
WavesfrequencyYnumber10.0Vertical wave frequency
WavesamplitudeXnumber0.02Horizontal wave amplitude
WavesamplitudeYnumber0.02Vertical wave amplitude
Mirroraxisnumber0Mirror axis (0=horizontal, 1=vertical)
Mirrorpositionnumber0.5Mirror position (0-1)
ReplicatecountXnumber2.0Horizontal repetitions
ReplicatecountYnumber2.0Vertical repetitions
Noise Fillscalenumber10.0Noise pattern scale
Noise Fillintensitynumber1.0Noise intensity
Noise Fillcolorfulnumber0Color noise mode (0=grayscale, 1=color)
Patternscalenumber10.0Pattern scale
PatternpatternTypenumber0Pattern type index
Reflective surfaceintensitynumber0.5Reflection intensity
Reflective surfaceroughnessnumber0.2Surface roughness
Noiseamountnumber0.1Noise amount
Vignetteamountnumber0.5Vignette intensity
Vignettepowernumber2.0Vignette falloff

Note: Filters without configurable options (CRT, Sepia, Old Film, etc.) use their built-in defaults and don't require an options array.

Important Notes

  • Case Sensitivity: Filter type names are case-sensitive. Use exact names as listed above.
  • Option Format: Each option in the options array must have a key and value. The min and max properties are optional UI hints.
  • Composite Filters: Some filters like "Old Film" internally combine multiple effects and cannot be customized via options.
  • Performance: Complex filters (Bloom, Chromatic aberration, etc.) may impact rendering performance on lower-end devices.
  • Region Masking: When using region, the filter is only applied within the specified area. Set invert: true to apply the filter everywhere except the region.