Conversation
orhun
left a comment
There was a problem hiding this comment.
Nice, this looks better & works faster than the previous animation for me :)
I will check out on mobile soon
… for landing page tachyonfx
orhun
left a comment
There was a problem hiding this comment.
This looks pretty good to me!
The animation is a bit fast and strong.. if we could make it milder then it would be great imo!
|
The updates effects can be previewed here: https://ratatui.ling.ooo/ In addition to resolving the above comments, I've also added padding for screens around 1280px width (as reported on Discord) and fixed the horizontal scrollbar issue in Chrome. The SSL certificate for the Scope TUI showcase link appears to have expired, which caused it to display as blank (we may need to contact the author about this): |
|
Fading from left to right via black color seems a bit off. Could you maybe disable it or use the same color as the website's background? |
|
I just checked on mobile and it doesn't render for me. Should we switch to another backend maybe? (DOM?) |
Occasionally, the WASM renderer appears blank in Chrome, especially during resource optimization when the browser tab has been left idle for awhile, or on the first load. Firefox doesn’t seem to have this issue. This might be related to how Astro handles WASM rendering. I’ve already tried forcing a reinitialization when a WebGL context loss error occurs. We could test switching to a different backend (e.g., DOM) to see if the problem persists. |
can the a context loss happen during first load? sounds unlikely but maybe i'm missing something. if nothing renders on load - in my experience, it's usually a race-condition or crash during init.
the current version of tachyonfx-renderer bundles beamterm 0.8.0 or 0.9.0 - automatic recovery from opengl context loss was added in 0.10.0. i can release a new version of tachyonfx-renderer during the weekend (prob tomorrow), which bundles the latest beamterm.
no, it only supports the webgl2 backend. |
|
btw, if you want to iterate on the effect interactively, you can do it here |
i've released tachyonfx-renderer 0.3.0 - it manages loss/recovery of the opengl context |
|
Thanks! Updated Steps to test:
|
|
you can lose the context programmatically too - it // retrieve
const canvas = document.querySelector('canvas');
const gl = canvas.getContext('webgl2');
const loseContextExt = gl.getExtension('WEBGL_lose_context');
// lose it
loseContextExt.loseContext();
// reinit
loseContextExt.restoreContext();i tested and confirmed working on chromium 144.0.7559.109 and firefox 147.0.3 (linux, radeon 8060s w wayland). |
|
I think this is almost ready! I realized a couple of things:
On 133% zoom, it is more visible:
I also observed the same behavior on mobile:
Maybe this is related to the recent changes in beamterm, not sure. cc @junkdog
|
|
the padding color, i.e. the area not covered by the terminal, can be controlled with i don't think it's the issue here, but depending on how things are setup, there's also i plan to support the dynamic atlas in the renderer too - which would maintain the scale of font relative to browser font - but there was some sort of impediment which i can't recall at the moment, so i shelved it for later. |
I've tried chaining them, and it doesn't solve the problem. 100% scale (chrome archlinux desktop): 125% scale (chrome archlinux desktop): I believe the core issue lies in the ANSI code generation process https://github.com/ling0x/ratatui-website/blob/fe44f7e0ae127908fb66b7d2b04c4b1d2c9b6ef4/src/utils/generateAnsiCode.sh#L29 . The ANSI code is currently hardcoded as a static asset with a fixed line width of 66 characters to match the canvas width. When the canvas auto-scales beyond this width, the ANSI code would need regeneration to maintain proper display, which would be impractical to perform dynamically in the user's browser. Additionally, the rendering appears incorrectly scaled on Windows 11 Chrome with small laptop screens. This seems to stem from Windows' different scaling behavior compared to Linux, combined with the WASM implementation's lack of responsiveness. 100% scale (chrome windows 11 laptop): I don't think we can solve this responsive scaling problem, including the dynamic adjustment of ANSI line length, purely with JavaScript. My recommendation is to revert to the JavaScript version of the CodeEffect component for now and merge the remaining changes from this pull request. I've made other improvements to the landing page layout in this PR for better small-screen compatibility and adjusted the showcase tile proportions for improved visual presentation. |
Ah, right! That makes sense.
Sounds good to me. Should we leave this one as is and maybe create a new PR with those related changes then? |
|
yeah, better do it as a separate PR since everything else is in place + this prob warrants another tachyonfx-renderer release, methinks.
shouldn't the padding color be
this should be fine, it would/should just leave padding on the right-hand side.
hmm, i think what we're seeing is the snapped scaling behavior for the static font atlas (which should be covered by the padded color - but i can check if there's something off after recalculating the DPR). tachyonfx-renderer has to support the dynamic atlas to maintain size and scale the font along with the browser zoom. |
|
Done. |







Partially addresses #830
Add live rendered TachyonFX demo on the landing page to replace the previous JavaScript version, which is quite slow.
Add label attribution to Ratzilla and WebAssembly.
Preview: https://ratatui.ling.ooo/
Screencast.From.2025-12-29.18-17-07.mp4