react-native-fast-shadow
Advanced tools
Comparing version
{ | ||
"name": "react-native-fast-shadow", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Fast and high quality Android shadows for React Native", | ||
@@ -5,0 +5,0 @@ "main": "lib/commonjs/index", |
# 🌖 react-native-fast-shadow | ||
[](https://www.npmjs.com/package/react-native-fast-shadow) | ||
**Fast and high quality** Android shadows for React Native | ||
@@ -62,3 +64,3 @@ | ||
``` | ||
## How it works under the hood | ||
@@ -70,3 +72,3 @@ | ||
3. The drawable is then converted to a [NinePatchDrawable](https://developer.android.com/reference/android/graphics/drawable/NinePatchDrawable) to ensure that corners of the shadow won't be distorted when the view is resized. This way, we can generate only a small shadow drawable and **reuse it** for all views with the same border and blur radii. | ||
4. Finally, the drawable is rendered behind the view content: it is tinted with `shadowColor`/`shadowOpacity` and offseted according to `shadowOffset` | ||
4. Finally, the drawable is rendered behind the view content: it is tinted with `shadowColor`/`shadowOpacity` and offseted according to `shadowOffset` | ||
@@ -73,0 +75,0 @@ **How NinePatchDrawable works** (notice how the corners are not streched when the drawable is resized): |
Sorry, the diff of this file is not supported yet
50559
0.03%92
2.22%755
-0.66%