Comments (3)
@ChristianKienle wow, sorry for such a long reply :)
I just got time to get through all the notifications.
Regard your question, no. There is no such a way to change canvas size without creating a new one.
from terminal-canvas.
Regard your question, no. There is no such a way to change canvas size without creating a new one.
Thanks for the response :)
It is a while back when I last worked on the project using terminal-canvas. I believe I ended up by disabling (showing the current size w/h instead) UI updates while the resizing occurs. This was good enough for a CLI UI. I wonder how ncurses is doing it though. :D
from terminal-canvas.
If you ask me, I'd try to implement it via vectors in terminal-canvas
, not just arrays.
The problem here, why it can't be easily done here is that, I'm pre-allocating required space for frame buffer by calling Array.new(witdth * height)
. It is done for performance optimizations.
So, if you want to change width or height, you will be forced to allocate new array and re-assign it to variable, which is obviously will be slow. Especially, if you do it in each resize event.
from terminal-canvas.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal-canvas.