components / donut

donut.

spinning ascii torus baked off-thread in a shared web worker and replayed as a seamless loop. multiple donuts share one bake.

installation
bunx @justin06lee/chrome@latest add donut
props
nametypedefaultdescription
widthnumber60char columns
heightnumber30char rows
Rnumber0.4torus center radius
rnumber0.25torus tube radius
Knumber-projection scale; omit to auto-fit the torus to the grid
Dnumber4camera distance
dunumber-optional override for the adaptive u-sampling step (radians)
dvnumber-optional override for the adaptive v-sampling step (radians)
speednumber0.5625
luminanceCharsstring' ,-~:;=!*#$@'
lightDirection[number, number, number][0, 1, -1]
yScaleOverridenumber-override the measured char-cell aspect
backgroundstring-CSS background applied to the root element. transparent by default.
isolatebooleantrueapply CSS contain to isolate per-frame repaint; set false inside <Chrome> so the foil paints through