How to use the react-native-redash.transformOrigin function in react-native-redash

To help you get started, we’ve selected a few react-native-redash examples, based on popular ways it is used in public projects.

github rainbow-me / rainbow / src / hooks / useTransformOrigin.js View on Github external
    transform => transformOriginUtil(offsetX, offsetY, transform),
    [offsetX, offsetY]
github wcandillon / can-it-be-done-in-react-native / season2 / bbc-iplayer / components / CircularSelection.tsx View on Github external
return (
    <View style={styles.container}>
      <LinearGradient
        style={{
          ...StyleSheet.absoluteFillObject,
          borderRadius: R,
          width: R * 2,
          height: R * 2,
          left: -(R - width / 2)
        }}
        colors={["#353637", "#161819", "#161819"]}
      />
      <Animated.View
        style={{
          ...StyleSheet.absoluteFillObject,
          transform: transformOrigin(0, R - height / 2, { rotateZ })
        }}
      >
        {channels.map((_, key) => {
          return (
            <View
              {...{ key }}
              style={{
                position: "absolute",
                top: 0,
                left: 0,
                transform: [
                  { translateX: cx },
                  { translateY: cy },
                  { rotateZ: `${key * segment}rad` },
                  { translateY: -cy }
                ]
github rainbow-me / rainbow / src / components / fab / DeleteButton.js View on Github external
const DeleteButton = enhance(({ deleteButtonScale }) => (
  <Animated.View
    style={{
      ...position.centeredAsObject,
      ...position.sizeAsObject(size),
      position: 'absolute',
      transform: transformOrigin(size / -8, size / -8, { scale: deleteButtonScale }),
    }}
  >
    <ShadowStack
      {...borders.buildCircleAsObject(size)}
      backgroundColor={colors.dark}
      shadows={FloatingActionButton.shadow}
    >
      <Icon
        color="white"
        name="close"
        size={12}
      />
    </ShadowStack>
  </Animated.View>
));