TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Full-screen 2D Cellular Automata

4 pointsby barbinbradalmost 4 years ago

1 comment

axguscbklpalmost 4 years ago
Nice, one file of vanilla JavaScript, an HTML file, and a Readme. I know that in some contexts there are advantages to having a bunch of separate JavaScript modules each in its own file, tests, build steps, frameworks, etc. but I like how this project does not add any of that sort of complexity given that it is not needed.<p>Just a note: when you are copying one canvas&#x27; data to another&#x27;s, I think you can use a TypedArray method like &quot;set&quot; to do the whole thing in one go. Not sure if the performance would be better, but it might be worth trying. In any case, there is no need to do a nested iteration over the width and the height, you can just iterate over the entire data array in one go.