Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Draw landscapes instead of DiceBear's Shapes style

2a8c7fbf4b2670a386ab2c203db20bb90489263a · Keenan Nemetz · 8d ago · parent 97f77001

Draw landscapes instead of DiceBear's Shapes style

DiceBear ships no landscape style, so the bundle now carries one written
against its core API. The engine that matters is still DiceBear's — the
seeded PRNG, the option handling, the 100×100 box and the circular mask
— while the style is part of Vole and carries this project's licence.
That drops the Shapes licence file and leaves DiceBear's own MIT notice.

The art is one idea: the account's tone is the sky, two or three hills
are the same colour a step darker, and the sun is drawn from Everforest's
cream, yellow or sunset orange. Each hill is a circle whose centre sits
below the box, so only its ridge shows; drawing them back to front with
one step of shade between them is what gives the depth at 17px without
an outline. The sun is placed above the highest ridge, so it is never
lost behind a hill, and a low ridge can swallow its foot like a sunset.

The bundle is now 10KB (4KB gzipped) and an avatar is about 470 bytes
of SVG, down from 18KB and 800 because Shapes was the bigger style. The
server's half is unchanged: the initial on the account's ground is drawn
first and stays if the script never runs.

server/web/templates.go +4−3

@@ -32,9 +32,10 @@ package web
32 32 // that language; confetti.browser.js (canvas-confetti 1.9.3, ISC, see
33 33 // static/canvas-confetti.LICENSE) is fetched by app.js only on a page a landing
34 34 // redirected to, so the rest of the instance never pays for it;
35 // dicebear-avatars.min.js (DiceBear core 9.3.1 and Shapes 9.4.2, MIT and CC0,
36 // built from scripts/avatars-entry.js) is loaded on every page because a name can
37 // be anywhere, and app.js draws each avatar from the name in its data attribute.
35 // dicebear-avatars.min.js (DiceBear core 9.3.1, MIT, carrying Vole's own Landscape
36 // style, built from scripts/avatars-entry.js) is loaded on every page because a
37 // name can be anywhere, and app.js draws each avatar from the name in its data
38 // attribute.
38 39
39 40 import (
40 41 "bytes"