Commit Graph

46 Commits

Author SHA1 Message Date
Krzysztof Magiera
faffa10318 Animate transforms 2019-05-03 21:08:54 +02:00
Krzysztof Magiera
54ec3f13b8 Animate zPosition 2019-05-03 20:56:58 +02:00
Krzysztof Magiera
b2fc9973e6 Animate bg color 2019-05-03 20:49:53 +02:00
Krzysztof Magiera
9b1ba6899b Clippin 2019-05-03 11:37:08 +02:00
Krzysztof Magiera
4f9702b22b Stashing moar work. 2019-04-19 18:52:44 +02:00
Krzysztof Magiera
e6228f64db Just playn 2019-04-10 22:17:59 +02:00
Krzysztof Magiera
7580879f44 Initial implementation of Transitions 2019-04-04 09:27:15 +02:00
Michał Osadnik
d406bdda83 Bump build.gradle and compileSdkVersion (#226) 2019-04-02 14:01:42 +02:00
Michał Osadnik
e6782cfd01 Bump to RN 0.59 (#224) 2019-04-02 13:30:03 +02:00
Michał Osadnik
25ee5056cb Add additional check for running clock for imperative snapTo (#197)
## Motivation
Issue has been described here https://github.com/kmagiera/react-native-reanimated/issues/182

Using imperative snapTo in `Interactable.View` sometimes didn't lead to any effect. 

## Changes
It was caused by a fact that clock was not running and therefore changes haven't been evaluated properly. If GH responsible for dragging hadn't beed activated, clock was not running and then snapping without dragging was expected to run  with clock stopped. 

Added extra condition for it.
2019-03-04 10:50:41 +01:00
Michał Osadnik
41fcf4b51b Bump RNGH (#189)
In new version of yarn integrity sum is dropped
2019-03-04 10:48:02 +01:00
Michał Osadnik
4408906731 Clear timeout if needed send event less often (#163)
I think it's more natural if animation do not perform so often. Once per second looks better imho and it's a better example of this library usage. 

Also, removed animations if "fetch" is finished
2019-02-05 12:23:43 +01:00
Michał Osadnik
fae1f1528a Fix detaching already detached nodes on evaluateOnce (#153)
## Motivation
I attach example illustrating this issue. The problem appears when we use `evaluateOnce` method (e.g. via `setValue`) for updating node which could be detached in the same time. 

## Changes
I observe I haven't deeply understood flow of reanimataed while writing this logic. Actually always node representing evaluation should not have children which has be informed about changes (it's pointless). In fact, always node has to be a child of these nodes, because we want to have these nodes attached (make them not sensitive for other detachments), because they states input for given node.
2018-12-21 14:56:23 +01:00
Alejandro
8899bc2910 fix(Example): add @babel/runtime dependency, fixes #124 (#125) 2018-10-24 09:51:38 +02:00
Krzysztof Magiera
b6c46cad76 Fix example app start command to use metro config instead of cli.config.js 2018-10-12 16:13:11 +02:00
Lorenzo Sciandra
2ee7c5da96 Update Example folder to RN0.57 (#117)
👋

This morning I tried testing the Examples via Snack, but since it wasn't working I tried to have them work in my local folder... and well, I ended up wanting to test with RN0.57 😅

I didn't have to modify anything about the "main" lib, but I thikn it would be good to -as a separate PR- try to update it too to newer versions of both JS and Native sides.

The changes to the gradle files have been done [following this](https://github.com/ncuillery/rn-diff/compare/rn-0.55.4...rn-0.57.0) comparison map.

I've tested it with both iOS simulator and an Android device and it works fine on both (aside from a crash I'll report separately if I can manage to repro "outside" of the Examples)
2018-10-11 10:52:42 +02:00
Michał Osadnik
c931e9d2cf Alter movable example with pan rotate and zoom (#111)
This example is a little bit more complex and fancy
2018-10-08 09:29:09 +02:00
Michał Osadnik
c693ab61bd Fix interpolate example on Android (#113) 2018-10-08 09:27:51 +02:00
Michał Osadnik
3bbf8a0fed Make Animated Value persist its value after reattaching (#87)
When value gets detached from all component it can be still kept in memory and attached to some other component at later time. But because we don't know when JS reference is dropped we need to delete native counterpart of the value when it gets detached. This has led to a situation in which the value was reinstantiated on the native site. In that case if the value has changed we expect it to persist that changes when it gets attached again. This wasn't happening and each time the value was instantiated we'd always use the initial value.

With this change we are solving that issue by querying the value right before we detach the native node and then we use that value to update config such that next time when it gets instantiated it uses updated value instead of the initial one.
2018-09-28 13:45:51 +02:00
Michał Osadnik
b7241bca22 Native event as a function (#83)
## Motivation 
I found it pretty fancy to write `nativeEvent` (or some field of `nativeEvent`) as a function which is evaluating on each event's frame.

## Changes
Because it must be done fully natively I do not relate `nativeEvent` function with  any View but use list of `AlwaysNodes` instead, which may seems to be similar to `Animated.Code` and behave conceptually in the same way.
On executing code it performs "evalution" which fill required (by function) fields of `nativeEvent` by `Animated.Value`s and connect it to `AlwaysNode`. I decided to use `Proxy` to manage it, but it is not supported currently by Android because of anscient version of JSC, which is going to be replaced soon (kindly ping @pmlocek), so I have done some kind of case-specic polyfill.
merge firstly: https://github.com/kmagiera/react-native-gesture-handler/pull/287
2018-09-28 13:33:03 +02:00
Michał Osadnik
7a8885c871 Make it possible to develop without copying library to node_modules (#105)
Inspired by: https://github.com/callstack/react-native-paper/tree/master/example
and https://blog.callstack.io/adding-an-example-app-to-your-react-native-library-d23b9741a19c

cc: @satya164 😻, thanks!
2018-09-25 09:36:41 +02:00
Serge Lebedev
a92e0c0ef7 Fix main screens accessibility in Example (#107) 2018-09-24 12:35:23 +02:00
Krzysztof Magiera
35c1cc34cb Create README.md 2018-09-21 16:24:23 +02:00
Krzysztof Magiera
067b440b33 Interactable.View implementation based on reanimated and gesture handler (#106)
This PR adds an implementation of Interactable.View to examples folder. The implementation is pretty feature full with the exception of alertAreas that I haven't had time yet to work on.
2018-09-21 16:18:27 +02:00
Michał Osadnik
9b355809f8 Update index.js (#100) 2018-09-14 09:59:26 +02:00
Michał Osadnik
59eb8108b5 Animated code (#77)
## Motivation
Logic of evaluation was strictly connected with views but it should not be like because some logic could be abstracted from views

## Changes 
Add `Animated.Code` which behaves like view, but indeed is not related to any layout.
2018-08-20 19:09:51 +02:00
Michał Osadnik
06b03a8461 Use strings as value (#53) 2018-08-16 17:09:13 +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
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
Krzysztof Magiera
369f7ef430 Add secon animation to start example 2018-08-02 16:09:53 +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
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
Krzysztof Magiera
1701f3947f Update example app to use RN 0.56 2018-07-10 11:13:32 +02:00
Dylan Vann
f607cebcd4 Configure jest and add tests for interpolate. (#23) 2018-06-10 19:52:09 +02:00
Krzysztof Magiera
11a25ebbd9 Fix interpolate examples 2018-06-08 14:27:51 +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
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
osdnk
cd86827daf Fix 2018-05-23 17:03:49 +02:00
osdnk
13b1b1d268 Update package.json and change string ids to React.createRef 2018-05-22 15:28:48 +02:00
Krzysztof Magiera
3571bbdd1c Add finger tracing 2018-05-17 10:53:15 +02:00
Krzysztof Magiera
97e8ddbc94 Use updateContext on iOS and implement updating non-native props 2018-04-25 16:55:34 +02:00
Krzysztof Magiera
78fc481867 Bump react versions in example app 2018-04-25 16:54:28 +02:00
Krzysztof Magiera
cb0a2680a8 Initial commit. 2018-04-25 11:22:32 +02:00