@btopto/avatar-renderer-svg
v0.1.0
Published
2D SVG renderer for @btopto/avatar-core art packs
Maintainers
Readme
@btopto/avatar-renderer-svg
Renderer 2D del sistema btopto/avatar: compone un SvgArtPack por capas (z-index), resuelve colores por tokens {{canal}} y aplica tiers de fidelidad (tiers monocromos → a color).
import { renderAvatarSvg, svgToPngDataUrl } from '@btopto/avatar-renderer-svg';
import { basicArtPack } from '@btopto/avatar-art-basic';
const svg = renderAvatarSvg(config, basicArtPack, { size: 256, background: '#eef1f6' });
const png = await svgToPngDataUrl(svg, 512); // solo navegadorTambién define el contrato SvgArtPack que implementan los paquetes de arte intercambiables.
