DiceBear 10.5 - Release Notes #550
FlorianKoerner
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
10.4 was the big artwork release. 10.5 is the quiet one that follows it: two more styles, one new color option, and three packages that lost a lot of weight.
🎨 Voxel Art and Voxel Bot
@dicebear/styles10.4.0 adds two styles and takes the collection from 50 to 52. Both are DiceBear originals under CC0 1.0, so you can use them anywhere, commercial projects included, without attribution.Voxel Art
Full-body characters stacked out of small cubes, in the look of a voxel game. 21 tops, 10 outfits, 8 eye sets, 10 mouths, and on top of that glasses, beards, eyebrows, noses, and cheeks. Eight color groups, from skin to shoes, are yours to override.
Voxel Bot
The same blocky vocabulary, pointed at small robots: 7 heads, 6 chest plates, 7 eye sets, and 5 mouths on a glowing screen face. The glow is its own color group, so you can tune the screen without touching the body.
Animation
Both ship the opt-in
animationcomponent that arrived in 10.4, which brings the count of animated styles to 18 of 52. Switch it on withanimationVariantortags=animation:Voxel Art
Voxel Bot
📋 Colors in the order you wrote them
Until now, every color you passed went through the shuffle. Great for variety, useless when you want a flag on a background and not one of its permutations. Discussion #549 asked for a way out, and 10.5 has one: the new
*ColorOrderoption.fixedrandom(default)The option exists for every color group in a style, so
skinColorOrder,hairColorOrder, and the rest work the same way. Withfixed, a gradient uses your colors as stops from first to last, a solid fill always takes the first one, and the number of stops defaults to the number of colors you passed. Without a*Coloroption,fixedonly skips the shuffle and uses the style's own palette in sorted order, where constraints such ascontrastTostill apply, so the result can stay seed dependent.randomremains the default, so nothing you have rendered so far changes. The option is in all six cores (JavaScript, PHP, Python, Rust, Go, and Dart) and in the HTTP API, validated by@dicebear/schema1.4.0 and pinned by two new parity fixture cases per style. See the core options guide for the full rules.One thing to know for later: the sorted palette fallback is deprecated. In DiceBear 11,
fixedwithout user colors will take the palette in its definition order, the same verbatim rule that already applies to colors you pass yourself.📦 Smaller packages
The JavaScript core generates its schema validators with schemasafe now instead of Ajv. The package still has zero runtime dependencies, and the validator code drops from 164 KB to 114 KB minified, which your browser bundle inherits. Both compilers accept and reject the same inputs: every published style definition and a pile of deliberately broken ones produced identical verdicts.
Error messages did change, though. schemasafe reports JSON pointers without prose, so the message is now built from the failing keyword (
/size is smaller than allowed), and everyValidationErrorDetailcarries two new optional fields,schemaPathandkeyword. If you match on message strings anywhere, this is the spot to look.@dicebear/converterlost its XML parser in the browser build. Setting the render size and mirroringmask-typedeclarations run on the nativeDOMParserandXMLSerializerinstead, which every browser has anyway. That parser stack was nine tenths of the bundle, so a browser build goes from 26 kB to 1.4 kB gzipped. The Node build keeps the parser, since Node has nothing native to swap in. Two edges shift with it: a malformed SVG fails with a clear error rather than a parser-specific one, andnormalizeMaskTypereturns self-closing empty elements in the browser.The CLI dropped the
ajvdependency it no longer used, which makes an install about 2.7 MB smaller.🧰 Also in 10.5
clay,critters,moods,pixelbot,sprouts,thumbs,voxel-art, andvoxel-bot. Its list now matches the Characters category on the website exactly, all 32 of them, with the new option labels translated into English, German, and Portuguese.@dicebear/coreat 58 kB instead of 26 kB and@dicebear/converterat 8 kB instead of 26 kB. Its converter hint also promised PDF output, which the package has never done.Everything else is in the changelog.
This discussion was created from the release DiceBear 10.5 - Release Notes.
All reactions