react-native-reanimated 3.9.0-rc.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/cpp/Fabric/ShadowTreeCloner.cpp +2 -1
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +11 -4
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +5 -3
- package/apple/REAModule.mm +14 -29
- package/apple/REANodesManager.mm +7 -6
- package/lib/module/Animated.js.map +1 -1
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/animationBuilder.js.map +1 -1
- package/lib/module/createAnimatedComponent/InlinePropManager.js +2 -2
- package/lib/module/createAnimatedComponent/InlinePropManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js +4 -4
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.web.js.map +1 -1
- package/lib/module/createAnimatedComponent/PropsFilter.js +5 -5
- package/lib/module/createAnimatedComponent/PropsFilter.js.map +1 -1
- package/lib/module/createAnimatedComponent/commonTypes.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +33 -33
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/createAnimatedComponent/getViewInfo.js +2 -2
- package/lib/module/createAnimatedComponent/getViewInfo.js.map +1 -1
- package/lib/module/createAnimatedComponent/index.js.map +1 -1
- package/lib/module/createAnimatedComponent/setAndForwardRef.js +4 -5
- package/lib/module/createAnimatedComponent/setAndForwardRef.js.map +1 -1
- package/lib/module/createAnimatedComponent/utils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/mock.js +3 -8
- package/lib/module/mock.js.map +1 -1
- package/lib/module/propsAllowlists.js.map +1 -1
- package/lib/module/reanimated2/Bezier.js.map +1 -1
- package/lib/module/reanimated2/Colors.js +4 -11
- package/lib/module/reanimated2/Colors.js.map +1 -1
- package/lib/module/reanimated2/Easing.js +3 -7
- package/lib/module/reanimated2/Easing.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +3 -3
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.web.js.map +1 -1
- package/lib/module/reanimated2/PlatformChecker.js +1 -0
- package/lib/module/reanimated2/PlatformChecker.js.map +1 -1
- package/lib/module/reanimated2/PropAdapters.js +1 -1
- package/lib/module/reanimated2/PropAdapters.js.map +1 -1
- package/lib/module/reanimated2/PropsRegistry.js.map +1 -1
- package/lib/module/reanimated2/Sensor.js +2 -2
- package/lib/module/reanimated2/Sensor.js.map +1 -1
- package/lib/module/reanimated2/SensorContainer.js +2 -2
- package/lib/module/reanimated2/SensorContainer.js.map +1 -1
- package/lib/module/reanimated2/UpdateLayoutAnimations.js.map +1 -1
- package/lib/module/reanimated2/UpdateProps.js.map +1 -1
- package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -1
- package/lib/module/reanimated2/WorkletEventHandler.js +74 -31
- package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -1
- package/lib/module/reanimated2/animation/clamp.js.map +1 -1
- package/lib/module/reanimated2/animation/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/decay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/index.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/rigidDecay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/rubberBandDecay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/utils.js.map +1 -1
- package/lib/module/reanimated2/animation/delay.js.map +1 -1
- package/lib/module/reanimated2/animation/index.js.map +1 -1
- package/lib/module/reanimated2/animation/repeat.js +1 -6
- package/lib/module/reanimated2/animation/repeat.js.map +1 -1
- package/lib/module/reanimated2/animation/sequence.js +1 -5
- package/lib/module/reanimated2/animation/sequence.js.map +1 -1
- package/lib/module/reanimated2/animation/spring.js.map +1 -1
- package/lib/module/reanimated2/animation/springUtils.js +8 -10
- package/lib/module/reanimated2/animation/springUtils.js.map +1 -1
- package/lib/module/reanimated2/animation/styleAnimation.js +5 -4
- package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
- package/lib/module/reanimated2/animation/timing.js.map +1 -1
- package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js +1 -2
- package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js.map +1 -1
- package/lib/module/reanimated2/animation/util.js.map +1 -1
- package/lib/module/reanimated2/commonTypes.js +2 -0
- package/lib/module/reanimated2/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/component/FlatList.js +1 -0
- package/lib/module/reanimated2/component/FlatList.js.map +1 -1
- package/lib/module/reanimated2/component/Image.js +1 -0
- package/lib/module/reanimated2/component/Image.js.map +1 -1
- package/lib/module/reanimated2/component/LayoutAnimationConfig.js +1 -0
- package/lib/module/reanimated2/component/LayoutAnimationConfig.js.map +1 -1
- package/lib/module/reanimated2/component/PerformanceMonitor.js +3 -4
- package/lib/module/reanimated2/component/PerformanceMonitor.js.map +1 -1
- package/lib/module/reanimated2/component/ScrollView.js +1 -0
- package/lib/module/reanimated2/component/ScrollView.js.map +1 -1
- package/lib/module/reanimated2/component/Text.js +1 -0
- package/lib/module/reanimated2/component/Text.js.map +1 -1
- package/lib/module/reanimated2/component/View.js +1 -0
- package/lib/module/reanimated2/component/View.js.map +1 -1
- package/lib/module/reanimated2/core.js +2 -4
- package/lib/module/reanimated2/core.js.map +1 -1
- package/lib/module/reanimated2/errors.js +7 -8
- package/lib/module/reanimated2/errors.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.js +4 -4
- package/lib/module/reanimated2/fabricUtils.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.web.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +2 -2
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/index.js.map +1 -1
- package/lib/module/reanimated2/globals.d.js.map +1 -1
- package/lib/module/reanimated2/helperTypes.js.map +1 -1
- package/lib/module/reanimated2/hook/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/hook/index.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +1 -0
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +3 -4
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedProps.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedReaction.js +1 -0
- package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedRef.js +1 -1
- package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +3 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedStyle.js +3 -6
- package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js +3 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useEvent.js +4 -5
- package/lib/module/reanimated2/hook/useEvent.js.map +1 -1
- package/lib/module/reanimated2/hook/useFrameCallback.js +1 -2
- package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/useHandler.js +3 -1
- package/lib/module/reanimated2/hook/useHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useReducedMotion.js.map +1 -1
- package/lib/module/reanimated2/hook/useScrollViewOffset.js +14 -6
- package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useWorkletCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/utils.js.map +1 -1
- package/lib/module/reanimated2/index.js.map +1 -1
- package/lib/module/reanimated2/initializers.js +1 -5
- package/lib/module/reanimated2/initializers.js.map +1 -1
- package/lib/module/reanimated2/interpolateColor.js +2 -6
- package/lib/module/reanimated2/interpolateColor.js.map +1 -1
- package/lib/module/reanimated2/interpolation.js +1 -1
- package/lib/module/reanimated2/interpolation.js.map +1 -1
- package/lib/module/reanimated2/isSharedValue.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.js +3 -6
- package/lib/module/reanimated2/jestUtils.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.web.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js +4 -5
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/WebSensor.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/index.js +2 -2
- package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/react-native-web.d.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +4 -2
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +8 -11
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +8 -9
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js +1 -2
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +22 -22
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +22 -22
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +26 -26
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +6 -6
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +18 -18
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +18 -18
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +34 -34
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js +4 -6
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js +4 -6
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Bounce.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Fade.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Flip.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Lightspeed.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Pinwheel.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Roll.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Rotate.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Slide.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Stretch.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Zoom.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animationParser.js +0 -2
- package/lib/module/reanimated2/layoutReanimation/web/animationParser.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js +1 -2
- package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js +3 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js +6 -7
- package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/config.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js +2 -2
- package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/domUtils.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/web/domUtils.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Fading.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Linear.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Sequenced.web.js.map +1 -1
- package/lib/module/reanimated2/mappers.js +2 -4
- package/lib/module/reanimated2/mappers.js.map +1 -1
- package/lib/module/reanimated2/mockedRequestAnimationFrame.js.map +1 -1
- package/lib/module/reanimated2/mutables.js +2 -4
- package/lib/module/reanimated2/mutables.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/checkCppVersion.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.js +2 -4
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js +2 -2
- package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/index.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/measure.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/measure.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.web.js +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setGestureState.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setGestureState.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setNativeProps.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setNativeProps.web.js.map +1 -1
- package/lib/module/reanimated2/pluginUtils.js.map +1 -1
- package/lib/module/reanimated2/publicGlobals.js.map +1 -1
- package/lib/module/reanimated2/runtimes.js +11 -19
- package/lib/module/reanimated2/runtimes.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/RNScreensTurboModule.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/animationManager.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/index.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/presets.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/styleUpdater.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js +1 -1
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js.map +1 -1
- package/lib/module/reanimated2/shareableMappingCache.js.map +1 -1
- package/lib/module/reanimated2/shareables.js +2 -4
- package/lib/module/reanimated2/shareables.js.map +1 -1
- package/lib/module/reanimated2/threads.js +9 -34
- package/lib/module/reanimated2/threads.js.map +1 -1
- package/lib/module/reanimated2/valueSetter.js +1 -2
- package/lib/module/reanimated2/valueSetter.js.map +1 -1
- package/lib/module/reanimated2/valueUnpacker.js.map +1 -1
- package/lib/module/specs/NativeReanimatedModule.js.map +1 -1
- package/lib/typescript/reanimated2/WorkletEventHandler.d.ts +16 -9
- package/lib/typescript/reanimated2/component/LayoutAnimationConfig.d.ts +1 -1
- package/lib/typescript/reanimated2/component/PerformanceMonitor.d.ts +2 -1
- package/lib/typescript/reanimated2/hook/commonTypes.d.ts +5 -0
- package/lib/typescript/reanimated2/hook/useEvent.d.ts +2 -3
- package/lib/typescript/reanimated2/platform-specific/jsVersion.d.ts +1 -1
- package/package.json +18 -14
- package/plugin/build/plugin.js +7 -2
- package/src/createAnimatedComponent/PropsFilter.tsx +1 -1
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +29 -33
- package/src/reanimated2/WorkletEventHandler.ts +98 -39
- package/src/reanimated2/animation/styleAnimation.ts +8 -6
- package/src/reanimated2/hook/commonTypes.ts +9 -0
- package/src/reanimated2/hook/useEvent.ts +4 -4
- package/src/reanimated2/hook/useScrollViewOffset.ts +21 -5
- package/src/reanimated2/js-reanimated/JSReanimated.ts +6 -3
- package/src/reanimated2/layoutReanimation/web/animationsManager.ts +1 -1
- package/src/reanimated2/layoutReanimation/web/componentStyle.ts +3 -1
- package/src/reanimated2/layoutReanimation/web/componentUtils.ts +1 -1
- package/src/reanimated2/layoutReanimation/web/createAnimation.ts +2 -2
- package/src/reanimated2/platform-specific/jsVersion.ts +1 -1
- package/src/reanimated2/platformFunctions/getRelativeCoords.ts +2 -2
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
} from 'react';
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { findNodeHandle, Platform } from 'react-native';
|
|
11
|
-
import WorkletEventHandler from '../reanimated2/WorkletEventHandler';
|
|
11
|
+
import { WorkletEventHandler } from '../reanimated2/WorkletEventHandler';
|
|
12
12
|
import '../reanimated2/layoutReanimation/animationsManager';
|
|
13
13
|
import invariant from 'invariant';
|
|
14
14
|
import { adaptViewConfig } from '../ConfigHelper';
|
|
@@ -143,6 +143,7 @@ export function createAnimatedComponent(
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
componentDidMount() {
|
|
146
|
+
this._viewTag = this._getViewInfo().viewTag as number;
|
|
146
147
|
this._attachNativeEvents();
|
|
147
148
|
this._jsPropsUpdater.addOnJSPropsChangeListener(this);
|
|
148
149
|
this._attachAnimatedStyles();
|
|
@@ -189,6 +190,7 @@ export function createAnimatedComponent(
|
|
|
189
190
|
const exiting = this.props.exiting;
|
|
190
191
|
if (
|
|
191
192
|
IS_WEB &&
|
|
193
|
+
this._component &&
|
|
192
194
|
this.props.exiting &&
|
|
193
195
|
!getReducedMotionFromConfig(this.props.exiting as CustomConfig)
|
|
194
196
|
) {
|
|
@@ -228,21 +230,13 @@ export function createAnimatedComponent(
|
|
|
228
230
|
}
|
|
229
231
|
|
|
230
232
|
_attachNativeEvents() {
|
|
231
|
-
const node = this._getEventViewRef() as AnimatedComponentRef;
|
|
232
|
-
let viewTag = null; // We set it only if needed
|
|
233
|
-
|
|
234
233
|
for (const key in this.props) {
|
|
235
234
|
const prop = this.props[key];
|
|
236
235
|
if (
|
|
237
236
|
has('workletEventHandler', prop) &&
|
|
238
237
|
prop.workletEventHandler instanceof WorkletEventHandler
|
|
239
238
|
) {
|
|
240
|
-
|
|
241
|
-
viewTag = IS_WEB
|
|
242
|
-
? this._component
|
|
243
|
-
: findNodeHandle(options?.setNativeProps ? this : node);
|
|
244
|
-
}
|
|
245
|
-
prop.workletEventHandler.registerForEvents(viewTag as number, key);
|
|
239
|
+
prop.workletEventHandler.registerForEvents(this._viewTag, key);
|
|
246
240
|
}
|
|
247
241
|
}
|
|
248
242
|
}
|
|
@@ -254,7 +248,7 @@ export function createAnimatedComponent(
|
|
|
254
248
|
has('workletEventHandler', prop) &&
|
|
255
249
|
prop.workletEventHandler instanceof WorkletEventHandler
|
|
256
250
|
) {
|
|
257
|
-
prop.workletEventHandler.unregisterFromEvents();
|
|
251
|
+
prop.workletEventHandler.unregisterFromEvents(this._viewTag);
|
|
258
252
|
}
|
|
259
253
|
}
|
|
260
254
|
}
|
|
@@ -277,38 +271,40 @@ export function createAnimatedComponent(
|
|
|
277
271
|
}
|
|
278
272
|
}
|
|
279
273
|
|
|
280
|
-
|
|
274
|
+
_updateNativeEvents(
|
|
281
275
|
prevProps: AnimatedComponentProps<InitialComponentProps>
|
|
282
276
|
) {
|
|
283
277
|
for (const key in prevProps) {
|
|
284
|
-
const
|
|
278
|
+
const prevProp = prevProps[key];
|
|
285
279
|
if (
|
|
286
|
-
has('workletEventHandler',
|
|
287
|
-
|
|
288
|
-
prop.workletEventHandler.reattachNeeded
|
|
280
|
+
has('workletEventHandler', prevProp) &&
|
|
281
|
+
prevProp.workletEventHandler instanceof WorkletEventHandler
|
|
289
282
|
) {
|
|
290
|
-
|
|
283
|
+
const newProp = this.props[key];
|
|
284
|
+
if (!newProp) {
|
|
285
|
+
// Prop got deleted
|
|
286
|
+
prevProp.workletEventHandler.unregisterFromEvents(this._viewTag);
|
|
287
|
+
} else if (
|
|
288
|
+
has('workletEventHandler', newProp) &&
|
|
289
|
+
newProp.workletEventHandler instanceof WorkletEventHandler &&
|
|
290
|
+
newProp.workletEventHandler !== prevProp.workletEventHandler
|
|
291
|
+
) {
|
|
292
|
+
// Prop got changed
|
|
293
|
+
prevProp.workletEventHandler.unregisterFromEvents(this._viewTag);
|
|
294
|
+
newProp.workletEventHandler.registerForEvents(this._viewTag);
|
|
295
|
+
}
|
|
291
296
|
}
|
|
292
297
|
}
|
|
293
298
|
|
|
294
|
-
let viewTag = null;
|
|
295
|
-
|
|
296
299
|
for (const key in this.props) {
|
|
297
|
-
const
|
|
300
|
+
const newProp = this.props[key];
|
|
298
301
|
if (
|
|
299
|
-
has('workletEventHandler',
|
|
300
|
-
|
|
301
|
-
|
|
302
|
+
has('workletEventHandler', newProp) &&
|
|
303
|
+
newProp.workletEventHandler instanceof WorkletEventHandler &&
|
|
304
|
+
!prevProps[key]
|
|
302
305
|
) {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
viewTag = IS_WEB
|
|
307
|
-
? this._component
|
|
308
|
-
: findNodeHandle(options?.setNativeProps ? this : node);
|
|
309
|
-
}
|
|
310
|
-
prop.workletEventHandler.registerForEvents(viewTag as number, key);
|
|
311
|
-
prop.workletEventHandler.reattachNeeded = false;
|
|
306
|
+
// Prop got added
|
|
307
|
+
newProp.workletEventHandler.registerForEvents(this._viewTag);
|
|
312
308
|
}
|
|
313
309
|
}
|
|
314
310
|
}
|
|
@@ -460,7 +456,7 @@ export function createAnimatedComponent(
|
|
|
460
456
|
) {
|
|
461
457
|
this._configureSharedTransition();
|
|
462
458
|
}
|
|
463
|
-
this.
|
|
459
|
+
this._updateNativeEvents(prevProps);
|
|
464
460
|
this._attachAnimatedStyles();
|
|
465
461
|
this._InlinePropManager.attachInlineProps(this, this._getViewInfo());
|
|
466
462
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import type { NativeSyntheticEvent } from 'react-native';
|
|
3
3
|
import { registerEventHandler, unregisterEventHandler } from './core';
|
|
4
|
-
import type {
|
|
4
|
+
import type {
|
|
5
|
+
EventPayload,
|
|
6
|
+
ReanimatedEvent,
|
|
7
|
+
IWorkletEventHandler,
|
|
8
|
+
} from './hook/commonTypes';
|
|
5
9
|
import { shouldBeUseWeb } from './PlatformChecker';
|
|
6
10
|
|
|
7
11
|
const SHOULD_BE_USE_WEB = shouldBeUseWeb();
|
|
@@ -20,64 +24,119 @@ function jsListener<Event extends object>(
|
|
|
20
24
|
};
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
class WorkletEventHandlerNative<Event extends object>
|
|
28
|
+
implements IWorkletEventHandler<Event>
|
|
29
|
+
{
|
|
30
|
+
eventNames: string[];
|
|
24
31
|
worklet: (event: ReanimatedEvent<Event>) => void;
|
|
32
|
+
#viewTags: Set<number>;
|
|
33
|
+
#registrations: Map<number, number[]>; // keys are viewTags, values are arrays of registration ID's for each viewTag
|
|
34
|
+
constructor(
|
|
35
|
+
worklet: (event: ReanimatedEvent<Event>) => void,
|
|
36
|
+
eventNames: string[]
|
|
37
|
+
) {
|
|
38
|
+
this.worklet = worklet;
|
|
39
|
+
this.eventNames = eventNames;
|
|
40
|
+
this.#viewTags = new Set<number>();
|
|
41
|
+
this.#registrations = new Map<number, number[]>();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
updateEventHandler(
|
|
45
|
+
newWorklet: (event: ReanimatedEvent<Event>) => void,
|
|
46
|
+
newEvents: string[]
|
|
47
|
+
): void {
|
|
48
|
+
// Update worklet and event names
|
|
49
|
+
this.worklet = newWorklet;
|
|
50
|
+
this.eventNames = newEvents;
|
|
51
|
+
|
|
52
|
+
// Detach all events
|
|
53
|
+
this.#registrations.forEach((registrationIDs) => {
|
|
54
|
+
registrationIDs.forEach((id) => unregisterEventHandler(id));
|
|
55
|
+
// No need to remove registrationIDs from map, since it gets overwritten when attaching
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Attach new events with new worklet
|
|
59
|
+
Array.from(this.#viewTags).forEach((tag) => {
|
|
60
|
+
const newRegistrations = this.eventNames.map((eventName) =>
|
|
61
|
+
registerEventHandler(this.worklet, eventName, tag)
|
|
62
|
+
);
|
|
63
|
+
this.#registrations.set(tag, newRegistrations);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
registerForEvents(viewTag: number, fallbackEventName?: string): void {
|
|
68
|
+
this.#viewTags.add(viewTag);
|
|
69
|
+
|
|
70
|
+
const newRegistrations = this.eventNames.map((eventName) =>
|
|
71
|
+
registerEventHandler(this.worklet, eventName, viewTag)
|
|
72
|
+
);
|
|
73
|
+
this.#registrations.set(viewTag, newRegistrations);
|
|
74
|
+
|
|
75
|
+
if (this.eventNames.length === 0 && fallbackEventName) {
|
|
76
|
+
const newRegistration = registerEventHandler(
|
|
77
|
+
this.worklet,
|
|
78
|
+
fallbackEventName,
|
|
79
|
+
viewTag
|
|
80
|
+
);
|
|
81
|
+
this.#registrations.set(viewTag, [newRegistration]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
unregisterFromEvents(viewTag: number): void {
|
|
86
|
+
this.#viewTags.delete(viewTag);
|
|
87
|
+
this.#registrations.get(viewTag)?.forEach((id) => {
|
|
88
|
+
unregisterEventHandler(id);
|
|
89
|
+
});
|
|
90
|
+
this.#registrations.delete(viewTag);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
class WorkletEventHandlerWeb<Event extends object>
|
|
95
|
+
implements IWorkletEventHandler<Event>
|
|
96
|
+
{
|
|
25
97
|
eventNames: string[];
|
|
26
|
-
reattachNeeded: boolean;
|
|
27
98
|
listeners:
|
|
28
99
|
| Record<string, (event: ReanimatedEvent<ReanimatedEvent<Event>>) => void>
|
|
29
100
|
| Record<string, (event: JSEvent<Event>) => void>;
|
|
30
101
|
|
|
31
|
-
|
|
32
|
-
|
|
102
|
+
worklet: (event: ReanimatedEvent<Event>) => void;
|
|
103
|
+
|
|
33
104
|
constructor(
|
|
34
105
|
worklet: (event: ReanimatedEvent<Event>) => void,
|
|
35
106
|
eventNames: string[] = []
|
|
36
107
|
) {
|
|
37
108
|
this.worklet = worklet;
|
|
38
109
|
this.eventNames = eventNames;
|
|
39
|
-
this.reattachNeeded = false;
|
|
40
110
|
this.listeners = {};
|
|
41
|
-
this.
|
|
42
|
-
this.registrations = [];
|
|
43
|
-
|
|
44
|
-
if (SHOULD_BE_USE_WEB) {
|
|
45
|
-
this.listeners = eventNames.reduce(
|
|
46
|
-
(
|
|
47
|
-
acc: Record<string, (event: JSEvent<Event>) => void>,
|
|
48
|
-
eventName: string
|
|
49
|
-
) => {
|
|
50
|
-
acc[eventName] = jsListener(eventName, worklet);
|
|
51
|
-
return acc;
|
|
52
|
-
},
|
|
53
|
-
{}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
111
|
+
this.setupWebListeners();
|
|
56
112
|
}
|
|
57
113
|
|
|
58
|
-
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
114
|
+
setupWebListeners() {
|
|
115
|
+
this.listeners = {};
|
|
116
|
+
this.eventNames.forEach((eventName) => {
|
|
117
|
+
this.listeners[eventName] = jsListener(eventName, this.worklet);
|
|
118
|
+
});
|
|
61
119
|
}
|
|
62
120
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
);
|
|
72
|
-
}
|
|
121
|
+
updateEventHandler(
|
|
122
|
+
newWorklet: (event: ReanimatedEvent<Event>) => void,
|
|
123
|
+
newEvents: string[]
|
|
124
|
+
): void {
|
|
125
|
+
// Update worklet and event names
|
|
126
|
+
this.worklet = newWorklet;
|
|
127
|
+
this.eventNames = newEvents;
|
|
128
|
+
this.setupWebListeners();
|
|
73
129
|
}
|
|
74
130
|
|
|
75
|
-
|
|
76
|
-
|
|
131
|
+
registerForEvents(_viewTag: number, _fallbackEventName?: string): void {
|
|
132
|
+
// noop
|
|
77
133
|
}
|
|
78
134
|
|
|
79
|
-
unregisterFromEvents(): void {
|
|
80
|
-
|
|
81
|
-
this.registrations = [];
|
|
135
|
+
unregisterFromEvents(_viewTag: number): void {
|
|
136
|
+
// noop
|
|
82
137
|
}
|
|
83
138
|
}
|
|
139
|
+
|
|
140
|
+
export const WorkletEventHandler = SHOULD_BE_USE_WEB
|
|
141
|
+
? WorkletEventHandlerWeb
|
|
142
|
+
: WorkletEventHandlerNative;
|
|
@@ -125,16 +125,18 @@ export function withStyleAnimation(
|
|
|
125
125
|
stillGoing = true;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
// When working with animations changing colors, we need to make sure that each one of them begins with a rgba, not a processed number.
|
|
129
|
+
// Thus, we only set the path to a processed color, but currentStyleAnimation.current stays as rgba.
|
|
130
|
+
const isAnimatingColorProp = ColorProperties.includes(
|
|
131
|
+
currentEntry.path[0] as string
|
|
132
|
+
);
|
|
133
133
|
|
|
134
134
|
setPath(
|
|
135
135
|
animation.current,
|
|
136
136
|
currentEntry.path,
|
|
137
|
-
|
|
137
|
+
isAnimatingColorProp
|
|
138
|
+
? processColor(currentStyleAnimation.current)
|
|
139
|
+
: currentStyleAnimation.current
|
|
138
140
|
);
|
|
139
141
|
}
|
|
140
142
|
}
|
|
@@ -79,6 +79,15 @@ export type RNNativeScrollEvent = NativeSyntheticEvent<NativeScrollEvent>;
|
|
|
79
79
|
|
|
80
80
|
export type ReanimatedScrollEvent = ReanimatedEvent<RNNativeScrollEvent>;
|
|
81
81
|
|
|
82
|
+
export interface IWorkletEventHandler<Event extends object> {
|
|
83
|
+
updateEventHandler: (
|
|
84
|
+
newWorklet: (event: ReanimatedEvent<Event>) => void,
|
|
85
|
+
newEvents: string[]
|
|
86
|
+
) => void;
|
|
87
|
+
registerForEvents: (viewTag: number, fallbackEventName?: string) => void;
|
|
88
|
+
unregisterFromEvents: (viewTag: number) => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
82
91
|
export interface AnimatedStyleHandle<
|
|
83
92
|
Style extends DefaultStyle = DefaultStyle
|
|
84
93
|
> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { useRef } from 'react';
|
|
3
|
-
import WorkletEventHandler from '../WorkletEventHandler';
|
|
4
|
-
import type { ReanimatedEvent } from './commonTypes';
|
|
3
|
+
import { WorkletEventHandler } from '../WorkletEventHandler';
|
|
4
|
+
import type { IWorkletEventHandler, ReanimatedEvent } from './commonTypes';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Worklet to provide as an argument to `useEvent` hook.
|
|
@@ -17,7 +17,7 @@ export type EventHandlerProcessed<
|
|
|
17
17
|
> = (event: Event, context?: Context) => void;
|
|
18
18
|
|
|
19
19
|
export type EventHandlerInternal<Event extends object> = {
|
|
20
|
-
workletEventHandler:
|
|
20
|
+
workletEventHandler: IWorkletEventHandler<Event>;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -57,7 +57,7 @@ export function useEvent<Event extends object, Context = never>(
|
|
|
57
57
|
initRef.current = { workletEventHandler };
|
|
58
58
|
} else if (rebuild) {
|
|
59
59
|
const workletEventHandler = initRef.current.workletEventHandler;
|
|
60
|
-
workletEventHandler.
|
|
60
|
+
workletEventHandler.updateEventHandler(handler, eventNames);
|
|
61
61
|
initRef.current = { workletEventHandler };
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -73,6 +73,7 @@ function useScrollViewOffsetNative(
|
|
|
73
73
|
const internalOffset = useSharedValue(0);
|
|
74
74
|
const offset = useRef(providedOffset ?? internalOffset).current;
|
|
75
75
|
const scrollRef = useRef<AnimatedScrollView | null>(null);
|
|
76
|
+
const scrollRefTag = useRef<number | null>(null);
|
|
76
77
|
|
|
77
78
|
const eventHandler = useEvent<RNNativeScrollEvent>(
|
|
78
79
|
(event: ReanimatedScrollEvent) => {
|
|
@@ -89,15 +90,30 @@ function useScrollViewOffsetNative(
|
|
|
89
90
|
|
|
90
91
|
useEffect(() => {
|
|
91
92
|
// We need to make sure that listener for old animatedRef value is removed
|
|
92
|
-
if (scrollRef.current !== null) {
|
|
93
|
-
eventHandler.workletEventHandler.unregisterFromEvents(
|
|
93
|
+
if (scrollRef.current !== null && scrollRefTag.current !== null) {
|
|
94
|
+
eventHandler.workletEventHandler.unregisterFromEvents(
|
|
95
|
+
scrollRefTag.current
|
|
96
|
+
);
|
|
94
97
|
}
|
|
98
|
+
|
|
99
|
+
// Store the ref and viewTag for future cleanup
|
|
95
100
|
scrollRef.current = animatedRef.current;
|
|
101
|
+
scrollRefTag.current = animatedRef.getTag();
|
|
102
|
+
|
|
103
|
+
if (scrollRefTag === null) {
|
|
104
|
+
console.warn(
|
|
105
|
+
'[Reanimated] ScrollViewOffset failed to resolve the view tag from animated ref. Did you forget to attach the ref to a component?'
|
|
106
|
+
);
|
|
107
|
+
} else {
|
|
108
|
+
eventHandler.workletEventHandler.registerForEvents(scrollRefTag.current);
|
|
109
|
+
}
|
|
96
110
|
|
|
97
|
-
const viewTag = animatedRef.getTag();
|
|
98
|
-
eventHandler.workletEventHandler.registerForEvents(viewTag);
|
|
99
111
|
return () => {
|
|
100
|
-
|
|
112
|
+
if (scrollRefTag.current !== null) {
|
|
113
|
+
eventHandler.workletEventHandler.unregisterFromEvents(
|
|
114
|
+
scrollRefTag.current
|
|
115
|
+
);
|
|
116
|
+
}
|
|
101
117
|
};
|
|
102
118
|
// React here has a problem with `animatedRef.current` since a Ref .current
|
|
103
119
|
// field shouldn't be used as a dependency. However, in this case we have
|
|
@@ -55,12 +55,15 @@ export default class JSReanimated {
|
|
|
55
55
|
_eventName: string,
|
|
56
56
|
_emitterReactTag: number
|
|
57
57
|
): number {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
throw new Error(
|
|
59
|
+
'[Reanimated] registerEventHandler is not available in JSReanimated.'
|
|
60
|
+
);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
unregisterEventHandler(_: number): void {
|
|
63
|
-
|
|
64
|
+
throw new Error(
|
|
65
|
+
'[Reanimated] unregisterEventHandler is not available in JSReanimated.'
|
|
66
|
+
);
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
enableLayoutAnimations() {
|
|
@@ -48,7 +48,7 @@ function checkUndefinedAnimationFail(
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
console.warn(
|
|
51
|
-
"[Reanimated] Couldn't load entering/exiting animation. Current version supports only predefined animations with modifiers: duration, delay, easing, randomizeDelay,
|
|
51
|
+
"[Reanimated] Couldn't load entering/exiting animation. Current version supports only predefined animations with modifiers: duration, delay, easing, randomizeDelay, withCallback, reducedMotion."
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
return true;
|
|
@@ -78,5 +78,7 @@ export function setDummyPosition(
|
|
|
78
78
|
dummy.style.height = `${snapshot.height}px`;
|
|
79
79
|
dummy.style.margin = '0px'; // tmpElement has absolute position, so margin is not necessary
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
if (dummy.parentElement) {
|
|
82
|
+
fixElementPosition(dummy, dummy.parentElement, snapshot);
|
|
83
|
+
}
|
|
82
84
|
}
|
|
@@ -276,7 +276,7 @@ export function handleExitingAnimation(
|
|
|
276
276
|
|
|
277
277
|
const scrollOffsets = getElementScrollValue(element);
|
|
278
278
|
|
|
279
|
-
// Scroll does not trigger
|
|
279
|
+
// Scroll does not trigger snapshotting, therefore if we start exiting animation after
|
|
280
280
|
// scrolling through parent component, dummy will end up in wrong place. In order to fix that
|
|
281
281
|
// we keep last known scroll position in snapshot and then adjust dummy position based on
|
|
282
282
|
// last known scroll offset and current scroll offset
|
|
@@ -14,7 +14,7 @@ import { FadingTransition } from './transition/Fading.web';
|
|
|
14
14
|
import { insertWebAnimation } from './domUtils';
|
|
15
15
|
|
|
16
16
|
// Translate values are passed as numbers. However, if `translate` property receives number, it will not automatically
|
|
17
|
-
// convert it to `px`. Therefore if we want to keep
|
|
17
|
+
// convert it to `px`. Therefore if we want to keep existing transform we have to add 'px' suffix to each of translate values
|
|
18
18
|
// that are present inside transform.
|
|
19
19
|
function addPxToTranslate(
|
|
20
20
|
existingTransform: NonNullable<TransformsStyle['transform']>
|
|
@@ -43,7 +43,7 @@ function addPxToTranslate(
|
|
|
43
43
|
return newTransform;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
// In order to keep
|
|
46
|
+
// In order to keep existing transform throughout animation, we have to add it to each of keyframe step.
|
|
47
47
|
function addExistingTransform(
|
|
48
48
|
newAnimationData: AnimationData,
|
|
49
49
|
newTransform: ReanimatedWebTransformProperties[]
|