@20baht/stickers 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/LICENSE +48 -0
  2. package/README.md +173 -2
  3. package/dist/all.d.ts +4 -0
  4. package/dist/all.js +7 -0
  5. package/dist/element.d.ts +103 -0
  6. package/dist/element.js +181 -0
  7. package/dist/graph.d.ts +172 -0
  8. package/dist/graph.js +374 -0
  9. package/dist/icons/access-point.d.ts +2 -0
  10. package/dist/icons/access-point.js +34 -0
  11. package/dist/icons/ai-agent.d.ts +2 -0
  12. package/dist/icons/ai-agent.js +50 -0
  13. package/dist/icons/alarm-clock.d.ts +2 -0
  14. package/dist/icons/alarm-clock.js +46 -0
  15. package/dist/icons/all-in-one.d.ts +2 -0
  16. package/dist/icons/all-in-one.js +37 -0
  17. package/dist/icons/angpao.d.ts +2 -0
  18. package/dist/icons/angpao.js +46 -0
  19. package/dist/icons/badge-reader.d.ts +2 -0
  20. package/dist/icons/badge-reader.js +51 -0
  21. package/dist/icons/baht-note.d.ts +2 -0
  22. package/dist/icons/baht-note.js +42 -0
  23. package/dist/icons/bamboo.d.ts +2 -0
  24. package/dist/icons/bamboo.js +57 -0
  25. package/dist/icons/banana-leaf.d.ts +2 -0
  26. package/dist/icons/banana-leaf.js +87 -0
  27. package/dist/icons/banana-tree.d.ts +2 -0
  28. package/dist/icons/banana-tree.js +75 -0
  29. package/dist/icons/bear.d.ts +2 -0
  30. package/dist/icons/bear.js +39 -0
  31. package/dist/icons/blade-chassis.d.ts +2 -0
  32. package/dist/icons/blade-chassis.js +43 -0
  33. package/dist/icons/bond.d.ts +2 -0
  34. package/dist/icons/bond.js +48 -0
  35. package/dist/icons/books.d.ts +2 -0
  36. package/dist/icons/books.js +44 -0
  37. package/dist/icons/bts-card.d.ts +2 -0
  38. package/dist/icons/bts-card.js +47 -0
  39. package/dist/icons/budget-jar.d.ts +2 -0
  40. package/dist/icons/budget-jar.js +43 -0
  41. package/dist/icons/cactus.d.ts +2 -0
  42. package/dist/icons/cactus.js +42 -0
  43. package/dist/icons/calculator.d.ts +2 -0
  44. package/dist/icons/calculator.js +46 -0
  45. package/dist/icons/calendar-month.d.ts +2 -0
  46. package/dist/icons/calendar-month.js +66 -0
  47. package/dist/icons/campfire.d.ts +2 -0
  48. package/dist/icons/campfire.js +63 -0
  49. package/dist/icons/cctv.d.ts +2 -0
  50. package/dist/icons/cctv.js +38 -0
  51. package/dist/icons/certificate.d.ts +2 -0
  52. package/dist/icons/certificate.js +50 -0
  53. package/dist/icons/cha-yen.d.ts +2 -0
  54. package/dist/icons/cha-yen.js +68 -0
  55. package/dist/icons/chedi.d.ts +2 -0
  56. package/dist/icons/chedi.js +56 -0
  57. package/dist/icons/classic-phone.d.ts +2 -0
  58. package/dist/icons/classic-phone.js +32 -0
  59. package/dist/icons/clipboard.d.ts +2 -0
  60. package/dist/icons/clipboard.js +61 -0
  61. package/dist/icons/cloud.d.ts +2 -0
  62. package/dist/icons/cloud.js +28 -0
  63. package/dist/icons/coins.d.ts +2 -0
  64. package/dist/icons/coins.js +34 -0
  65. package/dist/icons/compare.d.ts +2 -0
  66. package/dist/icons/compare.js +33 -0
  67. package/dist/icons/confetti.d.ts +2 -0
  68. package/dist/icons/confetti.js +72 -0
  69. package/dist/icons/convenience-bag.d.ts +2 -0
  70. package/dist/icons/convenience-bag.js +51 -0
  71. package/dist/icons/cooling.d.ts +2 -0
  72. package/dist/icons/cooling.js +46 -0
  73. package/dist/icons/copy-files.d.ts +2 -0
  74. package/dist/icons/copy-files.js +37 -0
  75. package/dist/icons/core-switch.d.ts +2 -0
  76. package/dist/icons/core-switch.js +48 -0
  77. package/dist/icons/cursor.d.ts +2 -0
  78. package/dist/icons/cursor.js +27 -0
  79. package/dist/icons/database.d.ts +2 -0
  80. package/dist/icons/database.js +24 -0
  81. package/dist/icons/desktop-tower.d.ts +2 -0
  82. package/dist/icons/desktop-tower.js +41 -0
  83. package/dist/icons/disc-image.d.ts +2 -0
  84. package/dist/icons/disc-image.js +54 -0
  85. package/dist/icons/dollar-note.d.ts +2 -0
  86. package/dist/icons/dollar-note.js +44 -0
  87. package/dist/icons/electric-bill.d.ts +2 -0
  88. package/dist/icons/electric-bill.js +51 -0
  89. package/dist/icons/email.d.ts +2 -0
  90. package/dist/icons/email.js +57 -0
  91. package/dist/icons/empty-state.d.ts +2 -0
  92. package/dist/icons/empty-state.js +75 -0
  93. package/dist/icons/expense.d.ts +2 -0
  94. package/dist/icons/expense.js +36 -0
  95. package/dist/icons/export-file.d.ts +2 -0
  96. package/dist/icons/export-file.js +35 -0
  97. package/dist/icons/eyedropper.d.ts +2 -0
  98. package/dist/icons/eyedropper.js +69 -0
  99. package/dist/icons/face-id.d.ts +2 -0
  100. package/dist/icons/face-id.js +51 -0
  101. package/dist/icons/file.d.ts +2 -0
  102. package/dist/icons/file.js +15 -0
  103. package/dist/icons/finance-b-coins.d.ts +8 -0
  104. package/dist/icons/finance-b-coins.js +14 -0
  105. package/dist/icons/finance-tray.d.ts +11 -0
  106. package/dist/icons/finance-tray.js +41 -0
  107. package/dist/icons/fingerprint.d.ts +2 -0
  108. package/dist/icons/fingerprint.js +45 -0
  109. package/dist/icons/firewall.d.ts +2 -0
  110. package/dist/icons/firewall.js +76 -0
  111. package/dist/icons/floating-ip.d.ts +2 -0
  112. package/dist/icons/floating-ip.js +59 -0
  113. package/dist/icons/flower.d.ts +2 -0
  114. package/dist/icons/flower.js +49 -0
  115. package/dist/icons/food.d.ts +6 -0
  116. package/dist/icons/food.js +18 -0
  117. package/dist/icons/freelance.d.ts +2 -0
  118. package/dist/icons/freelance.js +51 -0
  119. package/dist/icons/fuel.d.ts +2 -0
  120. package/dist/icons/fuel.js +46 -0
  121. package/dist/icons/goal.d.ts +2 -0
  122. package/dist/icons/goal.js +51 -0
  123. package/dist/icons/gold-bar.d.ts +2 -0
  124. package/dist/icons/gold-bar.js +60 -0
  125. package/dist/icons/hard-drive.d.ts +2 -0
  126. package/dist/icons/hard-drive.js +42 -0
  127. package/dist/icons/highlighter.d.ts +2 -0
  128. package/dist/icons/highlighter.js +75 -0
  129. package/dist/icons/home-router.d.ts +2 -0
  130. package/dist/icons/home-router.js +32 -0
  131. package/dist/icons/hot-drink.d.ts +2 -0
  132. package/dist/icons/hot-drink.js +33 -0
  133. package/dist/icons/hsm.d.ts +2 -0
  134. package/dist/icons/hsm.js +54 -0
  135. package/dist/icons/id-card.d.ts +2 -0
  136. package/dist/icons/id-card.js +36 -0
  137. package/dist/icons/income.d.ts +2 -0
  138. package/dist/icons/income.js +28 -0
  139. package/dist/icons/index.d.ts +185 -0
  140. package/dist/icons/index.js +366 -0
  141. package/dist/icons/interest.d.ts +2 -0
  142. package/dist/icons/interest.js +66 -0
  143. package/dist/icons/iot-sensor.d.ts +2 -0
  144. package/dist/icons/iot-sensor.js +35 -0
  145. package/dist/icons/ip-phone.d.ts +2 -0
  146. package/dist/icons/ip-phone.js +47 -0
  147. package/dist/icons/ipad-gen8.d.ts +2 -0
  148. package/dist/icons/ipad-gen8.js +58 -0
  149. package/dist/icons/iphone-17.d.ts +2 -0
  150. package/dist/icons/iphone-17.js +37 -0
  151. package/dist/icons/iso.d.ts +2 -0
  152. package/dist/icons/iso.js +3 -0
  153. package/dist/icons/kaprao.d.ts +2 -0
  154. package/dist/icons/kaprao.js +70 -0
  155. package/dist/icons/key-pair.d.ts +2 -0
  156. package/dist/icons/key-pair.js +54 -0
  157. package/dist/icons/key.d.ts +3 -0
  158. package/dist/icons/key.js +37 -0
  159. package/dist/icons/keyboard.d.ts +2 -0
  160. package/dist/icons/keyboard.js +35 -0
  161. package/dist/icons/kite.d.ts +2 -0
  162. package/dist/icons/kite.js +53 -0
  163. package/dist/icons/kvm.d.ts +2 -0
  164. package/dist/icons/kvm.js +53 -0
  165. package/dist/icons/lamp.d.ts +2 -0
  166. package/dist/icons/lamp.js +49 -0
  167. package/dist/icons/laptop.d.ts +2 -0
  168. package/dist/icons/laptop.js +44 -0
  169. package/dist/icons/load-balancer.d.ts +2 -0
  170. package/dist/icons/load-balancer.js +50 -0
  171. package/dist/icons/lock-screen.d.ts +2 -0
  172. package/dist/icons/lock-screen.js +44 -0
  173. package/dist/icons/long-tail-boat.d.ts +2 -0
  174. package/dist/icons/long-tail-boat.js +66 -0
  175. package/dist/icons/lottery.d.ts +2 -0
  176. package/dist/icons/lottery.js +51 -0
  177. package/dist/icons/lotus.d.ts +2 -0
  178. package/dist/icons/lotus.js +70 -0
  179. package/dist/icons/mac-mini.d.ts +2 -0
  180. package/dist/icons/mac-mini.js +31 -0
  181. package/dist/icons/macbook-air.d.ts +2 -0
  182. package/dist/icons/macbook-air.js +41 -0
  183. package/dist/icons/mailbox-thai.d.ts +2 -0
  184. package/dist/icons/mailbox-thai.js +66 -0
  185. package/dist/icons/mango-sticky-rice.d.ts +2 -0
  186. package/dist/icons/mango-sticky-rice.js +41 -0
  187. package/dist/icons/marigold.d.ts +2 -0
  188. package/dist/icons/marigold.js +69 -0
  189. package/dist/icons/market-basket.d.ts +2 -0
  190. package/dist/icons/market-basket.js +69 -0
  191. package/dist/icons/media-player.d.ts +2 -0
  192. package/dist/icons/media-player.js +71 -0
  193. package/dist/icons/metrics.d.ts +2 -0
  194. package/dist/icons/metrics.js +58 -0
  195. package/dist/icons/mini-pc.d.ts +2 -0
  196. package/dist/icons/mini-pc.js +26 -0
  197. package/dist/icons/modem.d.ts +2 -0
  198. package/dist/icons/modem.js +37 -0
  199. package/dist/icons/monitor.d.ts +2 -0
  200. package/dist/icons/monitor.js +40 -0
  201. package/dist/icons/monstera.d.ts +2 -0
  202. package/dist/icons/monstera.js +47 -0
  203. package/dist/icons/moon.d.ts +2 -0
  204. package/dist/icons/moon.js +55 -0
  205. package/dist/icons/motorbike-taxi.d.ts +2 -0
  206. package/dist/icons/motorbike-taxi.js +42 -0
  207. package/dist/icons/music-note.d.ts +2 -0
  208. package/dist/icons/music-note.js +63 -0
  209. package/dist/icons/nas-2bay.d.ts +2 -0
  210. package/dist/icons/nas-2bay.js +49 -0
  211. package/dist/icons/nas.d.ts +2 -0
  212. package/dist/icons/nas.js +41 -0
  213. package/dist/icons/nature-iso.d.ts +29 -0
  214. package/dist/icons/nature-iso.js +74 -0
  215. package/dist/icons/noodle-soup.d.ts +2 -0
  216. package/dist/icons/noodle-soup.js +52 -0
  217. package/dist/icons/notebook.d.ts +2 -0
  218. package/dist/icons/notebook.js +44 -0
  219. package/dist/icons/object-drum.d.ts +18 -0
  220. package/dist/icons/object-drum.js +63 -0
  221. package/dist/icons/otp.d.ts +2 -0
  222. package/dist/icons/otp.js +46 -0
  223. package/dist/icons/over-budget.d.ts +2 -0
  224. package/dist/icons/over-budget.js +48 -0
  225. package/dist/icons/pad-see-ew.d.ts +2 -0
  226. package/dist/icons/pad-see-ew.js +56 -0
  227. package/dist/icons/palm-tree.d.ts +2 -0
  228. package/dist/icons/palm-tree.js +52 -0
  229. package/dist/icons/paper-boat.d.ts +2 -0
  230. package/dist/icons/paper-boat.js +67 -0
  231. package/dist/icons/paper.d.ts +3 -0
  232. package/dist/icons/paper.js +45 -0
  233. package/dist/icons/password.d.ts +2 -0
  234. package/dist/icons/password.js +45 -0
  235. package/dist/icons/patch-panel.d.ts +2 -0
  236. package/dist/icons/patch-panel.js +41 -0
  237. package/dist/icons/pdu.d.ts +2 -0
  238. package/dist/icons/pdu.js +40 -0
  239. package/dist/icons/phone-topup.d.ts +2 -0
  240. package/dist/icons/phone-topup.js +55 -0
  241. package/dist/icons/photo.d.ts +2 -0
  242. package/dist/icons/photo.js +48 -0
  243. package/dist/icons/phuang-malai.d.ts +2 -0
  244. package/dist/icons/phuang-malai.js +59 -0
  245. package/dist/icons/pie-chart.d.ts +2 -0
  246. package/dist/icons/pie-chart.js +36 -0
  247. package/dist/icons/piggy-bank.d.ts +2 -0
  248. package/dist/icons/piggy-bank.js +64 -0
  249. package/dist/icons/plant-kit.d.ts +23 -0
  250. package/dist/icons/plant-kit.js +112 -0
  251. package/dist/icons/plastic-stool.d.ts +2 -0
  252. package/dist/icons/plastic-stool.js +67 -0
  253. package/dist/icons/pointer.d.ts +1 -0
  254. package/dist/icons/pointer.js +12 -0
  255. package/dist/icons/pos.d.ts +2 -0
  256. package/dist/icons/pos.js +59 -0
  257. package/dist/icons/potted-plant.d.ts +2 -0
  258. package/dist/icons/potted-plant.js +31 -0
  259. package/dist/icons/power-pole.d.ts +2 -0
  260. package/dist/icons/power-pole.js +60 -0
  261. package/dist/icons/power-station.d.ts +2 -0
  262. package/dist/icons/power-station.js +56 -0
  263. package/dist/icons/printer.d.ts +2 -0
  264. package/dist/icons/printer.js +46 -0
  265. package/dist/icons/qr-code.d.ts +2 -0
  266. package/dist/icons/qr-code.js +45 -0
  267. package/dist/icons/rack.d.ts +2 -0
  268. package/dist/icons/rack.js +39 -0
  269. package/dist/icons/rain-cloud.d.ts +2 -0
  270. package/dist/icons/rain-cloud.js +31 -0
  271. package/dist/icons/rainbow.d.ts +2 -0
  272. package/dist/icons/rainbow.js +46 -0
  273. package/dist/icons/receipt.d.ts +2 -0
  274. package/dist/icons/receipt.js +56 -0
  275. package/dist/icons/redmi-note-9s-pro.d.ts +2 -0
  276. package/dist/icons/redmi-note-9s-pro.js +37 -0
  277. package/dist/icons/register.d.ts +2 -0
  278. package/dist/icons/register.js +40 -0
  279. package/dist/icons/remote-desktop.d.ts +2 -0
  280. package/dist/icons/remote-desktop.js +62 -0
  281. package/dist/icons/remote-folder.d.ts +2 -0
  282. package/dist/icons/remote-folder.js +55 -0
  283. package/dist/icons/rent.d.ts +2 -0
  284. package/dist/icons/rent.js +50 -0
  285. package/dist/icons/rock.d.ts +2 -0
  286. package/dist/icons/rock.js +80 -0
  287. package/dist/icons/router.d.ts +2 -0
  288. package/dist/icons/router.js +59 -0
  289. package/dist/icons/salary.d.ts +2 -0
  290. package/dist/icons/salary.js +54 -0
  291. package/dist/icons/saving-streak.d.ts +2 -0
  292. package/dist/icons/saving-streak.js +66 -0
  293. package/dist/icons/scan-slip.d.ts +2 -0
  294. package/dist/icons/scan-slip.js +53 -0
  295. package/dist/icons/scissors.d.ts +2 -0
  296. package/dist/icons/scissors.js +52 -0
  297. package/dist/icons/server-cabinet.d.ts +2 -0
  298. package/dist/icons/server-cabinet.js +49 -0
  299. package/dist/icons/server.d.ts +2 -0
  300. package/dist/icons/server.js +41 -0
  301. package/dist/icons/shared.d.ts +8 -0
  302. package/dist/icons/shared.js +18 -0
  303. package/dist/icons/shield.d.ts +3 -0
  304. package/dist/icons/shield.js +28 -0
  305. package/dist/icons/shooting-star.d.ts +2 -0
  306. package/dist/icons/shooting-star.js +37 -0
  307. package/dist/icons/shopping-box.d.ts +2 -0
  308. package/dist/icons/shopping-box.js +46 -0
  309. package/dist/icons/sky-kit.d.ts +19 -0
  310. package/dist/icons/sky-kit.js +72 -0
  311. package/dist/icons/smart-tv.d.ts +2 -0
  312. package/dist/icons/smart-tv.js +39 -0
  313. package/dist/icons/smartphone.d.ts +2 -0
  314. package/dist/icons/smartphone.js +30 -0
  315. package/dist/icons/sms.d.ts +2 -0
  316. package/dist/icons/sms.js +45 -0
  317. package/dist/icons/snapshots.d.ts +2 -0
  318. package/dist/icons/snapshots.js +45 -0
  319. package/dist/icons/snip.d.ts +2 -0
  320. package/dist/icons/snip.js +63 -0
  321. package/dist/icons/spirit-house.d.ts +2 -0
  322. package/dist/icons/spirit-house.js +73 -0
  323. package/dist/icons/ssl-certificate.d.ts +2 -0
  324. package/dist/icons/ssl-certificate.js +56 -0
  325. package/dist/icons/star.d.ts +2 -0
  326. package/dist/icons/star.js +16 -0
  327. package/dist/icons/stock.d.ts +2 -0
  328. package/dist/icons/stock.js +62 -0
  329. package/dist/icons/storage-array.d.ts +2 -0
  330. package/dist/icons/storage-array.js +40 -0
  331. package/dist/icons/storm.d.ts +2 -0
  332. package/dist/icons/storm.js +43 -0
  333. package/dist/icons/street-food-cart.d.ts +2 -0
  334. package/dist/icons/street-food-cart.js +66 -0
  335. package/dist/icons/street-kit.d.ts +19 -0
  336. package/dist/icons/street-kit.js +67 -0
  337. package/dist/icons/street-sign.d.ts +2 -0
  338. package/dist/icons/street-sign.js +42 -0
  339. package/dist/icons/studio-monitors.d.ts +2 -0
  340. package/dist/icons/studio-monitors.js +67 -0
  341. package/dist/icons/sun.d.ts +2 -0
  342. package/dist/icons/sun.js +40 -0
  343. package/dist/icons/support.d.ts +2 -0
  344. package/dist/icons/support.js +48 -0
  345. package/dist/icons/switch.d.ts +2 -0
  346. package/dist/icons/switch.js +34 -0
  347. package/dist/icons/tablet.d.ts +2 -0
  348. package/dist/icons/tablet.js +44 -0
  349. package/dist/icons/tape-library.d.ts +2 -0
  350. package/dist/icons/tape-library.js +48 -0
  351. package/dist/icons/temple-donation.d.ts +2 -0
  352. package/dist/icons/temple-donation.js +60 -0
  353. package/dist/icons/tent.d.ts +2 -0
  354. package/dist/icons/tent.js +66 -0
  355. package/dist/icons/terminal.d.ts +2 -0
  356. package/dist/icons/terminal.js +56 -0
  357. package/dist/icons/thai-house.d.ts +2 -0
  358. package/dist/icons/thai-house.js +85 -0
  359. package/dist/icons/thai-lantern.d.ts +2 -0
  360. package/dist/icons/thai-lantern.js +61 -0
  361. package/dist/icons/thinkpad-l380.d.ts +2 -0
  362. package/dist/icons/thinkpad-l380.js +54 -0
  363. package/dist/icons/timer.d.ts +2 -0
  364. package/dist/icons/timer.js +59 -0
  365. package/dist/icons/train-ticket.d.ts +2 -0
  366. package/dist/icons/train-ticket.js +57 -0
  367. package/dist/icons/trash.d.ts +2 -0
  368. package/dist/icons/trash.js +62 -0
  369. package/dist/icons/tree.d.ts +2 -0
  370. package/dist/icons/tree.js +40 -0
  371. package/dist/icons/tuk-tuk.d.ts +2 -0
  372. package/dist/icons/tuk-tuk.js +45 -0
  373. package/dist/icons/tulip.d.ts +2 -0
  374. package/dist/icons/tulip.js +56 -0
  375. package/dist/icons/tunnel.d.ts +2 -0
  376. package/dist/icons/tunnel.js +50 -0
  377. package/dist/icons/two-factor.d.ts +2 -0
  378. package/dist/icons/two-factor.js +81 -0
  379. package/dist/icons/ups.d.ts +2 -0
  380. package/dist/icons/ups.js +37 -0
  381. package/dist/icons/usb-drive.d.ts +2 -0
  382. package/dist/icons/usb-drive.js +35 -0
  383. package/dist/icons/verified.d.ts +2 -0
  384. package/dist/icons/verified.js +32 -0
  385. package/dist/icons/virtual-machine.d.ts +2 -0
  386. package/dist/icons/virtual-machine.js +66 -0
  387. package/dist/icons/volume.d.ts +6 -0
  388. package/dist/icons/volume.js +35 -0
  389. package/dist/icons/vpn-gateway.d.ts +2 -0
  390. package/dist/icons/vpn-gateway.js +51 -0
  391. package/dist/icons/wake-on-lan.d.ts +2 -0
  392. package/dist/icons/wake-on-lan.js +40 -0
  393. package/dist/icons/wallet.d.ts +3 -0
  394. package/dist/icons/wallet.js +55 -0
  395. package/dist/icons/water-jar.d.ts +2 -0
  396. package/dist/icons/water-jar.js +72 -0
  397. package/dist/icons/wooden-window.d.ts +2 -0
  398. package/dist/icons/wooden-window.js +65 -0
  399. package/dist/index.d.ts +2 -0
  400. package/dist/index.js +4 -0
  401. package/dist/iso.d.ts +32 -0
  402. package/dist/iso.js +64 -0
  403. package/dist/load.d.ts +197 -0
  404. package/dist/load.js +197 -0
  405. package/dist/motions.d.ts +68 -0
  406. package/dist/motions.js +446 -0
  407. package/dist/sticker.d.ts +269 -0
  408. package/dist/sticker.js +1009 -0
  409. package/package.json +101 -4
@@ -0,0 +1,40 @@
1
+ // Drawn for @20baht/stickers: a round tree on a grass tile in 2.5d (tile and trunk in 3d, see plant-kit.ts).
2
+ import { sway, twinkle } from '../motions.js';
3
+ import { ellipse } from '../sticker.js';
4
+ import { ISO } from '../iso.js';
5
+ import { rod, tile, tuft } from './plant-kit.js';
6
+ import { glow, LINE } from './shared.js';
7
+ const TOP = ISO([0, 0, 118]);
8
+ const [cx, cy] = TOP;
9
+ const CROWN = [
10
+ { d: ellipse(cx - 52, cy - 34, 60), fill: 'ok', depth: 0.6 },
11
+ { d: ellipse(cx + 52, cy - 28, 56), fill: 'ok', depth: 0.6 },
12
+ { d: ellipse(cx, cy - 92, 70), fill: 'ok', depth: 0.6 },
13
+ ...[
14
+ [-60, -40],
15
+ [40, -64],
16
+ [8, -120],
17
+ [62, -14],
18
+ ].map(([x, y]) => ({ d: ellipse(cx + x, cy + y, 9), fill: 'hot' })),
19
+ ];
20
+ export const tree = {
21
+ name: 'tree',
22
+ frames: 180,
23
+ line: LINE,
24
+ extrude: [5, 10],
25
+ layers: [
26
+ { id: 'ground', p: [250, 352], shapes: [] },
27
+ {
28
+ parent: 'ground',
29
+ shapes: [
30
+ ...tile(118, 'ok', 'gold'),
31
+ ...[ISO([-80, -30, 0]), ISO([70, -70, 0]), ISO([40, 70, 0])].map((p) => ({
32
+ d: tuft(p),
33
+ })),
34
+ ...rod([0, 0, 0], [0, 0, 124], 22, 15, 'deep'),
35
+ ],
36
+ },
37
+ { parent: 'ground', a: TOP, p: TOP, m: { ...sway, k: 0.7 }, shapes: CROWN },
38
+ glow('ground', [150, -230], 22, [twinkle(44), twinkle(140, true)]),
39
+ ],
40
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const tukTuk: Icon;
@@ -0,0 +1,45 @@
1
+ import { hop } from '../motions.js';
2
+ import { block, faceOf, quad } from '../iso.js';
3
+ import { LINE } from './shared.js';
4
+ import { box, drum, wire } from './volume.js';
5
+ const cab = faceOf(block([-142, -62, 104], [55, 0, 0], [0, 124, 0], [0, 0, 78]), 'front');
6
+ export const tukTuk = {
7
+ name: 'tuk-tuk',
8
+ frames: 160,
9
+ line: LINE,
10
+ extrude: [0, 0],
11
+ layers: [
12
+ {
13
+ id: 'root',
14
+ p: [250, 365],
15
+ m: { ...hop, k: 0.6 },
16
+ shapes: [
17
+ ...drum([86, 42, 38], 33, 33, 22, 'deep', 'ink'),
18
+ ...box([-147, -62, 40], [280, 124, 35], 'deep', 'main'),
19
+ ...box([15, 25, 75], [112, 26, 75], 'deep', 'main'),
20
+ ...box([12, -42, 75], [112, 85, 24], 'deep', 'tint'),
21
+ ...box([113, -62, 70], [22, 124, 82], 'main', 'tint'),
22
+ ...box([-147, -62, 75], [60, 124, 45], 'main', 'tint'),
23
+ ...box([-142, -62, 104], [55, 124, 78], 'main', 'tint'),
24
+ { d: quad(cab, 0.12, 0.22, 0.75, 0.69, 3), fill: 'white' },
25
+ wire([
26
+ [-87, -38, 105],
27
+ [-65, -38, 143],
28
+ [-46, -38, 143],
29
+ ], 6),
30
+ ...box([-145, 48, 165], [12, 12, 58], 'grey', 'white'),
31
+ ...box([115, 48, 145], [12, 12, 78], 'grey', 'white'),
32
+ ...box([115, -62, 145], [12, 12, 78], 'grey', 'white'),
33
+ ...box([-145, -62, 165], [12, 12, 58], 'grey', 'white'),
34
+ ...box([-160, -76, 220], [308, 152, 20], 'main', 'gold', 'gold'),
35
+ ...box([0, -68, 65], [133, 14, 19], 'main', 'white', 'white'),
36
+ ...drum([-112, -76, 37], 35, 35, 27, 'deep', 'ink'),
37
+ ...drum([-112, -78, 37], 15, 15, 0, 'grey'),
38
+ ...drum([88, -76, 37], 35, 35, 27, 'deep', 'ink'),
39
+ ...drum([88, -78, 37], 15, 15, 0, 'grey'),
40
+ ...drum([-141, -66, 105], 13, 15, 4, 'gold'),
41
+ ...box([-162, -70, 60], [18, 138, 12], 'grey', 'white'),
42
+ ],
43
+ },
44
+ ],
45
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const tulip: Icon;
@@ -0,0 +1,56 @@
1
+ // Drawn for @20baht/stickers: three tulips in a vase in 2.5d (vase in 3d, see plant-kit.ts); the heads sway.
2
+ import { sway, twinkle } from '../motions.js';
3
+ import { line } from '../sticker.js';
4
+ import { leaf, rib, rod, spot } from './plant-kit.js';
5
+ import { ISO } from '../iso.js';
6
+ import { glow, LINE } from './shared.js';
7
+ const VASE = [
8
+ ...rod([0, 0, 0], [0, 0, 112], 46, 34, 'main'),
9
+ ...rod([0, 0, 108], [0, 0, 124], 38, 38, 'main', 'deep'),
10
+ ];
11
+ const MOUTH = ISO([0, 0, 124]);
12
+ const n = (v) => v.toFixed(1);
13
+ // a tulip cup from the top of its stem, three points on top
14
+ const head = (o, deg) => {
15
+ const p = (x, y) => spot(o, deg, [x, y]).map(n).join(' ');
16
+ return (`M${p(-20, 0)}C${p(-27, -24)} ${p(-22, -44)} ${p(-15, -52)}L${p(-6, -38)}L${p(0, -54)}L${p(6, -38)}L${p(15, -52)}` +
17
+ `C${p(22, -44)} ${p(27, -24)} ${p(20, 0)}C${p(11, 9)} ${p(-11, 9)} ${p(-20, 0)}Z`);
18
+ };
19
+ const STEMS = [
20
+ [-50, 150, -16, 'hot'],
21
+ [52, 140, 18, 'gold'],
22
+ [0, 176, 0, 'hot'],
23
+ ];
24
+ export const tulip = {
25
+ name: 'tulip',
26
+ frames: 180,
27
+ line: LINE,
28
+ extrude: [5, 10],
29
+ layers: [
30
+ { id: 'vase', p: [250, 386], shapes: [] },
31
+ ...STEMS.map(([dx, h, deg, fill], i) => {
32
+ const top = [MOUTH[0] + dx, MOUTH[1] - h];
33
+ return {
34
+ parent: 'vase',
35
+ a: MOUTH,
36
+ p: MOUTH,
37
+ m: { ...sway, at: i * 16, k: i === 1 ? -1.2 : 1.2 },
38
+ shapes: [
39
+ { d: line(MOUTH, top), line: 6, round: true },
40
+ { d: head(top, deg), fill, depth: 0.5 },
41
+ ],
42
+ };
43
+ }),
44
+ {
45
+ parent: 'vase',
46
+ shapes: [
47
+ { d: leaf(MOUTH, -30, 120, 20), fill: 'ok', depth: 0.3 },
48
+ { d: rib(MOUTH, -30, 120) },
49
+ { d: leaf(MOUTH, 26, 104, 18), fill: 'ok', depth: 0.3 },
50
+ { d: rib(MOUTH, 26, 104) },
51
+ ...VASE,
52
+ ],
53
+ },
54
+ glow('vase', [130, -270], 22, [twinkle(44), twinkle(140, true)]),
55
+ ],
56
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const tunnel: Icon;
@@ -0,0 +1,50 @@
1
+ // Drawn for @20baht/stickers: a secure tunnel; packets come out of the dark arch, a padlock on its keystone.
2
+ import { SNAP, twinkle } from '../motions.js';
3
+ import { ellipse, line, rect } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ const ARCH = 'M-150 80L-150 -10A150 150 0 0 1 150 -10L150 80L100 80L100 -10A100 100 0 0 0 -100 -10L-100 80Z';
6
+ const MOUTH = 'M-100 80L-100 -10A100 100 0 0 1 100 -10L100 80Z';
7
+ const packet = (x, start) => ({
8
+ parent: 'arch',
9
+ a: [x, 20],
10
+ p: [x, 20],
11
+ m: [
12
+ twinkle(start),
13
+ {
14
+ p: [
15
+ [start + 4, [0, 0], SNAP],
16
+ [start + 44, [x * 0.6, 110]],
17
+ ],
18
+ },
19
+ twinkle(start + 40, true),
20
+ ],
21
+ shapes: [{ d: ellipse(x, 20, 14), fill: 'gold' }],
22
+ });
23
+ export const tunnel = {
24
+ name: 'tunnel',
25
+ frames: 180,
26
+ line: LINE,
27
+ extrude: EXT,
28
+ layers: [
29
+ { id: 'root', p: [250, 250], shapes: [] },
30
+ {
31
+ id: 'arch',
32
+ parent: 'root',
33
+ tilt: FACE,
34
+ shapes: [
35
+ { d: MOUTH, fill: 'deep', depth: 0.2 },
36
+ { d: ARCH, fill: 'main', depth: 3 },
37
+ ...[200, 230, 270, 310, 340].map((a) => {
38
+ const [c, n] = [Math.cos((a * Math.PI) / 180), Math.sin((a * Math.PI) / 180)];
39
+ return { d: line([c * 100, n * 100 - 10], [c * 150, n * 150 - 10]) };
40
+ }),
41
+ { d: rect(-24, -186, 48, 40, 8), fill: 'ok', depth: 0.6 },
42
+ { d: 'M-14 -186L-14 -198A14 14 0 0 1 14 -198L14 -186', round: true },
43
+ ],
44
+ },
45
+ packet(-30, 10),
46
+ packet(30, 50),
47
+ packet(0, 90),
48
+ glow('root', [-180, -120], 22, [twinkle(30), twinkle(140, true)]),
49
+ ],
50
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const twoFactor: Icon;
@@ -0,0 +1,81 @@
1
+ // Drawn for @20baht/stickers: two-factor sign-in, an authenticator code under a shield on a phone, its timer
2
+ // running down, and a key that turns as the second factor.
3
+ import { EASY, twinkle, twist, wiggle } from '../motions.js';
4
+ import { arc, ellipse, line, poly, rect, ring } from '../sticker.js';
5
+ import { EXT, FACE, glow, LINE } from './shared.js';
6
+ const XS = [-98, -80, -62, -36, -18, 0];
7
+ export const twoFactor = {
8
+ name: 'two-factor',
9
+ frames: 180,
10
+ line: LINE,
11
+ extrude: EXT,
12
+ still: 100,
13
+ layers: [
14
+ { id: 'root', a: [0, 150], p: [230, 390], m: { ...wiggle, k: 0.4 }, shapes: [] },
15
+ {
16
+ id: 'scr',
17
+ parent: 'root',
18
+ tilt: FACE,
19
+ shapes: [
20
+ { d: rect(-124, -156, 168, 312, 32), fill: 'deep', depth: 0.8 },
21
+ { d: rect(-112, -144, 144, 288, 24), fill: 'tint' },
22
+ {
23
+ d: 'M-40 -126L0 -112L0 -78Q0 -48 -40 -32Q-80 -48 -80 -78L-80 -112Z',
24
+ fill: 'ok',
25
+ depth: 0.3,
26
+ },
27
+ { d: line([-56, -80], [-44, -68], [-22, -92]) },
28
+ { d: ellipse(-40, 76, 28), fill: 'white' },
29
+ {
30
+ d: arc(-40, 76, 28, -90, 270),
31
+ trim: [
32
+ [0, 1, EASY],
33
+ [160, 0, EASY],
34
+ [180, 1],
35
+ ],
36
+ line: 7,
37
+ },
38
+ ],
39
+ },
40
+ ...XS.map((x, i) => ({
41
+ parent: 'scr',
42
+ a: [x + 7, 0],
43
+ p: [x + 7, 0],
44
+ m: [twinkle(12 + i * 6), twinkle(150, true)],
45
+ shapes: [{ d: rect(x, -12, 14, 24, 5), fill: 'main', line: 3 }],
46
+ })),
47
+ {
48
+ parent: 'root',
49
+ tilt: FACE,
50
+ p: [130, 20],
51
+ shapes: [],
52
+ id: 'keyface',
53
+ },
54
+ {
55
+ parent: 'keyface',
56
+ a: [0, 0],
57
+ p: [0, 0],
58
+ m: { ...twist, at: 30 },
59
+ shapes: [
60
+ {
61
+ d: poly([
62
+ [20, -12],
63
+ [110, -12],
64
+ [110, 26],
65
+ [96, 26],
66
+ [96, 12],
67
+ [82, 12],
68
+ [82, 30],
69
+ [66, 30],
70
+ [66, 12],
71
+ [20, 12],
72
+ ], 4),
73
+ fill: 'gold',
74
+ depth: 1,
75
+ },
76
+ { d: ring(0, 0, 44, 18), fill: 'gold', depth: 1 },
77
+ ],
78
+ },
79
+ glow('root', [-150, -170], 22, [twinkle(40), twinkle(140, true)]),
80
+ ],
81
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const ups: Icon;
@@ -0,0 +1,37 @@
1
+ // Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
2
+ import { nudge, twinkle } from '../motions.js';
3
+ import { block, dot, faceOf, quad, solid, stroke } from '../iso.js';
4
+ import { glow, LINE } from './shared.js';
5
+ // A UPS: a heavy navy box, a pale screen showing a charged battery, a power button and vents
6
+ const W = 170;
7
+ const D = 230;
8
+ const H = 210;
9
+ const BOX = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
10
+ const front = faceOf(BOX, 'front');
11
+ export const ups = {
12
+ name: 'ups',
13
+ frames: 180,
14
+ line: LINE,
15
+ extrude: [0, 0],
16
+ layers: [
17
+ { id: 'ups', p: [250, 350], m: nudge, shapes: [] },
18
+ {
19
+ parent: 'ups',
20
+ shapes: [
21
+ ...solid(BOX, { fill: 'deep', top: 'main' }, 3),
22
+ { d: quad(front, 0.14, 0.56, 0.72, 0.3, 3), fill: 'tint' },
23
+ // the battery: a shell, its nub and three charge bars
24
+ { d: quad(front, 0.24, 0.62, 0.44, 0.18, 2), fill: 'white' },
25
+ { d: quad(front, 0.68, 0.67, 0.05, 0.08, 1), fill: 'white' },
26
+ ...[0, 1, 2].map((i) => ({
27
+ d: quad(front, 0.28 + i * 0.13, 0.65, 0.1, 0.12, 1),
28
+ fill: 'ok',
29
+ line: 3,
30
+ })),
31
+ { d: dot(front, 0.5, 0.36, 0.08, 0.08 * (W / H)), fill: 'gold' },
32
+ ...[0.1, 0.16].map((t) => ({ d: stroke(front, [0.22, t], [0.78, t]) })),
33
+ ],
34
+ },
35
+ glow('ups', [118, -270], 24, [twinkle(50), twinkle(140, true)]),
36
+ ],
37
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const usbDrive: Icon;
@@ -0,0 +1,35 @@
1
+ // Drawn for @20baht/stickers: a USB flash drive modelled in 3d (see iso.ts); it plugs in and its light blinks.
2
+ import { slide, twinkle } from '../motions.js';
3
+ import { block, dot, faceOf, ISO, quad, solid } from '../iso.js';
4
+ import { glow, LINE } from './shared.js';
5
+ const BODY = block([-80, -150, 0], [160, 0, 0], [0, 300, 0], [0, 0, 52]);
6
+ const PLUG = block([-54, -260, 8], [108, 0, 0], [0, 110, 0], [0, 0, 36]);
7
+ const plugTop = faceOf(PLUG, 'top');
8
+ const top = faceOf(BODY, 'top');
9
+ export const usbDrive = {
10
+ name: 'usb-drive',
11
+ frames: 160,
12
+ line: LINE,
13
+ extrude: [0, 0],
14
+ layers: [
15
+ { id: 'usb', p: [280, 300], m: slide(ISO([0, -40, 0]), 14, 70, 30), shapes: [] },
16
+ {
17
+ parent: 'usb',
18
+ shapes: [
19
+ ...solid(PLUG, { fill: 'grey', top: 'white' }, 2),
20
+ { d: quad(plugTop, 0.2, 0.3, 0.2, 0.25), fill: 'ink' },
21
+ { d: quad(plugTop, 0.6, 0.3, 0.2, 0.25), fill: 'ink' },
22
+ ...solid(BODY, { fill: 'deep', top: 'main' }, 6),
23
+ { d: quad(top, 0.2, 0.45, 0.6, 0.35, 6), fill: 'white' },
24
+ ],
25
+ },
26
+ {
27
+ parent: 'usb',
28
+ a: top.at(0.5, 0.2),
29
+ p: top.at(0.5, 0.2),
30
+ m: [twinkle(46), twinkle(100, true)],
31
+ shapes: [{ d: dot(top, 0.5, 0.2, 0.08, 0.05), fill: 'ok' }],
32
+ },
33
+ glow('usb', [-150, -100], 22, [twinkle(50), twinkle(130, true)]),
34
+ ],
35
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const verified: Icon;
@@ -0,0 +1,32 @@
1
+ // Drawn for @20baht/stickers: a verified rosette with a check, hopping and glinting.
2
+ import { glint, hop, sparkle } from '../motions.js';
3
+ import { ellipse, line, rosette, spark } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ export const verified = {
6
+ name: 'verified',
7
+ frames: 160,
8
+ line: LINE,
9
+ extrude: EXT,
10
+ layers: [
11
+ { id: 'root', a: [0, 120], p: [250, 370], m: hop, shapes: [] },
12
+ {
13
+ id: 'badge',
14
+ parent: 'root',
15
+ tilt: FACE,
16
+ shapes: [
17
+ { d: rosette(0, 0, 120, 12), fill: 'ok', depth: 1 },
18
+ { d: ellipse(0, 0, 74), fill: 'white', depth: 0.3 },
19
+ { d: line([-34, 2], [-8, 28], [38, -24]), line: 16 },
20
+ ],
21
+ },
22
+ {
23
+ parent: 'badge',
24
+ a: [40, -40],
25
+ p: [40, -40],
26
+ m: glint(28, 80),
27
+ shapes: [{ d: spark(40, -40, 22), fill: 'white' }],
28
+ },
29
+ glow('root', [-150, -110], 26, sparkle(20)),
30
+ glow('root', [150, -40], 16, sparkle(60)),
31
+ ],
32
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const virtualMachine: Icon;
@@ -0,0 +1,66 @@
1
+ // Drawn for @20baht/stickers (konmek asked for one), modelled in 3d (see iso.ts): a virtual machine, a computer
2
+ // with a prompt on its screen hovering over the host it runs on, never touching it.
3
+ import { hop, twinkle } from '../motions.js';
4
+ import { poly } from '../sticker.js';
5
+ import { block, dot, faceOf, quad, solid } from '../iso.js';
6
+ import { glow, LINE } from './shared.js';
7
+ // the host: a low wide box, lights along its front
8
+ const HOST = block([-136, -110, 0], [272, 0, 0], [0, 220, 0], [0, 0, 50]);
9
+ const hostFront = faceOf(HOST, 'front');
10
+ const hostTop = faceOf(HOST, 'top');
11
+ // the guest: a cube hovering over a pad on the host, a screen on its front
12
+ const S = 132;
13
+ const LIFT = 136;
14
+ const GUEST = block([-S / 2, -S / 2, LIFT], [S, 0, 0], [0, S, 0], [0, 0, S]);
15
+ const screen = faceOf(GUEST, 'front');
16
+ /** A filled polygon in a face's 0..1 space. */
17
+ const onFace = (f, pts, r = 0) => poly(pts.map(([s, t]) => f.at(s, t)), r);
18
+ // a prompt: a chevron and a cursor, white on the dark screen
19
+ const PROMPT = [
20
+ {
21
+ d: onFace(screen, [
22
+ [0.24, 0.66],
23
+ [0.42, 0.53],
24
+ [0.24, 0.4],
25
+ [0.24, 0.48],
26
+ [0.32, 0.53],
27
+ [0.24, 0.58],
28
+ ], 2),
29
+ fill: 'white',
30
+ line: 3,
31
+ },
32
+ { d: quad(screen, 0.48, 0.4, 0.24, 0.08, 2), fill: 'white', line: 3 },
33
+ ];
34
+ export const virtualMachine = {
35
+ name: 'virtual-machine',
36
+ frames: 180,
37
+ line: LINE,
38
+ extrude: [0, 0],
39
+ layers: [
40
+ { id: 'root', p: [250, 372], shapes: [] },
41
+ {
42
+ parent: 'root',
43
+ shapes: [
44
+ ...solid(HOST, { fill: 'grey', top: 'white', front: 'white' }, 4),
45
+ ...[0.12, 0.2, 0.28].map((s) => ({
46
+ d: dot(hostFront, s, 0.5, 0.018, 0.12),
47
+ fill: 'ok',
48
+ })),
49
+ { d: quad(hostFront, 0.5, 0.36, 0.4, 0.28, 2), fill: 'grey' },
50
+ { d: dot(hostTop, 0.5, 0.5, 0.3, 0.38), fill: 'tint' },
51
+ { d: dot(hostTop, 0.5, 0.5, 0.18, 0.23), fill: 'main' },
52
+ ],
53
+ },
54
+ { id: 'guest', parent: 'root', a: [0, -190], p: [0, -190], m: { ...hop, k: 0.7 }, shapes: [] },
55
+ {
56
+ parent: 'guest',
57
+ shapes: [
58
+ ...solid(GUEST, { fill: 'main', top: 'tint', front: 'white' }, 4),
59
+ { d: quad(screen, 0.12, 0.2, 0.76, 0.66, 3), fill: 'deep' },
60
+ ...PROMPT,
61
+ ],
62
+ },
63
+ glow('guest', [150, -260], 24, [twinkle(40), twinkle(140, true)]),
64
+ glow('guest', [-160, -150], 16, [twinkle(52), twinkle(150, true)]),
65
+ ],
66
+ };
@@ -0,0 +1,6 @@
1
+ import type { Shape, Swatch } from '../sticker.js';
2
+ import type { V3 } from '../iso.js';
3
+ export declare const box: (o: V3, size: V3, fill?: Swatch, top?: Swatch, front?: Swatch) => Shape[];
4
+ export declare const wire: (points: V3[], width?: number) => Shape;
5
+ /** A drum along y: curved side wall and a circular front, not an offset slab. */
6
+ export declare function drum(c: V3, rx: number, rz: number, depth: number, fill: Swatch, side?: Swatch): Shape[];
@@ -0,0 +1,35 @@
1
+ // Solid primitives in the same world coordinates and camera as notebook.
2
+ import { line, poly } from '../sticker.js';
3
+ import { add, block, ISO, solid } from '../iso.js';
4
+ export const box = (o, size, fill = 'main', top = 'tint', front = fill) => solid(block(o, [size[0], 0, 0], [0, size[1], 0], [0, 0, size[2]]), { fill, top, front }, 6);
5
+ export const wire = (points, width = 5) => ({
6
+ d: line(...points.map(ISO)),
7
+ line: width,
8
+ round: true,
9
+ });
10
+ /** A drum along y: curved side wall and a circular front, not an offset slab. */
11
+ export function drum(c, rx, rz, depth, fill, side = 'deep') {
12
+ const ring = (y) => Array.from({ length: 48 }, (_, i) => {
13
+ const a = (i * Math.PI) / 24;
14
+ return ISO(add(c, [rx * Math.cos(a), y, rz * Math.sin(a)]));
15
+ });
16
+ const front = ring(0);
17
+ const back = ring(depth);
18
+ // The convex silhouette hides the rear cap and avoids drawing hidden rim edges.
19
+ const points = [...front, ...back].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
20
+ const cross = (a, b, c) => (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
21
+ const half = (ordered) => {
22
+ const hull = [];
23
+ for (const p of ordered) {
24
+ while (hull.length > 1 && cross(hull[hull.length - 2], hull[hull.length - 1], p) <= 0)
25
+ hull.pop();
26
+ hull.push(p);
27
+ }
28
+ return hull.slice(0, -1);
29
+ };
30
+ const outline = [...half(points), ...half([...points].reverse())];
31
+ return [
32
+ { d: poly(outline), fill: side },
33
+ { d: poly(front), fill },
34
+ ];
35
+ }
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const vpnGateway: Icon;
@@ -0,0 +1,51 @@
1
+ // Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
2
+ import { clasp, shackle, twinkle } from '../motions.js';
3
+ import { arc } from '../sticker.js';
4
+ import { block, dot, faceOf, quad, solid } from '../iso.js';
5
+ import { glow, LINE } from './shared.js';
6
+ // A small VPN box with a padlock standing on its lid: the shackle springs open and snaps shut
7
+ const BOX = block([-130, -90, 0], [260, 0, 0], [0, 180, 0], [0, 0, 60]);
8
+ const front = faceOf(BOX, 'front');
9
+ const BODY = block([-48, -20, 60], [96, 0, 0], [0, 34, 0], [0, 0, 74]);
10
+ const lockFront = faceOf(BODY, 'front');
11
+ const top = faceOf(BODY, 'top').at(0.5, 0.5);
12
+ export const vpnGateway = {
13
+ name: 'vpn-gateway',
14
+ frames: 180,
15
+ line: LINE,
16
+ extrude: [0, 0],
17
+ layers: [
18
+ { id: 'vpn', p: [250, 360], m: clasp, shapes: [] },
19
+ {
20
+ parent: 'vpn',
21
+ shapes: [
22
+ ...solid(BOX, { fill: 'deep', top: 'main' }, 4),
23
+ ...[0, 1, 2].map((i) => ({
24
+ d: dot(front, 0.1 + i * 0.07, 0.5, 0.018, 0.1),
25
+ fill: i === 2 ? 'gold' : 'ok',
26
+ })),
27
+ ...[0, 1].map((i) => ({
28
+ d: quad(front, 0.7 + i * 0.1, 0.3, 0.06, 0.4, 1),
29
+ fill: 'ink',
30
+ line: false,
31
+ })),
32
+ ],
33
+ },
34
+ // the shackle hinges on its left foot, behind the lock body
35
+ {
36
+ parent: 'vpn',
37
+ a: [top[0] - 30, top[1] - 4],
38
+ p: [top[0] - 30, top[1] - 4],
39
+ m: shackle,
40
+ shapes: [{ d: arc(top[0], top[1] - 4, 30, 180, 360), line: 14, round: true }],
41
+ },
42
+ {
43
+ parent: 'vpn',
44
+ shapes: [
45
+ ...solid(BODY, { fill: 'gold', front: 'gold' }, 6),
46
+ { d: dot(lockFront, 0.5, 0.55, 0.1, 0.14), fill: 'ink', line: false },
47
+ ],
48
+ },
49
+ glow('vpn', [160, -200], 22, [twinkle(50), twinkle(140, true)]),
50
+ ],
51
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const wakeOnLan: Icon;
@@ -0,0 +1,40 @@
1
+ // Drawn for @20baht/stickers: wake-on-LAN, a power button pressed from afar; it lights up and the magic packet
2
+ // ripples out.
3
+ import { erase, press, twinkle } from '../motions.js';
4
+ import { arc, ellipse, line, ring } from '../sticker.js';
5
+ import { EXT, FACE, glow, LINE } from './shared.js';
6
+ const WAVES = [150, 180, 210].map((r, i) => ({
7
+ d: arc(0, 0, r, -70, -20),
8
+ round: true,
9
+ trim: erase(30 + i * 6, 110 + i * 6),
10
+ }));
11
+ export const wakeOnLan = {
12
+ name: 'wake-on-lan',
13
+ frames: 160,
14
+ line: LINE,
15
+ extrude: EXT,
16
+ layers: [
17
+ { id: 'root', p: [230, 290], shapes: [] },
18
+ {
19
+ id: 'base',
20
+ parent: 'root',
21
+ tilt: FACE,
22
+ shapes: [{ d: ellipse(0, 0, 128), fill: 'deep', depth: 1 }, ...WAVES],
23
+ },
24
+ {
25
+ parent: 'base',
26
+ m: [twinkle(36), twinkle(140, true)],
27
+ shapes: [{ d: ring(0, 0, 118, 100), fill: 'ok' }],
28
+ },
29
+ {
30
+ parent: 'base',
31
+ m: { ...press, k: 0.6 },
32
+ shapes: [
33
+ { d: ellipse(0, 0, 92), fill: 'white', depth: 1.2 },
34
+ { d: arc(0, 6, 40, -55, 235), line: 10, round: true },
35
+ { d: line([0, -48], [0, 0]), line: 10, round: true },
36
+ ],
37
+ },
38
+ glow('root', [-150, -110], 22, [twinkle(40), twinkle(130, true)]),
39
+ ],
40
+ };
@@ -0,0 +1,3 @@
1
+ import type { Icon } from '../sticker.js';
2
+ /** Wallet: flips open on a toss, the banknote and the card riding inside it. */
3
+ export declare const wallet: Icon;