1
0
Fork 0
freesewing/packages/react/components/LineDrawing/bee.mjs

58 lines
40 KiB
JavaScript
Raw Normal View History

2024-10-06 11:49:14 +02:00
import React from 'react'
import { LineDrawingWrapper, thin, dashed } from './shared.mjs'
/*
* This strokeScale factor is used to normalize the stroke across
* designs so we have a consistent look when showing our collection
2024-10-06 11:49:14 +02:00
*/
const strokeScale = 0.4
2024-10-06 11:49:14 +02:00
/**
* A linedrawing component for Bee
*
* @component
* @param {object} props - All component props
* @param {string} props.className - Any CSS classes to apply
* @param {number} props.stroke - The stroke width to apply
* @returns {JSX.Element}
*/
export const Bee = ({ className, stroke = 1 }) => (
<LineDrawingWrapper viewBox="-20 0 120 120" {...{ stroke, className }}>
<Front stroke={stroke * strokeScale} />
</LineDrawingWrapper>
)
/**
* A linedrawing component for the front of Bee
*
* @component
* @param {object} props - All component props
* @param {string} props.className - Any CSS classes to apply
* @param {number} props.stroke - The stroke width to apply
* @returns {JSX.Element}
*/
export const BeeFront = Bee
2024-10-06 11:49:14 +02:00
/*
* SVG elements for the front
*/
const Front = ({ stroke }) => (
2024-10-06 11:49:14 +02:00
<>
<path
key="stitches"
{...dashed(stroke)}
{...thin(stroke)}
d="m 70.406974,75.018686 c 7.1609,-14.22416 -2.42094,-25.91197 -8.42857,-33.8338 l -1.21319,0.003 c -0.0726,-0.0161 -16.88073,13.19272 -17.67475,32.55075 m -36.5540484,1.29146 c -7.16090501,-14.22416 2.412649,-25.92437 8.4202704,-33.8462 l 1.213194,-0.006 c 0.0726,-0.0161 16.889014,13.21339 17.683034,32.57142"
/>
<path
key="folds"
opacity={0.3}
d="m 70.596164,73.491226 c -0.0397,0.19816 -0.0317,0.40128 0.0238,0.58706 0.0291,0.0941 0.0767,0.17835 0.11377,0.27 0.0344,0.0917 0.082,0.17835 0.11907,0.27744 l -0.0106,0.007 c -0.0979,-0.0569 -0.16933,-0.14119 -0.23018,-0.23036 -0.0582,-0.0917 -0.082,-0.19817 -0.0979,-0.30221 -0.037,-0.20807 -0.008,-0.4211 0.0688,-0.61184 z m 0.24342,1.13946 c 0.008,-0.14863 0.0132,-0.29726 0.0265,-0.44588 0.0159,-0.14863 0.0132,-0.29725 0.037,-0.44341 0.0556,-0.29229 0.12171,-0.58211 0.21431,-0.86698 l 0.0132,0.003 c -0.0106,0.29725 -0.0476,0.59202 -0.0926,0.88432 -0.0212,0.14615 -0.0609,0.28982 -0.0873,0.43597 -0.0291,0.14615 -0.0635,0.28982 -0.0952,0.43596 z m -1.016,-1.33764 c -0.005,0.23781 -0.09,0.46074 -0.11642,0.69112 -0.0132,0.11642 -0.0291,0.23036 -0.0344,0.34678 -0.0106,0.11395 -0.005,0.2279 0.0185,0.34432 l -0.005,0.003 c -0.0608,-0.10652 -0.0794,-0.23037 -0.0794,-0.3468 0.003,-0.1189 0.0238,-0.23532 0.0476,-0.35175 0.0397,-0.23284 0.14023,-0.45083 0.16405,-0.68368 z m -2.04523,0.0372 c -0.10583,0.39138 0.008,0.81744 0.28575,1.11222 l -0.0794,0.0223 c 0.037,-0.29478 0.0582,-0.58955 0.10055,-0.88432 0.0556,-0.2923 0.1217,-0.58212 0.21431,-0.86699 l 0.0132,0.003 c -0.0212,0.59698 -0.14552,1.17414 -0.23813,1.76121 l -0.0159,0.0966 -0.0661,-0.0743 c -0.2831,-0.32698 -0.36512,-0.78276 -0.22754,-1.16919 z m -2.97127,-0.25018 c -0.10584,0.39137 0.008,0.81743 0.28575,1.11221 l -0.0794,0.0223 c 0.037,-0.29478 0.0582,-0.58955 0.10054,-0.88432 0.0556,-0.2923 0.12171,-0.58211 0.21432,-0.86699 l 0.0132,0.003 c -0.0212,0.59698 -0.14552,1.17415 -0.23813,1.76122 l -0.0159,0.0966 -0.0662,-0.0743 c -0.2831,-0.32698 -0.36512,-0.78276 -0.22754,-1.16918 z m -6.41615,-0.18331 c -0.0556,0.20808 -0.0582,0.43101 0.008,0.63414 0.0661,0.20312 0.17462,0.39633 0.31485,0.55734 l -0.0794,0.0248 c 0.0238,-0.31212 0.0317,-0.62423 0.0608,-0.93635 v -0.003 -0.003 c 0.0556,-0.29973 0.12436,-0.59698 0.21961,-0.89176 l 0.0132,0.003 c -0.0106,0.30716 -0.0476,0.60936 -0.0979,0.90909 v -0.005 c -0.0291,0.31211 -0.0741,0.62175 -0.10583,0.93387 l -0.0106,0.11146 -0.0688,-0.0891 c -0.14287,-0.18084 -0.24077,-0.38395 -0.29369,-0.59946 -0.0503,-0.21551 -0.0397,-0.44092 0.0291,-0.649 z m -3.84969,-0.41863 c -0.0212,0.16596 -0.0185,0.33441 -0.0238,0.50285 l -0.003,0.50532 0.003,0.25267 c 0.003,0.0793 0,0.17835 0.0238,0.23285 0.0106,0 -0.0291,-0.01 -0.0265,-0.005 0,0 0.008,-0.007 0.0106,-0.0149 0.0106,-0.0149 0.0185,-0.0322 0.0291,-0.0521 l 0.0529,-0.11395 c 0.0185,-0.0396 0.0344,-0.0793 0.0556,-0.1189 0.0106,-0.0198 0.0212,-0.0396 0.0397,-0.0594 0.0106,-0.01 0.0159,-0.0223 0.037,-0.0322 0.0212,-0.0173 0.0741,-0.007 0.0873,0.0149 l -0.0794,0.0223 c 0.037,-0.29477 0.0582,-0.58955 0.10054,-0.88432 0.0556,-0.2923 0.12171,-0.58211 0.21431,-0.86698 l 0.0132,0.003 c -0.0212,0.59698 -0.14552,1.17415 -0.23812,1.76121 l -0.0794,0.0223 c -0.003,0.005 0.0265,0.01 0.0265,0.005 0.003,-0.003 -0.005,0.005 -0.0106,0.01 -0.0106,0.0124 -0.0212,0.0298 -0.0317,0.0471 -0.0212,0.0346 -0.0397,0.0743 -0.0582,0.11147 l -0.0582,0.11643 c -0.0106,0.0198 -0.0212,0.0396 -0.037,0.0594 -0.008,0.01 -0.0159,0.0198 -0.0318,0.0322 -0.008,0.005 -0.0291,0.0149 -0.0476,0.007 -0.0238,-0.007 -0.0264,-0.0173 -0.0344,-0.0272 -0.037,-0.10403 -0.0212,-0.18082 -0.0238,-0.26752 l 0.008,-0.25266 0.0238,-0.50533 c 0.0132,-0.16845 0.0159,-0.33688 0.045,-0.50533 z m 1.90236,1.97672 c -0.008,-0.16101 -0.0265,-0.3245 -0.0291,-0.48551 0.005,-0.16349 0.0238,-0.3245 0.0529,-0.48551 0.0609,-0.31954 0.16933,-0.63414 0.32015,-0.92643 l 0.0397,-0.0768 0.0106,0.0843 c 0.0212,0.17093 0.0238,0.34431 0.005,0.51524 -0.0185,0.1734 -0.0794,0.33688 -0.11113,0.50285 -0.0344,0.16596 -0.0688,0.33441 -0.0741,0.50037 -0.003,0.0843 0.005,0.16845 0.0291,0.24771 0.0212,0.0817 0.0661,0.15606 0.0979,0.23533 l -0.005,0.003 c -0.0397,-0.0768 -0.09,-0.14863 -0.12171,-0.23037 -0.0291,-0.0817 -0.0397,-0.17092 -0.0423,-0.25762 -0.003,-0.17339 0.0238,-0.34432 0.0529,-0.51275 0.0317,-0.17093 0.0926,-0.33194 0.11113,-0.49791 0.0212,-0.16596 0.0238,-0.33688 0.008,-0.50284 l 0.0503,0.007 c -0.15611,0.28733 -0.26723,0.5945 -0.33338,0.91156 -0.0344,0.15
/>
<path
key="bow"
d="m 39.708134,3.6034957 c 0,0 0.71966,0.94456 0.0926,2.04522 0,0 -0.77523,0.33073 -1.39435,0.0476 0,0.003 0.2487,-1.29381 -0.30427,-1.99761 m 0.33974,0.94729 c 0,0 -1.30547,1.23815 -1.13349,2.7648 0.16933,1.52929 0.47625,-0.53446 0.47625,-0.53446 m 2.267829,-2.0409 c 0,0 0.841021,1.01432 1.010351,1.74986 0.16934,0.73819 -0.47096,0.78052 -0.50535,0.26194 0.0212,-1.016 -0.505001,-2.0118 -0.505001,-2.0118 z m -3.673185,2.26115 c -0.386951,2.29139 -1.363168,4.6415803 -1.584149,4.7782803 0.843219,0.51267 2.052826,-0.0878 2.052826,-0.0878 1.113076,-1.3137 1.496013,-5.3168903 1.560628,-6.0895503 -7.04e-4,-3.2e-4 -0.0014,-7.1e-4 -0.0021,-0.001 0,1.9e-4 0.003,-0.0186 0.0047,-0.0279 m 1.580782,-1.44539 c 0.0974,0.36567 0.117781,0.8606 -0.174667,1.39423 0.05007,2.4737 1.668632,5.8652703 1.668632,5.8652703 0,0 0.788806,0.94717 1.484664,0.61908 0.69585,-0.32544 0.997356,-0.71158 0.997356,-0.71158 -0.5424,-0.0661 -1.764888,-2.2677703 -1.979208,-4.3315203 m -1.997294,-2.83755 c 2.85e-4,0.001 0.0034,0.004 0.0041,0.005 0.04643,0.0365 0.144022,0.1174 0.259933,0.21807 0.398592,0.32301 1.149458,0.98355 1.546675,1.93942 0.02585,0.0598 0.0505,0.11982 0.07183,0.18035 0.02876,0.0816 0.05301,0.16343 0.07235,0.24598 0.01934,0.0825 0.03384,0.16561 0.04237,0.24856 0.01124,0.10821 0.02687,0.21693 0.04341,0.32556 0.0077,0.0493 0.01559,0.0985 0.02429,0.1478 0.0067,0.0389 0.01436,0.0779 0.0217,0.11679 0.02732,0.14191 0.05773,0.28373 0.09198,0.42426 0.377271,0.72482 0.700448,1.49704 0.867648,2.2484403 0.06149,0.11085 0.123328,0.21424 0.184485,0.31058 0.0013,0.002 0.0023,0.004 0.0036,0.006 0.0603,0.0947 0.120185,0.18216 0.1788,0.26148 6.9e-4,9.3e-4 0.0014,0.002 0.0021,0.003 0.0071,0.01 0.01459,0.02 0.02171,0.0295 0.02866,0.0379 0.05628,0.0717 0.08423,0.10542 0.01877,0.0225 0.03743,0.0451 0.05581,0.0656 0.02285,0.0256 0.04553,0.0489 0.0677,0.0713 0.02094,0.0211 0.04125,0.0408 0.0615,0.0589 0.02381,0.0215 0.04806,0.0433 0.0708,0.0605 0.0034,0.003 0.0069,0.005 0.01034,0.008 0.03199,0.0234 0.06252,0.0425 0.09198,0.0568 0.0095,0.005 0.01872,0.008 0.02791,0.0119 0.0067,0.003 0.01356,0.006 0.02015,0.008 0.01688,0.005 0.03332,0.009 0.04909,0.0114 0,0 -0.03678,0.0457 -0.106971,0.11472 0.488087,-0.42858 0.920686,-1.26777 0.236678,-2.8556403 -1.18532,-2.75167 -4.386812,-5.0431 -4.386812,-5.0431 h -5.17e-4 c -0.137059,-0.0945 -0.301394,-0.14388 -0.489376,-0.154 -0.313302,-0.0169 -0.691914,0.075 -1.118794,0.2465 0.0529,0.33602 -2.7598,1.94478 -4.027145,3.01635 -1.2647,1.0742 -1.031835,2.32052 -0.3545,4.0297303 0,0 0.385203,0.930537 1.126546,1.16014 -0.01522,-0.0149 -0.03768,-0.0135 -0.05191,-0.0301 0.0182,-0.009 0.04677,-0.0434 0.07,-0.0681 0.250246,-0.45326 0.496261,-1.06707 0.690441,-1.59663 -0.104183,-0.11955 -1.195948,-1.4746103 -0.125618,-2.3602303 0.352153,-0.29138 0.684323,-0.55071 0.994772,-0.78807 0.02714,-0.11786 0.05694,-0.23142 0.08888,-0.34158 0.01287,-0.0444 0.02726,-0.0855 0.04082,-0.12867 0.02123,-0.0675 0.04231,-0.13593 0.06511,-0.20051 0.01432,-0.0405 0.03007,-0.0784 0.04496,-0.11782 0.02439,-0.0645 0.04815,-0.12917 0.0739,-0.19069 0.01638,-0.0391 0.03378,-0.0758 0.05064,-0.11368 0.02428,-0.0546 0.04821,-0.10964 0.07338,-0.16175 0.02243,-0.0464 0.04571,-0.0904 0.06873,-0.13488 0.02105,-0.0407 0.0421,-0.0818 0.06356,-0.12092 0.02495,-0.0455 0.05006,-0.0889 0.07545,-0.13229 0.02117,-0.0362 0.04216,-0.0722 0.06356,-0.10697 0.02493,-0.0404 0.0498,-0.0793 0.07493,-0.11782 0.02193,-0.0336 0.04362,-0.067 0.06563,-0.0992 0.02446,-0.0358 0.04892,-0.0704 0.07338,-0.10439 0.02493,-0.0347 0.04961,-0.0684 0.07441,-0.10129 0.02339,-0.031 0.04658,-0.061 0.06976,-0.0904 0.02045,-0.026 0.04075,-0.0512 0.06098,-0.076 0.02629,-0.0322 0.05224,-0.0638 0.07803,-0.0941 0.01472,-0.0173 0.02836,-0.033 0.04289,-0.0496 0.07299,-0.0836 0.142765,-0.1596 0.208773,-0.2279 0.06542,-0.0677 0.32153,-0.34259 0.376871,-0.39621 m 0.171416,1.57547 -0.0088,0.004 c 0,0 -9.7e-4,0.009 -0.001,0.01 l 0.0088,-0.007 c 3e-6,-2e-5 5.14e-4,2e-5 5.17e-4,0 2.38e-4,-0.002 2.78e-4,-0.005 5.17e-4,-0.007 z m 0.01964,-0.20774 c -4.4e-4,0.006 -0.0011,0.0122 -0.0016,0.0181 5.67e-4,-0.007 0.0015,-0.
/>
</>
)