Commit Graph

71 Commits

Author SHA1 Message Date
Freddy Harris
5a0cc182e8 Update README.md
Co-Authored-By: osdnk <micosa97@gmail.com>
2019-03-28 15:23:41 +01:00
Michał Osadnik
c3bc5bb891 Update delay.js 2018-09-20 13:20:23 +02:00
Michał Osadnik
4682d4fd34 Update README.md 2018-08-14 11:51:20 +02:00
Michał Osadnik
1df056107d Merge branch 'master' into delay-node 2018-08-14 11:48:36 +02:00
Michał Osadnik
d54f70ebf6 Update layout props without crossing JS bridge (#45)
* Add handling od iOS and Android

* Fix style

* Delete proder.sh

* Fix example

* staph

* example

* example

* Improve iOS

* Optimize android

* Add whitelist  📎 📊

* Update REAPropsNode.m

* Fix example

* Update App.js

* Update ConfigHelper.js

* Works

* Update REANodesManager.h

* Add files

* Mor pr issues

* Update Android things

* Revert "Update Android things"

This reverts commit 255bb74

* PR

* Update UIManagerUtils.java

* rename

* rename

* Update UIManagerUtils.java

* Update UIManagerUtils.java

* PR

* Pr stuff

* Update UIManagerReanimatedHelper.java

* revert CAC

* Update Android things

(cherry picked from commit 255bb74)

* Update REAPropsNode.m

* Update ConfigHelper.js

* Update NodesManager.java

* js props

* Update REANodesManager.m

* simplify

* dead

* style

* style

* style

* Update Animated.js

* Update UIManagerReanimatedHelper.java

* Update REANodesManager.m
2018-08-14 11:41:30 +02:00
Michał Osadnik
d6063d54ec Update build.gradle 2018-08-14 10:18:05 +02:00
Michał Osadnik
7ea9138eb9 Delete EvalContext.java 2018-08-14 10:17:52 +02:00
osdnk
e245648c80 Add delay node 2018-08-14 10:17:03 +02:00
Birkir Rafn Guðjónsson
f68b67d50e Add .podspec to package.json (#65) 2018-08-13 18:52:46 +02:00
Raúl Gómez Acuña
b3f805e193 Add new derived nodes: floor and ceil (#66) 2018-08-13 18:50:55 +02:00
osdnk
65dd7c2b91 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	Example/android/app/build.gradle
2018-08-11 23:26:29 +02:00
osdnk
68477e4617 Merge branch 'master' of /Users/osdnk/work/RNR/react-native-reanimated with conflicts. 2018-08-11 23:26:22 +02:00
Jeromy Maligie
0594edc36c Update TypeScript definitions (#63) 2018-08-11 20:08:28 +02:00
Krzysztof Magiera
438bb676b2 Fix evaluation logic to visit nodes that get marked as updated during eval loop.
After start/stop API landed we started evaluating graph of nodes in topological order. In order for that to work we needed to create a stack of final node to be evaluated and run it in particular order. What might happen during evaluation is that some new nodes can be marked as updated (e.g. we use set node to update a value in a different nodes subtree). In such a case we want to update views that newly marked node may have impact on.

Here we also changed Android to use ArrayList instead of SparseArray for the list of updated nodes. This is to make it consistent with iOS implementation where we use a regular list too. In practice it won't happen too often that a view is added to a queue several times. Even if that happens, we still will evaluate the node at most once per frame.
2018-08-08 11:23:31 +02:00
Krzysztof Magiera
28910e18f9 Fix Example app Android build settings 2018-08-08 11:21:59 +02:00
Michał Osadnik
e881481f5d bump compileSdkVersion in Example (#56)
* Update build.gradle

* Update build.gradle
2018-08-06 13:49:49 +02:00
Cameron Knight
076e2b2d32 Add typescript definitions (#51)
* Add typescript definitions

* Update typescript definition based on PR comments

* Update react-native-reanimated.d.ts
2018-08-06 10:30:35 +02:00
Cameron Knight
22e0f221f8 Color alpha should work with AnimatedNode (#50)
This enables `color` to work in the event that the `alpha` value for a color is a derived node rather than explicitly an `AnimatedValue`
2018-08-05 15:43:57 +02:00
Cameron Knight
a4d6e11902 Use strict equals to compare animation values (#46) 2018-08-03 17:42:47 +02:00
Raúl Gómez Acuña
60817e1e11 Update diffClamp.js (#47)
Fixing default imports
2018-08-03 17:41:38 +02:00
Krzysztof Magiera
9e93addf4c Document 2018-08-02 18:58:21 +02:00
Krzysztof Magiera
369f7ef430 Add secon animation to start example 2018-08-02 16:09:53 +02:00
Krzysztof Magiera
330b983b42 Small cleanup of start/stop API implementation 2018-08-02 16:09:53 +02:00
Krzysztof Magiera
f14ab827ba Little cleanup of start/stop API implementation 2018-08-01 19:21:17 +02:00
Krzysztof Magiera
c9f2b77bcc Merge branch 'master' of github.com:kmagiera/react-native-reanimated 2018-08-01 19:01:18 +02:00
Michał Osadnik
01ccea7b3c Add start/stop api (#18)
* Add start api on iOS and struggle to do it on Android 🙌

* Why don't you wanna work 🌝 ?

* Consider crucial

* Well, it might be the issue

* Fix memory leaks

* Make it topological on Android

* Make it topological on iOS as well 🎉

* Change queue to stack

* Style issue

* Names style

* Dummy -> AlwaysEvaluative

* Make it workable for stopping as well

* Add { finished } callback ☑️

* Remove dummy code

* Remane again

* Always

* Remove dummy

* Fix merge issue

* Add zero

* Add delay

* Add readme

* Optimize imports

* Remove unused imports:

* Add tests and fix their consequences

* Styles

* Fix example

* Add sequence, fix delays

* Unused imports

* Unused imports

* Fix tests

* Fix delay

* Change seq system

* Useless stuff

* Useless stuff

* Make it more elegant

* Fix imports

* Fix readme

* Add setValue

* Add parallel

* Fix PR issues

* Fix PR issues

* Fix PR issues

* Fix PR issues

* Fix PR issues

* Simplify delay

* cleanup

* cleanup

* seqq

* pr

* remove delay

* remove delay

* remove delay

* remove delay

* Fix tests

* Fix stop

* Add comment

* rename

* tests wip

* Fix tests

* Fix tests

* wish to make it work some day

* Moar tests

* Remove dummy tests

* Moar js fixes

* android fixed

* ios fixes

* Update rm

* rev tim

* rem deps

* rem imports

* Moarrr testzzz

* line

* Testss

* rmn

* rm empty line

* rnm

* spr

* cmt

* Tests

* style

* sop line

* Fix tests

* Fix test

* fix fix fix

* fix fix fix

* rename

* Fix tests

* simplify

* Add comment

* Add comment

* Add comment

* fixx

* Fix docs

* enter

* fix docs

* fix

* change logic

* mock in all rolling in the tests 🙋

* Fix

* Add one more test

* pos

* current return

* add child

* rename

* rename

* Protocol

* rnm

* Fix tests

* Fix another test

* Fix yet another test

* Rename

* Fix tests

* ``

* detach

* Moar tests

* Fix detaching

* Update REAAlwaysNode.h
2018-08-01 19:00:58 +02:00
Krzysztof Magiera
4ce435c93f Merge branch 'master' of github.com:kmagiera/react-native-reanimated 2018-08-01 18:56:17 +02:00
Michał Osadnik
7fae9e2891 Chat heads example (#41)
* make spring moar like Animated

* Add chat head example

* Fix heads

* Revert
2018-07-20 14:30:40 +02:00
Serge Lebedev
938e1ca4dc Fix typos in README (#39) 2018-07-17 14:51:17 +02:00
Krzysztof Magiera
29edd1c1b6 Bump version -> alpha.5 2018-07-10 11:14:25 +02:00
Krzysztof Magiera
cc4ab7fbe7 Update createAnimatedComponent to be compatible with react 16.4 changes 1.0.0-alpha.5 2018-07-10 11:14:01 +02:00
Krzysztof Magiera
1701f3947f Update example app to use RN 0.56 2018-07-10 11:13:32 +02:00
Michał Osadnik
c48bbd1d26 Fix freezing initalized value in AnimatedNode (#30)
* Fix freezing initalized in AnimatedNode

* Update AnimatedNode.js
2018-06-25 08:56:26 +02:00
Dylan Vann
f607cebcd4 Configure jest and add tests for interpolate. (#23) 2018-06-10 19:52:09 +02:00
Krzysztof Magiera
05c92a777b Bump version -> alpha.4 2018-06-08 18:21:28 +02:00
Krzysztof Magiera
11a25ebbd9 Fix interpolate examples 2018-06-08 14:27:51 +02:00
Krzysztof Magiera
6cf7234389 Handle empty nodes and convertable types to match iOS impl behavior (#24)
I found that Android reanimated code that runs on iOS would often crash because of nodes being used and not registered. This seems to be a quite frequent usecase that some nodes are created and used e.g. in "set" statement but because of the way views are configured they may not be attached to the view hierarchy and hence missing from native registry. 
Obj-c handles that case gracefully as all methods can be called on nullable objects. This is not the case in Java, and this PR attempts to mitigate that issue.
2018-06-08 14:24:09 +02:00
Krzysztof Magiera
881990b548 During rerender try to reuse prop, style, transform nodes when possible (#22)
When reanimated component gets re-rendered we used to create new Prop node which in turn created Style and Transform node if present.
This turns out to be a huge waste of resources as new nodes would generate additional bridge traffic while they often represent the same prop mapping.

We now extract prop, style and transform node configuration which uniquely represents node behavior and try to match that with node used previously. If config matches we reuse the node instead of creating a new one.

This also fixes #13
2018-06-08 13:58:27 +02:00
Krzysztof Magiera
46eac7a492 Fix issue with transform config being shared between all nodes (#25) 2018-06-08 09:45:54 +02:00
Dylan Vann
ad8b0cf534 Interpolate method, input validation, linting, refactoring. (#17)
Interpolate validations are taken from `Animated`.
2018-06-07 20:24:48 +02:00
Michał Osadnik
401227f8f1 Update package.json (#20) 2018-06-04 10:33:50 +02:00
Krzysztof Magiera
c9103b2d94 Bump version -> alpha.3 1.0.0-alpha.3 2018-06-01 13:52:18 +02:00
Krzysztof Magiera
6b19cde018 Add round and color nodes (#15)
This PR adds new "round" and "color" nodes.

Color nodes can be used to map to color props in view (e.g. backgroundColor)
Round is required for the color math to function properly (each color component needs to be an integer).

Added demo app where you can pan view around that changes color depending on the position on HSV palette.
2018-06-01 13:51:27 +02:00
Dylan Vann
b9ba694ace Add interpolate function from kmagiera with example. [WIP] (#11)
Interpolate function from https://github.com/kmagiera/react-native-reanimated/issues/10#issuecomment-392066106 with extrapolation handling, examples, and documentation.

Closes #10 .
2018-06-01 08:14:44 +02:00
Michał Osadnik
8d3ece3356 Add iPad support in Example app 🍎 (#14) 2018-05-31 09:55:36 +02:00
Michał Osadnik
3821486010 Fix typo (#12)
* Update README.md

* Update README.md
2018-05-29 13:18:31 +02:00
Krzysztof Magiera
e6c316eae5 Merge pull request #9 from kmagiera/react-create-ref
Update package.json and change string ids to React.createRef
2018-05-23 19:11:16 +02:00
osdnk
cd86827daf Fix 2018-05-23 17:03:49 +02:00
Krzysztof Magiera
ac9c489707 Merge pull request #8 from kmagiera/fix-typos
Fix typos
2018-05-22 18:51:01 +02:00
osdnk
13b1b1d268 Update package.json and change string ids to React.createRef 2018-05-22 15:28:48 +02:00