-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Restore auto-panning that #2443 had broken #2562
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
Conversation
| for message in editor.handle_message(BroadcastMessage::TriggerEvent(BroadcastEvent::AnimationFrame)) { | ||
| handle.send_frontend_message_to_js(message); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to dispatch both the broadcast event and the increment frame counter message from the CurrentTime input preprocessor message handler. Having these multiple invocations is not pretty. It also somewhat obfuscates that setting the current time now has a side effect (of changing the frame time).
I'm also wondering if it even makes sense to use the animation frame here at all for non render related editor timing. We could consider adding a LogicTick broadcast event which is triggered on a set interval timer and seperate this completely from animation related functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also wondering if it even makes sense to use the animation frame here at all for non render related editor timing. We could consider adding a LogicTick broadcast event which is triggered on a set interval timer and seperate this completely from animation related functionality
(To be clear, that would be a separate discussion for a later PR, this one is just focused on un-breaking the functionality without refactoring or rearchitecting it.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the code should work, I just don't like it, but I didn't like it before either so that is not a merge blocker
|
!build |
|
Fixes #2504 by restoring part of the code deleted in #2443