Giter Club home page Giter Club logo

Comments (7)

sinclairzx81 avatar sinclairzx81 commented on August 28, 2024 5

@richrd @loganzartman

I've put a rough implementation of true color in the feature/true-color branch. It needs testing and a few more optimizations. Initial tests on windows/cygwin (without TTY) and a Linux Mint terminal seem to work alright, but there is likely room to improve performance. Running true color on Windows CMD / Powershell are completely broken by default which is expected. The GIF below is running out of a VirtualBox linux instance, framerate is about on par with the GIF (with fontsize dropped to 2)

output

I don't own a OSX device so cannot test there. Open to any feedback if either of you own a Mac. Can run out of the feature/true-color branch with the following.

# clone the project
$ git checkout feature/true-color
$ npm install
$ npm run build
$ node index --color

from zero.

sinclairzx81 avatar sinclairzx81 commented on August 28, 2024 3

Hi, thanks for the suggestion.

I may actually take another look at this when I next get a bit of free time. It should be possible to implement ANSI true color and just have it enabled behind a --color flag. I did run a couple of tests on this and note that performance does degrade quite a bit with the color (its a lot more buffer throughput written to the terminal), but still could be interesting for terminals that support it.

from zero.

liamdon avatar liamdon commented on August 28, 2024 2

Greetings from 2022! I love this project.

I thought you might like to see how well true color runs these days. This is on a Mac M1 Max, in iTerm 3.0.

ZeroRenderer_5.mp4

from zero.

sinclairzx81 avatar sinclairzx81 commented on August 28, 2024 1

@liamdon Hey thanks for sharing :D That looks like it runs pretty great!

from zero.

loganzartman avatar loganzartman commented on August 28, 2024

You mentioned in #5 that terminals have limited support for truecolor. While it is more challenging to detect , many of them (including Windows console in Windows 10 when ENABLE_VIRTUAL_TERMINAL_PROCESSING is set) actually do support it . Alternatively, almost any terminal will support 256 color mode, and it is fairly easy to do a rough conversion from RGB.

Sorry, I can't remember which reference I used for the color palette.

from zero.

sinclairzx81 avatar sinclairzx81 commented on August 28, 2024

Have pushed a release to npm [email protected]. The color support is fairly experimental, so your mileage may vary depending on the capabilities of your terminal. Can test it out with..

$ npx zero-demo@latest --color

Have fun!

from zero.

richrd avatar richrd commented on August 28, 2024

Wow thanks! That's amazing! Works great on my Linux machine. I might be able to test on OSX at work.
You sir are a legend :)

from zero.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.