default ui open/close transition is now quick-fade

This commit is contained in:
minjaesong
2023-01-06 18:57:18 +09:00
parent 53dee515fe
commit 02bdb2a4fc
22 changed files with 141 additions and 246 deletions

View File

@@ -18,7 +18,7 @@ class UIItemHorizontalFadeSlide(
//transitionLength: Float,
currentPosition: Float,
vararg uis: UICanvas
) : UIItemTransitionContainer(parent, initialX, initialY, width, height, 0.15f, currentPosition, uis) {
) : UIItemTransitionContainer(parent, initialX, initialY, width, height, 0.10f, currentPosition, uis) {
fun getOffX(index: Int) = ((currentPosition - index) * width / 2f).roundToInt()
fun getOpacity(index: Int) = 1f - (currentPosition - index).absoluteValue.coerceIn(0f, 1f)