@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.
- package/LICENSE +48 -0
- package/README.md +173 -2
- package/dist/all.d.ts +4 -0
- package/dist/all.js +7 -0
- package/dist/element.d.ts +103 -0
- package/dist/element.js +181 -0
- package/dist/graph.d.ts +172 -0
- package/dist/graph.js +374 -0
- package/dist/icons/access-point.d.ts +2 -0
- package/dist/icons/access-point.js +34 -0
- package/dist/icons/ai-agent.d.ts +2 -0
- package/dist/icons/ai-agent.js +50 -0
- package/dist/icons/alarm-clock.d.ts +2 -0
- package/dist/icons/alarm-clock.js +46 -0
- package/dist/icons/all-in-one.d.ts +2 -0
- package/dist/icons/all-in-one.js +37 -0
- package/dist/icons/angpao.d.ts +2 -0
- package/dist/icons/angpao.js +46 -0
- package/dist/icons/badge-reader.d.ts +2 -0
- package/dist/icons/badge-reader.js +51 -0
- package/dist/icons/baht-note.d.ts +2 -0
- package/dist/icons/baht-note.js +42 -0
- package/dist/icons/bamboo.d.ts +2 -0
- package/dist/icons/bamboo.js +57 -0
- package/dist/icons/banana-leaf.d.ts +2 -0
- package/dist/icons/banana-leaf.js +87 -0
- package/dist/icons/banana-tree.d.ts +2 -0
- package/dist/icons/banana-tree.js +75 -0
- package/dist/icons/bear.d.ts +2 -0
- package/dist/icons/bear.js +39 -0
- package/dist/icons/blade-chassis.d.ts +2 -0
- package/dist/icons/blade-chassis.js +43 -0
- package/dist/icons/bond.d.ts +2 -0
- package/dist/icons/bond.js +48 -0
- package/dist/icons/books.d.ts +2 -0
- package/dist/icons/books.js +44 -0
- package/dist/icons/bts-card.d.ts +2 -0
- package/dist/icons/bts-card.js +47 -0
- package/dist/icons/budget-jar.d.ts +2 -0
- package/dist/icons/budget-jar.js +43 -0
- package/dist/icons/cactus.d.ts +2 -0
- package/dist/icons/cactus.js +42 -0
- package/dist/icons/calculator.d.ts +2 -0
- package/dist/icons/calculator.js +46 -0
- package/dist/icons/calendar-month.d.ts +2 -0
- package/dist/icons/calendar-month.js +66 -0
- package/dist/icons/campfire.d.ts +2 -0
- package/dist/icons/campfire.js +63 -0
- package/dist/icons/cctv.d.ts +2 -0
- package/dist/icons/cctv.js +38 -0
- package/dist/icons/certificate.d.ts +2 -0
- package/dist/icons/certificate.js +50 -0
- package/dist/icons/cha-yen.d.ts +2 -0
- package/dist/icons/cha-yen.js +68 -0
- package/dist/icons/chedi.d.ts +2 -0
- package/dist/icons/chedi.js +56 -0
- package/dist/icons/classic-phone.d.ts +2 -0
- package/dist/icons/classic-phone.js +32 -0
- package/dist/icons/clipboard.d.ts +2 -0
- package/dist/icons/clipboard.js +61 -0
- package/dist/icons/cloud.d.ts +2 -0
- package/dist/icons/cloud.js +28 -0
- package/dist/icons/coins.d.ts +2 -0
- package/dist/icons/coins.js +34 -0
- package/dist/icons/compare.d.ts +2 -0
- package/dist/icons/compare.js +33 -0
- package/dist/icons/confetti.d.ts +2 -0
- package/dist/icons/confetti.js +72 -0
- package/dist/icons/convenience-bag.d.ts +2 -0
- package/dist/icons/convenience-bag.js +51 -0
- package/dist/icons/cooling.d.ts +2 -0
- package/dist/icons/cooling.js +46 -0
- package/dist/icons/copy-files.d.ts +2 -0
- package/dist/icons/copy-files.js +37 -0
- package/dist/icons/core-switch.d.ts +2 -0
- package/dist/icons/core-switch.js +48 -0
- package/dist/icons/cursor.d.ts +2 -0
- package/dist/icons/cursor.js +27 -0
- package/dist/icons/database.d.ts +2 -0
- package/dist/icons/database.js +24 -0
- package/dist/icons/desktop-tower.d.ts +2 -0
- package/dist/icons/desktop-tower.js +41 -0
- package/dist/icons/disc-image.d.ts +2 -0
- package/dist/icons/disc-image.js +54 -0
- package/dist/icons/dollar-note.d.ts +2 -0
- package/dist/icons/dollar-note.js +44 -0
- package/dist/icons/electric-bill.d.ts +2 -0
- package/dist/icons/electric-bill.js +51 -0
- package/dist/icons/email.d.ts +2 -0
- package/dist/icons/email.js +57 -0
- package/dist/icons/empty-state.d.ts +2 -0
- package/dist/icons/empty-state.js +75 -0
- package/dist/icons/expense.d.ts +2 -0
- package/dist/icons/expense.js +36 -0
- package/dist/icons/export-file.d.ts +2 -0
- package/dist/icons/export-file.js +35 -0
- package/dist/icons/eyedropper.d.ts +2 -0
- package/dist/icons/eyedropper.js +69 -0
- package/dist/icons/face-id.d.ts +2 -0
- package/dist/icons/face-id.js +51 -0
- package/dist/icons/file.d.ts +2 -0
- package/dist/icons/file.js +15 -0
- package/dist/icons/finance-b-coins.d.ts +8 -0
- package/dist/icons/finance-b-coins.js +14 -0
- package/dist/icons/finance-tray.d.ts +11 -0
- package/dist/icons/finance-tray.js +41 -0
- package/dist/icons/fingerprint.d.ts +2 -0
- package/dist/icons/fingerprint.js +45 -0
- package/dist/icons/firewall.d.ts +2 -0
- package/dist/icons/firewall.js +76 -0
- package/dist/icons/floating-ip.d.ts +2 -0
- package/dist/icons/floating-ip.js +59 -0
- package/dist/icons/flower.d.ts +2 -0
- package/dist/icons/flower.js +49 -0
- package/dist/icons/food.d.ts +6 -0
- package/dist/icons/food.js +18 -0
- package/dist/icons/freelance.d.ts +2 -0
- package/dist/icons/freelance.js +51 -0
- package/dist/icons/fuel.d.ts +2 -0
- package/dist/icons/fuel.js +46 -0
- package/dist/icons/goal.d.ts +2 -0
- package/dist/icons/goal.js +51 -0
- package/dist/icons/gold-bar.d.ts +2 -0
- package/dist/icons/gold-bar.js +60 -0
- package/dist/icons/hard-drive.d.ts +2 -0
- package/dist/icons/hard-drive.js +42 -0
- package/dist/icons/highlighter.d.ts +2 -0
- package/dist/icons/highlighter.js +75 -0
- package/dist/icons/home-router.d.ts +2 -0
- package/dist/icons/home-router.js +32 -0
- package/dist/icons/hot-drink.d.ts +2 -0
- package/dist/icons/hot-drink.js +33 -0
- package/dist/icons/hsm.d.ts +2 -0
- package/dist/icons/hsm.js +54 -0
- package/dist/icons/id-card.d.ts +2 -0
- package/dist/icons/id-card.js +36 -0
- package/dist/icons/income.d.ts +2 -0
- package/dist/icons/income.js +28 -0
- package/dist/icons/index.d.ts +185 -0
- package/dist/icons/index.js +366 -0
- package/dist/icons/interest.d.ts +2 -0
- package/dist/icons/interest.js +66 -0
- package/dist/icons/iot-sensor.d.ts +2 -0
- package/dist/icons/iot-sensor.js +35 -0
- package/dist/icons/ip-phone.d.ts +2 -0
- package/dist/icons/ip-phone.js +47 -0
- package/dist/icons/ipad-gen8.d.ts +2 -0
- package/dist/icons/ipad-gen8.js +58 -0
- package/dist/icons/iphone-17.d.ts +2 -0
- package/dist/icons/iphone-17.js +37 -0
- package/dist/icons/iso.d.ts +2 -0
- package/dist/icons/iso.js +3 -0
- package/dist/icons/kaprao.d.ts +2 -0
- package/dist/icons/kaprao.js +70 -0
- package/dist/icons/key-pair.d.ts +2 -0
- package/dist/icons/key-pair.js +54 -0
- package/dist/icons/key.d.ts +3 -0
- package/dist/icons/key.js +37 -0
- package/dist/icons/keyboard.d.ts +2 -0
- package/dist/icons/keyboard.js +35 -0
- package/dist/icons/kite.d.ts +2 -0
- package/dist/icons/kite.js +53 -0
- package/dist/icons/kvm.d.ts +2 -0
- package/dist/icons/kvm.js +53 -0
- package/dist/icons/lamp.d.ts +2 -0
- package/dist/icons/lamp.js +49 -0
- package/dist/icons/laptop.d.ts +2 -0
- package/dist/icons/laptop.js +44 -0
- package/dist/icons/load-balancer.d.ts +2 -0
- package/dist/icons/load-balancer.js +50 -0
- package/dist/icons/lock-screen.d.ts +2 -0
- package/dist/icons/lock-screen.js +44 -0
- package/dist/icons/long-tail-boat.d.ts +2 -0
- package/dist/icons/long-tail-boat.js +66 -0
- package/dist/icons/lottery.d.ts +2 -0
- package/dist/icons/lottery.js +51 -0
- package/dist/icons/lotus.d.ts +2 -0
- package/dist/icons/lotus.js +70 -0
- package/dist/icons/mac-mini.d.ts +2 -0
- package/dist/icons/mac-mini.js +31 -0
- package/dist/icons/macbook-air.d.ts +2 -0
- package/dist/icons/macbook-air.js +41 -0
- package/dist/icons/mailbox-thai.d.ts +2 -0
- package/dist/icons/mailbox-thai.js +66 -0
- package/dist/icons/mango-sticky-rice.d.ts +2 -0
- package/dist/icons/mango-sticky-rice.js +41 -0
- package/dist/icons/marigold.d.ts +2 -0
- package/dist/icons/marigold.js +69 -0
- package/dist/icons/market-basket.d.ts +2 -0
- package/dist/icons/market-basket.js +69 -0
- package/dist/icons/media-player.d.ts +2 -0
- package/dist/icons/media-player.js +71 -0
- package/dist/icons/metrics.d.ts +2 -0
- package/dist/icons/metrics.js +58 -0
- package/dist/icons/mini-pc.d.ts +2 -0
- package/dist/icons/mini-pc.js +26 -0
- package/dist/icons/modem.d.ts +2 -0
- package/dist/icons/modem.js +37 -0
- package/dist/icons/monitor.d.ts +2 -0
- package/dist/icons/monitor.js +40 -0
- package/dist/icons/monstera.d.ts +2 -0
- package/dist/icons/monstera.js +47 -0
- package/dist/icons/moon.d.ts +2 -0
- package/dist/icons/moon.js +55 -0
- package/dist/icons/motorbike-taxi.d.ts +2 -0
- package/dist/icons/motorbike-taxi.js +42 -0
- package/dist/icons/music-note.d.ts +2 -0
- package/dist/icons/music-note.js +63 -0
- package/dist/icons/nas-2bay.d.ts +2 -0
- package/dist/icons/nas-2bay.js +49 -0
- package/dist/icons/nas.d.ts +2 -0
- package/dist/icons/nas.js +41 -0
- package/dist/icons/nature-iso.d.ts +29 -0
- package/dist/icons/nature-iso.js +74 -0
- package/dist/icons/noodle-soup.d.ts +2 -0
- package/dist/icons/noodle-soup.js +52 -0
- package/dist/icons/notebook.d.ts +2 -0
- package/dist/icons/notebook.js +44 -0
- package/dist/icons/object-drum.d.ts +18 -0
- package/dist/icons/object-drum.js +63 -0
- package/dist/icons/otp.d.ts +2 -0
- package/dist/icons/otp.js +46 -0
- package/dist/icons/over-budget.d.ts +2 -0
- package/dist/icons/over-budget.js +48 -0
- package/dist/icons/pad-see-ew.d.ts +2 -0
- package/dist/icons/pad-see-ew.js +56 -0
- package/dist/icons/palm-tree.d.ts +2 -0
- package/dist/icons/palm-tree.js +52 -0
- package/dist/icons/paper-boat.d.ts +2 -0
- package/dist/icons/paper-boat.js +67 -0
- package/dist/icons/paper.d.ts +3 -0
- package/dist/icons/paper.js +45 -0
- package/dist/icons/password.d.ts +2 -0
- package/dist/icons/password.js +45 -0
- package/dist/icons/patch-panel.d.ts +2 -0
- package/dist/icons/patch-panel.js +41 -0
- package/dist/icons/pdu.d.ts +2 -0
- package/dist/icons/pdu.js +40 -0
- package/dist/icons/phone-topup.d.ts +2 -0
- package/dist/icons/phone-topup.js +55 -0
- package/dist/icons/photo.d.ts +2 -0
- package/dist/icons/photo.js +48 -0
- package/dist/icons/phuang-malai.d.ts +2 -0
- package/dist/icons/phuang-malai.js +59 -0
- package/dist/icons/pie-chart.d.ts +2 -0
- package/dist/icons/pie-chart.js +36 -0
- package/dist/icons/piggy-bank.d.ts +2 -0
- package/dist/icons/piggy-bank.js +64 -0
- package/dist/icons/plant-kit.d.ts +23 -0
- package/dist/icons/plant-kit.js +112 -0
- package/dist/icons/plastic-stool.d.ts +2 -0
- package/dist/icons/plastic-stool.js +67 -0
- package/dist/icons/pointer.d.ts +1 -0
- package/dist/icons/pointer.js +12 -0
- package/dist/icons/pos.d.ts +2 -0
- package/dist/icons/pos.js +59 -0
- package/dist/icons/potted-plant.d.ts +2 -0
- package/dist/icons/potted-plant.js +31 -0
- package/dist/icons/power-pole.d.ts +2 -0
- package/dist/icons/power-pole.js +60 -0
- package/dist/icons/power-station.d.ts +2 -0
- package/dist/icons/power-station.js +56 -0
- package/dist/icons/printer.d.ts +2 -0
- package/dist/icons/printer.js +46 -0
- package/dist/icons/qr-code.d.ts +2 -0
- package/dist/icons/qr-code.js +45 -0
- package/dist/icons/rack.d.ts +2 -0
- package/dist/icons/rack.js +39 -0
- package/dist/icons/rain-cloud.d.ts +2 -0
- package/dist/icons/rain-cloud.js +31 -0
- package/dist/icons/rainbow.d.ts +2 -0
- package/dist/icons/rainbow.js +46 -0
- package/dist/icons/receipt.d.ts +2 -0
- package/dist/icons/receipt.js +56 -0
- package/dist/icons/redmi-note-9s-pro.d.ts +2 -0
- package/dist/icons/redmi-note-9s-pro.js +37 -0
- package/dist/icons/register.d.ts +2 -0
- package/dist/icons/register.js +40 -0
- package/dist/icons/remote-desktop.d.ts +2 -0
- package/dist/icons/remote-desktop.js +62 -0
- package/dist/icons/remote-folder.d.ts +2 -0
- package/dist/icons/remote-folder.js +55 -0
- package/dist/icons/rent.d.ts +2 -0
- package/dist/icons/rent.js +50 -0
- package/dist/icons/rock.d.ts +2 -0
- package/dist/icons/rock.js +80 -0
- package/dist/icons/router.d.ts +2 -0
- package/dist/icons/router.js +59 -0
- package/dist/icons/salary.d.ts +2 -0
- package/dist/icons/salary.js +54 -0
- package/dist/icons/saving-streak.d.ts +2 -0
- package/dist/icons/saving-streak.js +66 -0
- package/dist/icons/scan-slip.d.ts +2 -0
- package/dist/icons/scan-slip.js +53 -0
- package/dist/icons/scissors.d.ts +2 -0
- package/dist/icons/scissors.js +52 -0
- package/dist/icons/server-cabinet.d.ts +2 -0
- package/dist/icons/server-cabinet.js +49 -0
- package/dist/icons/server.d.ts +2 -0
- package/dist/icons/server.js +41 -0
- package/dist/icons/shared.d.ts +8 -0
- package/dist/icons/shared.js +18 -0
- package/dist/icons/shield.d.ts +3 -0
- package/dist/icons/shield.js +28 -0
- package/dist/icons/shooting-star.d.ts +2 -0
- package/dist/icons/shooting-star.js +37 -0
- package/dist/icons/shopping-box.d.ts +2 -0
- package/dist/icons/shopping-box.js +46 -0
- package/dist/icons/sky-kit.d.ts +19 -0
- package/dist/icons/sky-kit.js +72 -0
- package/dist/icons/smart-tv.d.ts +2 -0
- package/dist/icons/smart-tv.js +39 -0
- package/dist/icons/smartphone.d.ts +2 -0
- package/dist/icons/smartphone.js +30 -0
- package/dist/icons/sms.d.ts +2 -0
- package/dist/icons/sms.js +45 -0
- package/dist/icons/snapshots.d.ts +2 -0
- package/dist/icons/snapshots.js +45 -0
- package/dist/icons/snip.d.ts +2 -0
- package/dist/icons/snip.js +63 -0
- package/dist/icons/spirit-house.d.ts +2 -0
- package/dist/icons/spirit-house.js +73 -0
- package/dist/icons/ssl-certificate.d.ts +2 -0
- package/dist/icons/ssl-certificate.js +56 -0
- package/dist/icons/star.d.ts +2 -0
- package/dist/icons/star.js +16 -0
- package/dist/icons/stock.d.ts +2 -0
- package/dist/icons/stock.js +62 -0
- package/dist/icons/storage-array.d.ts +2 -0
- package/dist/icons/storage-array.js +40 -0
- package/dist/icons/storm.d.ts +2 -0
- package/dist/icons/storm.js +43 -0
- package/dist/icons/street-food-cart.d.ts +2 -0
- package/dist/icons/street-food-cart.js +66 -0
- package/dist/icons/street-kit.d.ts +19 -0
- package/dist/icons/street-kit.js +67 -0
- package/dist/icons/street-sign.d.ts +2 -0
- package/dist/icons/street-sign.js +42 -0
- package/dist/icons/studio-monitors.d.ts +2 -0
- package/dist/icons/studio-monitors.js +67 -0
- package/dist/icons/sun.d.ts +2 -0
- package/dist/icons/sun.js +40 -0
- package/dist/icons/support.d.ts +2 -0
- package/dist/icons/support.js +48 -0
- package/dist/icons/switch.d.ts +2 -0
- package/dist/icons/switch.js +34 -0
- package/dist/icons/tablet.d.ts +2 -0
- package/dist/icons/tablet.js +44 -0
- package/dist/icons/tape-library.d.ts +2 -0
- package/dist/icons/tape-library.js +48 -0
- package/dist/icons/temple-donation.d.ts +2 -0
- package/dist/icons/temple-donation.js +60 -0
- package/dist/icons/tent.d.ts +2 -0
- package/dist/icons/tent.js +66 -0
- package/dist/icons/terminal.d.ts +2 -0
- package/dist/icons/terminal.js +56 -0
- package/dist/icons/thai-house.d.ts +2 -0
- package/dist/icons/thai-house.js +85 -0
- package/dist/icons/thai-lantern.d.ts +2 -0
- package/dist/icons/thai-lantern.js +61 -0
- package/dist/icons/thinkpad-l380.d.ts +2 -0
- package/dist/icons/thinkpad-l380.js +54 -0
- package/dist/icons/timer.d.ts +2 -0
- package/dist/icons/timer.js +59 -0
- package/dist/icons/train-ticket.d.ts +2 -0
- package/dist/icons/train-ticket.js +57 -0
- package/dist/icons/trash.d.ts +2 -0
- package/dist/icons/trash.js +62 -0
- package/dist/icons/tree.d.ts +2 -0
- package/dist/icons/tree.js +40 -0
- package/dist/icons/tuk-tuk.d.ts +2 -0
- package/dist/icons/tuk-tuk.js +45 -0
- package/dist/icons/tulip.d.ts +2 -0
- package/dist/icons/tulip.js +56 -0
- package/dist/icons/tunnel.d.ts +2 -0
- package/dist/icons/tunnel.js +50 -0
- package/dist/icons/two-factor.d.ts +2 -0
- package/dist/icons/two-factor.js +81 -0
- package/dist/icons/ups.d.ts +2 -0
- package/dist/icons/ups.js +37 -0
- package/dist/icons/usb-drive.d.ts +2 -0
- package/dist/icons/usb-drive.js +35 -0
- package/dist/icons/verified.d.ts +2 -0
- package/dist/icons/verified.js +32 -0
- package/dist/icons/virtual-machine.d.ts +2 -0
- package/dist/icons/virtual-machine.js +66 -0
- package/dist/icons/volume.d.ts +6 -0
- package/dist/icons/volume.js +35 -0
- package/dist/icons/vpn-gateway.d.ts +2 -0
- package/dist/icons/vpn-gateway.js +51 -0
- package/dist/icons/wake-on-lan.d.ts +2 -0
- package/dist/icons/wake-on-lan.js +40 -0
- package/dist/icons/wallet.d.ts +3 -0
- package/dist/icons/wallet.js +55 -0
- package/dist/icons/water-jar.d.ts +2 -0
- package/dist/icons/water-jar.js +72 -0
- package/dist/icons/wooden-window.d.ts +2 -0
- package/dist/icons/wooden-window.js +65 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/iso.d.ts +32 -0
- package/dist/iso.js +64 -0
- package/dist/load.d.ts +197 -0
- package/dist/load.js +197 -0
- package/dist/motions.d.ts +68 -0
- package/dist/motions.js +446 -0
- package/dist/sticker.d.ts +269 -0
- package/dist/sticker.js +1009 -0
- package/package.json +101 -4
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a dollar bill, green with a dollar sign in a white seal; a second bill fans out behind.
|
|
2
|
+
import { glint, twinkle, wiggle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, rect, spark } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
// $: an S with a bar through it
|
|
6
|
+
const SIGN = 'M14 -18Q8 -28 -2 -28Q-18 -28 -18 -14Q-18 -2 0 0Q18 2 18 14Q18 28 0 28Q-12 28 -20 18M0 -40L0 40';
|
|
7
|
+
export const dollarNote = {
|
|
8
|
+
name: 'dollar-note',
|
|
9
|
+
frames: 180,
|
|
10
|
+
line: LINE,
|
|
11
|
+
extrude: EXT,
|
|
12
|
+
layers: [
|
|
13
|
+
{ id: 'root', a: [-40, 90], p: [232, 330], m: { ...wiggle, k: 0.35 }, shapes: [] },
|
|
14
|
+
{
|
|
15
|
+
parent: 'root',
|
|
16
|
+
tilt: [-6, 36],
|
|
17
|
+
p: [14, -26],
|
|
18
|
+
shapes: [{ d: rect(-150, -80, 300, 160, 10), fill: 'tint', depth: 0.4 }],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'bill',
|
|
22
|
+
parent: 'root',
|
|
23
|
+
tilt: FACE,
|
|
24
|
+
shapes: [
|
|
25
|
+
{ d: rect(-150, -80, 300, 160, 10), fill: 'ok', depth: 0.4 },
|
|
26
|
+
{ d: rect(-134, -64, 268, 128, 6) },
|
|
27
|
+
{ d: ellipse(0, 0, 52), fill: 'white', depth: 0.2 },
|
|
28
|
+
{ d: SIGN },
|
|
29
|
+
{ d: ellipse(-98, -34, 14) },
|
|
30
|
+
{ d: ellipse(98, 34, 14) },
|
|
31
|
+
{ d: line([-116, 40], [-70, 40]) },
|
|
32
|
+
{ d: line([70, -40], [116, -40]) },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
parent: 'bill',
|
|
37
|
+
a: [-120, 30],
|
|
38
|
+
p: [-120, 30],
|
|
39
|
+
m: glint(50, 90),
|
|
40
|
+
shapes: [{ d: spark(-120, 30, 22), fill: 'white' }],
|
|
41
|
+
},
|
|
42
|
+
glow('root', [150, -120], 22, [twinkle(46), twinkle(140, true)]),
|
|
43
|
+
],
|
|
44
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a utility bill for electricity and water; the total is stamped paid. No utility mark.
|
|
2
|
+
import { jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const BOLT = poly([
|
|
6
|
+
[-92, -142],
|
|
7
|
+
[-112, -104],
|
|
8
|
+
[-96, -104],
|
|
9
|
+
[-106, -72],
|
|
10
|
+
[-76, -118],
|
|
11
|
+
[-92, -118],
|
|
12
|
+
[-80, -142],
|
|
13
|
+
], 2);
|
|
14
|
+
const DROP = 'M-34 -142C-24 -126 -12 -112 -12 -98A22 22 0 0 1 -56 -98C-56 -112 -44 -126 -34 -142Z';
|
|
15
|
+
export const electricBill = {
|
|
16
|
+
name: 'electric-bill',
|
|
17
|
+
frames: 160,
|
|
18
|
+
still: 100,
|
|
19
|
+
line: LINE,
|
|
20
|
+
extrude: EXT,
|
|
21
|
+
layers: [
|
|
22
|
+
{ id: 'bill', a: [0, 170], p: [250, 392], m: jolt(), shapes: [] },
|
|
23
|
+
{
|
|
24
|
+
id: 'page',
|
|
25
|
+
parent: 'bill',
|
|
26
|
+
tilt: FACE,
|
|
27
|
+
shapes: [
|
|
28
|
+
{ d: rect(-136, -170, 272, 340, 14), fill: 'white', depth: 0.6 },
|
|
29
|
+
{ d: rect(-136, -170, 272, 120, 14), fill: 'tint', line: false },
|
|
30
|
+
{ d: line([-136, -50], [136, -50]) },
|
|
31
|
+
{ d: BOLT, fill: 'gold', depth: 0.3 },
|
|
32
|
+
{ d: DROP, fill: 'main', depth: 0.3 },
|
|
33
|
+
{ d: line([10, -130], [100, -130]) },
|
|
34
|
+
{ d: line([10, -100], [76, -100]) },
|
|
35
|
+
...[-14, 22, 58].map((y) => ({ d: line([-100, y], [100, y]) })),
|
|
36
|
+
{ d: rect(-100, 96, 200, 44, 10), fill: 'gold', depth: 0.2 },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
parent: 'page',
|
|
41
|
+
a: [60, 60],
|
|
42
|
+
p: [60, 60],
|
|
43
|
+
m: [twinkle(30), twinkle(126, true)],
|
|
44
|
+
shapes: [
|
|
45
|
+
{ d: ellipse(60, 60, 54), fill: 'ok', depth: 0.3 },
|
|
46
|
+
{ d: line([36, 60], [54, 78], [86, 42]), line: 9 },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
glow('bill', [-160, -130], 22, [twinkle(44), twinkle(130, true)]),
|
|
50
|
+
],
|
|
51
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: an envelope that lifts its letter out and flags one unread.
|
|
2
|
+
import { jolt, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, LINE } from './shared.js';
|
|
5
|
+
export const email = {
|
|
6
|
+
name: 'email',
|
|
7
|
+
frames: 180,
|
|
8
|
+
line: LINE,
|
|
9
|
+
extrude: EXT,
|
|
10
|
+
still: 90,
|
|
11
|
+
layers: [
|
|
12
|
+
{ id: 'env', a: [0, 120], p: [250, 340], m: jolt([-4, 10]), shapes: [] },
|
|
13
|
+
{
|
|
14
|
+
id: 'back',
|
|
15
|
+
parent: 'env',
|
|
16
|
+
tilt: FACE,
|
|
17
|
+
shapes: [{ d: rect(-140, -80, 280, 180, 14), fill: 'deep', depth: 1 }],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
parent: 'back',
|
|
21
|
+
m: slide([0, -84], 22, 70, 36),
|
|
22
|
+
shapes: [
|
|
23
|
+
{ d: rect(-108, -60, 216, 150, 8), fill: 'white', depth: 0.25 },
|
|
24
|
+
{ d: line([-80, -34], [60, -34]) },
|
|
25
|
+
{ d: line([-80, -12], [24, -12]) },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
parent: 'back',
|
|
30
|
+
shapes: [
|
|
31
|
+
{
|
|
32
|
+
d: poly([
|
|
33
|
+
[-140, -40],
|
|
34
|
+
[0, 36],
|
|
35
|
+
[140, -40],
|
|
36
|
+
[140, 100],
|
|
37
|
+
[-140, 100],
|
|
38
|
+
], [4, 6, 4, 14, 14]),
|
|
39
|
+
fill: 'main',
|
|
40
|
+
depth: 1,
|
|
41
|
+
},
|
|
42
|
+
{ d: line([-140, 100], [-30, 30]) },
|
|
43
|
+
{ d: line([140, 100], [30, 30]) },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
parent: 'back',
|
|
48
|
+
a: [124, -78],
|
|
49
|
+
p: [124, -78],
|
|
50
|
+
m: [twinkle(58), twinkle(150, true)],
|
|
51
|
+
shapes: [
|
|
52
|
+
{ d: ellipse(124, -78, 28), fill: 'hot', depth: 0.5 },
|
|
53
|
+
{ d: line([118, -86], [126, -92], [126, -64]) },
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: nothing recorded yet; a blank ledger lies open and a pencil writes the first line.
|
|
2
|
+
import { SNAP, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const RULES = [-70, -36, -2, 32, 66];
|
|
6
|
+
const ruled = (x0, x1, col) => [
|
|
7
|
+
...RULES.map((y) => ({ d: line([x0, y], [x1, y]), line: 2 })),
|
|
8
|
+
{ d: line([col, -96], [col, 90]), line: 2 },
|
|
9
|
+
];
|
|
10
|
+
const TIP = [30, -84];
|
|
11
|
+
const WRITE = [
|
|
12
|
+
[16, 0, SNAP],
|
|
13
|
+
[66, 1, 0],
|
|
14
|
+
[116, 1, SNAP],
|
|
15
|
+
[166, 0],
|
|
16
|
+
];
|
|
17
|
+
export const emptyState = {
|
|
18
|
+
name: 'empty-state',
|
|
19
|
+
frames: 180,
|
|
20
|
+
still: 90,
|
|
21
|
+
line: LINE,
|
|
22
|
+
extrude: EXT,
|
|
23
|
+
layers: [
|
|
24
|
+
{ id: 'root', p: [250, 280], shapes: [] },
|
|
25
|
+
{
|
|
26
|
+
id: 'book',
|
|
27
|
+
parent: 'root',
|
|
28
|
+
tilt: FACE,
|
|
29
|
+
shapes: [
|
|
30
|
+
{ d: rect(-190, -130, 380, 250, 16), fill: 'main', depth: 1 },
|
|
31
|
+
{ d: rect(-176, -116, 172, 222, 8), fill: 'white', depth: 0.3 },
|
|
32
|
+
{ d: rect(4, -116, 172, 222, 8), fill: 'white', depth: 0.3 },
|
|
33
|
+
...ruled(-160, -20, -60),
|
|
34
|
+
...ruled(20, 160, 120),
|
|
35
|
+
{ d: line([TIP[0], TIP[1] + 14], [140, TIP[1] + 14]), line: 4, trim: WRITE },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
parent: 'book',
|
|
40
|
+
m: slide([110, 0], 16, 50, 50),
|
|
41
|
+
shapes: [
|
|
42
|
+
{
|
|
43
|
+
d: poly([
|
|
44
|
+
[TIP[0] + 14, TIP[1] - 30],
|
|
45
|
+
[TIP[0] + 30, TIP[1] - 16],
|
|
46
|
+
[TIP[0] + 128, TIP[1] - 118],
|
|
47
|
+
[TIP[0] + 112, TIP[1] - 132],
|
|
48
|
+
], 2),
|
|
49
|
+
fill: 'gold',
|
|
50
|
+
depth: 0.5,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
d: poly([
|
|
54
|
+
[TIP[0] + 112, TIP[1] - 132],
|
|
55
|
+
[TIP[0] + 128, TIP[1] - 118],
|
|
56
|
+
[TIP[0] + 146, TIP[1] - 136],
|
|
57
|
+
[TIP[0] + 130, TIP[1] - 150],
|
|
58
|
+
], [2, 2, 6, 6]),
|
|
59
|
+
fill: 'hot',
|
|
60
|
+
depth: 0.5,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
d: poly([
|
|
64
|
+
[TIP[0], TIP[1] + 12],
|
|
65
|
+
[TIP[0] + 14, TIP[1] - 30],
|
|
66
|
+
[TIP[0] + 30, TIP[1] - 16],
|
|
67
|
+
], 2),
|
|
68
|
+
fill: 'paper',
|
|
69
|
+
depth: 0.5,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
glow('root', [-170, -170], 22, [twinkle(66), twinkle(140, true)]),
|
|
74
|
+
],
|
|
75
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: an expense; a coin flies out of the cash tray and a red arrow drops.
|
|
2
|
+
import { fall, jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { arrow, coin, TRAY_BACK, TRAY_LIP, WELL } from './finance-tray.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const SEAT = [WELL[0], WELL[1] - 40];
|
|
6
|
+
export const expense = {
|
|
7
|
+
name: 'expense',
|
|
8
|
+
frames: 180,
|
|
9
|
+
still: 20,
|
|
10
|
+
line: LINE,
|
|
11
|
+
extrude: EXT,
|
|
12
|
+
layers: [
|
|
13
|
+
{ id: 'out', p: [250, 360], m: { ...jolt([-6, 10]), at: 30 }, shapes: [] },
|
|
14
|
+
{ parent: 'out', shapes: TRAY_BACK },
|
|
15
|
+
{
|
|
16
|
+
parent: 'out',
|
|
17
|
+
a: SEAT,
|
|
18
|
+
p: SEAT,
|
|
19
|
+
m: fall([100, -120], 30, 24),
|
|
20
|
+
op: 54,
|
|
21
|
+
shapes: coin(SEAT),
|
|
22
|
+
},
|
|
23
|
+
{ parent: 'out', a: SEAT, p: SEAT, m: twinkle(130), ip: 128, shapes: coin(SEAT) },
|
|
24
|
+
{ parent: 'out', shapes: TRAY_LIP },
|
|
25
|
+
{
|
|
26
|
+
id: 'dn',
|
|
27
|
+
parent: 'out',
|
|
28
|
+
a: [0, -60],
|
|
29
|
+
p: [-150, -130],
|
|
30
|
+
m: { ...jolt([0, 22]), at: 32 },
|
|
31
|
+
shapes: [],
|
|
32
|
+
},
|
|
33
|
+
{ parent: 'dn', tilt: FACE, shapes: [arrow('hot', true)] },
|
|
34
|
+
glow('out', [160, -60], 20, [twinkle(40), twinkle(100, true)]),
|
|
35
|
+
],
|
|
36
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: exporting a statement; a sheet and a report rise out of a folder and drop back.
|
|
2
|
+
import { slide, twinkle } from '../motions.js';
|
|
3
|
+
import { line, rect } from '../sticker.js';
|
|
4
|
+
import { page } from './paper.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
export const exportFile = {
|
|
7
|
+
name: 'export-file',
|
|
8
|
+
frames: 180,
|
|
9
|
+
still: 80,
|
|
10
|
+
line: LINE,
|
|
11
|
+
extrude: EXT,
|
|
12
|
+
layers: [
|
|
13
|
+
{ id: 'root', p: [240, 300], shapes: [] },
|
|
14
|
+
{
|
|
15
|
+
id: 'back',
|
|
16
|
+
parent: 'root',
|
|
17
|
+
tilt: FACE,
|
|
18
|
+
shapes: [
|
|
19
|
+
{ d: rect(-160, -116, 120, 44, 12), fill: 'deep', depth: 1 },
|
|
20
|
+
{ d: rect(-160, -96, 320, 200, 18), fill: 'deep', depth: 1 },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{ parent: 'back', m: slide([20, -70], 22, 50, 40), shapes: page(-110, -150, 140, 180, 'hot') },
|
|
24
|
+
{ parent: 'back', m: slide([70, -110], 14, 56, 40), shapes: page(-40, -150, 150, 190, 'ok') },
|
|
25
|
+
{
|
|
26
|
+
parent: 'back',
|
|
27
|
+
shapes: [
|
|
28
|
+
{ d: rect(-160, -20, 320, 124, 18), fill: 'main', depth: 0.6 },
|
|
29
|
+
{ d: line([-24, 70], [26, 24]) },
|
|
30
|
+
{ d: line([2, 24], [26, 24], [26, 48]) },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
glow('root', [150, -210], 22, [twinkle(54), twinkle(140, true)]),
|
|
34
|
+
],
|
|
35
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: an eyedropper picking a colour; a drop falls and the picked swatch pops up.
|
|
2
|
+
import { fall, hop, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, pill, poly } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
export const eyedropper = {
|
|
6
|
+
name: 'eyedropper',
|
|
7
|
+
frames: 160,
|
|
8
|
+
line: LINE,
|
|
9
|
+
extrude: EXT,
|
|
10
|
+
still: 110,
|
|
11
|
+
layers: [
|
|
12
|
+
{ id: 'root', p: [210, 270], shapes: [] },
|
|
13
|
+
{
|
|
14
|
+
parent: 'root',
|
|
15
|
+
tilt: FACE,
|
|
16
|
+
a: [0, 120],
|
|
17
|
+
p: [0, 120],
|
|
18
|
+
shapes: [{ d: ellipse(40, 150, 70, 44), fill: 'white', depth: 0.4 }],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'sw',
|
|
22
|
+
parent: 'root',
|
|
23
|
+
tilt: FACE,
|
|
24
|
+
a: [40, 150],
|
|
25
|
+
p: [40, 150],
|
|
26
|
+
m: [twinkle(60), twinkle(140, true)],
|
|
27
|
+
shapes: [
|
|
28
|
+
{ d: ellipse(40, 150, 46, 30), fill: 'main', depth: 0.6 },
|
|
29
|
+
{ d: pill(100, 140, 90, 26), fill: 'white', depth: 0.3 },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
parent: 'root',
|
|
34
|
+
m: [twinkle(26), fall([0, 120], 34, 22)],
|
|
35
|
+
op: 58,
|
|
36
|
+
shapes: [{ d: 'M24 6Q24 -14 34 -26Q44 -14 44 6A10 10 0 0 1 24 6Z', fill: 'main' }],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
parent: 'root',
|
|
40
|
+
tilt: FACE,
|
|
41
|
+
m: { ...hop, k: 0.5 },
|
|
42
|
+
shapes: [
|
|
43
|
+
{
|
|
44
|
+
d: poly([
|
|
45
|
+
[20, -30],
|
|
46
|
+
[30, -40],
|
|
47
|
+
[130, -150],
|
|
48
|
+
[150, -130],
|
|
49
|
+
[44, -24],
|
|
50
|
+
], 4),
|
|
51
|
+
fill: 'white',
|
|
52
|
+
depth: 0.6,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
d: poly([
|
|
56
|
+
[110, -150],
|
|
57
|
+
[150, -110],
|
|
58
|
+
[130, -90],
|
|
59
|
+
[90, -130],
|
|
60
|
+
], 4),
|
|
61
|
+
fill: 'grey',
|
|
62
|
+
depth: 0.8,
|
|
63
|
+
},
|
|
64
|
+
{ d: ellipse(170, -186, 44), fill: 'hot', depth: 1 },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
glow('root', [-120, -120], 22, [twinkle(64), twinkle(140, true)]),
|
|
68
|
+
],
|
|
69
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a face inside scanning brackets, recognised with a check.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { arc, ellipse, line, poly } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, LINE } from './shared.js';
|
|
5
|
+
const corner = (sx, sy) => ({
|
|
6
|
+
d: poly([
|
|
7
|
+
[-136 * sx, -136 * sy],
|
|
8
|
+
[-66 * sx, -136 * sy],
|
|
9
|
+
[-66 * sx, -110 * sy],
|
|
10
|
+
[-110 * sx, -110 * sy],
|
|
11
|
+
[-110 * sx, -66 * sy],
|
|
12
|
+
[-136 * sx, -66 * sy],
|
|
13
|
+
], [16, 6, 6, 4, 6, 6]),
|
|
14
|
+
fill: 'main',
|
|
15
|
+
depth: 0.7,
|
|
16
|
+
});
|
|
17
|
+
export const faceId = {
|
|
18
|
+
name: 'face-id',
|
|
19
|
+
frames: 160,
|
|
20
|
+
line: LINE,
|
|
21
|
+
extrude: EXT,
|
|
22
|
+
still: 100,
|
|
23
|
+
layers: [
|
|
24
|
+
{ id: 'root', a: [0, 130], p: [250, 380], m: hop, shapes: [] },
|
|
25
|
+
{
|
|
26
|
+
id: 'face',
|
|
27
|
+
parent: 'root',
|
|
28
|
+
tilt: FACE,
|
|
29
|
+
shapes: [
|
|
30
|
+
corner(1, 1),
|
|
31
|
+
corner(-1, 1),
|
|
32
|
+
corner(1, -1),
|
|
33
|
+
corner(-1, -1),
|
|
34
|
+
{ d: ellipse(0, 0, 76), fill: 'white', depth: 0.6 },
|
|
35
|
+
{ d: ellipse(-26, -14, 9, 13), fill: 'ink', line: false },
|
|
36
|
+
{ d: ellipse(26, -14, 9, 13), fill: 'ink', line: false },
|
|
37
|
+
{ d: arc(0, 12, 32, 25, 155) },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
parent: 'face',
|
|
42
|
+
a: [96, 96],
|
|
43
|
+
p: [96, 96],
|
|
44
|
+
m: [twinkle(40), twinkle(140, true)],
|
|
45
|
+
shapes: [
|
|
46
|
+
{ d: ellipse(96, 96, 34), fill: 'ok', depth: 0.6 },
|
|
47
|
+
{ d: line([80, 96], [92, 108], [114, 84]) },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a file, a page with a folded corner and a kind tag; it hops.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { page } from './paper.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
export const file = {
|
|
6
|
+
name: 'file',
|
|
7
|
+
frames: 160,
|
|
8
|
+
line: LINE,
|
|
9
|
+
extrude: EXT,
|
|
10
|
+
layers: [
|
|
11
|
+
{ id: 'root', a: [0, 150], p: [250, 390], m: hop, shapes: [] },
|
|
12
|
+
{ parent: 'root', tilt: FACE, shapes: page(-110, -150, 220, 290, 'main') },
|
|
13
|
+
glow('root', [150, -170], 24, [twinkle(36), twinkle(130, true)]),
|
|
14
|
+
],
|
|
15
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Shape } from '../sticker.js';
|
|
2
|
+
export declare const PILE: readonly [0, 18];
|
|
3
|
+
/** How far each coin sits above the one under it. */
|
|
4
|
+
export declare const STEP = 15;
|
|
5
|
+
/** One coin lying flat, centred on (x, y). */
|
|
6
|
+
export declare const coin: (x: number, y: number) => Shape[];
|
|
7
|
+
/** `n` coins stacked up from the one centred on (x, y). */
|
|
8
|
+
export declare const stack: (x: number, y: number, n: number) => Shape[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Coins lying flat in piles, for the finance stickers: an icon using them takes the front view's straight-down extrude.
|
|
2
|
+
import { ellipse, VIEWS } from '../sticker.js';
|
|
3
|
+
export const { extrude: PILE } = VIEWS.front;
|
|
4
|
+
const RX = 62;
|
|
5
|
+
const RY = 26;
|
|
6
|
+
/** How far each coin sits above the one under it. */
|
|
7
|
+
export const STEP = 15;
|
|
8
|
+
/** One coin lying flat, centred on (x, y). */
|
|
9
|
+
export const coin = (x, y) => [
|
|
10
|
+
{ d: ellipse(x, y, RX, RY), fill: 'gold', depth: 0.8 },
|
|
11
|
+
{ d: ellipse(x, y, RX * 0.64, RY * 0.64) },
|
|
12
|
+
];
|
|
13
|
+
/** `n` coins stacked up from the one centred on (x, y). */
|
|
14
|
+
export const stack = (x, y, n) => Array.from({ length: n }, (_, i) => coin(x, y - i * STEP)).flat();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Shape, Swatch, Vec } from '../sticker.js';
|
|
2
|
+
/** The tray's back half (body and the dark well), drawn before a coin that drops into it. */
|
|
3
|
+
export declare const TRAY_BACK: Shape[];
|
|
4
|
+
/** The tray's front lip, drawn over the coin so it sinks in behind it. */
|
|
5
|
+
export declare const TRAY_LIP: Shape[];
|
|
6
|
+
/** Where a coin enters the well, in tray space. */
|
|
7
|
+
export declare const WELL: Vec;
|
|
8
|
+
/** A gold coin turned a little edge-on, centred on c (drawn upright, so it suits an untilted layer). */
|
|
9
|
+
export declare const coin: ([x, y]: Vec) => Shape[];
|
|
10
|
+
/** A chunky arrow on the leaned face, pointing up (or down), centred on the origin. */
|
|
11
|
+
export declare const arrow: (fill: Swatch, down?: boolean) => Shape;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Shared by income and expense: an open cash tray in 3d (see iso.ts), a gold coin on the leaned face and an arrow.
|
|
2
|
+
import { ellipse, poly } from '../sticker.js';
|
|
3
|
+
import { block, faceOf, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
const W = 250;
|
|
5
|
+
const D = 170;
|
|
6
|
+
const H = 64;
|
|
7
|
+
const BOX = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
|
|
8
|
+
const top = faceOf(BOX, 'top');
|
|
9
|
+
const front = faceOf(BOX, 'front');
|
|
10
|
+
/** The tray's back half (body and the dark well), drawn before a coin that drops into it. */
|
|
11
|
+
export const TRAY_BACK = [
|
|
12
|
+
...solid(BOX, { fill: 'main', top: 'white' }, 6),
|
|
13
|
+
{ d: quad(top, 0.08, 0.12, 0.84, 0.78, 10), fill: 'deep' },
|
|
14
|
+
...[0.36, 0.64].map((s) => ({ d: stroke(top, [s, 0.12], [s, 0.9]) })),
|
|
15
|
+
];
|
|
16
|
+
/** The tray's front lip, drawn over the coin so it sinks in behind it. */
|
|
17
|
+
export const TRAY_LIP = [
|
|
18
|
+
{ d: quad(front, 0, 0, 1, 1, 6), fill: 'main' },
|
|
19
|
+
{ d: quad(front, 0.38, 0.3, 0.24, 0.36, 6), fill: 'white' },
|
|
20
|
+
];
|
|
21
|
+
/** Where a coin enters the well, in tray space. */
|
|
22
|
+
export const WELL = top.at(0.5, 0.5);
|
|
23
|
+
/** A gold coin turned a little edge-on, centred on c (drawn upright, so it suits an untilted layer). */
|
|
24
|
+
export const coin = ([x, y]) => [
|
|
25
|
+
{ d: ellipse(x, y, 32, 42), fill: 'gold', depth: 0.6 },
|
|
26
|
+
{ d: ellipse(x, y, 16, 24) },
|
|
27
|
+
];
|
|
28
|
+
/** A chunky arrow on the leaned face, pointing up (or down), centred on the origin. */
|
|
29
|
+
export const arrow = (fill, down = false) => {
|
|
30
|
+
const k = down ? -1 : 1;
|
|
31
|
+
const pts = [
|
|
32
|
+
[0, -62 * k],
|
|
33
|
+
[48, -10 * k],
|
|
34
|
+
[18, -10 * k],
|
|
35
|
+
[18, 58 * k],
|
|
36
|
+
[-18, 58 * k],
|
|
37
|
+
[-18, -10 * k],
|
|
38
|
+
[-48, -10 * k],
|
|
39
|
+
];
|
|
40
|
+
return { d: poly(pts, 6), fill, depth: 0.8 };
|
|
41
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a fingerprint reader; the ridges redraw while a scan bar sweeps.
|
|
2
|
+
import { erase, jolt, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
// arches with legs of uneven length, so it reads as a print and not a wifi mark
|
|
6
|
+
const ridge = (r, left, right) => `M${String(-r)} ${String(left)}L${String(-r)} -10A${String(r)} ${String(r)} 0 0 1 ${String(r)} -10L${String(r)} ${String(right)}`;
|
|
7
|
+
const RIDGES = [
|
|
8
|
+
[16, 20, 40],
|
|
9
|
+
[36, 60, 30],
|
|
10
|
+
[56, 50, 76],
|
|
11
|
+
[76, 84, 56],
|
|
12
|
+
].map(([r, l, rt], i) => ({
|
|
13
|
+
d: ridge(r, l, rt),
|
|
14
|
+
round: true,
|
|
15
|
+
trim: erase(20 + i * 5, 86 + i * 5),
|
|
16
|
+
}));
|
|
17
|
+
export const fingerprint = {
|
|
18
|
+
name: 'fingerprint',
|
|
19
|
+
frames: 150,
|
|
20
|
+
line: LINE,
|
|
21
|
+
extrude: EXT,
|
|
22
|
+
still: 10,
|
|
23
|
+
layers: [
|
|
24
|
+
{ id: 'pad', a: [0, 130], p: [250, 380], m: jolt([-3, 8]), shapes: [] },
|
|
25
|
+
{
|
|
26
|
+
id: 'face',
|
|
27
|
+
parent: 'pad',
|
|
28
|
+
tilt: FACE,
|
|
29
|
+
shapes: [{ d: rect(-112, -136, 224, 272, 44), fill: 'deep', depth: 1 }],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'scrn',
|
|
33
|
+
parent: 'face',
|
|
34
|
+
shapes: [{ d: rect(-92, -116, 184, 232, 32), fill: 'tint' }],
|
|
35
|
+
},
|
|
36
|
+
{ parent: 'face', shapes: RIDGES },
|
|
37
|
+
{
|
|
38
|
+
parent: 'face',
|
|
39
|
+
clip: 'scrn',
|
|
40
|
+
m: slide([0, 196], 20, 6, 52),
|
|
41
|
+
shapes: [{ d: rect(-100, -104, 200, 12, 6), fill: 'ok' }],
|
|
42
|
+
},
|
|
43
|
+
glow('pad', [130, -150], 24, [twinkle(72), twinkle(130, true)]),
|
|
44
|
+
],
|
|
45
|
+
};
|