UNPKG

@dicebear/bottts

Version:

Avatar style for DiceBear

50 lines (49 loc) 1.49 kB
/** * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma. * * Plugin: https://www.figma.com/community/plugin/1005765655729342787 * File: https://www.figma.com/file/4nf3pyoOuM1U9Pa8M0cL6u */ import { pickComponent } from './pickComponent.js'; export function getComponents({ prng, options, }) { const sidesComponent = pickComponent({ prng, group: 'sides', values: options.sides, }); const topComponent = pickComponent({ prng, group: 'top', values: options.top, }); const faceComponent = pickComponent({ prng, group: 'face', values: options.face, }); const mouthComponent = pickComponent({ prng, group: 'mouth', values: options.mouth, }); const eyesComponent = pickComponent({ prng, group: 'eyes', values: options.eyes, }); const textureComponent = pickComponent({ prng, group: 'texture', values: options.texture, }); return { sides: prng.bool(options.sidesProbability) ? sidesComponent : undefined, top: prng.bool(options.topProbability) ? topComponent : undefined, face: faceComponent, mouth: prng.bool(options.mouthProbability) ? mouthComponent : undefined, eyes: eyesComponent, texture: prng.bool(options.textureProbability) ? textureComponent : undefined, }; }