https://linear.app/comm/issue/ENG-8152/convert-cameramodal-to-reanimated-2-syntax
The code before migration looks complicated, here is what it does:
- it basically animated a circle (scale and opacity) that appears after you tap on camera screen
- first it runs a scale spring animation which is infinite (damping = 0)
- after two "pulses" (scale goes 0.75 -> 1.2 -> 0.75 -> 1.2) spring animation is stopped
- there is a delay of 400ms
- then there is a timing animation for 500ms, scale goes 1.2 -> 0, opacity goes 1 -> 0
Also animation can be stopped at any time.
It also turns out the animation is broken on master branch. Calling setAutoFocusPointOfInterest in focusOnPoint causes the
component to rerender and the animation is stopped. Migrating to V2 API solves the problem.
Before fix:
After fix:
Depends on D14233