@20baht/stickers 0.0.0-stage → 0.1.1

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 (413) 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/cron.d.ts +2 -0
  78. package/dist/icons/cron.js +86 -0
  79. package/dist/icons/cursor.d.ts +2 -0
  80. package/dist/icons/cursor.js +27 -0
  81. package/dist/icons/database.d.ts +2 -0
  82. package/dist/icons/database.js +24 -0
  83. package/dist/icons/desktop-tower.d.ts +2 -0
  84. package/dist/icons/desktop-tower.js +41 -0
  85. package/dist/icons/disc-image.d.ts +2 -0
  86. package/dist/icons/disc-image.js +54 -0
  87. package/dist/icons/dollar-note.d.ts +2 -0
  88. package/dist/icons/dollar-note.js +44 -0
  89. package/dist/icons/electric-bill.d.ts +2 -0
  90. package/dist/icons/electric-bill.js +51 -0
  91. package/dist/icons/email.d.ts +2 -0
  92. package/dist/icons/email.js +57 -0
  93. package/dist/icons/empty-state.d.ts +2 -0
  94. package/dist/icons/empty-state.js +75 -0
  95. package/dist/icons/expense.d.ts +2 -0
  96. package/dist/icons/expense.js +36 -0
  97. package/dist/icons/export-file.d.ts +2 -0
  98. package/dist/icons/export-file.js +35 -0
  99. package/dist/icons/eyedropper.d.ts +2 -0
  100. package/dist/icons/eyedropper.js +69 -0
  101. package/dist/icons/face-id.d.ts +2 -0
  102. package/dist/icons/face-id.js +51 -0
  103. package/dist/icons/file.d.ts +2 -0
  104. package/dist/icons/file.js +15 -0
  105. package/dist/icons/finance-b-coins.d.ts +8 -0
  106. package/dist/icons/finance-b-coins.js +14 -0
  107. package/dist/icons/finance-tray.d.ts +11 -0
  108. package/dist/icons/finance-tray.js +41 -0
  109. package/dist/icons/fingerprint.d.ts +2 -0
  110. package/dist/icons/fingerprint.js +45 -0
  111. package/dist/icons/firewall.d.ts +2 -0
  112. package/dist/icons/firewall.js +76 -0
  113. package/dist/icons/floating-ip.d.ts +2 -0
  114. package/dist/icons/floating-ip.js +59 -0
  115. package/dist/icons/flower.d.ts +2 -0
  116. package/dist/icons/flower.js +49 -0
  117. package/dist/icons/food.d.ts +6 -0
  118. package/dist/icons/food.js +18 -0
  119. package/dist/icons/freelance.d.ts +2 -0
  120. package/dist/icons/freelance.js +51 -0
  121. package/dist/icons/fuel.d.ts +2 -0
  122. package/dist/icons/fuel.js +46 -0
  123. package/dist/icons/goal.d.ts +2 -0
  124. package/dist/icons/goal.js +51 -0
  125. package/dist/icons/gold-bar.d.ts +2 -0
  126. package/dist/icons/gold-bar.js +60 -0
  127. package/dist/icons/hard-drive.d.ts +2 -0
  128. package/dist/icons/hard-drive.js +42 -0
  129. package/dist/icons/highlighter.d.ts +2 -0
  130. package/dist/icons/highlighter.js +75 -0
  131. package/dist/icons/home-router.d.ts +2 -0
  132. package/dist/icons/home-router.js +32 -0
  133. package/dist/icons/hot-drink.d.ts +2 -0
  134. package/dist/icons/hot-drink.js +33 -0
  135. package/dist/icons/hsm.d.ts +2 -0
  136. package/dist/icons/hsm.js +54 -0
  137. package/dist/icons/id-card.d.ts +2 -0
  138. package/dist/icons/id-card.js +36 -0
  139. package/dist/icons/income.d.ts +2 -0
  140. package/dist/icons/income.js +28 -0
  141. package/dist/icons/index.d.ts +187 -0
  142. package/dist/icons/index.js +370 -0
  143. package/dist/icons/interest.d.ts +2 -0
  144. package/dist/icons/interest.js +66 -0
  145. package/dist/icons/iot-sensor.d.ts +2 -0
  146. package/dist/icons/iot-sensor.js +35 -0
  147. package/dist/icons/ip-phone.d.ts +2 -0
  148. package/dist/icons/ip-phone.js +47 -0
  149. package/dist/icons/ipad-gen8.d.ts +2 -0
  150. package/dist/icons/ipad-gen8.js +58 -0
  151. package/dist/icons/iphone-17.d.ts +2 -0
  152. package/dist/icons/iphone-17.js +37 -0
  153. package/dist/icons/iso.d.ts +2 -0
  154. package/dist/icons/iso.js +3 -0
  155. package/dist/icons/kanban.d.ts +2 -0
  156. package/dist/icons/kanban.js +85 -0
  157. package/dist/icons/kaprao.d.ts +2 -0
  158. package/dist/icons/kaprao.js +70 -0
  159. package/dist/icons/key-pair.d.ts +2 -0
  160. package/dist/icons/key-pair.js +54 -0
  161. package/dist/icons/key.d.ts +3 -0
  162. package/dist/icons/key.js +37 -0
  163. package/dist/icons/keyboard.d.ts +2 -0
  164. package/dist/icons/keyboard.js +35 -0
  165. package/dist/icons/kite.d.ts +2 -0
  166. package/dist/icons/kite.js +53 -0
  167. package/dist/icons/kvm.d.ts +2 -0
  168. package/dist/icons/kvm.js +53 -0
  169. package/dist/icons/lamp.d.ts +2 -0
  170. package/dist/icons/lamp.js +49 -0
  171. package/dist/icons/laptop.d.ts +2 -0
  172. package/dist/icons/laptop.js +44 -0
  173. package/dist/icons/load-balancer.d.ts +2 -0
  174. package/dist/icons/load-balancer.js +50 -0
  175. package/dist/icons/lock-screen.d.ts +2 -0
  176. package/dist/icons/lock-screen.js +44 -0
  177. package/dist/icons/long-tail-boat.d.ts +2 -0
  178. package/dist/icons/long-tail-boat.js +66 -0
  179. package/dist/icons/lottery.d.ts +2 -0
  180. package/dist/icons/lottery.js +51 -0
  181. package/dist/icons/lotus.d.ts +2 -0
  182. package/dist/icons/lotus.js +70 -0
  183. package/dist/icons/mac-mini.d.ts +2 -0
  184. package/dist/icons/mac-mini.js +31 -0
  185. package/dist/icons/macbook-air.d.ts +2 -0
  186. package/dist/icons/macbook-air.js +41 -0
  187. package/dist/icons/mailbox-thai.d.ts +2 -0
  188. package/dist/icons/mailbox-thai.js +66 -0
  189. package/dist/icons/mango-sticky-rice.d.ts +2 -0
  190. package/dist/icons/mango-sticky-rice.js +41 -0
  191. package/dist/icons/marigold.d.ts +2 -0
  192. package/dist/icons/marigold.js +69 -0
  193. package/dist/icons/market-basket.d.ts +2 -0
  194. package/dist/icons/market-basket.js +69 -0
  195. package/dist/icons/media-player.d.ts +2 -0
  196. package/dist/icons/media-player.js +71 -0
  197. package/dist/icons/metrics.d.ts +2 -0
  198. package/dist/icons/metrics.js +58 -0
  199. package/dist/icons/mini-pc.d.ts +2 -0
  200. package/dist/icons/mini-pc.js +26 -0
  201. package/dist/icons/modem.d.ts +2 -0
  202. package/dist/icons/modem.js +37 -0
  203. package/dist/icons/monitor.d.ts +2 -0
  204. package/dist/icons/monitor.js +40 -0
  205. package/dist/icons/monstera.d.ts +2 -0
  206. package/dist/icons/monstera.js +47 -0
  207. package/dist/icons/moon.d.ts +2 -0
  208. package/dist/icons/moon.js +55 -0
  209. package/dist/icons/motorbike-taxi.d.ts +2 -0
  210. package/dist/icons/motorbike-taxi.js +42 -0
  211. package/dist/icons/music-note.d.ts +2 -0
  212. package/dist/icons/music-note.js +63 -0
  213. package/dist/icons/nas-2bay.d.ts +2 -0
  214. package/dist/icons/nas-2bay.js +49 -0
  215. package/dist/icons/nas.d.ts +2 -0
  216. package/dist/icons/nas.js +41 -0
  217. package/dist/icons/nature-iso.d.ts +29 -0
  218. package/dist/icons/nature-iso.js +74 -0
  219. package/dist/icons/noodle-soup.d.ts +2 -0
  220. package/dist/icons/noodle-soup.js +52 -0
  221. package/dist/icons/notebook.d.ts +2 -0
  222. package/dist/icons/notebook.js +44 -0
  223. package/dist/icons/object-drum.d.ts +18 -0
  224. package/dist/icons/object-drum.js +63 -0
  225. package/dist/icons/otp.d.ts +2 -0
  226. package/dist/icons/otp.js +46 -0
  227. package/dist/icons/over-budget.d.ts +2 -0
  228. package/dist/icons/over-budget.js +48 -0
  229. package/dist/icons/pad-see-ew.d.ts +2 -0
  230. package/dist/icons/pad-see-ew.js +56 -0
  231. package/dist/icons/palm-tree.d.ts +2 -0
  232. package/dist/icons/palm-tree.js +52 -0
  233. package/dist/icons/paper-boat.d.ts +2 -0
  234. package/dist/icons/paper-boat.js +67 -0
  235. package/dist/icons/paper.d.ts +3 -0
  236. package/dist/icons/paper.js +45 -0
  237. package/dist/icons/password.d.ts +2 -0
  238. package/dist/icons/password.js +45 -0
  239. package/dist/icons/patch-panel.d.ts +2 -0
  240. package/dist/icons/patch-panel.js +41 -0
  241. package/dist/icons/pdu.d.ts +2 -0
  242. package/dist/icons/pdu.js +40 -0
  243. package/dist/icons/phone-topup.d.ts +2 -0
  244. package/dist/icons/phone-topup.js +55 -0
  245. package/dist/icons/photo.d.ts +2 -0
  246. package/dist/icons/photo.js +48 -0
  247. package/dist/icons/phuang-malai.d.ts +2 -0
  248. package/dist/icons/phuang-malai.js +59 -0
  249. package/dist/icons/pie-chart.d.ts +2 -0
  250. package/dist/icons/pie-chart.js +36 -0
  251. package/dist/icons/piggy-bank.d.ts +2 -0
  252. package/dist/icons/piggy-bank.js +64 -0
  253. package/dist/icons/plant-kit.d.ts +23 -0
  254. package/dist/icons/plant-kit.js +112 -0
  255. package/dist/icons/plastic-stool.d.ts +2 -0
  256. package/dist/icons/plastic-stool.js +67 -0
  257. package/dist/icons/pointer.d.ts +1 -0
  258. package/dist/icons/pointer.js +12 -0
  259. package/dist/icons/pos.d.ts +2 -0
  260. package/dist/icons/pos.js +59 -0
  261. package/dist/icons/potted-plant.d.ts +2 -0
  262. package/dist/icons/potted-plant.js +31 -0
  263. package/dist/icons/power-pole.d.ts +2 -0
  264. package/dist/icons/power-pole.js +60 -0
  265. package/dist/icons/power-station.d.ts +2 -0
  266. package/dist/icons/power-station.js +56 -0
  267. package/dist/icons/printer.d.ts +2 -0
  268. package/dist/icons/printer.js +46 -0
  269. package/dist/icons/qr-code.d.ts +2 -0
  270. package/dist/icons/qr-code.js +45 -0
  271. package/dist/icons/rack.d.ts +2 -0
  272. package/dist/icons/rack.js +39 -0
  273. package/dist/icons/rain-cloud.d.ts +2 -0
  274. package/dist/icons/rain-cloud.js +31 -0
  275. package/dist/icons/rainbow.d.ts +2 -0
  276. package/dist/icons/rainbow.js +46 -0
  277. package/dist/icons/receipt.d.ts +2 -0
  278. package/dist/icons/receipt.js +56 -0
  279. package/dist/icons/redmi-note-9s-pro.d.ts +2 -0
  280. package/dist/icons/redmi-note-9s-pro.js +37 -0
  281. package/dist/icons/register.d.ts +2 -0
  282. package/dist/icons/register.js +40 -0
  283. package/dist/icons/remote-desktop.d.ts +2 -0
  284. package/dist/icons/remote-desktop.js +62 -0
  285. package/dist/icons/remote-folder.d.ts +2 -0
  286. package/dist/icons/remote-folder.js +55 -0
  287. package/dist/icons/rent.d.ts +2 -0
  288. package/dist/icons/rent.js +50 -0
  289. package/dist/icons/rock.d.ts +2 -0
  290. package/dist/icons/rock.js +80 -0
  291. package/dist/icons/router.d.ts +2 -0
  292. package/dist/icons/router.js +59 -0
  293. package/dist/icons/salary.d.ts +2 -0
  294. package/dist/icons/salary.js +54 -0
  295. package/dist/icons/saving-streak.d.ts +2 -0
  296. package/dist/icons/saving-streak.js +66 -0
  297. package/dist/icons/scan-slip.d.ts +2 -0
  298. package/dist/icons/scan-slip.js +53 -0
  299. package/dist/icons/scissors.d.ts +2 -0
  300. package/dist/icons/scissors.js +52 -0
  301. package/dist/icons/server-cabinet.d.ts +2 -0
  302. package/dist/icons/server-cabinet.js +49 -0
  303. package/dist/icons/server.d.ts +2 -0
  304. package/dist/icons/server.js +41 -0
  305. package/dist/icons/shared.d.ts +8 -0
  306. package/dist/icons/shared.js +18 -0
  307. package/dist/icons/shield.d.ts +3 -0
  308. package/dist/icons/shield.js +28 -0
  309. package/dist/icons/shooting-star.d.ts +2 -0
  310. package/dist/icons/shooting-star.js +37 -0
  311. package/dist/icons/shopping-box.d.ts +2 -0
  312. package/dist/icons/shopping-box.js +46 -0
  313. package/dist/icons/sky-kit.d.ts +19 -0
  314. package/dist/icons/sky-kit.js +72 -0
  315. package/dist/icons/smart-tv.d.ts +2 -0
  316. package/dist/icons/smart-tv.js +39 -0
  317. package/dist/icons/smartphone.d.ts +2 -0
  318. package/dist/icons/smartphone.js +30 -0
  319. package/dist/icons/sms.d.ts +2 -0
  320. package/dist/icons/sms.js +45 -0
  321. package/dist/icons/snapshots.d.ts +2 -0
  322. package/dist/icons/snapshots.js +45 -0
  323. package/dist/icons/snip.d.ts +2 -0
  324. package/dist/icons/snip.js +63 -0
  325. package/dist/icons/spirit-house.d.ts +2 -0
  326. package/dist/icons/spirit-house.js +73 -0
  327. package/dist/icons/ssl-certificate.d.ts +2 -0
  328. package/dist/icons/ssl-certificate.js +56 -0
  329. package/dist/icons/star.d.ts +2 -0
  330. package/dist/icons/star.js +16 -0
  331. package/dist/icons/stock.d.ts +2 -0
  332. package/dist/icons/stock.js +62 -0
  333. package/dist/icons/storage-array.d.ts +2 -0
  334. package/dist/icons/storage-array.js +40 -0
  335. package/dist/icons/storm.d.ts +2 -0
  336. package/dist/icons/storm.js +43 -0
  337. package/dist/icons/street-food-cart.d.ts +2 -0
  338. package/dist/icons/street-food-cart.js +66 -0
  339. package/dist/icons/street-kit.d.ts +19 -0
  340. package/dist/icons/street-kit.js +67 -0
  341. package/dist/icons/street-sign.d.ts +2 -0
  342. package/dist/icons/street-sign.js +42 -0
  343. package/dist/icons/studio-monitors.d.ts +2 -0
  344. package/dist/icons/studio-monitors.js +67 -0
  345. package/dist/icons/sun.d.ts +2 -0
  346. package/dist/icons/sun.js +40 -0
  347. package/dist/icons/support.d.ts +2 -0
  348. package/dist/icons/support.js +48 -0
  349. package/dist/icons/switch.d.ts +2 -0
  350. package/dist/icons/switch.js +34 -0
  351. package/dist/icons/tablet.d.ts +2 -0
  352. package/dist/icons/tablet.js +44 -0
  353. package/dist/icons/tape-library.d.ts +2 -0
  354. package/dist/icons/tape-library.js +48 -0
  355. package/dist/icons/temple-donation.d.ts +2 -0
  356. package/dist/icons/temple-donation.js +60 -0
  357. package/dist/icons/tent.d.ts +2 -0
  358. package/dist/icons/tent.js +66 -0
  359. package/dist/icons/terminal.d.ts +2 -0
  360. package/dist/icons/terminal.js +56 -0
  361. package/dist/icons/thai-house.d.ts +2 -0
  362. package/dist/icons/thai-house.js +85 -0
  363. package/dist/icons/thai-lantern.d.ts +2 -0
  364. package/dist/icons/thai-lantern.js +61 -0
  365. package/dist/icons/thinkpad-l380.d.ts +2 -0
  366. package/dist/icons/thinkpad-l380.js +54 -0
  367. package/dist/icons/timer.d.ts +2 -0
  368. package/dist/icons/timer.js +59 -0
  369. package/dist/icons/train-ticket.d.ts +2 -0
  370. package/dist/icons/train-ticket.js +57 -0
  371. package/dist/icons/trash.d.ts +2 -0
  372. package/dist/icons/trash.js +62 -0
  373. package/dist/icons/tree.d.ts +2 -0
  374. package/dist/icons/tree.js +40 -0
  375. package/dist/icons/tuk-tuk.d.ts +2 -0
  376. package/dist/icons/tuk-tuk.js +45 -0
  377. package/dist/icons/tulip.d.ts +2 -0
  378. package/dist/icons/tulip.js +56 -0
  379. package/dist/icons/tunnel.d.ts +2 -0
  380. package/dist/icons/tunnel.js +50 -0
  381. package/dist/icons/two-factor.d.ts +2 -0
  382. package/dist/icons/two-factor.js +81 -0
  383. package/dist/icons/ups.d.ts +2 -0
  384. package/dist/icons/ups.js +37 -0
  385. package/dist/icons/usb-drive.d.ts +2 -0
  386. package/dist/icons/usb-drive.js +35 -0
  387. package/dist/icons/verified.d.ts +2 -0
  388. package/dist/icons/verified.js +32 -0
  389. package/dist/icons/virtual-machine.d.ts +2 -0
  390. package/dist/icons/virtual-machine.js +66 -0
  391. package/dist/icons/volume.d.ts +6 -0
  392. package/dist/icons/volume.js +35 -0
  393. package/dist/icons/vpn-gateway.d.ts +2 -0
  394. package/dist/icons/vpn-gateway.js +51 -0
  395. package/dist/icons/wake-on-lan.d.ts +2 -0
  396. package/dist/icons/wake-on-lan.js +40 -0
  397. package/dist/icons/wallet.d.ts +3 -0
  398. package/dist/icons/wallet.js +55 -0
  399. package/dist/icons/water-jar.d.ts +2 -0
  400. package/dist/icons/water-jar.js +72 -0
  401. package/dist/icons/wooden-window.d.ts +2 -0
  402. package/dist/icons/wooden-window.js +65 -0
  403. package/dist/index.d.ts +2 -0
  404. package/dist/index.js +4 -0
  405. package/dist/iso.d.ts +32 -0
  406. package/dist/iso.js +64 -0
  407. package/dist/load.d.ts +199 -0
  408. package/dist/load.js +199 -0
  409. package/dist/motions.d.ts +68 -0
  410. package/dist/motions.js +446 -0
  411. package/dist/sticker.d.ts +269 -0
  412. package/dist/sticker.js +1009 -0
  413. package/package.json +101 -4
@@ -0,0 +1,55 @@
1
+ // Drawn for @20baht/stickers: topping up a phone; a coin drops in and the signal bars fill. No operator mark.
2
+ import { fall, nudge, twinkle } from '../motions.js';
3
+ import { ellipse, line, onFace, rect } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ const TOP = onFace(FACE, [0, -160]);
6
+ const COIN = [TOP[0], TOP[1] - 62];
7
+ const BARS = [0, 1, 2, 3];
8
+ export const phoneTopup = {
9
+ name: 'phone-topup',
10
+ frames: 180,
11
+ still: 120,
12
+ line: LINE,
13
+ extrude: EXT,
14
+ layers: [
15
+ { id: 'ph', a: [0, 160], p: [250, 410], m: { ...nudge, at: 50 }, shapes: [] },
16
+ {
17
+ parent: 'ph',
18
+ a: COIN,
19
+ p: COIN,
20
+ m: [twinkle(4), fall([0, 68], 28, 20)],
21
+ op: 50,
22
+ shapes: [
23
+ { d: ellipse(COIN[0], COIN[1], 34), fill: 'gold', depth: 0.5 },
24
+ { d: line([COIN[0] - 14, COIN[1]], [COIN[0] + 14, COIN[1]]), line: 7 },
25
+ { d: line([COIN[0], COIN[1] - 14], [COIN[0], COIN[1] + 14]), line: 7 },
26
+ ],
27
+ },
28
+ {
29
+ id: 'face',
30
+ parent: 'ph',
31
+ tilt: FACE,
32
+ shapes: [
33
+ { d: rect(-90, -160, 180, 320, 34), fill: 'deep', depth: 0.8 },
34
+ { d: rect(-76, -146, 152, 292, 24), fill: 'tint' },
35
+ { d: ellipse(0, -126, 7), fill: 'ink', line: false },
36
+ { d: rect(-56, 70, 112, 44, 14), fill: 'white', depth: 0.3 },
37
+ { d: line([-30, 92], [30, 92]) },
38
+ ],
39
+ },
40
+ ...BARS.map((i) => {
41
+ const h = 34 + i * 26;
42
+ const c = [-48 + i * 32, 30 - h / 2];
43
+ return {
44
+ parent: 'face',
45
+ a: c,
46
+ p: c,
47
+ m: [twinkle(54 + i * 8), twinkle(140 + i * 3, true)],
48
+ shapes: [
49
+ { d: rect(c[0] - 11, 30 - h, 22, h, 4), fill: i === 3 ? 'ok' : 'main', depth: 0.25 },
50
+ ],
51
+ };
52
+ }),
53
+ glow('ph', [130, -150], 24, [twinkle(82), twinkle(150, true)]),
54
+ ],
55
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const photo: Icon;
@@ -0,0 +1,48 @@
1
+ // Drawn for @20baht/stickers: an image file, hills under a sun that bounces up when it opens.
2
+ import { bounce, jolt, twinkle } from '../motions.js';
3
+ import { ellipse, poly, rect } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ export const photo = {
6
+ name: 'photo',
7
+ frames: 180,
8
+ line: LINE,
9
+ extrude: EXT,
10
+ layers: [
11
+ { id: 'root', a: [0, 110], p: [250, 330], m: jolt(), shapes: [] },
12
+ {
13
+ id: 'pic',
14
+ parent: 'root',
15
+ tilt: FACE,
16
+ shapes: [
17
+ { d: rect(-160, -120, 320, 240, 18), fill: 'white', depth: 0.8 },
18
+ { d: rect(-140, -100, 280, 200, 10), fill: 'tint' },
19
+ ],
20
+ },
21
+ {
22
+ parent: 'pic',
23
+ a: [60, -40],
24
+ p: [60, -40],
25
+ m: { ...bounce, at: 6 },
26
+ shapes: [{ d: ellipse(60, -40, 28), fill: 'gold' }],
27
+ },
28
+ {
29
+ parent: 'pic',
30
+ shapes: [
31
+ {
32
+ d: poly([
33
+ [-140, 100],
34
+ [-140, 40],
35
+ [-70, -30],
36
+ [10, 50],
37
+ [50, 14],
38
+ [140, 90],
39
+ [140, 100],
40
+ ], [10, 4, 10, 6, 10, 4, 10]),
41
+ fill: 'ok',
42
+ depth: 0.2,
43
+ },
44
+ ],
45
+ },
46
+ glow('root', [-190, -110], 22, [twinkle(40), twinkle(140, true)]),
47
+ ],
48
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const phuangMalai: Icon;
@@ -0,0 +1,59 @@
1
+ // Drawn for @20baht/stickers: a jasmine phuang malai in 2.5d (see nature-iso.ts); it swings from its hook.
2
+ import { sway, twinkle } from '../motions.js';
3
+ import { ellipse, line, pill, rosette } from '../sticker.js';
4
+ import { ISO } from '../iso.js';
5
+ import { farness } from './nature-iso.js';
6
+ import { glow, LINE } from './shared.js';
7
+ // two strands of jasmine buds hang in a loop that leans into the page, tied at the bottom with a rose and a
8
+ // marigold; ribbons and bead strings hang below and swing a beat behind
9
+ const bead = (R, t) => [R * Math.sin(t), 0, R * Math.cos(t)];
10
+ const STRANDS = [
11
+ { R: 78, n: 30, off: 0 },
12
+ { R: 64, n: 24, off: 0.5 },
13
+ ];
14
+ const BEADS = STRANDS.flatMap(({ R, n, off }) => Array.from({ length: n }, (_, i) => bead(R, ((i + off) / n) * Math.PI * 2)).filter((p) => p[2] > -R * 0.9)).sort((a, b) => farness(b) - farness(a));
15
+ const KNOT = ISO([0, 0, -74]);
16
+ const TASSELS = [
17
+ [-26, 120],
18
+ [-8, 150],
19
+ [10, 136],
20
+ [28, 112],
21
+ ];
22
+ export const phuangMalai = {
23
+ name: 'phuang-malai',
24
+ frames: 180,
25
+ line: LINE,
26
+ extrude: [0, 0],
27
+ layers: [
28
+ { id: 'malai', a: [0, -96], p: [250, 128], m: { ...sway, k: 1.2 }, shapes: [] },
29
+ {
30
+ parent: 'malai',
31
+ shapes: [
32
+ { d: line([0, -120], [0, -78]), line: 5 },
33
+ { d: ellipse(0, -126, 9), line: 5 },
34
+ ...BEADS.map((b) => {
35
+ const [x, y] = ISO(b);
36
+ return { d: ellipse(x, y, 10, 11), fill: 'white', line: 4 };
37
+ }),
38
+ ],
39
+ },
40
+ {
41
+ id: 'tail',
42
+ parent: 'malai',
43
+ a: KNOT,
44
+ p: KNOT,
45
+ m: { ...sway, at: 8, k: 2 },
46
+ shapes: [
47
+ ...TASSELS.map(([x, h], i) => ({
48
+ d: pill(KNOT[0] + x - 7, KNOT[1] + 10, 14, h),
49
+ fill: i % 2 ? 'gold' : 'hot',
50
+ })),
51
+ { d: rosette(KNOT[0] - 20, KNOT[1] + 2, 26, 9, 0.6), fill: 'hot' },
52
+ { d: rosette(KNOT[0] - 20, KNOT[1] + 2, 13, 6, 0.6), fill: 'hot' },
53
+ { d: rosette(KNOT[0] + 24, KNOT[1] + 6, 20, 10, 0.7), fill: 'gold' },
54
+ { d: ellipse(KNOT[0] + 24, KNOT[1] + 6, 6), fill: 'hot' },
55
+ ],
56
+ },
57
+ glow('malai', [110, -60], 22, [twinkle(40), twinkle(140, true)]),
58
+ ],
59
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const pieChart: Icon;
@@ -0,0 +1,36 @@
1
+ // Drawn for @20baht/stickers: a spending pie chart on the leaned face; the biggest-spend slice slides out.
2
+ import { slide, twinkle } from '../motions.js';
3
+ import { EXT, FACE, glow, LINE } from './shared.js';
4
+ const R = 130;
5
+ const DEG = Math.PI / 180;
6
+ const at = (a, r = R) => [Math.cos(a * DEG) * r, Math.sin(a * DEG) * r];
7
+ const n = (v) => +v.toFixed(2);
8
+ /** A wedge from `from` to `to` degrees, clockwise from 3 o'clock. */
9
+ const wedge = (from, to, fill) => {
10
+ const [a, b] = [at(from), at(to)];
11
+ const large = to - from > 180 ? 1 : 0;
12
+ return {
13
+ d: `M0 0L${n(a[0])} ${n(a[1])}A${R} ${R} 0 ${large} 1 ${n(b[0])} ${n(b[1])}Z`,
14
+ fill,
15
+ depth: 1,
16
+ };
17
+ };
18
+ const OUT = (-90 + -30) / 2;
19
+ export const pieChart = {
20
+ name: 'pie-chart',
21
+ frames: 180,
22
+ still: 100,
23
+ line: LINE,
24
+ extrude: EXT,
25
+ layers: [
26
+ { id: 'pie', p: [240, 270], shapes: [] },
27
+ {
28
+ id: 'face',
29
+ parent: 'pie',
30
+ tilt: FACE,
31
+ shapes: [wedge(120, 210, 'tint'), wedge(210, 270, 'white'), wedge(-30, 120, 'main')],
32
+ },
33
+ { parent: 'face', m: slide(at(OUT, 34), 16, 70, 44), shapes: [wedge(-90, -30, 'gold')] },
34
+ glow('pie', [160, -170], 24, [twinkle(56), twinkle(140, true)]),
35
+ ],
36
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const piggyBank: Icon;
@@ -0,0 +1,64 @@
1
+ import { fall, nudge, twinkle } from '../motions.js';
2
+ import { block, faceOf, ISO, quad, solid } from '../iso.js';
3
+ import { glow, LINE } from './shared.js';
4
+ import { drum, wire } from './volume.js';
5
+ // Voxel pig: a long body, separate square head, four short legs and a raised snout.
6
+ const PINK = '#efa4b5';
7
+ const LIGHT = '#ffd0d9';
8
+ const SHADE = '#ce7f95';
9
+ const voxel = (o, size, front = PINK, top = LIGHT, side = SHADE) => solid(block(o, [size[0], 0, 0], [0, size[1], 0], [0, 0, size[2]]), { fill: side, front, top }, 1);
10
+ const body = block([-62, -45, 53], [124, 0, 0], [0, 192, 0], [0, 0, 95]);
11
+ const head = faceOf(block([-58, -116, 74], [116, 0, 0], [0, 85, 0], [0, 0, 104]), 'front');
12
+ const snout = faceOf(block([-31, -139, 94], [62, 0, 0], [0, 23, 0], [0, 0, 37]), 'front');
13
+ const coin = ISO([0, 55, 240]);
14
+ export const piggyBank = {
15
+ name: 'piggy-bank',
16
+ frames: 180,
17
+ still: 120,
18
+ line: LINE,
19
+ extrude: [0, 0],
20
+ layers: [
21
+ { id: 'pig', p: [235, 350], m: { ...nudge, at: 58 }, shapes: [] },
22
+ {
23
+ parent: 'pig',
24
+ shapes: [
25
+ wire([
26
+ [0, 147, 99],
27
+ [0, 167, 99],
28
+ [18, 167, 99],
29
+ [18, 167, 117],
30
+ ], 7),
31
+ ...[-53, 20].flatMap((x) => [-31, 102].flatMap((y) => [
32
+ ...voxel([x, y, 0], [33, 34, 65]),
33
+ ...voxel([x, y, 0], [33, 34, 15], '#bd778d', PINK, '#a66079'),
34
+ ])),
35
+ ...voxel([-62, -45, 53], [124, 192, 95]),
36
+ { d: quad(faceOf(body, 'top'), 0.28, 0.47, 0.44, 0.055, 1), fill: 'ink', line: false },
37
+ ...voxel([-58, -116, 74], [116, 85, 104]),
38
+ ...[0.12, 0.72].flatMap((s) => [
39
+ { d: quad(head, s, 0.62, 0.16, 0.17), fill: 'white', line: false },
40
+ {
41
+ d: quad(head, s + 0.055, 0.62, 0.09, 0.14),
42
+ fill: 'ink',
43
+ line: false,
44
+ },
45
+ ]),
46
+ ...voxel([-31, -139, 94], [62, 23, 37], '#f8b8c7', LIGHT, '#d989a2'),
47
+ ...[0.17, 0.65].map((s) => ({
48
+ d: quad(snout, s, 0.3, 0.18, 0.42),
49
+ fill: '#a45573',
50
+ line: false,
51
+ })),
52
+ ],
53
+ },
54
+ {
55
+ parent: 'pig',
56
+ a: coin,
57
+ p: coin,
58
+ m: [twinkle(4), fall([0, 78], 34, 22)],
59
+ op: 58,
60
+ shapes: drum([0, 55, 240], 23, 23, 9, 'gold', 'main'),
61
+ },
62
+ glow('pig', [150, -170], 22, [twinkle(60), twinkle(140, true)]),
63
+ ],
64
+ };
@@ -0,0 +1,23 @@
1
+ import type { Shape, Swatch, Vec } from '../sticker.js';
2
+ import type { V3 } from '../iso.js';
3
+ /**
4
+ * A round rod from a (radius ra) to b (radius rb): a pot, a trunk, a log. Its outline, then whichever end turns to
5
+ * the viewer, in `cap` (the body's fill when left out).
6
+ */
7
+ export declare function rod(a: V3, b: V3, ra: number, rb: number, fill: Swatch, cap?: Swatch): Shape[];
8
+ /** A square ground tile, top at z 0, `half` from the centre to each side. */
9
+ export declare const tile: (half: number, top: Swatch, side: Swatch, thick?: number) => Shape[];
10
+ /** A pointed leaf from its stalk at o, `len` long and `w` wide, turned deg from straight up (clockwise). */
11
+ export declare const leaf: (o: Vec, deg: number, len: number, w: number) => string;
12
+ /** The leaf's midrib, an open line for the outline pass. */
13
+ export declare const rib: (o: Vec, deg: number, len: number) => string;
14
+ /** A point on a turned local frame, for parts that ride a leaf (slits, a flower on a stem). */
15
+ export declare const spot: (o: Vec, deg: number, p: Vec) => Vec;
16
+ /** A long drooping frond: a tapered blade bent along a curve, from o turned deg, droop pulling the tip down. */
17
+ export declare function frond(o: Vec, deg: number, len: number, w: number, droop: number): string;
18
+ /** The frond's spine, open. */
19
+ export declare const spine: (o: Vec, deg: number, len: number, droop: number) => string;
20
+ /** A tuft of grass at p: three blades, open. */
21
+ export declare const tuft: ([x, y]: Vec) => string;
22
+ /** A pot: a tapered body, a rim and the soil in it. Returns its shapes and the soil's centre on screen. */
23
+ export declare function pot(h: number, r0: number, r1: number, fill: Swatch, soil?: Swatch): [Shape[], Vec];
@@ -0,0 +1,112 @@
1
+ // Helpers for the plant and camping stickers (not a sticker): round parts in true 3d (pots, trunks, logs), the
2
+ // square ground tile they stand on, and leaf outlines as raw paths for slabs.
3
+ import { poly } from '../sticker.js';
4
+ import { add, block, ISO, mul, solid } from '../iso.js';
5
+ const cross = (a, b) => [
6
+ a[1] * b[2] - a[2] * b[1],
7
+ a[2] * b[0] - a[0] * b[2],
8
+ a[0] * b[1] - a[1] * b[0],
9
+ ];
10
+ const unit = (a) => mul(a, 1 / (Math.hypot(...a) || 1));
11
+ const area = (pts) => pts.reduce((s, p, i) => {
12
+ const q = pts[(i + 1) % pts.length] ?? p;
13
+ return s + p[0] * q[1] - q[0] * p[1];
14
+ }, 0);
15
+ // convex hull, monotone chain: the outline of a round part seen from any side
16
+ function hull(points) {
17
+ const pts = [...points].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
18
+ const turn = (o, a, b) => (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
19
+ const half = (list) => {
20
+ const out = [];
21
+ for (const p of list) {
22
+ while (out.length >= 2 && turn(out[out.length - 2] ?? p, out[out.length - 1] ?? p, p) <= 0)
23
+ out.pop();
24
+ out.push(p);
25
+ }
26
+ out.pop();
27
+ return out;
28
+ };
29
+ return [...half(pts), ...half([...pts].reverse())];
30
+ }
31
+ /** A circle of radius r about c, in the plane whose outward normal is n, projected; wound like a block face. */
32
+ function ring(c, n, r, count = 28) {
33
+ const nn = unit(n);
34
+ const w = Math.abs(nn[2]) < 0.9 ? [0, 0, 1] : [1, 0, 0];
35
+ const u = unit(cross(w, nn));
36
+ const v = cross(nn, u);
37
+ return Array.from({ length: count }, (_, i) => {
38
+ const t = (i / count) * Math.PI * 2;
39
+ return ISO(add(c, add(mul(u, Math.cos(t) * r), mul(v, Math.sin(t) * r))));
40
+ });
41
+ }
42
+ /**
43
+ * A round rod from a (radius ra) to b (radius rb): a pot, a trunk, a log. Its outline, then whichever end turns to
44
+ * the viewer, in `cap` (the body's fill when left out).
45
+ */
46
+ export function rod(a, b, ra, rb, fill, cap = fill) {
47
+ const d = add(b, mul(a, -1));
48
+ const [top, bottom] = [ring(b, d, rb), ring(a, mul(d, -1), ra)];
49
+ const out = [{ d: poly(hull([...top, ...bottom])), fill }];
50
+ for (const e of [top, bottom])
51
+ if (area(e) < 0)
52
+ out.push({ d: poly(e), fill: cap });
53
+ return out;
54
+ }
55
+ /** A square ground tile, top at z 0, `half` from the centre to each side. */
56
+ export const tile = (half, top, side, thick = 26) => solid(block([-half, -half, -thick], [half * 2, 0, 0], [0, half * 2, 0], [0, 0, thick]), { fill: side, top }, 6);
57
+ const n = (v) => v.toFixed(1);
58
+ const rot = ([x, y], deg) => {
59
+ const a = (deg * Math.PI) / 180;
60
+ return [x * Math.cos(a) - y * Math.sin(a), x * Math.sin(a) + y * Math.cos(a)];
61
+ };
62
+ const place = (o, deg, p) => {
63
+ const [x, y] = rot(p, deg);
64
+ return `${n(o[0] + x)} ${n(o[1] + y)}`;
65
+ };
66
+ /** A pointed leaf from its stalk at o, `len` long and `w` wide, turned deg from straight up (clockwise). */
67
+ export const leaf = (o, deg, len, w) => `M${place(o, deg, [0, 0])}C${place(o, deg, [w, -len * 0.2])} ${place(o, deg, [w * 0.8, -len * 0.75])} ` +
68
+ `${place(o, deg, [0, -len])}C${place(o, deg, [-w * 0.8, -len * 0.75])} ${place(o, deg, [-w, -len * 0.2])} ` +
69
+ `${place(o, deg, [0, 0])}Z`;
70
+ /** The leaf's midrib, an open line for the outline pass. */
71
+ export const rib = (o, deg, len) => `M${place(o, deg, [0, -len * 0.08])}L${place(o, deg, [0, -len * 0.8])}`;
72
+ /** A point on a turned local frame, for parts that ride a leaf (slits, a flower on a stem). */
73
+ export const spot = (o, deg, p) => {
74
+ const [x, y] = rot(p, deg);
75
+ return [o[0] + x, o[1] + y];
76
+ };
77
+ /** A long drooping frond: a tapered blade bent along a curve, from o turned deg, droop pulling the tip down. */
78
+ export function frond(o, deg, len, w, droop) {
79
+ const mid = (t) => {
80
+ const [x, y] = spot(o, deg, [len * t, 0]);
81
+ return [x, y + droop * t * t];
82
+ };
83
+ const side = (t, s) => {
84
+ const [x, y] = mid(t);
85
+ const [x2, y2] = mid(Math.min(1, t + 0.02));
86
+ const l = Math.hypot(x2 - x, y2 - y) || 1;
87
+ const k = Math.sin(Math.PI * Math.min(1, t * 1.15)) * w * s;
88
+ return [x - ((y2 - y) / l) * k, y + ((x2 - x) / l) * k];
89
+ };
90
+ const ts = Array.from({ length: 13 }, (_, i) => i / 12);
91
+ const back = ts.slice(1, -1).reverse();
92
+ return poly([...ts.map((t) => side(t, 1)), ...back.map((t) => side(t, -1))]);
93
+ }
94
+ /** The frond's spine, open. */
95
+ export const spine = (o, deg, len, droop) => Array.from({ length: 11 }, (_, i) => {
96
+ const t = (i / 10) * 0.92;
97
+ const [x, y] = spot(o, deg, [len * t, 0]);
98
+ return `${i ? 'L' : 'M'}${n(x)} ${n(y + droop * t * t)}`;
99
+ }).join('');
100
+ /** A tuft of grass at p: three blades, open. */
101
+ export const tuft = ([x, y]) => `M${n(x - 9)} ${n(y)}L${n(x - 5)} ${n(y - 12)}L${n(x - 1)} ${n(y)}L${n(x + 3)} ${n(y - 15)}L${n(x + 7)} ${n(y)}`;
102
+ /** A pot: a tapered body, a rim and the soil in it. Returns its shapes and the soil's centre on screen. */
103
+ export function pot(h, r0, r1, fill, soil = 'deep') {
104
+ const lip = h * 0.22;
105
+ return [
106
+ [
107
+ ...rod([0, 0, 0], [0, 0, h - lip], r0, r1, fill),
108
+ ...rod([0, 0, h - lip], [0, 0, h], r1 + 6, r1 + 6, fill, soil),
109
+ ],
110
+ ISO([0, 0, h]),
111
+ ];
112
+ }
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const plasticStool: Icon;
@@ -0,0 +1,67 @@
1
+ // Drawn for @20baht/stickers: a stack of red plastic stools, modelled in 3d (see street-kit.ts).
2
+ import { hop, twinkle } from '../motions.js';
3
+ import { poly } from '../sticker.js';
4
+ import { ISO } from '../iso.js';
5
+ import { face, lerp4 } from './street-kit.js';
6
+ import { glow, LINE } from './shared.js';
7
+ // Three stools nested in a stack: square seats with a hand slot, splayed sides with arched openings; the top one hops
8
+ const [TOP, BOT, H, STEP] = [70, 90, 150, 58];
9
+ const SIGNS = [
10
+ [-1, -1],
11
+ [1, -1],
12
+ [1, 1],
13
+ [-1, 1],
14
+ ];
15
+ const corner = (r, z, i) => {
16
+ const [sx, sy] = SIGNS[i % 4] ?? SIGNS[0];
17
+ return [sx * r, sy * r, z];
18
+ };
19
+ const corners = (r, z) => [0, 1, 2, 3].map((i) => corner(r, z, i));
20
+ const visible = (q, z0) => face(q, 'hot', [0, 0, z0 + H / 2]).length > 0;
21
+ const arch = (q) => {
22
+ const pts = [ISO(lerp4(q, 0.24, 0)), ISO(lerp4(q, 0.24, 0.34))];
23
+ for (let i = 1; i < 10; i++) {
24
+ const a = Math.PI - (i / 10) * Math.PI;
25
+ pts.push(ISO(lerp4(q, 0.5 + Math.cos(a) * 0.26, 0.34 + Math.sin(a) * 0.24)));
26
+ }
27
+ pts.push(ISO(lerp4(q, 0.76, 0.34)), ISO(lerp4(q, 0.76, 0)));
28
+ return poly(pts, 2);
29
+ };
30
+ const stool = (z0) => {
31
+ const sides = [0, 1, 2, 3].map((i) => [
32
+ corner(BOT, z0, i),
33
+ corner(BOT, z0, i + 1),
34
+ corner(TOP, z0 + H, i + 1),
35
+ corner(TOP, z0 + H, i),
36
+ ]);
37
+ const IN = [0, 0, z0 + H / 2];
38
+ const seat = corners(TOP, z0 + H);
39
+ return [
40
+ ...sides
41
+ .filter((q) => visible(q, z0))
42
+ .flatMap((q) => [...face(q, 'hot', IN, 3), { d: arch(q), fill: 'deep' }]),
43
+ ...face(seat, 'hot', IN, 6),
44
+ {
45
+ d: poly([
46
+ ISO([-28, -8, z0 + H]),
47
+ ISO([28, -8, z0 + H]),
48
+ ISO([28, 8, z0 + H]),
49
+ ISO([-28, 8, z0 + H]),
50
+ ], 4),
51
+ fill: 'deep',
52
+ },
53
+ ];
54
+ };
55
+ const foot = ISO([0, 0, 2 * STEP]);
56
+ export const plasticStool = {
57
+ name: 'plastic-stool',
58
+ frames: 160,
59
+ line: LINE,
60
+ extrude: [0, 0],
61
+ layers: [
62
+ { id: 'stack', p: [250, 405], shapes: [] },
63
+ { parent: 'stack', shapes: [...stool(0), ...stool(STEP)] },
64
+ { parent: 'stack', a: foot, p: foot, m: { ...hop, k: 2.2 }, shapes: stool(2 * STEP) },
65
+ glow('stack', [140, -250], 24, [twinkle(36), twinkle(130, true)]),
66
+ ],
67
+ };
@@ -0,0 +1 @@
1
+ export declare const arrow: (x: number, y: number, k?: number) => string;
@@ -0,0 +1,12 @@
1
+ // The mouse pointer the remote-control stickers share: tip at (x, y), k times its 44 unit height.
2
+ import { poly } from '../sticker.js';
3
+ const ARROW = [
4
+ [0, 0],
5
+ [0, 44],
6
+ [11, 34],
7
+ [19, 50],
8
+ [27, 46],
9
+ [19, 31],
10
+ [33, 31],
11
+ ];
12
+ export const arrow = (x, y, k = 1) => poly(ARROW.map(([ax, ay]) => [x + ax * k, y + ay * k]), 3 * k);
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const pos: Icon;
@@ -0,0 +1,59 @@
1
+ // Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
2
+ import { jolt, slide, twinkle } from '../motions.js';
3
+ import { block, dot, faceOf, ISO, quad, solid, stroke } from '../iso.js';
4
+ import { glow, LINE } from './shared.js';
5
+ // Point of sale: a cash drawer, a receipt printer on it printing, a small screen leaning back on a neck
6
+ const LEAN = (18 * Math.PI) / 180;
7
+ const DRAWER = block([-140, -90, 0], [280, 0, 0], [0, 180, 0], [0, 0, 66]);
8
+ const drawer = faceOf(DRAWER, 'front');
9
+ const NECK = block([-96, 30, 66], [22, 0, 0], [0, 22, 0], [0, 0, 70]);
10
+ const UP = [0, Math.sin(LEAN) * 120, Math.cos(LEAN) * 120];
11
+ const BACK = [0, Math.cos(LEAN) * 10, -Math.sin(LEAN) * 10];
12
+ const SCREEN = block([-140, 30, 126], [130, 0, 0], BACK, UP);
13
+ const screen = faceOf(SCREEN, 'front');
14
+ const PRINTER = block([20, -70, 66], [100, 0, 0], [0, 110, 0], [0, 0, 58]);
15
+ const printer = faceOf(PRINTER, 'front');
16
+ const RECEIPT = block([38, -22, 100], [64, 0, 0], [0, 3, 0], [0, 0, 70]);
17
+ const receipt = faceOf(RECEIPT, 'front');
18
+ export const pos = {
19
+ name: 'pos',
20
+ frames: 180,
21
+ still: 90,
22
+ line: LINE,
23
+ extrude: [0, 0],
24
+ layers: [
25
+ { id: 'till', p: [256, 360], m: jolt([-4, 6]), shapes: [] },
26
+ {
27
+ parent: 'till',
28
+ shapes: [
29
+ ...solid(DRAWER, { fill: 'grey', top: 'white', front: 'white' }, 4),
30
+ { d: stroke(drawer, [0.08, 0.62], [0.92, 0.62]) },
31
+ { d: quad(drawer, 0.4, 0.22, 0.2, 0.16, 3), fill: 'grey' },
32
+ ...solid(NECK, { fill: 'grey', top: 'white' }, 2),
33
+ ...solid(SCREEN, { fill: 'grey', front: 'deep' }, 3),
34
+ { d: quad(screen, 0.08, 0.1, 0.84, 0.8, 3), fill: 'tint' },
35
+ ...[0.7, 0.52, 0.34].map((t, i) => ({
36
+ d: stroke(screen, [0.2, t], [i === 1 ? 0.6 : 0.8, t]),
37
+ })),
38
+ ],
39
+ },
40
+ // the receipt rises out of the slot, is torn off, and slides home
41
+ {
42
+ parent: 'till',
43
+ m: slide(ISO([0, 0, 46]), 16, 60, 40),
44
+ shapes: [
45
+ ...solid(RECEIPT, { fill: 'grey', front: 'paper' }, 2),
46
+ ...[0.8, 0.62].map((t) => ({ d: stroke(receipt, [0.2, t], [0.8, t]) })),
47
+ ],
48
+ },
49
+ {
50
+ parent: 'till',
51
+ shapes: [
52
+ ...solid(PRINTER, { fill: 'deep', top: 'main' }, 4),
53
+ { d: quad(printer, 0.15, 0.3, 0.35, 0.4, 3), fill: 'tint' },
54
+ { d: dot(printer, 0.78, 0.5, 0.07, 0.12), fill: 'ok' },
55
+ ],
56
+ },
57
+ glow('till', [150, -200], 22, [twinkle(56), twinkle(140, true)]),
58
+ ],
59
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const pottedPlant: Icon;
@@ -0,0 +1,31 @@
1
+ // Drawn for @20baht/stickers: a small potted plant in 2.5d, the pot modelled in 3d (see plant-kit.ts); leaves sway.
2
+ import { sway, twinkle } from '../motions.js';
3
+ import { leaf, pot, rib } from './plant-kit.js';
4
+ import { glow, LINE } from './shared.js';
5
+ const [POT, SOIL] = pot(96, 46, 58, 'main');
6
+ // outer leaves first, the tall middle one last: angle, length, width
7
+ const LEAVES = [
8
+ [-62, 104, 30],
9
+ [62, 104, 30],
10
+ [-32, 138, 34],
11
+ [32, 138, 34],
12
+ [-8, 158, 36],
13
+ ];
14
+ export const pottedPlant = {
15
+ name: 'potted-plant',
16
+ frames: 180,
17
+ line: LINE,
18
+ extrude: [5, 10],
19
+ layers: [
20
+ { id: 'plant', p: [250, 372], shapes: [] },
21
+ { parent: 'plant', shapes: POT },
22
+ ...LEAVES.map(([deg, len, w], i) => ({
23
+ parent: 'plant',
24
+ a: SOIL,
25
+ p: SOIL,
26
+ m: { ...sway, at: i * 14, k: i % 2 ? -1.1 : 1.1 },
27
+ shapes: [{ d: leaf(SOIL, deg, len, w), fill: 'ok', depth: 0.4 }, { d: rib(SOIL, deg, len) }],
28
+ })),
29
+ glow('plant', [120, -250], 22, [twinkle(50), twinkle(140, true)]),
30
+ ],
31
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const powerPole: Icon;