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
docs(examples): add animation and FPS counter to colors_rgb #583
Conversation
This doesn't render nicely in VHS yet unfortunately
- Rebased - changed hooks to use color_eyre and shuffled some of the init code - Tweaked the VHS tape (it still renders glitches though) - ran the for loop for setting up colors to 1 larger than the column and row counts to avoid off by one errors
66215e2
to
a29f9a7
Compare
VHS makes glitches in thish gif due to the animation
a154dab
to
43617de
Compare
Screen.Recording.2023-12-16.at.5.12.22.PM.mov |
43617de
to
7dcba7c
Compare
7dcba7c
to
490c4b7
Compare
Ok - I think this is in the right place now. |
Did you tested this? I still got it to panic quite easily. I'm afraid this is related to fps and computer performance. If you didn't got it to panic that's probably the case |
I really think this is because the frame changes size between the resize event and the next draw. So I included the Could you try these changes? fix-panic-colors_rgb.patch (had to rename it to .txt to upload on github, you can |
The problem is cause by Terminal::draw internally calling autoresize before creating the frame (this is intentiona). If the resize event occurred twice since the previous draw, then the second event may not have been seen by the app (but the size is changed regardless). So the app really can't rely on the size from the resize event to be the size to use for sizing the colors cache. It has to instead use the size from the Frame. |
Yep that's what I did in the patch. Ultimately this is going to be a problem in every app that want to use the resize event then ... |
yep |
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.
Looks good, happy to merge that
|
This doesn't render nicely in VHS yet unfortunately (there's some odd screen tearing that happens)
Screen.Recording.2023-10-22.at.3.23.45.AM.mov