Skip to content

Commit

Permalink
📝 Docs: README - Update CustomFilterViewExample01
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Dec 24, 2024
1 parent ab7723e commit e6776cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ Please see the [examples directory](example/src/examples) for the full list of e

| Notes |
| :----------------------------------------------------------- |
| 1️⃣ — The `CustomFilterView.currentFilters` prop accepts an array of `LayerFilterConfig` object. <br/>This object will be used to create and configure the `UIVisualEffectView` backdrop effects. |
| 2️⃣ — `LayerFilterConfig` object is an tagged union type, with the `LayerFilterConfig.filterName` property being the "discriminant" that separates all the possible combinations.<br><br>The `filterName` defines what filter to use, and different types of filters have different inputs to control the look/behavior of the filter.<br><br>In the example below, we pass 4 filters to the `CustomFilterView.currentFilters` prop: `variadicBlur` (variable blur), `colorBlackAndWhite` (color monochrome), `brightenColors` (color brightness), and `contrastColors` (color contrast).<br><br>📝 **Note**: The names for the filter are a bit weird because we can't use the internal filters directly. Please see [`LayerFilterTypeName.swift`](https://github.com/dominicstop/VisualEffectBlurView/blob/1ac12b049e53ace5dce4ce46870024d5f98b052a/Sources/ObjectWrappers/LayerFilterWrapper/LayerFilterTypeName.swift) for the implementation details. |
| TBA |
| 1️⃣ — The `CustomFilterView.currentFilters` prop accepts a `CustomFilterConfig` object; this object is used create and configure the underlying `UIVisualEffectView` effects.<br><br>The `CustomFilterConfig` is comprised of several properties, but for this example we will be focusing on the `CustomFilterConfig.backgroundFilters` property (since it's required). |
| 2️⃣ — The `CustomFilterConfig.backgroundFilters` property accepts an array of `LayerFilterConfig` object; the "filter entries" in this array defines what filters to use for the `UIVisualEffectView`'s backdrop layer.<br><br>The backdrop layer is special in that it is able to composite views that are behind it, and apply filters to it.<br><br>📝 **Note**: The "quality" of the composited views can be controlled via the `CustomFilterView.backgroundLayerSamplingSizeScale` prop; Setting this to `2.0` increases the sampling size, but at the cost of performance (use with caution). |
| 3️⃣ — The `LayerFilterConfig` object is an tagged union type, with the `LayerFilterConfig.filterName` property being the "discriminant" that separates all the possible combinations.<br><br>The `filterName` defines what type of filter to use; different types of filters have different inputs to control the look/behavior of the desired effect.<br><br>In the example below, we define 4 `LayerFilterConfig` entries in the array for the `CustomFilterConfig.backgroundFilters` property: `variadicBlur` (variable blur), `colorBlackAndWhite` (color monochrome), `brightenColors` (color brightness), and `contrastColors` (color contrast).<br><br>📝 **Note**: The names for the filter are a bit weird because we can't use the internal filters directly. Please see [`LayerFilterTypeName.swift`](https://github.com/dominicstop/VisualEffectBlurView/blob/1ac12b049e53ace5dce4ce46870024d5f98b052a/Sources/ObjectWrappers/LayerFilterWrapper/LayerFilterTypeName.swift) for the implementation details. |

<br>

Expand Down

0 comments on commit e6776cb

Please sign in to comment.