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

resize support for WASM mode #670

Open
gdamore opened this issue Dec 10, 2023 · 2 comments
Open

resize support for WASM mode #670

gdamore opened this issue Dec 10, 2023 · 2 comments
Labels

Comments

@gdamore
Copy link
Owner

gdamore commented Dec 10, 2023

It would be good if we could support having a resizable terminal widget -- right now the sizes are fixed, or set programmatically - whereas we'd like the text widget to be responsive to resizing performed by a mouse action.

@gdamore gdamore added the wasm label Dec 10, 2023
@digitallyserviced
Copy link
Contributor

digitallyserviced commented Dec 19, 2023

@gdamore Hey, I was actually just thinking about polishing off what I have been working on, and and pushing it up.

I have tried to find a WASM build or runtime that would properly operate with xterm, without some backend server, rather then all self-contained in the browser's client runtime.

Forgive the lack of couth in my choice of test strings... However the TDFDraw fonts look great in a xterm.js vtty 😀 It also does a great job to show off your library inside of it.

I would have re-made the animation, but I broke the build, and i just dumped 2.5GB of an ISO onto the frontend of my 500GB drive with other gifs/mp4s of this, so tryng to push off salvaging that until after xmas.

This adds another screen impl with the wasm/js GOOS/GOARCH build tags to produce js bindings, and init hooks/callbacks for being able to share the input/output buffers, and I then built an xterm addon specifically to handle your library with Go so that I could try and optimize as much as possible due to the lack of proper threading.

I am not sure when I would have time to polish it up... but I can push what I have if anyone wants to deal with my mess.

It supports all of xterm.js features (not that much needed to be done to handle). You may have to provide decent fonts for some things.

Transparency works, resize events are fired, things are quite snappy as long as you dont try and do lots of screen updates while also doing input.

xterm.mp4

@gdamore
Copy link
Owner Author

gdamore commented Dec 19, 2023

This looks interesting. I would be interested in seeing this followed up.

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

No branches or pull requests

2 participants