Skip to content

Commit

Permalink
reworded parts of the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 20, 2024
1 parent c7d39c3 commit 20e6519
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/src/sources-sprites.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ the PNG, there is a high DPI version available at `/sprite/<sprite_id>@2x.json`.
}
```

##### Coloring at runtime via Sprite Signed Distance Fields (SDFs)
##### Coloring at runtime via Signed Distance Fields (SDFs)

If you want to set the color of a sprite at runtime, you will need use the [Signed Distance Fields (SDFs)](https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf)-endpoints instead.
For example, maplibre does support the image being modified via the [`icon-color`](https://maplibre.org/maplibre-style-spec/layers/#icon-color) and [`icon-halo-color`](https://maplibre.org/maplibre-style-spec/layers/#icon-halo-color) properties.
SDFs have the significant downside of only allowing one color and are thus not the default.
If you want multiple colors, you will need to layer icons.
If you want to set the color of a sprite at runtime, you will need use the [Signed Distance Fields (SDFs)](https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf)-endpoints.
For example, maplibre does support the image being modified via the [`icon-color`](https://maplibre.org/maplibre-style-spec/layers/#icon-color) and [`icon-halo-color`](https://maplibre.org/maplibre-style-spec/layers/#icon-halo-color) properties if using SDFs.

The following to APIs are available:
SDFs have the significant **downside of only allowing one color**.
If you want multiple colors, you will need to layer icons on top of each other.

The following APIs are available:
- `/sprite/sdf/<sprite_id>.json` for getting a sprite index as SDF and

Check failure on line 53 in docs/src/sources-sprites.md

View workflow job for this annotation

GitHub Actions / Build Docs

Lists should be surrounded by blank lines

docs/src/sources-sprites.md:53 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- `/sprite/sdf/<sprite_id>.jso..."] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md032.md
- `/sprite/sdf/<sprite_id>.png` for getting sprite PNGs as SDF

Expand Down

0 comments on commit 20e6519

Please sign in to comment.