PERGOLA LOGO

Filters Library

A filter definition is a function –property of the pergola.filter object (defined in lib/filters.js). The function first creates a unique ID based on the function name and values, taking into account the overriding values, and if it doesn't already exist in the document it creates and appends the filter element to pergola.defs. Returns the URI string.

The filter functions expect an optional object specifying filter attributes to override the default values. The property names use SVG vocabulary, and names containing illegal characters for JavaScript variable names are specified using the string notation, e.g. "flood-opacity". A numeric value can be specified as number or string. Because of the different types of fe components used to fabricate a filter, the expected attributes are not necessarily the same across the functions.

See the SVG filters specification for more descriptive explanations on filter attributes.

pergola.filter

pergola.filter.blur([object])

If object is specified it may define these filter attributes:

pergola.filter.specular([object])

If object is specified it may define these filter attributes:

Note that fePointLight is a filter component, not an attribute. If specified, it must define its three properties.

pergola.filter.noise([object])

If object is specified it may define these filter attributes:

Note that tableValues, If specified, must define its three properties.

pergola.filter.turbulence([object])

If object is specified it may define these filter attributes:

Note that tableValues, if specified, must define its three properties.