fix: fade state may get inconsistent on rapid ui open-close; correct logscale impl

This commit is contained in:
minjaesong
2023-11-19 20:05:44 +09:00
parent d77b8087cb
commit 04144fff08
7 changed files with 39 additions and 24 deletions

View File

@@ -341,7 +341,7 @@ abstract class UICanvas(
}
companion object {
const val OPENCLOSE_GENERIC = 0.0666f
const val OPENCLOSE_GENERIC = 0.1f
fun doOpeningFade(ui: UICanvas, openCloseTime: Second) {
ui.handler.opacity = max(0f, ui.handler.openCloseCounter - 0.02f) / openCloseTime // fade start 1/50 sec late, it's intended