4 ms·
ASCII 3D Renderer for JavaScript
- owenpalmer 2y agoReminds me of https://asciicker.com/ https://asciicker.com/.
- lsc4719 2y agoAmazing!
- smusamashah 2y agoThis immediately reminded me of this ascii graphics library https://play.ertdfgcvb.xyz/ https://play.ertdfgcvb.xyz/ which I found on HN a while ago
- sukmaagung 2y agoSo, as long it uses only text, it can be called ASCII art, not just characters from space to tilde (or null to tilde)?
- mock-possum 2y agoColloquially, yes.
- mxfh 2y agoIts just 3 bits white plus those 7 box art chars. private Shade = '·┼╬'; [1] Would have expected something more sophisticated, where the shader also looks at subpixels, where it gets the best matching char for the shape and brightness. Like rastapasta map renderer did with the braille block: https://github.com/rastapasta/mapscii https://github.com/rastapasta/mapscii https://news.ycombinator.com/item?id=39975887 https://news.ycombinator.com/item?id=39975887 --- https://github.com/kciter/ascii-3d-renderer.js/blob/1f1a8493bb26197e4e33f72d16f33158d450e167/src/renderer.ts#L20C1-L21C1 https://github.com/kciter/ascii-3d-renderer.js/blob/1f1a8493... [1] Shades and Box art chars where never part of any ASCII standard. https://en.wikipedia.org/wiki/Code_page_437 https://en.wikipedia.org/wiki/Code_page_437 Technically no ASCII but that's just for purists https://en.wikipedia.org/wiki/ASCII_art#%22Block_ASCII%22_/_%22High_ASCII%22_style_ASCII_art_on_the_IBM_PC https://en.wikipedia.org/wiki/ASCII_art#%22Block_ASCII%22_/_...
- Retr0id 2y agoYes, sadly this semantic battle has already been lost.
- nox101 2y agoI'm pretty sure it's rendering strings but there's also the technique of post processing on the GPU like this https://threejs.org/examples/?q=asc#webgl_effects_ascii https://threejs.org/examples/?q=asc#webgl_effects_ascii
- LukaD 2y agoThis video goes into depth about ASCII rendering as a post processing effect: https://www.youtube.com/watch?v=gg40RWiaHRY https://www.youtube.com/watch?v=gg40RWiaHRY
- EGreg 2y ago“goes into depth” I see what you did there (without intending to do it)
- thih9 2y agoIMHO in this video the end result doesn't qualify as ASCII art - square letters in particular are a deal breaker to me. It is still a cool shader that turns input into text, even if it doesn't have the ascii art vibe.
- california-og 2y agoASCII just refers to the 7bit standard, so if we are pedantic ASCII art is just art using the printable characters of the 128 code points defined in it. Font size doesn't have anything to do with it. But ASCII art is used as an umbrella term, encompassing a variety of different standards, character sets and fonts. There are a bunch of square ASCII, like PETSCII, ATASCII and even PC ASCII can be rendered with a 8x8 cp437 font. We don't need to gatekeep what "qualifies" as ASCII art.
- thih9 2y ago> There are a bunch of square ASCII, like PETSCII Note that e.g. PETSCII, while internally 8x8, would be displayed using non-square pixels[1] - also not resulting in square letters. [1]: https://retrocomputing.stackexchange.com/a/13871 https://retrocomputing.stackexchange.com/a/13871
- gewaltig 2y agoMy younger self cries out in joy. So 1980s when you could print an ASCII picture of yourself on mugs and Ts
- _the_inflator 2y agoBBS vibes as well. I did quite a lot of printing on dot matrix printers as well.
- agys 2y agoSelf plug: the “ASCII Playground“ has a couple of 3D demos as well! DOM manipulation is fast enough to allow text output into a PRE element as long as text color is not changed too often (each style change needs the affected chars wrapped into a SPAN). https://play.ertdfgcvb.xyz https://play.ertdfgcvb.xyz
- Xen9 2y agoAnyone who attempts to generate 3-dimensional renders by textual means is living in a state of sin(x).
- rrnechmech 2y agoIf this is sin, give me chastity and continence, but not yet :)
- agys 2y agoCos(x) players are welcome!
- slowmovintarget 2y agoAre we not all sinusoidal in the eyes of the Function?
- MaanuAir 2y agoImmediately reminds me of: https://aa-project.sourceforge.net/index.html https://aa-project.sourceforge.net/index.html
- woodrowbarlow 2y agosee also: donut.c which renders a 3d spinning torus in ascii. https://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html https://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html explanation with animations: https://www.a1k0n.net/2011/07/20/donut-math.html https://www.a1k0n.net/2011/07/20/donut-math.html