From 1b73fa3e41002875e53049f7a12dec08b02652c5 Mon Sep 17 00:00:00 2001 From: Zsolt Kocsi Date: Thu, 5 Oct 2023 19:10:49 +0100 Subject: [PATCH 1/2] Lower position and rotation animation round-off thresholds --- .../appyx/interactions/core/ui/property/impl/RotationX.kt | 2 +- .../appyx/interactions/core/ui/property/impl/RotationY.kt | 2 +- .../appyx/interactions/core/ui/property/impl/RotationZ.kt | 2 +- .../core/ui/property/impl/position/PositionInside.kt | 2 +- .../core/ui/property/impl/position/PositionOutside.kt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationX.kt b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationX.kt index c5a1ec9a4..78185f867 100644 --- a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationX.kt +++ b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationX.kt @@ -21,7 +21,7 @@ import kotlinx.coroutines.flow.StateFlow class RotationX( coroutineScope: CoroutineScope, target: Target, - visibilityThreshold: Float = 1f, + visibilityThreshold: Float = 0.1f, displacement: StateFlow = MutableStateFlow(0f), private val origin: TransformOrigin = target.origin, ) : MotionProperty( diff --git a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationY.kt b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationY.kt index 9e29691e2..84f3e80a8 100644 --- a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationY.kt +++ b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationY.kt @@ -21,7 +21,7 @@ import kotlinx.coroutines.flow.StateFlow class RotationY( coroutineScope: CoroutineScope, target: Target, - visibilityThreshold: Float = 1f, + visibilityThreshold: Float = 0.1f, displacement: StateFlow = MutableStateFlow(0f), private val origin: TransformOrigin = target.origin, ) : MotionProperty( diff --git a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationZ.kt b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationZ.kt index 6af6204c2..2e69e87af 100644 --- a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationZ.kt +++ b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/RotationZ.kt @@ -21,7 +21,7 @@ import kotlinx.coroutines.flow.StateFlow class RotationZ( coroutineScope: CoroutineScope, target: Target, - visibilityThreshold: Float = 1f, + visibilityThreshold: Float = 0.1f, displacement: StateFlow = MutableStateFlow(0f), private val origin: TransformOrigin = target.origin, ) : MotionProperty( diff --git a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionInside.kt b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionInside.kt index da68473fb..13119ce97 100644 --- a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionInside.kt +++ b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionInside.kt @@ -29,7 +29,7 @@ class PositionInside( coroutineScope: CoroutineScope, val target: Target, displacement: StateFlow = MutableStateFlow(Value.Zero), - visibilityThreshold: Value = Value(InsideAlignment(0.01f, 0.01f), DpOffset(1.dp, 1.dp)), + visibilityThreshold: Value = Value(InsideAlignment(0.001f, 0.001f), DpOffset(1.dp, 1.dp)), ) : MotionProperty( coroutineScope = coroutineScope, animatable = Animatable(target.value, Value.VectorConverter), diff --git a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionOutside.kt b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionOutside.kt index ff7d53d27..4eded965b 100644 --- a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionOutside.kt +++ b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/core/ui/property/impl/position/PositionOutside.kt @@ -28,7 +28,7 @@ class PositionOutside( coroutineScope: CoroutineScope, val target: Target, displacement: StateFlow = MutableStateFlow(Value.Zero), - visibilityThreshold: Value = Value(OutsideAlignment(0.01f, 0.01f), DpOffset(1.dp, 1.dp)), + visibilityThreshold: Value = Value(OutsideAlignment(0.001f, 0.001f), DpOffset(1.dp, 1.dp)), ) : MotionProperty( coroutineScope = coroutineScope, animatable = Animatable(target.value, Value.VectorConverter), From 3ad26794903e901316996252bea00371ed196104 Mon Sep 17 00:00:00 2001 From: Zsolt Kocsi Date: Thu, 5 Oct 2023 19:21:15 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d25d0a21b..543813a7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ ## Pending changes -– +### Changed + +- [#611](https://github.com/bumble-tech/appyx/pull/611) – Lower position and rotation animation default round-off thresholds + +--- ## 2.0.0-alpha08 @@ -10,6 +14,8 @@ - [#608](https://github.com/bumble-tech/appyx/pull/608) – Setting default value to NodeCustomisationDirectory in IosNodeHost +--- + ## 2.0.0-alpha07 ### Added @@ -19,6 +25,7 @@
4 Oct 2023
+--- ## 2.0.0-alpha06