react-native/Libraries/NativeAnimation/Nodes
Kevin Gozali 0a0dd30c6a Introduced AnimatedDivision
Summary:
Combining 2 animated values via addition, multiplication, and modulo are already supported, and this adds another one: division.
There are some cases where an animated value needs to invert (1 / x) another animated value for calculation. An example is inverting a scale (2x --> 0.5x), e.g.:

```
const a = Animated.Value(1);
const b = Animated.divide(1, a);

Animated.spring(a, {
  toValue: 2,
}).start();
```

`b` will then follow `a`'s spring animation and produce the value of `1 / a`.

The basic usage is like this:

```
<Animated.View style={{transform: [{scale: a}]}}>
  <Animated.Image style={{transform: [{scale: b}]}} />
<Animated.View>
```

In this example, the inner image won't get stretched at all because the parent's scaling gets cancelled out.

Also added this to native animated implementation.

Reviewed By: foghina, mmmulani

Differential Revision: D3922891

fbshipit-source-id: 32508956c4b65b2deb7574d50a10c85b4809b961
2016-09-26 16:43:51 -07:00
..
RCTAdditionAnimatedNode.h Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTAdditionAnimatedNode.m Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTAnimatedNode.h Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTAnimatedNode.m Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTAnimationDriverNode.h Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTAnimationDriverNode.m Harmonize native animation callback args with JS 2016-07-05 11:13:23 -07:00
RCTDiffClampAnimatedNode.h Add support for DiffClamp node 2016-09-06 15:43:35 -07:00
RCTDiffClampAnimatedNode.m Add support for DiffClamp node 2016-09-06 15:43:35 -07:00
RCTDivisionAnimatedNode.h Introduced AnimatedDivision 2016-09-26 16:43:51 -07:00
RCTDivisionAnimatedNode.m Introduced AnimatedDivision 2016-09-26 16:43:51 -07:00
RCTInterpolationAnimatedNode.h Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTInterpolationAnimatedNode.m InterpolationAnimatedNode fromDoubleArray should support the string type 2016-08-05 02:58:30 -07:00
RCTModuloAnimatedNode.h Modulo node 2016-08-31 14:43:43 -07:00
RCTModuloAnimatedNode.m Modulo node 2016-08-31 14:43:43 -07:00
RCTMultiplicationAnimatedNode.h Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTMultiplicationAnimatedNode.m Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTPropsAnimatedNode.h Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTPropsAnimatedNode.m Add support for native animations on iOS 2016-06-09 10:43:51 -07:00
RCTStyleAnimatedNode.h Maintain transform order 2016-08-02 14:28:29 -07:00
RCTStyleAnimatedNode.m Maintain transform order 2016-08-02 14:28:29 -07:00
RCTTransformAnimatedNode.h Maintain transform order 2016-08-02 14:28:29 -07:00
RCTTransformAnimatedNode.m Add transform support for native animated on Android 2016-08-07 00:58:36 -07:00
RCTValueAnimatedNode.h Value offsets 2016-09-26 10:28:35 -07:00
RCTValueAnimatedNode.m Value offsets 2016-09-26 10:28:35 -07:00