Skip to content

Getting Started

Planet Avatar generates deterministic SVG planets from a seed. The same seed and options always return the same avatar.

Terminal window
npm install planet-avatar
import { createPlanetAvatar } from 'planet-avatar'
const svg = createPlanetAvatar({
seed: 'viking',
size: 128,
title: 'Viking planet'
})
document.querySelector('#avatar')!.innerHTML = svg

Use mountPlanetAvatar() when you want the small DOM helper instead of assigning innerHTML yourself.