@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,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const notebook: Icon;
@@ -0,0 +1,44 @@
1
+ // Drawn for @20baht/stickers after the network diagrams of Protocol Explorer, modelled in 3d (see iso.ts).
2
+ import { erase, jolt, twinkle } from '../motions.js';
3
+ import { block, faceOf, quad, solid, stroke } from '../iso.js';
4
+ import { glow, LINE } from './shared.js';
5
+ // A thin light notebook, lid open about 105 degrees: silver deck and lid, dark bezel, a wide trackpad
6
+ const W = 280;
7
+ const D = 184;
8
+ const LID = 182;
9
+ const LEAN = (15 * Math.PI) / 180;
10
+ const DECK = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, 12]);
11
+ const deckTop = faceOf(DECK, 'top');
12
+ // the lid hinges on the deck's back edge and leans back; its thickness runs behind the screen
13
+ const UP = [0, Math.sin(LEAN) * LID, Math.cos(LEAN) * LID];
14
+ const BACK = [0, Math.cos(LEAN) * 7, -Math.sin(LEAN) * 7];
15
+ const LIDB = block([-W / 2, D / 2, 12], [W, 0, 0], BACK, UP);
16
+ const screen = faceOf(LIDB, 'front');
17
+ export const notebook = {
18
+ name: 'notebook',
19
+ frames: 180,
20
+ still: 150,
21
+ line: LINE,
22
+ extrude: [0, 0],
23
+ layers: [
24
+ { id: 'nb', p: [250, 330], m: jolt([-6, 10]), shapes: [] },
25
+ {
26
+ parent: 'nb',
27
+ shapes: [
28
+ ...solid(LIDB, { fill: 'grey', front: 'white' }, 3),
29
+ { d: quad(screen, 0.04, 0.06, 0.92, 0.9, 4), fill: 'ink', line: false },
30
+ { d: quad(screen, 0.07, 0.1, 0.86, 0.82, 3), fill: 'tint' },
31
+ { d: quad(screen, 0.14, 0.5, 0.3, 0.32, 4), fill: 'white' },
32
+ ...[0.74, 0.6, 0.46].map((t, i) => ({
33
+ d: stroke(screen, [0.52, t], [i === 1 ? 0.74 : 0.84, t]),
34
+ trim: erase(24 - i * 5, 90 + i * 5),
35
+ })),
36
+ ...solid(DECK, { fill: 'grey', top: 'white' }, 3),
37
+ { d: quad(deckTop, 0.08, 0.5, 0.84, 0.4, 3), fill: 'paper' },
38
+ ...[0.62, 0.76].map((t) => ({ d: stroke(deckTop, [0.14, t], [0.86, t]) })),
39
+ { d: quad(deckTop, 0.3, 0.08, 0.4, 0.32, 4), fill: 'paper' },
40
+ ],
41
+ },
42
+ glow('nb', [160, -230], 24, [twinkle(40), twinkle(140, true)]),
43
+ ],
44
+ };
@@ -0,0 +1,18 @@
1
+ import type { Shape, Swatch, Vec } from '../sticker.js';
2
+ import type { V3 } from '../iso.js';
3
+ export interface Drum {
4
+ /** Side, then the rim facing the viewer. */
5
+ shapes: Shape[];
6
+ /** The facing rim's space to screen: s and t from -1 to 1 across it. */
7
+ at: (s: number, t: number) => Vec;
8
+ /** A circle on the facing rim, centred at (s, t) with radius r in rim units. */
9
+ disc: (s: number, t: number, r: number) => string;
10
+ }
11
+ /**
12
+ * A drum from `o` along `axis`, radius `r0` at `o` and `r1` at the far end. `up` picks the rim's first direction
13
+ * (any vector not along the axis).
14
+ */
15
+ export declare function drum(o: V3, axis: V3, r0: number, r1: number, fills: {
16
+ side: Swatch;
17
+ cap: Swatch;
18
+ }, up?: V3): Drum;
@@ -0,0 +1,63 @@
1
+ // Round solids for the object stickers, modelled in 3d with the house camera (see iso.ts): a drum is a cylinder or a
2
+ // cone frustum along any axis, drawn as its silhouette (the hull of both rims) and the rim that faces the viewer.
3
+ import { poly } from '../sticker.js';
4
+ import { add, ISO, mul } from '../iso.js';
5
+ const N = 36;
6
+ const cross = (a, b) => [
7
+ a[1] * b[2] - a[2] * b[1],
8
+ a[2] * b[0] - a[0] * b[2],
9
+ a[0] * b[1] - a[1] * b[0],
10
+ ];
11
+ const unit = (a) => mul(a, 1 / Math.hypot(...a));
12
+ const area = (pts) => pts.reduce((s, p, i) => {
13
+ const q = pts[(i + 1) % pts.length] ?? p;
14
+ return s + p[0] * q[1] - q[0] * p[1];
15
+ }, 0);
16
+ /** The convex hull of points on screen (monotone chain). */
17
+ function hull(pts) {
18
+ const s = [...pts].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
19
+ const turn = (o, a, b) => (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
20
+ const half = (list) => {
21
+ const out = [];
22
+ for (const p of list) {
23
+ while (out.length >= 2 && turn(out[out.length - 2] ?? p, out[out.length - 1] ?? p, p) <= 0)
24
+ out.pop();
25
+ out.push(p);
26
+ }
27
+ out.pop();
28
+ return out;
29
+ };
30
+ return [...half(s), ...half([...s].reverse())];
31
+ }
32
+ /**
33
+ * A drum from `o` along `axis`, radius `r0` at `o` and `r1` at the far end. `up` picks the rim's first direction
34
+ * (any vector not along the axis).
35
+ */
36
+ export function drum(o, axis, r0, r1, fills, up = [0, 1, 0]) {
37
+ const a = unit(axis);
38
+ const u = unit(cross(Math.abs(a[1]) > 0.9 ? [1, 0, 0] : up, a));
39
+ const v = cross(a, u);
40
+ const rim = (c, r) => Array.from({ length: N }, (_, i) => {
41
+ const t = (i / N) * Math.PI * 2;
42
+ return ISO(add(c, add(mul(u, Math.cos(t) * r), mul(v, Math.sin(t) * r))));
43
+ });
44
+ const end = add(o, axis);
45
+ const far = rim(end, r1);
46
+ const near = rim(o, r0);
47
+ // the end rim winds the house way when its outward normal (the axis) faces the viewer
48
+ const endShows = area(far) < 0;
49
+ const [c, r, pts] = endShows ? [end, r1, far] : [o, r0, near];
50
+ const at = (s, t) => ISO(add(c, add(mul(u, s * r), mul(v, t * r))));
51
+ const disc = (s, t, rr) => poly(Array.from({ length: 20 }, (_, i) => {
52
+ const g = (i / 20) * Math.PI * 2;
53
+ return at(s + Math.cos(g) * rr, t + Math.sin(g) * rr);
54
+ }), 1);
55
+ return {
56
+ shapes: [
57
+ { d: poly(hull([...near, ...far]), 1), fill: fills.side },
58
+ { d: poly(pts, 1), fill: fills.cap },
59
+ ],
60
+ at,
61
+ disc,
62
+ };
63
+ }
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const otp: Icon;
@@ -0,0 +1,46 @@
1
+ // Drawn for @20baht/stickers: a one-time code arriving on a phone, digit by digit, then a check.
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
+ const XS = [-69, -33, 3, 39];
6
+ export const otp = {
7
+ name: 'otp',
8
+ frames: 180,
9
+ line: LINE,
10
+ extrude: EXT,
11
+ still: 110,
12
+ layers: [
13
+ { id: 'ph', a: [0, 150], p: [244, 396], m: { ...wiggle, k: 0.5 }, shapes: [] },
14
+ {
15
+ id: 'scr',
16
+ parent: 'ph',
17
+ tilt: FACE,
18
+ shapes: [
19
+ { d: rect(-90, -160, 180, 320, 36), fill: 'deep', depth: 0.8 },
20
+ { d: rect(-78, -148, 156, 296, 26), fill: 'tint' },
21
+ { d: pill(-30, -132, 60, 10), fill: 'ink', line: false },
22
+ { d: line([-44, -92], [44, -92]) },
23
+ { d: line([-26, -72], [26, -72]) },
24
+ ...XS.map((x) => ({ d: rect(x, -42, 30, 46, 8), fill: 'white', depth: 0.3 })),
25
+ ],
26
+ },
27
+ ...XS.map((x, i) => ({
28
+ parent: 'scr',
29
+ a: [x + 15, -19],
30
+ p: [x + 15, -19],
31
+ m: [twinkle(18 + i * 10), twinkle(148, true)],
32
+ shapes: [{ d: ellipse(x + 15, -19, 8), fill: 'ink', line: false }],
33
+ })),
34
+ {
35
+ parent: 'scr',
36
+ a: [0, 62],
37
+ p: [0, 62],
38
+ m: [twinkle(64), twinkle(152, true)],
39
+ shapes: [
40
+ { d: rect(-46, 40, 92, 44, 22), fill: 'ok', depth: 0.3 },
41
+ { d: line([-16, 62], [-4, 74], [18, 50]) },
42
+ ],
43
+ },
44
+ glow('ph', [124, -170], 24, [twinkle(64), twinkle(140, true)]),
45
+ ],
46
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const overBudget: Icon;
@@ -0,0 +1,48 @@
1
+ // Drawn for @20baht/stickers: over budget; an empty wallet shakes, a fly buzzes out of it, an alert pops.
2
+ import { drift, twinkle, wiggle } from '../motions.js';
3
+ import { ellipse, rect } from '../sticker.js';
4
+ import { EXT, FACE, glow, LINE } from './shared.js';
5
+ export const overBudget = {
6
+ name: 'over-budget',
7
+ frames: 180,
8
+ line: LINE,
9
+ extrude: EXT,
10
+ layers: [
11
+ { id: 'root', p: [250, 250], shapes: [] },
12
+ { id: 'w', parent: 'root', a: [-20, 140], p: [-20, 140], m: { ...wiggle, k: 0.5 }, shapes: [] },
13
+ {
14
+ parent: 'w',
15
+ tilt: FACE,
16
+ shapes: [
17
+ { d: rect(-150, -110, 300, 210, 24), fill: 'deep', depth: 1 },
18
+ { d: rect(-126, -88, 252, 90, 12), fill: 'tint', depth: 0.1 },
19
+ { d: rect(-150, -6, 300, 116, 24), fill: 'main', depth: 0.6 },
20
+ { d: rect(96, -30, 84, 60, 16), fill: 'deep', depth: 0.4 },
21
+ { d: ellipse(150, 0, 12), fill: 'white', depth: 0.2 },
22
+ ],
23
+ },
24
+ {
25
+ parent: 'root',
26
+ p: [30, -140],
27
+ m: drift.map((m) => ({ ...m, k: 2.2 })),
28
+ shapes: [
29
+ { d: ellipse(-18, -24, 22, 13), fill: 'white' },
30
+ { d: ellipse(18, -24, 22, 13), fill: 'white' },
31
+ { d: ellipse(0, 0, 24, 17), fill: 'ink' },
32
+ { d: ellipse(-14, -4, 5), fill: 'white', line: false },
33
+ ],
34
+ },
35
+ {
36
+ parent: 'root',
37
+ a: [150, -80],
38
+ p: [150, -80],
39
+ m: [twinkle(30), twinkle(140, true)],
40
+ shapes: [
41
+ { d: ellipse(150, -80, 30), fill: 'hot', depth: 0.4 },
42
+ { d: rect(146, -98, 8, 22, 3), fill: 'white', line: false },
43
+ { d: ellipse(150, -66, 4.5), fill: 'white', line: false },
44
+ ],
45
+ },
46
+ glow('root', [-170, -130], 18, [twinkle(48), twinkle(140, true)]),
47
+ ],
48
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const padSeeEw: Icon;
@@ -0,0 +1,56 @@
1
+ // Drawn for @20baht/stickers: pad see ew with yellow egg noodles, Chinese kale, pork and egg, tossed on the plate.
2
+ import { hop, twinkle } from '../motions.js';
3
+ import { ellipse, line, rect } from '../sticker.js';
4
+ import { DOWN, plate, steam, TABLE } from './food.js';
5
+ import { glow, LINE } from './shared.js';
6
+ // a ribbon with a wave along both edges
7
+ const ribbon = (x, y, w) => {
8
+ const q = w / 4;
9
+ const t = `t${String(q)} 0`;
10
+ return `M${String(x)} ${String(y)}q${String(q / 2)} -12 ${String(q)} 0${t}${t}${t}l0 18q${String(-q / 2)} 12 ${String(-q)} 0t${String(-q)} 0t${String(-q)} 0t${String(-q)} 0Z`;
11
+ };
12
+ const NOODLES = [
13
+ [-120, -40, 150],
14
+ [-90, -10, 170],
15
+ [-130, 20, 140],
16
+ [-60, 50, 150],
17
+ [-100, 80, 120],
18
+ [-40, -70, 130],
19
+ ];
20
+ export const padSeeEw = {
21
+ name: 'pad-see-ew',
22
+ frames: 160,
23
+ line: LINE,
24
+ extrude: DOWN,
25
+ layers: [
26
+ { id: 'root', p: [250, 300], shapes: [] },
27
+ { id: 'dish', parent: 'root', tilt: TABLE, shapes: plate(180) },
28
+ {
29
+ parent: 'dish',
30
+ a: [0, 0],
31
+ m: { ...hop, k: 0.6 },
32
+ shapes: [
33
+ ...NOODLES.map(([x, y, w]) => ({
34
+ d: ribbon(x, y, w),
35
+ fill: 'gold',
36
+ depth: 0.6,
37
+ })),
38
+ ...[
39
+ [40, -50],
40
+ [90, 10],
41
+ [-20, 100],
42
+ ].flatMap(([x = 0, y = 0]) => [
43
+ { d: ellipse(x, y, 34, 22), fill: 'ok', depth: 0.3 },
44
+ { d: line([x - 26, y], [x + 26, y]) },
45
+ ]),
46
+ { d: rect(60, 60, 34, 26, 6), fill: 'deep', depth: 0.6 },
47
+ { d: rect(10, 20, 30, 24, 6), fill: 'deep', depth: 0.6 },
48
+ { d: rect(110, -40, 30, 24, 6), fill: 'deep', depth: 0.6 },
49
+ { d: ellipse(-10, -20, 18, 14), fill: 'white', depth: 0.4 },
50
+ { d: ellipse(50, 110, 16, 12), fill: 'white', depth: 0.4 },
51
+ ],
52
+ },
53
+ steam('root', [-50, 0, 50], -80),
54
+ glow('root', [170, -70], 20, [twinkle(40), twinkle(130, true)]),
55
+ ],
56
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const palmTree: Icon;
@@ -0,0 +1,52 @@
1
+ // Drawn for @20baht/stickers: a coconut palm on a sand 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 { frond, rod, spine, tile } from './plant-kit.js';
6
+ import { glow, LINE } from './shared.js';
7
+ // the trunk leans and bends: short rings stacked along a curve
8
+ const RINGS = 7;
9
+ const point = (i) => {
10
+ const t = i / RINGS;
11
+ return [-24 + 50 * t * t, -6 * t, 236 * t];
12
+ };
13
+ const TRUNK = Array.from({ length: RINGS }, (_, i) => rod(point(i), point(i + 1), 22 - i, 21 - i, 'gold', 'gold')).flat();
14
+ const CROWN = ISO(point(RINGS));
15
+ // angle (screen, 0 is right), length, droop
16
+ const FRONDS = [
17
+ [-150, 150, 80],
18
+ [-30, 156, 84],
19
+ [-114, 120, 40],
20
+ [-64, 126, 40],
21
+ [178, 140, 110],
22
+ [4, 146, 116],
23
+ ];
24
+ export const palmTree = {
25
+ name: 'palm-tree',
26
+ frames: 180,
27
+ line: LINE,
28
+ extrude: [5, 10],
29
+ layers: [
30
+ { id: 'isle', p: [250, 380], shapes: [] },
31
+ { parent: 'isle', shapes: [...tile(104, 'paper', 'gold'), ...TRUNK] },
32
+ ...FRONDS.map(([deg, len, droop], i) => ({
33
+ parent: 'isle',
34
+ a: CROWN,
35
+ p: CROWN,
36
+ m: { ...sway, at: i * 10, k: deg > -90 ? 1 : -1 },
37
+ shapes: [
38
+ { d: frond(CROWN, deg, len, 28, droop), fill: 'ok', depth: 0.3 },
39
+ { d: spine(CROWN, deg, len, droop) },
40
+ ],
41
+ })),
42
+ {
43
+ parent: 'isle',
44
+ shapes: [
45
+ [-12, 10],
46
+ [12, 12],
47
+ [0, 26],
48
+ ].map(([x, y]) => ({ d: ellipse(CROWN[0] + x, CROWN[1] + y, 13), fill: 'deep' })),
49
+ },
50
+ glow('isle', [-150, -250], 22, [twinkle(46), twinkle(140, true)]),
51
+ ],
52
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const paperBoat: Icon;
@@ -0,0 +1,67 @@
1
+ // Drawn for @20baht/stickers: a folded paper boat on a round of water, modelled in 3d (see iso.ts); it bobs.
2
+ import { bob, twinkle } from '../motions.js';
3
+ import { line, poly } from '../sticker.js';
4
+ import { ISO } from '../iso.js';
5
+ import { drum } from './object-drum.js';
6
+ import { glow, LINE } from './shared.js';
7
+ const WATER = drum([0, 0, 0], [0, 0, 16], 164, 164, { side: 'main', cap: 'tint' });
8
+ const Z = 26;
9
+ const P = (x, y, z) => ISO([x, y, z + Z]);
10
+ const face = (pts, fill) => ({
11
+ d: poly(pts.map((p) => P(...p)), 3),
12
+ fill,
13
+ });
14
+ // painted back to front: the far wall (its inside shows), the sail with its fold, the near wall; the ends rise to points
15
+ const K0 = [-70, 0, 0];
16
+ const K1 = [70, 0, 0];
17
+ const E0 = [-160, 0, 96];
18
+ const E1 = [160, 0, 96];
19
+ const BOAT = [
20
+ face([K0, K1, E1, [0, 40, 62], E0], 'tint'),
21
+ face([
22
+ [-66, 0, 58],
23
+ [0, 0, 196],
24
+ [0, -22, 58],
25
+ ], 'white'),
26
+ face([
27
+ [0, -22, 58],
28
+ [0, 0, 196],
29
+ [66, 0, 58],
30
+ ], 'tint'),
31
+ face([K0, K1, E1, [0, -40, 62], E0], 'white'),
32
+ { d: line(P(-70, -22, 30), P(70, -22, 30)), line: 3 },
33
+ ];
34
+ const WAVES = [
35
+ [-0.6, -0.3],
36
+ [0.35, 0.5],
37
+ ].map(([s, t]) => ({
38
+ d: line(WATER.at(s - 0.2, t), WATER.at(s, t + 0.06), WATER.at(s + 0.2, t)),
39
+ line: 4,
40
+ }));
41
+ export const paperBoat = {
42
+ name: 'paper-boat',
43
+ frames: 160,
44
+ line: LINE,
45
+ extrude: [0, 0],
46
+ layers: [
47
+ { id: 'pond', p: [250, 330], shapes: [...WATER.shapes, ...WAVES] },
48
+ {
49
+ parent: 'pond',
50
+ a: ISO([0, 0, 0]),
51
+ p: ISO([0, 0, 0]),
52
+ m: [
53
+ { ...bob, k: 2.4 },
54
+ {
55
+ r: [
56
+ [0, 0, [0.333, 0, 0.667, 1]],
57
+ [40, 3, [0.333, 0, 0.667, 1]],
58
+ [120, -3, [0.333, 0, 0.667, 1]],
59
+ [160, 0],
60
+ ],
61
+ },
62
+ ],
63
+ shapes: BOAT,
64
+ },
65
+ glow('pond', [150, -200], 24, [twinkle(40), twinkle(126, true)]),
66
+ ],
67
+ };
@@ -0,0 +1,3 @@
1
+ import type { Shape, Swatch } from '../sticker.js';
2
+ /** A page w by h with its top-left at (x, y), the top-right corner folded; `tag` colours a label at its foot. */
3
+ export declare function page(x: number, y: number, w: number, h: number, tag?: Swatch): Shape[];
@@ -0,0 +1,45 @@
1
+ // The sheet of paper the file stickers share: a page with a folded corner, text lines and a kind tag.
2
+ import { line, poly } from '../sticker.js';
3
+ /** A page w by h with its top-left at (x, y), the top-right corner folded; `tag` colours a label at its foot. */
4
+ export function page(x, y, w, h, tag) {
5
+ const f = Math.min(w, h) * 0.26;
6
+ const lines = [0.3, 0.42, 0.54].map((t, i) => ({
7
+ d: line([x + w * 0.18, y + h * t], [x + w * (i === 2 ? 0.6 : 0.82), y + h * t]),
8
+ }));
9
+ return [
10
+ {
11
+ d: poly([
12
+ [x, y],
13
+ [x + w - f, y],
14
+ [x + w, y + f],
15
+ [x + w, y + h],
16
+ [x, y + h],
17
+ ], [10, 2, 2, 10, 10]),
18
+ fill: 'white',
19
+ depth: 0.6,
20
+ },
21
+ {
22
+ d: poly([
23
+ [x + w - f, y],
24
+ [x + w - f, y + f],
25
+ [x + w, y + f],
26
+ ], 2),
27
+ fill: 'tint',
28
+ },
29
+ ...lines,
30
+ ...(tag
31
+ ? [
32
+ {
33
+ d: poly([
34
+ [x + w * 0.14, y + h * 0.72],
35
+ [x + w * 0.62, y + h * 0.72],
36
+ [x + w * 0.62, y + h * 0.86],
37
+ [x + w * 0.14, y + h * 0.86],
38
+ ], 8),
39
+ fill: tag,
40
+ depth: 0.2,
41
+ },
42
+ ]
43
+ : []),
44
+ ];
45
+ }
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const password: Icon;
@@ -0,0 +1,45 @@
1
+ // Drawn for @20baht/stickers: a password field filling with dots, its padlock clasping shut.
2
+ import { clasp, jolt, twinkle } from '../motions.js';
3
+ import { ellipse, pill, rect } from '../sticker.js';
4
+ import { EXT, FACE, LINE } from './shared.js';
5
+ const XS = [-104, -70, -36, -2, 32];
6
+ const SHACKLE = 'M-150 -96L-150 -124A26 26 0 0 1 -98 -124L-98 -96L-110 -96L-110 -124A14 14 0 0 0 -138 -124L-138 -96Z';
7
+ export const password = {
8
+ name: 'password',
9
+ frames: 180,
10
+ line: LINE,
11
+ extrude: EXT,
12
+ still: 120,
13
+ layers: [
14
+ { id: 'root', a: [0, 40], p: [250, 290], m: jolt([-3, 8]), shapes: [] },
15
+ {
16
+ id: 'field',
17
+ parent: 'root',
18
+ tilt: FACE,
19
+ shapes: [
20
+ { d: pill(-150, -42, 300, 84), fill: 'white', depth: 1 },
21
+ { d: ellipse(104, 0, 26, 16), fill: 'tint' },
22
+ { d: ellipse(104, 0, 8), fill: 'ink', line: false },
23
+ ],
24
+ },
25
+ ...XS.map((x, i) => ({
26
+ parent: 'field',
27
+ a: [x, 0],
28
+ p: [x, 0],
29
+ m: [twinkle(14 + i * 9), twinkle(150, true)],
30
+ shapes: [{ d: ellipse(x, 0, 11), fill: 'main', line: false }],
31
+ })),
32
+ {
33
+ id: 'lock',
34
+ parent: 'field',
35
+ a: [-124, -70],
36
+ p: [-124, -70],
37
+ m: { ...clasp, at: 50, k: 0.6 },
38
+ shapes: [
39
+ { d: SHACKLE, fill: 'grey', depth: 0.5 },
40
+ { d: rect(-162, -100, 76, 60, 12), fill: 'ok', depth: 0.8 },
41
+ { d: ellipse(-124, -72, 8), fill: 'ink', line: false },
42
+ ],
43
+ },
44
+ ],
45
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const patchPanel: Icon;
@@ -0,0 +1,41 @@
1
+ // Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
2
+ import { jolt, twinkle } from '../motions.js';
3
+ import { block, faceOf, quad, solid } from '../iso.js';
4
+ import { glow, LINE } from './shared.js';
5
+ // A 1U patch panel: a row of jacks, a few patch cords plugged in and hanging forward
6
+ const H = 50;
7
+ const PANEL = block([-170, -40, 0], [340, 0, 0], [0, 80, 0], [0, 0, H]);
8
+ const front = faceOf(PANEL, 'front');
9
+ const JACKS = 10;
10
+ // a cord: a boot in the jack, then the cable dropping down towards the viewer
11
+ const cord = (i, fill) => {
12
+ const x = -170 + 340 * (0.06 + i * 0.09) + 6;
13
+ const boot = block([x, -66, 16], [20, 0, 0], [0, 26, 0], [0, 0, 18]);
14
+ const cable = block([x + 4, -76, -50], [12, 0, 0], [0, 12, 0], [0, 0, 74]);
15
+ return [...solid(cable, { fill }, 2), ...solid(boot, { fill, top: 'white' }, 2)];
16
+ };
17
+ export const patchPanel = {
18
+ name: 'patch-panel',
19
+ frames: 180,
20
+ line: LINE,
21
+ extrude: [0, 0],
22
+ layers: [
23
+ { id: 'pp', p: [250, 280], m: jolt([-4, 8]), shapes: [] },
24
+ {
25
+ parent: 'pp',
26
+ shapes: [
27
+ ...solid(PANEL, { fill: 'deep', top: 'grey', front: 'grey' }, 3),
28
+ ...Array.from({ length: JACKS }, (_, i) => ({
29
+ d: quad(front, 0.06 + i * 0.09, 0.3, 0.06, 0.4, 1),
30
+ fill: 'ink',
31
+ line: false,
32
+ })),
33
+ ...cord(1, 'main'),
34
+ ...cord(3, 'gold'),
35
+ ...cord(4, 'ok'),
36
+ ...cord(7, 'hot'),
37
+ ],
38
+ },
39
+ glow('pp', [190, -120], 22, [twinkle(44), twinkle(140, true)]),
40
+ ],
41
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const pdu: Icon;
@@ -0,0 +1,40 @@
1
+ // Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
2
+ import { sway, twinkle } from '../motions.js';
3
+ import { block, dot, faceOf, ISO, quad, solid } from '../iso.js';
4
+ import { glow, LINE } from './shared.js';
5
+ // A rack power strip: a tall slim bar with a column of sockets, a status light and its cord curling away
6
+ const W = 70;
7
+ const D = 56;
8
+ const H = 300;
9
+ const BAR = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
10
+ const front = faceOf(BAR, 'front');
11
+ const K = W / H;
12
+ const socket = (i) => {
13
+ const t = 0.12 + i * 0.15;
14
+ return [
15
+ { d: quad(front, 0.18, t, 0.64, 0.11, 3), fill: 'paper' },
16
+ { d: dot(front, 0.38, t + 0.055, 0.06, 0.06 * K), fill: 'ink', line: false },
17
+ { d: dot(front, 0.62, t + 0.055, 0.06, 0.06 * K), fill: 'ink', line: false },
18
+ ];
19
+ };
20
+ const [cx, cy] = ISO([0, 0, 0]);
21
+ const CORD = `M${String(cx)} ${String(cy)}C${String(cx - 10)} ${String(cy + 40)} ${String(cx - 70)} ${String(cy + 40)} ${String(cx - 96)} ${String(cy + 18)}`;
22
+ export const pdu = {
23
+ name: 'pdu',
24
+ frames: 180,
25
+ line: LINE,
26
+ extrude: [0, 0],
27
+ layers: [
28
+ { id: 'pdu', a: [0, 0], p: [262, 392], m: { ...sway, k: 0.6 }, shapes: [] },
29
+ {
30
+ parent: 'pdu',
31
+ shapes: [
32
+ { d: CORD, round: true },
33
+ ...solid(BAR, { fill: 'deep', top: 'main' }, 3),
34
+ ...[0, 1, 2, 3, 4].flatMap(socket),
35
+ { d: dot(front, 0.5, 0.91, 0.14, 0.14 * K), fill: 'ok' },
36
+ ],
37
+ },
38
+ glow('pdu', [70, -300], 24, [twinkle(50), twinkle(140, true)]),
39
+ ],
40
+ };
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '../sticker.js';
2
+ export declare const phoneTopup: Icon;