Skip to content

Instantly share code, notes, and snippets.

@reime005
Created September 6, 2020 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reime005/15c13df8219746df4f49001b3258f442 to your computer and use it in GitHub Desktop.
Save reime005/15c13df8219746df4f49001b3258f442 to your computer and use it in GitHub Desktop.
const imageStyle = useAnimatedStyle(() => {
// ...
// x/y are based on "useSharedValue"
// and assigned in PanGestureHandler
return {
transform: [
{ translateX: x.value },
{ translateY: y.value },
{ rotateZ: `${rotateZ}deg` },
],
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment