@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,8 @@
1
+ import type { Layer, Motion, Vec } from '../sticker.js';
2
+ export declare const LINE = 5;
3
+ export declare const FACE: readonly [-18, 36], EXT: readonly [-4, 18];
4
+ export declare const glow: (parent: string, p: Vec, r: number, m: Motion | readonly Motion[], extra?: {
5
+ ip?: number;
6
+ op?: number;
7
+ }) => Layer;
8
+ export declare const inset: (d: string, k: number, [cx, cy]: Vec) => string;
@@ -0,0 +1,18 @@
1
+ // Helpers the worked icons share: line weight, the house view, sparkles.
2
+ // From fun-isometric by Kelvin Adithya (MIT, see LICENSE).
3
+ import { spark, VIEWS } from '../sticker.js';
4
+ // colours are palette slots, so draw(..., palette) or play(..., { palette }) recolours the whole set
5
+ export const LINE = 5;
6
+ // the house view: faces turned 18 degrees in their plane and leaned back 36, sides falling down left
7
+ export const { tilt: FACE, extrude: EXT } = VIEWS.right;
8
+ // a white sparkle riding a parent, popped by whatever motion it is given
9
+ export const glow = (parent, p, r, m, extra = {}) => ({
10
+ parent,
11
+ a: p,
12
+ p,
13
+ m,
14
+ ...extra,
15
+ shapes: [{ d: spark(p[0], p[1], r), fill: 'white' }],
16
+ });
17
+ // grows or shrinks a path of plain x y pairs about a point, for rims and insets
18
+ export const inset = (d, k, [cx, cy]) => d.replace(/(-?\d+\.?\d*) (-?\d+\.?\d*)/g, (_, x, y) => `${+(cx + (+x - cx) * k).toFixed(2)} ${+(cy + (+y - cy) * k).toFixed(2)}`);
@@ -0,0 +1,3 @@
1
+ import type { Icon } from '../sticker.js';
2
+ /** A shield hopping with a check on its face: you decide who gets in. */
3
+ export declare const shield: Icon;
@@ -0,0 +1,28 @@
1
+ // From identity-service's sticker set, drawn on the fun-isometric kit by Kelvin Adithya (MIT, see LICENSE).
2
+ import { hop, twinkle } from '../motions.js';
3
+ import { line } from '../sticker.js';
4
+ import { EXT, glow, inset, LINE } from './shared.js';
5
+ const SHIELD = 'M0 -132C40 -112 76 -104 112 -104C112 -10 104 72 0 128C-104 72 -112 -10 -112 -104C-76 -104 -40 -112 0 -132Z';
6
+ /** A shield hopping with a check on its face: you decide who gets in. */
7
+ export const shield = {
8
+ name: 'shield',
9
+ frames: 123,
10
+ line: LINE,
11
+ extrude: EXT,
12
+ layers: [
13
+ { id: 'shield', p: [250, 260], m: hop, shapes: [] },
14
+ {
15
+ parent: 'shield',
16
+ tilt: [-14, 26],
17
+ shapes: [
18
+ { d: SHIELD, fill: 'main', depth: 1, edges: [[0, 128]] },
19
+ { d: inset(SHIELD, 0.74, [0, -6]), fill: 'tint' },
20
+ { d: line([-42, -6], [-10, 28], [48, -40]), line: 16, round: true },
21
+ ],
22
+ },
23
+ glow('shield', [126, -118], 28, twinkle(0, true), { op: 30 }),
24
+ glow('shield', [126, -118], 28, twinkle(48), { ip: 48 }),
25
+ glow('shield', [-148, 20], 18, twinkle(6, true), { op: 36 }),
26
+ glow('shield', [-148, 20], 18, twinkle(56), { ip: 56 }),
27
+ ],
28
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const shootingStar: Icon;
@@ -0,0 +1,37 @@
1
+ // Drawn for @20baht/stickers: a 3d star streaking in from the top left, its trail drawn behind it then gone.
2
+ import { deal, OUT, SNAP, twinkle } from '../motions.js';
3
+ import { line } from '../sticker.js';
4
+ import { glow, LINE } from './shared.js';
5
+ import { starPrism } from './sky-kit.js';
6
+ const TRAIL = [
7
+ [8, 0, OUT],
8
+ [44, 1, 0],
9
+ [90, 1, SNAP],
10
+ [116, 0],
11
+ ];
12
+ export const shootingStar = {
13
+ name: 'shooting-star',
14
+ frames: 160,
15
+ still: 70,
16
+ line: LINE,
17
+ extrude: [0, 0],
18
+ layers: [
19
+ { id: 'sky', p: [300, 300], shapes: [] },
20
+ {
21
+ parent: 'sky',
22
+ shapes: [-26, 0, 26].map((o, i) => ({
23
+ d: line([-205 + o * 0.6, -89 - o * 0.8 + i * 4], [-55 + o * 0.6, 21 - o * 0.8]),
24
+ line: 9,
25
+ round: true,
26
+ trim: TRAIL,
27
+ })),
28
+ },
29
+ {
30
+ id: 'st',
31
+ parent: 'sky',
32
+ m: [deal([-150, -118], -40, 8), twinkle(0), twinkle(118, true)],
33
+ shapes: starPrism([0, 0, -70], 80, 30, 'gold', 'gold'),
34
+ },
35
+ glow('sky', [90, -110], 22, [twinkle(54), twinkle(120, true)]),
36
+ ],
37
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const shoppingBox: Icon;
@@ -0,0 +1,46 @@
1
+ // Drawn for @20baht/stickers: an online-order parcel in 3d (see iso.ts), taped, with a shipping label; it lands
2
+ // and a delivered tick pops.
3
+ import { hop, twinkle } from '../motions.js';
4
+ import { ellipse, line } from '../sticker.js';
5
+ import { block, faceOf, quad, solid, stroke } from '../iso.js';
6
+ import { glow, LINE } from './shared.js';
7
+ const W = 230;
8
+ const D = 200;
9
+ const H = 160;
10
+ const BOX = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
11
+ const top = faceOf(BOX, 'top');
12
+ const front = faceOf(BOX, 'front');
13
+ const right = faceOf(BOX, 'right');
14
+ export const shoppingBox = {
15
+ name: 'shopping-box',
16
+ frames: 160,
17
+ line: LINE,
18
+ extrude: [0, 0],
19
+ layers: [
20
+ { id: 'box', p: [250, 340], m: hop, shapes: [] },
21
+ {
22
+ parent: 'box',
23
+ shapes: [
24
+ ...solid(BOX, { fill: 'gold', top: 'tint' }, 4),
25
+ { d: stroke(top, [0, 0.5], [1, 0.5]) },
26
+ { d: quad(top, 0.42, 0, 0.16, 1), fill: 'white' },
27
+ { d: quad(front, 0.42, 0.7, 0.16, 0.3), fill: 'white' },
28
+ { d: quad(front, 0.08, 0.14, 0.28, 0.46, 3), fill: 'white' },
29
+ ...[0.46, 0.34, 0.22].map((t) => ({ d: stroke(front, [0.12, t], [0.3, t]) })),
30
+ ...[0.66, 0.74, 0.82].map((s) => ({ d: stroke(front, [s, 0.16], [s, 0.4]) })),
31
+ { d: quad(right, 0.3, 0.3, 0.4, 0.36, 2), fill: 'white' },
32
+ ],
33
+ },
34
+ {
35
+ parent: 'box',
36
+ a: [130, -190],
37
+ p: [130, -190],
38
+ m: [twinkle(40), twinkle(130, true)],
39
+ shapes: [
40
+ { d: ellipse(130, -190, 34), fill: 'ok' },
41
+ { d: line([114, -190], [126, -178], [148, -202]), line: 7 },
42
+ ],
43
+ },
44
+ glow('box', [-150, -150], 20, [twinkle(48), twinkle(136, true)]),
45
+ ],
46
+ };
@@ -0,0 +1,19 @@
1
+ import type { Shape, Swatch, Vec } from '../sticker.js';
2
+ import type { V3 } from '../iso.js';
3
+ type Circle = readonly [number, number, number];
4
+ /** The outline of a union of puffs around c, sampled as a ray fan: clouds and soft blobs. */
5
+ export declare function blob(c: Vec, puffs: readonly Circle[], n?: number): string;
6
+ /** A flat-bottomed cloud, w wide at scale k, its middle at (x, y). */
7
+ export declare const cloud: (x: number, y: number, k?: number) => string;
8
+ /** Points along a circle from one angle to another (degrees, clockwise on screen). */
9
+ export declare const arcPts: (cx: number, cy: number, r: number, from: number, to: number, n?: number) => Vec[];
10
+ /** Turns points about the origin. */
11
+ export declare const turn: (pts: readonly Vec[], deg: number) => Vec[];
12
+ /**
13
+ * A five point star standing upright and facing the viewer, `d` thick, modelled in 3d: its front and the sides
14
+ * that turn towards the viewer, for a star with real thickness.
15
+ */
16
+ export declare function starPrism(o: V3, r: number, d: number, front: Swatch, side: Swatch): Shape[];
17
+ /** A rain drop hanging from its tip at (x, y). */
18
+ export declare const drop: (x: number, y: number, k?: number) => string;
19
+ export {};
@@ -0,0 +1,72 @@
1
+ // Shared shapes for the sky and weather stickers: cloud outlines, arcs as point runs, a star prism in 3d, a drop.
2
+ import { poly } from '../sticker.js';
3
+ import { add, ISO } from '../iso.js';
4
+ /** Where a ray from c along u leaves a circle, or 0 when it misses. */
5
+ const exitCircle = (c, u, [ox, oy, r]) => {
6
+ const [dx, dy] = [ox - c[0], oy - c[1]];
7
+ const b = u[0] * dx + u[1] * dy;
8
+ const disc = b * b - (dx * dx + dy * dy - r * r);
9
+ return disc < 0 ? 0 : b + Math.sqrt(disc);
10
+ };
11
+ /** The outline of a union of puffs around c, sampled as a ray fan: clouds and soft blobs. */
12
+ export function blob(c, puffs, n = 120) {
13
+ const pts = [];
14
+ for (let i = 0; i < n; i++) {
15
+ const a = (i / n) * Math.PI * 2;
16
+ const u = [Math.cos(a), Math.sin(a)];
17
+ const t = Math.max(...puffs.map((p) => exitCircle(c, u, p)));
18
+ pts.push([c[0] + u[0] * t, c[1] + u[1] * t]);
19
+ }
20
+ return poly(pts);
21
+ }
22
+ /** A flat-bottomed cloud, w wide at scale k, its middle at (x, y). */
23
+ export const cloud = (x, y, k = 1) => blob([x, y + 10 * k], [
24
+ [x - 92 * k, y + 22 * k, 44 * k],
25
+ [x - 40 * k, y - 12 * k, 58 * k],
26
+ [x + 30 * k, y - 30 * k, 66 * k],
27
+ [x + 92 * k, y + 8 * k, 52 * k],
28
+ [x - 40 * k, y + 30 * k, 36 * k],
29
+ [x + 30 * k, y + 26 * k, 40 * k],
30
+ ]);
31
+ /** Points along a circle from one angle to another (degrees, clockwise on screen). */
32
+ export const arcPts = (cx, cy, r, from, to, n = 40) => Array.from({ length: n + 1 }, (_, i) => {
33
+ const a = ((from + ((to - from) * i) / n) * Math.PI) / 180;
34
+ return [cx + Math.cos(a) * r, cy + Math.sin(a) * r];
35
+ });
36
+ /** Turns points about the origin. */
37
+ export const turn = (pts, deg) => {
38
+ const a = (deg * Math.PI) / 180;
39
+ return pts.map(([x, y]) => [
40
+ x * Math.cos(a) - y * Math.sin(a),
41
+ x * Math.sin(a) + y * Math.cos(a),
42
+ ]);
43
+ };
44
+ const area = (pts) => pts.reduce((s, p, i) => {
45
+ const q = pts[(i + 1) % pts.length] ?? p;
46
+ return s + p[0] * q[1] - q[0] * p[1];
47
+ }, 0);
48
+ /**
49
+ * A five point star standing upright and facing the viewer, `d` thick, modelled in 3d: its front and the sides
50
+ * that turn towards the viewer, for a star with real thickness.
51
+ */
52
+ export function starPrism(o, r, d, front, side) {
53
+ // x right, z up, in the front plane; wound counter clockwise seen from the front
54
+ const flat = Array.from({ length: 10 }, (_, i) => {
55
+ const a = Math.PI / 2 - (i * Math.PI) / 5;
56
+ const k = i % 2 ? r * 0.5 : r;
57
+ return [Math.cos(a) * k, Math.sin(a) * k];
58
+ }).reverse();
59
+ const f = flat.map(([x, z]) => ISO(add(o, [x, 0, z])));
60
+ const b = flat.map(([x, z]) => ISO(add(o, [x, d, z])));
61
+ const sign = Math.sign(area(f));
62
+ const sides = [];
63
+ for (let i = 0; i < flat.length; i++) {
64
+ const j = (i + 1) % flat.length;
65
+ const quad = [f[i] ?? [0, 0], b[i] ?? [0, 0], b[j] ?? [0, 0], f[j] ?? [0, 0]];
66
+ if (Math.sign(area(quad)) === sign)
67
+ sides.push({ d: poly(quad, 1), fill: side });
68
+ }
69
+ return [...sides, { d: poly(f, 4), fill: front }];
70
+ }
71
+ /** A rain drop hanging from its tip at (x, y). */
72
+ export const drop = (x, y, k = 1) => poly([[x, y], ...arcPts(x, y + 26 * k, 12 * k, -20, 200, 16)]);
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const smartTv: Icon;
@@ -0,0 +1,39 @@
1
+ // Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
2
+ import { jolt, twinkle } from '../motions.js';
3
+ import { poly } from '../sticker.js';
4
+ import { block, faceOf, quad, solid } from '../iso.js';
5
+ import { glow, LINE } from './shared.js';
6
+ // A wide meeting-room screen on a centre stand, a play button and a bar chart on it
7
+ const W = 360;
8
+ const H = 200;
9
+ const SCREEN = block([-W / 2, -8, 52], [W, 0, 0], [0, 16, 0], [0, 0, H]);
10
+ const face = faceOf(SCREEN, 'front');
11
+ const FOOT = block([-100, -56, 0], [200, 0, 0], [0, 112, 0], [0, 0, 12]);
12
+ const NECK = block([-16, 8, 12], [32, 0, 0], [0, 16, 0], [0, 0, 40]);
13
+ export const smartTv = {
14
+ name: 'smart-tv',
15
+ frames: 180,
16
+ line: LINE,
17
+ extrude: [0, 0],
18
+ layers: [
19
+ { id: 'tv', p: [250, 360], m: jolt([-5, 8]), shapes: [] },
20
+ {
21
+ parent: 'tv',
22
+ shapes: [
23
+ ...solid(FOOT, { fill: 'grey', top: 'white' }, 4),
24
+ ...solid(NECK, { fill: 'grey', front: 'white' }, 2),
25
+ ...solid(SCREEN, { fill: 'grey', front: 'ink', top: 'white' }, 4),
26
+ { d: quad(face, 0.03, 0.06, 0.94, 0.88, 3), fill: 'deep' },
27
+ {
28
+ d: poly([face.at(0.2, 0.32), face.at(0.36, 0.5), face.at(0.2, 0.68)], 4),
29
+ fill: 'white',
30
+ },
31
+ ...[0.3, 0.5, 0.42, 0.66].map((h, i) => ({
32
+ d: quad(face, 0.52 + i * 0.1, 0.18, 0.06, h, 2),
33
+ fill: i === 3 ? 'gold' : 'tint',
34
+ })),
35
+ ],
36
+ },
37
+ glow('tv', [190, -270], 24, [twinkle(44), twinkle(140, true)]),
38
+ ],
39
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const smartphone: Icon;
@@ -0,0 +1,30 @@
1
+ // Drawn for @20baht/stickers after the network diagrams of Protocol Explorer (redrawn as a slab).
2
+ import { twinkle, wiggle } from '../motions.js';
3
+ import { ellipse, line, pill, rect } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ // A modern all-screen phone: thin bezel, a camera hole, a notification card on the screen; it buzzes
6
+ export const smartphone = {
7
+ name: 'smartphone',
8
+ frames: 180,
9
+ line: LINE,
10
+ extrude: EXT,
11
+ layers: [
12
+ { id: 'ph', a: [0, 150], p: [240, 400], m: { ...wiggle, k: 0.6 }, shapes: [] },
13
+ {
14
+ parent: 'ph',
15
+ tilt: FACE,
16
+ shapes: [
17
+ ...[-70, -20].map((y) => ({ d: rect(80, y, 12, 34, 4), fill: 'deep', depth: 0.8 })),
18
+ { d: rect(-86, -160, 172, 320, 36), fill: 'deep', depth: 0.8 },
19
+ { d: rect(-74, -148, 148, 296, 26), fill: 'tint' },
20
+ { d: ellipse(0, -128, 8), fill: 'ink', line: false },
21
+ { d: rect(-58, -92, 116, 58, 14), fill: 'white', depth: 0.3 },
22
+ { d: ellipse(-34, -63, 12), fill: 'ok' },
23
+ { d: line([-12, -72], [40, -72]) },
24
+ { d: line([-12, -54], [22, -54]) },
25
+ { d: pill(-34, 128, 68, 8), fill: 'ink', line: false },
26
+ ],
27
+ },
28
+ glow('ph', [120, -170], 24, [twinkle(46), twinkle(140, true)]),
29
+ ],
30
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const sms: Icon;
@@ -0,0 +1,45 @@
1
+ // Drawn for @20baht/stickers: a text message bubbling up out of a phone.
2
+ import { twinkle, wiggle } from '../motions.js';
3
+ import { ellipse, line, pill, poly, rect } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ const TAIL = [14, -74];
6
+ const BUBBLE = poly([[-10, -200], [176, -200], [176, -100], [46, -100], TAIL, [20, -100], [-10, -100]], [26, 26, 26, 4, 4, 4, 26]);
7
+ export const sms = {
8
+ name: 'sms',
9
+ frames: 180,
10
+ line: LINE,
11
+ extrude: EXT,
12
+ still: 100,
13
+ layers: [
14
+ { id: 'ph', a: [0, 150], p: [236, 384], m: { ...wiggle, k: 0.5 }, shapes: [] },
15
+ {
16
+ id: 'face',
17
+ parent: 'ph',
18
+ tilt: FACE,
19
+ shapes: [
20
+ { d: rect(-120, -110, 150, 260, 30), fill: 'deep', depth: 0.8 },
21
+ { d: rect(-108, -98, 126, 236, 22), fill: 'white' },
22
+ { d: pill(-70, -86, 50, 8), fill: 'ink', line: false },
23
+ { d: rect(-94, -60, 80, 34, 12), fill: 'tint', depth: 0.2 },
24
+ { d: rect(-56, -12, 60, 34, 12), fill: 'tint', depth: 0.2 },
25
+ { d: line([-94, 112], [4, 112]) },
26
+ ],
27
+ },
28
+ {
29
+ id: 'msg',
30
+ parent: 'face',
31
+ a: TAIL,
32
+ p: TAIL,
33
+ m: [twinkle(16), twinkle(150, true)],
34
+ shapes: [{ d: BUBBLE, fill: 'main', depth: 0.8 }],
35
+ },
36
+ ...[52, 84, 116].map((x, i) => ({
37
+ parent: 'msg',
38
+ a: [x, -150],
39
+ p: [x, -150],
40
+ m: [twinkle(34 + i * 8), twinkle(140, true)],
41
+ shapes: [{ d: ellipse(x, -150, 11), fill: 'white' }],
42
+ })),
43
+ glow('ph', [-150, -40], 20, [twinkle(40), twinkle(140, true)]),
44
+ ],
45
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const snapshots: Icon;
@@ -0,0 +1,45 @@
1
+ // Drawn for @20baht/stickers: snip history, a fanned stack of snapshots; a new one is dealt on top and cleared.
2
+ import { deal, twinkle } from '../motions.js';
3
+ import { ellipse, poly, rect } from '../sticker.js';
4
+ import { EXT, glow, LINE } from './shared.js';
5
+ const shot = (fill, sun) => [
6
+ { d: rect(-130, -96, 260, 192, 12), fill: 'white', depth: 0.5 },
7
+ { d: rect(-114, -80, 228, 136, 6), fill },
8
+ ...(sun
9
+ ? [
10
+ { d: ellipse(56, -44, 18), fill: 'gold' },
11
+ {
12
+ d: poly([
13
+ [-114, 56],
14
+ [-114, 20],
15
+ [-50, -30],
16
+ [20, 30],
17
+ [50, 6],
18
+ [114, 50],
19
+ [114, 56],
20
+ ], [4, 3, 6, 4, 6, 3, 4]),
21
+ fill: 'ok',
22
+ },
23
+ ]
24
+ : []),
25
+ ];
26
+ export const snapshots = {
27
+ name: 'snapshots',
28
+ frames: 180,
29
+ line: LINE,
30
+ extrude: EXT,
31
+ layers: [
32
+ { id: 'root', p: [250, 270], shapes: [] },
33
+ { parent: 'root', tilt: [-34, 36], p: [-30, 14], shapes: shot('tint', false) },
34
+ { parent: 'root', tilt: [-24, 36], p: [-14, 4], shapes: shot('tint', false) },
35
+ { parent: 'root', tilt: [-18, 36], shapes: shot('tint', true) },
36
+ {
37
+ parent: 'root',
38
+ tilt: [-10, 36],
39
+ p: [14, -12],
40
+ m: [twinkle(14), deal([110, -60], 24, 16), twinkle(150, true)],
41
+ shapes: shot('tint', true),
42
+ },
43
+ glow('root', [180, -140], 22, [twinkle(70), twinkle(150, true)]),
44
+ ],
45
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const snip: Icon;
@@ -0,0 +1,63 @@
1
+ // Drawn for @20baht/stickers: a screen snip; a crosshair drags a selection out over the screen and lets go.
2
+ import { SNAP, twinkle } from '../motions.js';
3
+ import { line, rect } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ const [X, Y, W, H] = [-110, -76, 190, 132];
6
+ const handles = [
7
+ [X, Y],
8
+ [X + W, Y],
9
+ [X, Y + H],
10
+ [X + W, Y + H],
11
+ ].map(([x = 0, y = 0]) => ({ d: rect(x - 9, y - 9, 18, 18, 3), fill: 'white', line: 4 }));
12
+ // grows from its top-left corner; the crosshair rides the far corner
13
+ const DRAG = [
14
+ [10, 8, SNAP],
15
+ [60, 100, 0],
16
+ [140, 100, SNAP],
17
+ [170, 8],
18
+ ];
19
+ export const snip = {
20
+ name: 'snip',
21
+ frames: 180,
22
+ line: LINE,
23
+ extrude: EXT,
24
+ layers: [
25
+ { id: 'root', p: [250, 250], shapes: [] },
26
+ {
27
+ id: 'scr',
28
+ parent: 'root',
29
+ tilt: FACE,
30
+ shapes: [
31
+ { d: rect(-170, -126, 340, 252, 18), fill: 'deep', depth: 0.8 },
32
+ { d: rect(-156, -112, 312, 224, 10), fill: 'tint' },
33
+ { d: rect(-136, 60, 120, 30, 8), fill: 'white' },
34
+ { d: rect(40, -96, 96, 60, 8), fill: 'white' },
35
+ ],
36
+ },
37
+ {
38
+ parent: 'scr',
39
+ a: [X, Y],
40
+ p: [X, Y],
41
+ m: { s: DRAG.map(([f, k, e]) => [f, [k, k], e]) },
42
+ shapes: [
43
+ { d: rect(X, Y, W, H, 4), fill: 'white', line: 6 },
44
+ { d: rect(X + 14, Y + 14, W - 28, 40, 4), fill: 'main' },
45
+ ...handles,
46
+ ],
47
+ },
48
+ {
49
+ parent: 'scr',
50
+ m: {
51
+ p: DRAG.map(([f, k, e]) => {
52
+ const t = 1 - k / 100;
53
+ return [f, [-W * t, -H * t], e];
54
+ }),
55
+ },
56
+ shapes: [
57
+ { d: line([X + W - 30, Y + H], [X + W + 30, Y + H]), line: 6 },
58
+ { d: line([X + W, Y + H - 30], [X + W, Y + H + 30]), line: 6 },
59
+ ],
60
+ },
61
+ glow('root', [190, -150], 22, [twinkle(60), twinkle(150, true)]),
62
+ ],
63
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const spiritHouse: Icon;
@@ -0,0 +1,73 @@
1
+ // Drawn for @20baht/stickers: a Thai spirit house (san phra phum) on its pillar, in 3d (see iso.ts, street-kit.ts).
2
+ import { sway, twinkle } from '../motions.js';
3
+ import { ellipse, line } from '../sticker.js';
4
+ import { steam } from './food.js';
5
+ import { block, faceOf, ISO as ISO0, mul, quad, solid } from '../iso.js';
6
+ import { face } from './street-kit.js';
7
+ import { glow, LINE } from './shared.js';
8
+ // A white pillar, a deep platform, a small shrine with a gold door under a steep red roof and crossed kalae at the
9
+ // gable; marigold garlands hang from the platform and three incense sticks smoke in front
10
+ // everything modelled at 1, drawn 1.2 times larger
11
+ const S = 1.2;
12
+ const ISO = (p) => ISO0(mul(p, S));
13
+ const sb = (o, x, y, z) => block(mul(o, S), mul(x, S), mul(y, S), mul(z, S));
14
+ const PILLAR = sb([-20, -20, 0], [40, 0, 0], [0, 40, 0], [0, 0, 150]);
15
+ const DECK = sb([-82, -82, 150], [164, 0, 0], [0, 164, 0], [0, 0, 14]);
16
+ const HOUSE = sb([-44, -40, 164], [88, 0, 0], [0, 80, 0], [0, 0, 70]);
17
+ const front = faceOf(HOUSE, 'front');
18
+ const IN = [0, 0, 262];
19
+ const [EAVE, RIDGE] = [234, 304];
20
+ const ROOF = [
21
+ ...face([
22
+ [-62, -54, EAVE],
23
+ [0, -54, RIDGE],
24
+ [0, 54, RIDGE],
25
+ [-62, 54, EAVE],
26
+ ], 'hot', IN, 2, ISO),
27
+ ...face([
28
+ [62, -54, EAVE],
29
+ [62, 54, EAVE],
30
+ [0, 54, RIDGE],
31
+ [0, -54, RIDGE],
32
+ ], 'hot', IN, 2, ISO),
33
+ ...face([
34
+ [-50, -46, EAVE],
35
+ [50, -46, EAVE],
36
+ [0, -46, RIDGE - 12],
37
+ ], 'gold', IN, 0, ISO),
38
+ { d: line(ISO([-10, -54, RIDGE - 10]), ISO([14, -54, RIDGE + 24])), line: 7 },
39
+ { d: line(ISO([10, -54, RIDGE - 10]), ISO([-14, -54, RIDGE + 24])), line: 7 },
40
+ ];
41
+ const garland = (x) => {
42
+ const [gx, gy] = ISO([x, -82, 150]);
43
+ return [0, 1, 2].map((i) => ({
44
+ d: ellipse(gx, gy + 8 + i * 13, 7),
45
+ fill: i === 2 ? 'hot' : 'gold',
46
+ }));
47
+ };
48
+ const STICKS = [-16, 0, 16].map((x) => ISO([x, -66, 164]));
49
+ export const spiritHouse = {
50
+ name: 'spirit-house',
51
+ frames: 180,
52
+ line: LINE,
53
+ extrude: [0, 0],
54
+ layers: [
55
+ { id: 'sh', p: [250, 420], m: { ...sway, k: 0.3 }, shapes: [] },
56
+ {
57
+ parent: 'sh',
58
+ shapes: [
59
+ ...solid(PILLAR, { fill: 'white', top: 'white' }, 2),
60
+ ...solid(DECK, { fill: 'deep', top: 'main' }, 3),
61
+ ...solid(HOUSE, { fill: 'white' }, 2),
62
+ { d: quad(front, 0.32, 0, 0.36, 0.72, 2), fill: 'gold' },
63
+ ...ROOF,
64
+ ...garland(-74),
65
+ ...garland(74),
66
+ { d: ellipse(STICKS[1]?.[0] ?? 0, (STICKS[1]?.[1] ?? 0) + 4, 16, 7), fill: 'gold' },
67
+ ...STICKS.map(([x, y]) => ({ d: line([x, y], [x, y - 36]), line: 4 })),
68
+ ],
69
+ },
70
+ steam('sh', STICKS.map(([x]) => x), (STICKS[0]?.[1] ?? 0) - 40),
71
+ glow('sh', [140, -370], 24, [twinkle(40), twinkle(140, true)]),
72
+ ],
73
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const sslCertificate: Icon;
@@ -0,0 +1,56 @@
1
+ // Drawn for @20baht/stickers: an SSL/TLS certificate, a secure address bar over the certificate; the padlock on
2
+ // its seal snaps shut.
3
+ import { clasp, jolt, shackle, twinkle } from '../motions.js';
4
+ import { line, pill, rect, rosette } from '../sticker.js';
5
+ import { EXT, FACE, glow, LINE } from './shared.js';
6
+ const SHACKLE = 'M68 38L68 22A16 16 0 0 1 100 22L100 38L92 38L92 22A8 8 0 0 0 76 22L76 38Z';
7
+ export const sslCertificate = {
8
+ name: 'ssl-certificate',
9
+ frames: 160,
10
+ line: LINE,
11
+ extrude: EXT,
12
+ still: 120,
13
+ layers: [
14
+ { id: 'root', a: [0, 120], p: [250, 340], m: jolt(), shapes: [] },
15
+ {
16
+ id: 'card',
17
+ parent: 'root',
18
+ tilt: FACE,
19
+ shapes: [
20
+ { d: rect(-160, -126, 320, 252, 18), fill: 'white', depth: 0.8 },
21
+ { d: pill(-140, -108, 280, 40), fill: 'tint' },
22
+ { d: rect(-126, -94, 20, 16, 3), fill: 'ok' },
23
+ { d: 'M-122 -94L-122 -100A6 6 0 0 1 -110 -100L-110 -94' },
24
+ { d: line([-94, -88], [60, -88]) },
25
+ { d: line([-130, -30], [10, -30]), line: 9 },
26
+ { d: line([-130, 4], [-10, 4]) },
27
+ { d: line([-130, 32], [-30, 32]) },
28
+ { d: line([-130, 60], [-50, 60]) },
29
+ { d: line([-130, 88], [-70, 88]) },
30
+ ],
31
+ },
32
+ {
33
+ id: 'seal',
34
+ parent: 'card',
35
+ a: [84, 40],
36
+ p: [84, 40],
37
+ m: { ...clasp, k: 0.6 },
38
+ shapes: [{ d: rosette(84, 40, 64, 14), fill: 'ok', depth: 0.6 }],
39
+ },
40
+ {
41
+ parent: 'seal',
42
+ a: [96, 38],
43
+ p: [96, 38],
44
+ m: { ...shackle, k: 0.6 },
45
+ shapes: [{ d: SHACKLE, fill: 'grey', depth: 0.3 }],
46
+ },
47
+ {
48
+ parent: 'seal',
49
+ shapes: [
50
+ { d: rect(60, 36, 48, 36, 7), fill: 'white', depth: 0.3 },
51
+ { d: rect(81, 46, 6, 14, 3), fill: 'ink', line: false },
52
+ ],
53
+ },
54
+ glow('root', [170, -150], 24, [twinkle(84), twinkle(140, true)]),
55
+ ],
56
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const star: Icon;
@@ -0,0 +1,16 @@
1
+ // Drawn for @20baht/stickers: a chunky star modelled in 3d (see iso.ts), standing up, that hops and glints.
2
+ import { glint, hop, twinkle } from '../motions.js';
3
+ import { glow, LINE } from './shared.js';
4
+ import { starPrism } from './sky-kit.js';
5
+ export const star = {
6
+ name: 'star',
7
+ frames: 160,
8
+ line: LINE,
9
+ extrude: [0, 0],
10
+ layers: [
11
+ { id: 'star', p: [250, 270], m: hop, shapes: [] },
12
+ { parent: 'star', shapes: starPrism([0, 0, 0], 140, 46, 'gold', 'gold') },
13
+ glow('star', [-40, -70], 30, glint(40)),
14
+ glow('star', [150, -140], 22, [twinkle(46), twinkle(130, true)]),
15
+ ],
16
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const stock: Icon;