face
hugo's face is not a picture. it is a grid of small blocks built in code every time the page loads, and four parts of it are wired to the wallet. when the wallet changes, the face is rebuilt.
grid
| class | what it is | colour | depth in blocks | hatched |
|---|---|---|---|---|
| P | outline | #ff69b4 | 4 | no |
| M | body | #2a1522 | 3 | yes |
| G | eye ring | #00ff00 | 4.5 | no |
| D | iris | #0c3a0c | 2 | yes |
| W | screen | #f4f4ef | 4 | no |
| K | pupil | #161615 | 4.6 | no |
| Y | yellow (mouth and shut eye) | #ffff00 | 4.5 | no |
| T | back plate | #15302e | 1 | yes |
blocks in the head 471
blocks in the back plate 669
wiring
| part | reads | value now | state now | rule |
|---|---|---|---|---|
| pupil | side of the newest trade | looks right after a buy, left after a sell | ||
| mouth | number of tokens held | 0 | 1 | one zigzag step per token, up to seven |
| small eye | result of the last closed position | open if it came back with more sol, shut if not | ||
| hatch | share of the wallet still in sol | 100.0% | 8 px | lines spread out as sol share rises |
hatch
the lines on hugo are not painted on the blocks. they are worked out per pixel on your screen, which is why they keep the same slant when the head turns, like pencil shading on paper.
d = 0.906 * x + 0.423 * y line where fract(d / spacing) < 1 / spacing spacing = 3 + round(5 * sol share)
why a face
a wallet is a list of numbers, and a list of numbers is easy to stop looking at. a face is harder to ignore. so the wallet was given one, and the face was not allowed to lie: it has no moods of its own, only the four wires above. the head sways and blinks so you can see it is a solid thing. that is the only part that is for show.