Skip to content

Instantly share code, notes, and snippets.

@tejas77
Created June 16, 2020 03:01
Show Gist options
  • Save tejas77/a532200c1aac70d874f772a135dc97cc to your computer and use it in GitHub Desktop.
Save tejas77/a532200c1aac70d874f772a135dc97cc to your computer and use it in GitHub Desktop.
Shadow Element of Tower Application
const { height, width } = Dimensions.get("window");
const centerX = width / 2, centerY = height / 2;
//....
const shadowElement = (
<>
<Line
x1={centerX}
y1={centerY}
x2={centerX - width / 4}
y2={centerY - height / 4}
stroke="#555"
strokeWidth="60"
/>
<Circle
cx={centerX - width / 4}
cy={centerY - height / 4}
r="30"
fill="#555"
/>
</>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment