47 lines
3.0 KiB
JavaScript
47 lines
3.0 KiB
JavaScript
/**
|
|
* 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/YHb4ShTgmO8Lqhkz1plLfL
|
|
*/
|
|
import { getComponents } from './utils/getComponents.js';
|
|
import { getColors } from './utils/getColors.js';
|
|
import { onPreCreate } from './hooks/onPreCreate.js';
|
|
import { onPostCreate } from './hooks/onPostCreate.js';
|
|
export const meta = {
|
|
title: 'Avatar Illustration System',
|
|
creator: 'Micah Lanier',
|
|
source: 'https://www.figma.com/community/file/829741575478342595',
|
|
homepage: 'https://dribbble.com/micahlanier',
|
|
license: {
|
|
name: 'CC BY 4.0',
|
|
url: 'https://creativecommons.org/licenses/by/4.0/',
|
|
},
|
|
};
|
|
export const create = ({ prng, options }) => {
|
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
onPreCreate({ prng, options });
|
|
const components = getComponents({ prng, options });
|
|
const colors = getColors({ prng, options });
|
|
onPostCreate({ prng, options, components, colors });
|
|
return {
|
|
attributes: {
|
|
viewBox: '0 0 360 360',
|
|
fill: 'none',
|
|
'shape-rendering': 'auto'
|
|
},
|
|
body: `<g transform="translate(80 23)">${(_b = (_a = components.base) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(170 183)">${(_d = (_c = components.mouth) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(110 102)">${(_f = (_e = components.eyebrows) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(49 11)">${(_h = (_g = components.hair) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="translate(142 119)">${(_k = (_j = components.eyes) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g><g transform="rotate(-8 1149.44 -1186.92)">${(_m = (_l = components.nose) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g><g transform="translate(84 154)">${(_p = (_o = components.ears) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}</g><g transform="translate(53 272)">${(_r = (_q = components.shirt) === null || _q === void 0 ? void 0 : _q.value(components, colors)) !== null && _r !== void 0 ? _r : ''}</g>`,
|
|
extra: () => ({
|
|
...Object.entries(components).reduce((acc, [key, value]) => {
|
|
acc[key] = value === null || value === void 0 ? void 0 : value.name;
|
|
return acc;
|
|
}, {}),
|
|
...Object.entries(colors).reduce((acc, [key, value]) => {
|
|
acc[`${key}Color`] = value;
|
|
return acc;
|
|
}, {}),
|
|
}),
|
|
};
|
|
};
|
|
export { schema } from './schema.js';
|