Crates.io | asciirend |
lib.rs | asciirend |
version | 0.3.1 |
source | src |
created_at | 2023-11-22 09:28:05.407024 |
updated_at | 2023-12-05 20:02:15.745349 |
description | no_std compatible ascii rendering core |
homepage | |
repository | https://github.com/h33p/asciirend |
max_upload_size | |
id | 1045012 |
size | 132,673 |
. ... . . . . . . . .. .. .. . .. . . .. ... . . ...
. . . .. .. ...... . . ....... . .. . .. ....... . ..
. . . ... .. . =======+=+==+======+=====+======. . ... .
. ....######======+================+=====+===+===+===+=+=+=+== .... ...
. . .###%##########=============+===+=========++++++=====+ . . .
. . ..######%###%###%####%======+===++==++=+===+==+++++=.. . . .
... ... ##########%##%######%####=+==+======++++===+==+=. . . ...
.. .. . .#####%#######%####...........=+====+=====+=== .. . .. ..
. ..... . ... ##%####%%######%.asciirend.======+=+==+=== . .... ..... .
.. .. . . ##########%####...........+========+==== .. ... .
. . .. . ##%##############%##=+++======+==+=== .. ... .. .. ..
.. .... . .##################=+=====++===+==+ . . . .
. ... . ... #%####%#####%###==+=+==+=+++== ... . ... ..
. .. . . ... . .. .. ##########%%##+===++===+=+ . . .. .. ..
. . . .. . .. . ############+===+=++==. . . .. . .. .
. . . . . . . ... ##########+==++=++ ..... . . . . . . .
.... .. ... .... .. #%#####%==+=== .. . . .. .. . .... ..
.. . ... .. .. .. ... ..##%###+=== . ... . .. . . . .
asciirend
is a no_std
compatible 3D rendering core. This crate renders objects in several
stages:
Fragments are shaded in full sRGB float color space, which then is quantized to characters with a
dithering algorithm. This allows the image to have clearer color transitions, as opposed to direct
character shading. This also means the rendering backend is agnostic to the available color space
(so long as it's not HDR!), which is important for a generic no_std
compatible renderer.
Please see examples/sample.rs
for usage sample.
asciirend
has a javascript sample that uses WASM. Albeit the API surface is limited, it is
possible to use it to draw basic interactive scenes. Please see web_sample
directory for details.
In addition, there is a python sample (and pip package). Please see python
subdirectory for more details, or install asciirend
package, and run the python sample at
sample.py
.