peek-vanilla
JavaScriptThe reference port. Zero dependencies, no React, no build step. Static SVG strings, or mount a face with the full live animation rig: springs, blinks, saccades, gaze.
npm i @sakayori/peek-vanilla
The deterministic avatar family
Peek turns any name into an avatar. Nothing is stored, nothing is fetched, so the face is the same one every time, everywhere. These are independent ports of the original Peek, bringing identical faces to JavaScript, Kotlin, and Rust.
01
Pick the language you ship in. The faces stay the same.
The reference port. Zero dependencies, no React, no build step. Static SVG strings, or mount a face with the full live animation rig: springs, blinks, saccades, gaze.
npm i @sakayori/peek-vanilla
For the JVM and Android. Drop it into Jetpack Compose, or render SVG strings on a server. Verified byte-identical to the reference across 445 golden vectors.
com.github.Sakayorii:peek-kotlin:v1.0.1
For CLIs, servers, and WASM. Same hash, same seed, same drawing code, compiled down to nothing. One deliberate difference: lone surrogates become U+FFFD, per TextEncoder semantics.
sakayori-peek = { git = ".../peek-rust" }
02
Each face is computed from the name with FNV-1a and mulberry32. There is no database and no network call, so identity is portable by construction.
Each face above is rendered live from its language name. Same name in, same face out, in every runtime. The Kotlin and Rust ports produce byte-identical SVG for the same input, checked by 445 golden vectors.
03
A string in, a face out. The shape of the call barely changes between languages.
import { toSvg, mount } from '@sakayori/peek-vanilla';
// a string of SVG, anywhere JavaScript runs
const svg = toSvg('Sakayori');
// or a live face, animated, in the DOM
mount('Sakayori', '#avatar', { animate: true });
// repositories { maven("https://jitpack.io") }
// implementation("com.github.Sakayorii:peek-kotlin:v1.0.1")
val svg: String = toSvg("Sakayori")
val happy: String = toSvg(
"Sakayori",
PeekOptions(expression = "happy")
)
# sakayori-peek = { git = "https://github.com/Sakayorii/peek-rust" }
use sakayori_peek::{to_svg, PeekOptions};
let svg = to_svg("Sakayori", &PeekOptions::default());
Credit
The original Peek, the algorithm, the drawing code, and the design belong to Doan Labs. This family ports their work to new languages with the same care, keeping the MIT license intact. Thank you for making something worth porting.
Visit the original