git ssb

0+

dinoworm 🐛 / solarpunk-icon



Commit 0819cd8c289b3089eef1dacfdd7f450a71ee0948

plants!

Michael Williams committed on 2/7/2019, 8:15:11 PM
Parent: 3bbf848a52801dc212408be047c6d41ea59e312e

Files changed

icon.svgchanged
index.jschanged
icon.svg
icon.svg
index.jsView
@@ -8,9 +8,9 @@
88 viewBox="-1 -1 2 2"
99 >
1010 ${plants({ size: 0.25, offsetRadius: 0.2 })}
1111 ${gear({ offsetRadius: 0.15, toothLength: 0.3, toothWidth: 0.2 })}
12- ${moons({ moonRadius: 0.1, offsetRadius: 0.7 })}
12 + ${moons({ moonRadius: 0.2, offsetRadius: 0.7 })}
1313 </svg>
1414 `
1515 }
1616
@@ -59,8 +59,11 @@
5959 }
6060 .plant-stem {
6161 fill: none;
6262 }
63 + .plant-leaf {
64 + fill: green;
65 + }
6366 </style>
6467 ${range({ start: 0, stop: 1, step: 1/8 })
6568 .map(index => plant({
6669 size,
@@ -86,24 +89,39 @@
8689 M 0,0
8790 L 0,${size}
8891 "
8992 />
90- <path class="plant-stem"
91- d="
92- M 0,${size * 0.9}
93- C 0,${size * 0.8} 0,${size * 1.2} ${size * 0.3},${size * 1.4}
94- "
95- />
96- <path class="plant-stem"
97- d="
98- M 0,${size * 0.9}
99- C 0,${size * 0.8} 0,${size * 1.2} ${size * -0.3},${size * 1.4}
100- "
101- />
93 + ${plantStem({ size, direction: 1 })}
94 + ${plantStem({ size, direction: -1 })}
95 + ${plantLeaf({ size, direction: 1 })}
96 + ${plantLeaf({ size, direction: -1 })}
10297 </g>
10398 `
10499 }
105100
101 +function plantStem ({ size, direction }) {
102 + return `
103 + <path class="plant-stem"
104 + d="
105 + M 0,${size * 0.9}
106 + C 0,${size * 0.8} 0,${size * 1.2} ${size * direction * 0.3},${size * 1.4}
107 + "
108 + />
109 + `
110 +}
111 +
112 +function plantLeaf ({ size, direction }) {
113 + return `
114 + <path class="plant-leaf"
115 + d="
116 + M ${size * direction * 0.3},${size * 1.4}
117 + a ${size},${size} -45 0,0 ${size * direction * 0.8},${size * 0.6}
118 + A ${size},${size} -45 0,0 ${size * direction * 0.3},${size * 1.4}
119 + "
120 + />
121 + `
122 +}
123 +
106124 function moons ({ moonRadius, offsetRadius }) {
107125 return `
108126 <style type="text/css">
109127 .moon {

Built with git-ssb-web