Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous window sliding #91

Open
Morgerion opened this issue Apr 7, 2023 · 5 comments
Open

Asynchronous window sliding #91

Morgerion opened this issue Apr 7, 2023 · 5 comments

Comments

@Morgerion
Copy link

Thanks to the upgraded monarch, I was able to make sliding windows.

sliding.mp4

...
But the following problem has come to light - the windows slide unevenly.
You can see it in the video if you look closely.
This can also be seen in the screenshots:
Скриншот 2023-04-08 00 21 13
Скриншот 2023-04-08 00 21 26

Apparently, for some windows, the transition is triggered a couple of frames later.
This could be remedied by passing some sort of start time to all transitions, and compensating the delay via a negative delay in the gui.animation().

@Morgerion
Copy link
Author

This effect is very noticeable on the mobile:
https://www.dropbox.com/s/poa3dee3kpvclm8/20230408_022714.mp4?dl=0

@Morgerion
Copy link
Author

I was able to get rid of the background shift when sliding. I had to do some trickery with skipping frames before animation, but now it's stable. :)
However, when it comes to the GUI specifically, it still lags:

slide2.mp4

The fact is that the middle window consists of two entities - the 3D scene and the GUI itself. I slide the 3D scene into the background on its own, and there is no problem here. But there is still a delay with the GUI sliding, and it is clearly within Monarch.

@britzl
Copy link
Owner

britzl commented Aug 3, 2023

I'm not sure if/how to solve this with the current design in Monarch. I can take one final look if you can prepare a minimal project where this problem can be seen. The other solution is to not use Monarch for the problematic screens or for those kinds of transitions.

@Morgerion
Copy link
Author

Morgerion commented Aug 14, 2023

here's the project:
__test_slide_GUI.zip

and here's a video (from this project) that shows where the lag in synchronization is noticeable:

sliding_gui.mp4

@Morgerion
Copy link
Author

Let's say we always have two windows when sliding:

  • IN_Window (the window we arrive at)
  • OUT_Window (the window we're leaving from)
    For some reason i don't understand, IN_Window starts its animation 1 frame earlier than OUT_Window.

This problem can be solved without using the standard transitions from monarch. But even in this case you will have to manage the delay of 1 frame on PC and 2 frames on mobile devices (i don't know why this happens).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants