@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 stack of books modelled in 3d (see iso.ts); the top one slides out and back.
|
|
2
|
+
import { slide, sway, twinkle } from '../motions.js';
|
|
3
|
+
import { add, block, faceOf, ISO, mul, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A book is a cover board under and over a block of pages, turned `deg` on the stack, with page lines on its edge
|
|
6
|
+
const book = (z, deg, w, d, h, cover) => {
|
|
7
|
+
const a = (deg * Math.PI) / 180;
|
|
8
|
+
const ex = [Math.cos(a) * w, Math.sin(a) * w, 0];
|
|
9
|
+
const ey = [-Math.sin(a) * d, Math.cos(a) * d, 0];
|
|
10
|
+
const o = [-(ex[0] + ey[0]) / 2, -(ex[1] + ey[1]) / 2, z];
|
|
11
|
+
const pages = block(add(o, add(mul(ex, 0.02), add(mul(ey, 0.04), [0, 0, 8]))), mul(ex, 0.95), mul(ey, 0.92), [0, 0, h - 16]);
|
|
12
|
+
const front = faceOf(pages, 'front');
|
|
13
|
+
return [
|
|
14
|
+
...solid(block(o, ex, ey, [0, 0, 8]), { fill: cover }, 2),
|
|
15
|
+
...solid(pages, { fill: 'white' }, 1),
|
|
16
|
+
...[0.33, 0.66].map((t) => ({ d: stroke(front, [0.04, t], [0.96, t]), line: 3 })),
|
|
17
|
+
...solid(block(add(o, [0, 0, h - 8]), ex, ey, [0, 0, 8]), { fill: cover }, 2),
|
|
18
|
+
];
|
|
19
|
+
};
|
|
20
|
+
const BOOKS = [
|
|
21
|
+
...book(0, 0, 260, 180, 56, 'main'),
|
|
22
|
+
...book(56, -6, 236, 168, 48, 'ok'),
|
|
23
|
+
...book(104, 5, 250, 172, 44, 'gold'),
|
|
24
|
+
];
|
|
25
|
+
export const books = {
|
|
26
|
+
name: 'books',
|
|
27
|
+
frames: 180,
|
|
28
|
+
line: LINE,
|
|
29
|
+
extrude: [0, 0],
|
|
30
|
+
layers: [
|
|
31
|
+
{ id: 'pile', p: [250, 330], m: { ...sway, k: 0.4 }, shapes: [] },
|
|
32
|
+
{ parent: 'pile', shapes: BOOKS },
|
|
33
|
+
{
|
|
34
|
+
id: 'top',
|
|
35
|
+
parent: 'pile',
|
|
36
|
+
m: slide(ISO([0, -46, 0]), 20, 50, 40),
|
|
37
|
+
shapes: [
|
|
38
|
+
...book(148, -3, 226, 160, 40, 'hot'),
|
|
39
|
+
...solid(block([-30, -84, 112], [22, 0, 0], [0, 3, 0], [0, 0, 40]), { fill: 'gold' }),
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
glow('pile', [170, -180], 24, [twinkle(60), twinkle(140, true)]),
|
|
43
|
+
],
|
|
44
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a transit card taps the reader on a skytrain gate; the light turns green. No operator mark.
|
|
2
|
+
import { slide, twinkle } from '../motions.js';
|
|
3
|
+
import { arc, ellipse, line, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
export const btsCard = {
|
|
6
|
+
name: 'bts-card',
|
|
7
|
+
frames: 180,
|
|
8
|
+
still: 80,
|
|
9
|
+
line: LINE,
|
|
10
|
+
extrude: EXT,
|
|
11
|
+
layers: [
|
|
12
|
+
{ id: 'gate', p: [250, 300], shapes: [] },
|
|
13
|
+
{
|
|
14
|
+
parent: 'gate',
|
|
15
|
+
tilt: FACE,
|
|
16
|
+
shapes: [
|
|
17
|
+
{ d: rect(-120, -40, 240, 200, 28), fill: 'deep', depth: 1.4 },
|
|
18
|
+
{ d: ellipse(0, 70, 66), fill: 'tint', depth: 0.2 },
|
|
19
|
+
{ d: arc(0, 70, 30, 200, 340) },
|
|
20
|
+
{ d: arc(0, 70, 46, 205, 335) },
|
|
21
|
+
{ d: ellipse(0, 70, 8), fill: 'ink', line: false },
|
|
22
|
+
{ d: rect(66, -24, 36, 20, 8), fill: 'grey' },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
parent: 'gate',
|
|
27
|
+
tilt: FACE,
|
|
28
|
+
a: [84, -14],
|
|
29
|
+
p: [84, -14],
|
|
30
|
+
m: [twinkle(40), twinkle(122, true)],
|
|
31
|
+
shapes: [{ d: rect(66, -24, 36, 20, 8), fill: 'ok' }],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
parent: 'gate',
|
|
35
|
+
tilt: FACE,
|
|
36
|
+
m: slide([-26, 104], 6, 40, 34),
|
|
37
|
+
shapes: [
|
|
38
|
+
{ d: rect(-100, -200, 200, 130, 16), fill: 'main', depth: 0.3 },
|
|
39
|
+
{ d: rect(-100, -176, 200, 26, 0), fill: 'gold', line: false },
|
|
40
|
+
{ d: rect(-80, -128, 34, 26, 6), fill: 'gold' },
|
|
41
|
+
{ d: line([-24, -116], [70, -116]) },
|
|
42
|
+
{ d: line([-24, -96], [40, -96]) },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
glow('gate', [160, -120], 24, [twinkle(42), twinkle(130, true)]),
|
|
46
|
+
],
|
|
47
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a savings jar with a label; coins fill it up to the line, then settle back.
|
|
2
|
+
import { jolt, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const GLASS = rect(-104, -110, 208, 250, 48);
|
|
6
|
+
const COINS = [
|
|
7
|
+
{ d: rect(-120, 30, 240, 200, 0), fill: 'gold' },
|
|
8
|
+
...[
|
|
9
|
+
[-60, 56],
|
|
10
|
+
[10, 50],
|
|
11
|
+
[72, 62],
|
|
12
|
+
[-28, 92],
|
|
13
|
+
[44, 100],
|
|
14
|
+
].map(([x = 0, y = 0]) => ({ d: ellipse(x, y, 22, 12) })),
|
|
15
|
+
];
|
|
16
|
+
export const budgetJar = {
|
|
17
|
+
name: 'budget-jar',
|
|
18
|
+
frames: 180,
|
|
19
|
+
still: 100,
|
|
20
|
+
line: LINE,
|
|
21
|
+
extrude: EXT,
|
|
22
|
+
layers: [
|
|
23
|
+
{ id: 'jar', a: [0, 140], p: [250, 400], m: { ...jolt([0, 8]), at: 70 }, shapes: [] },
|
|
24
|
+
{
|
|
25
|
+
id: 'face',
|
|
26
|
+
parent: 'jar',
|
|
27
|
+
tilt: FACE,
|
|
28
|
+
shapes: [{ d: rect(-70, -150, 140, 40, 12), fill: 'main', depth: 0.8 }],
|
|
29
|
+
},
|
|
30
|
+
{ id: 'glass', parent: 'face', shapes: [{ d: GLASS, fill: 'tint', depth: 1 }] },
|
|
31
|
+
{ parent: 'face', clip: 'glass', m: slide([0, -90], 14, 70, 56), shapes: COINS },
|
|
32
|
+
{
|
|
33
|
+
parent: 'face',
|
|
34
|
+
shapes: [
|
|
35
|
+
{ d: rect(-86, -96, 22, 70, 11), fill: 'white', line: false },
|
|
36
|
+
{ d: rect(-74, -4, 148, 72, 12), fill: 'white', depth: 0.2 },
|
|
37
|
+
{ d: line([-50, 20], [50, 20]) },
|
|
38
|
+
{ d: line([-50, 44], [16, 44]) },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
glow('jar', [150, -140], 24, [twinkle(70), twinkle(140, true)]),
|
|
42
|
+
],
|
|
43
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a cactus in a clay pot in 2.5d (pot in 3d, see plant-kit.ts); a flower pops on top.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, rect, rosette } from '../sticker.js';
|
|
4
|
+
import { pot } from './plant-kit.js';
|
|
5
|
+
import { glow, LINE } from './shared.js';
|
|
6
|
+
const [POT, [, sy]] = pot(92, 48, 60, 'gold');
|
|
7
|
+
const TOP = sy - 168;
|
|
8
|
+
const arm = (x, y, w, up, flip) => [
|
|
9
|
+
{ d: rect(flip > 0 ? x : x - w, y, w, 28, 14), fill: 'ok', depth: 0.6 },
|
|
10
|
+
{ d: rect(flip > 0 ? x + w - 28 : x - w, y - up, 28, up + 20, 14), fill: 'ok', depth: 0.6 },
|
|
11
|
+
];
|
|
12
|
+
export const cactus = {
|
|
13
|
+
name: 'cactus',
|
|
14
|
+
frames: 180,
|
|
15
|
+
still: 100,
|
|
16
|
+
line: LINE,
|
|
17
|
+
extrude: [5, 10],
|
|
18
|
+
layers: [
|
|
19
|
+
{ id: 'pot', p: [250, 380], m: { ...hop, k: 0.45, at: 34 }, shapes: [] },
|
|
20
|
+
{
|
|
21
|
+
parent: 'pot',
|
|
22
|
+
shapes: [
|
|
23
|
+
...arm(-28, sy - 104, 52, 50, -1),
|
|
24
|
+
...arm(28, sy - 128, 48, 56, 1),
|
|
25
|
+
{ d: rect(-36, TOP, 72, 180, 36), fill: 'ok', depth: 0.8 },
|
|
26
|
+
...[-13, 13].map((x) => ({ d: line([x, TOP + 26], [x, sy - 10]) })),
|
|
27
|
+
...POT,
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
parent: 'pot',
|
|
32
|
+
a: [0, TOP],
|
|
33
|
+
p: [0, TOP],
|
|
34
|
+
m: [twinkle(28), twinkle(146, true)],
|
|
35
|
+
shapes: [
|
|
36
|
+
{ d: rosette(0, TOP - 4, 26, 6), fill: 'hot', depth: 0.4 },
|
|
37
|
+
{ d: ellipse(0, TOP - 4, 9), fill: 'gold' },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
glow('pot', [96, -300], 22, [twinkle(40), twinkle(140, true)]),
|
|
41
|
+
],
|
|
42
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a desk calculator modelled in 3d (see iso.ts); keys press in turn as a sum is typed.
|
|
2
|
+
import { erase, press, twinkle } from '../motions.js';
|
|
3
|
+
import { block, faceOf, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
const W = 220;
|
|
6
|
+
const D = 300;
|
|
7
|
+
const BODY = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, 26]);
|
|
8
|
+
const top = faceOf(BODY, 'top');
|
|
9
|
+
const SCREEN = block([-W / 2 + 22, D / 2 - 92, 26], [W - 44, 0, 0], [0, 64, 0], [0, 0, 6]);
|
|
10
|
+
const screen = faceOf(SCREEN, 'top');
|
|
11
|
+
const key = (c, r, fill = 'white', h = 1) => solid(block([-W / 2 + 22 + c * 46, -D / 2 + 20 + r * 44, 26], [36, 0, 0], [0, 34 + (h - 1) * 44, 0], [0, 0, 12]), { fill: 'grey', top: fill }, 3);
|
|
12
|
+
// the keys that press, in typing order: 7, +, 5, =
|
|
13
|
+
const PRESSED = [
|
|
14
|
+
[0, 3, 'white'],
|
|
15
|
+
[3, 3, 'gold'],
|
|
16
|
+
[1, 2, 'white'],
|
|
17
|
+
[3, 0, 'main'],
|
|
18
|
+
];
|
|
19
|
+
const pressed = (c, r) => PRESSED.some(([pc, pr]) => pc === c && pr === r);
|
|
20
|
+
const KEYS = [3, 2, 1, 0].flatMap((r) => [0, 1, 2, 3].filter((c) => !pressed(c, r)).flatMap((c) => key(c, r, c === 3 ? 'gold' : 'white')));
|
|
21
|
+
export const calculator = {
|
|
22
|
+
name: 'calculator',
|
|
23
|
+
frames: 180,
|
|
24
|
+
still: 150,
|
|
25
|
+
line: LINE,
|
|
26
|
+
extrude: [0, 0],
|
|
27
|
+
layers: [
|
|
28
|
+
{ id: 'calc', p: [250, 280], shapes: [] },
|
|
29
|
+
{
|
|
30
|
+
parent: 'calc',
|
|
31
|
+
shapes: [
|
|
32
|
+
...solid(BODY, { fill: 'deep', top: 'main' }, 6),
|
|
33
|
+
...solid(SCREEN, { fill: 'grey', top: 'tint' }, 3),
|
|
34
|
+
{ d: stroke(screen, [0.55, 0.5], [0.9, 0.5]), trim: erase(20, 110) },
|
|
35
|
+
{ d: quad(top, 0.7, 0.9, 0.2, 0.05, 2), fill: 'ink' },
|
|
36
|
+
...KEYS,
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
...PRESSED.map(([c, r, fill], i) => ({
|
|
40
|
+
parent: 'calc',
|
|
41
|
+
m: { ...press, at: 10 + i * 20, k: 0.3 },
|
|
42
|
+
shapes: key(c, r, fill),
|
|
43
|
+
})),
|
|
44
|
+
glow('calc', [150, -160], 22, [twinkle(80), twinkle(140, true)]),
|
|
45
|
+
],
|
|
46
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a month planner on the leaned face; last month's page lifts away and a day is marked.
|
|
2
|
+
import { SNAP, twinkle } from '../motions.js';
|
|
3
|
+
import { line, pill, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const X0 = -126;
|
|
6
|
+
const Y0 = -46;
|
|
7
|
+
const CW = 36;
|
|
8
|
+
const RH = 34;
|
|
9
|
+
const page = (head) => [
|
|
10
|
+
{ d: rect(-140, -140, 280, 290, 22), fill: 'white', depth: 0.4 },
|
|
11
|
+
{ d: rect(-140, -140, 280, 72, 22), fill: head },
|
|
12
|
+
...[1, 2, 3, 4].map((r) => ({ d: line([X0, Y0 + r * RH], [X0 + 7 * CW, Y0 + r * RH]) })),
|
|
13
|
+
...[1, 2, 3, 4, 5, 6].map((c) => ({
|
|
14
|
+
d: line([X0 + c * CW, Y0 + 8], [X0 + c * CW, Y0 + 5 * RH - 8]),
|
|
15
|
+
})),
|
|
16
|
+
];
|
|
17
|
+
const MARK = [X0 + 4.5 * CW, Y0 + 2.5 * RH];
|
|
18
|
+
export const calendarMonth = {
|
|
19
|
+
name: 'calendar-month',
|
|
20
|
+
frames: 180,
|
|
21
|
+
still: 100,
|
|
22
|
+
line: LINE,
|
|
23
|
+
extrude: EXT,
|
|
24
|
+
layers: [
|
|
25
|
+
{ id: 'cal', p: [250, 280], shapes: [] },
|
|
26
|
+
{
|
|
27
|
+
id: 'face',
|
|
28
|
+
parent: 'cal',
|
|
29
|
+
tilt: FACE,
|
|
30
|
+
shapes: [{ d: rect(-140, -126, 280, 290, 22), fill: 'tint', depth: 0.6 }, ...page('main')],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
parent: 'face',
|
|
34
|
+
a: MARK,
|
|
35
|
+
p: MARK,
|
|
36
|
+
m: [twinkle(46), twinkle(126, true)],
|
|
37
|
+
shapes: [
|
|
38
|
+
{ d: rect(MARK[0] - 16, MARK[1] - 15, 32, 30, 8), fill: 'hot', depth: 0.3 },
|
|
39
|
+
{ d: line([MARK[0] - 8, MARK[1]], [MARK[0] - 2, MARK[1] + 7], [MARK[0] + 9, MARK[1] - 7]) },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
parent: 'face',
|
|
44
|
+
a: [0, -140],
|
|
45
|
+
p: [0, -140],
|
|
46
|
+
m: {
|
|
47
|
+
s: [
|
|
48
|
+
[12, [100, 100], SNAP],
|
|
49
|
+
[36, [100, 0], 0],
|
|
50
|
+
[140, [100, 0], SNAP],
|
|
51
|
+
[164, [100, 100]],
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
shapes: page('deep'),
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
parent: 'face',
|
|
58
|
+
shapes: [-80, 80].map((x) => ({
|
|
59
|
+
d: pill(x - 10, -160, 20, 46),
|
|
60
|
+
fill: 'deep',
|
|
61
|
+
depth: 0.6,
|
|
62
|
+
})),
|
|
63
|
+
},
|
|
64
|
+
glow('cal', [170, -170], 24, [twinkle(50), twinkle(140, true)]),
|
|
65
|
+
],
|
|
66
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a campfire in 2.5d, logs and stones in 3d (see plant-kit.ts); the flame flickers.
|
|
2
|
+
import { flicker, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, spark } from '../sticker.js';
|
|
4
|
+
import { ISO } from '../iso.js';
|
|
5
|
+
import { rod, tile } from './plant-kit.js';
|
|
6
|
+
import { glow, LINE } from './shared.js';
|
|
7
|
+
const n = (v) => v.toFixed(1);
|
|
8
|
+
// one command list for every flame shape, so they morph: w wide, h tall, t leaning the tip
|
|
9
|
+
const fire = (w, h, t) => `M0 0C${n(-w)} 0 ${n(-w * 1.2)} ${n(-h * 0.45)} ${n(-w * 0.3 + t)} ${n(-h * 0.7)}` +
|
|
10
|
+
`C${n(-w * 0.1 + t)} ${n(-h * 0.8)} ${n(t)} ${n(-h * 0.9)} ${n(t * 1.3)} ${n(-h)}` +
|
|
11
|
+
`C${n(w * 0.6 + t)} ${n(-h * 0.75)} ${n(w * 1.2)} ${n(-h * 0.5)} ${n(w)} ${n(-h * 0.2)}` +
|
|
12
|
+
`C${n(w * 0.9)} ${n(-h * 0.05)} ${n(w * 0.5)} 0 0 0Z`;
|
|
13
|
+
const stone = (a) => {
|
|
14
|
+
const r = (a * Math.PI) / 180;
|
|
15
|
+
const c = [Math.cos(r) * 104, Math.sin(r) * 104, 0];
|
|
16
|
+
return { y: ISO(c)[1], shapes: rod(c, [c[0], c[1], 18], 20, 16, 'grey', 'white') };
|
|
17
|
+
};
|
|
18
|
+
const STONES = Array.from({ length: 10 }, (_, i) => stone(i * 36 + 10));
|
|
19
|
+
const BACK = STONES.filter((s) => s.y < 0).flatMap((s) => s.shapes);
|
|
20
|
+
const FRONT = STONES.filter((s) => s.y >= 0).flatMap((s) => s.shapes);
|
|
21
|
+
const LOGS = [
|
|
22
|
+
...rod([-74, -40, 14], [74, 40, 14], 14, 14, 'gold', 'tint'),
|
|
23
|
+
...rod([-74, 40, 14], [74, -40, 14], 14, 14, 'gold', 'tint'),
|
|
24
|
+
];
|
|
25
|
+
const BASE = ISO([0, 0, 26]);
|
|
26
|
+
const ember = (x, start) => ({
|
|
27
|
+
parent: 'fire',
|
|
28
|
+
a: [BASE[0] + x, BASE[1] - 120],
|
|
29
|
+
p: [BASE[0] + x, BASE[1] - 120],
|
|
30
|
+
m: [slide([x * 0.5, -70], start, 0, 50), twinkle(start), twinkle(start + 24, true)],
|
|
31
|
+
shapes: [{ d: spark(BASE[0] + x, BASE[1] - 120, 9), fill: 'gold' }],
|
|
32
|
+
});
|
|
33
|
+
export const campfire = {
|
|
34
|
+
name: 'campfire',
|
|
35
|
+
frames: 180,
|
|
36
|
+
line: LINE,
|
|
37
|
+
extrude: [0, 0],
|
|
38
|
+
layers: [
|
|
39
|
+
{ id: 'fire', p: [250, 330], shapes: [] },
|
|
40
|
+
{
|
|
41
|
+
parent: 'fire',
|
|
42
|
+
shapes: [
|
|
43
|
+
...tile(130, 'ok', 'gold'),
|
|
44
|
+
{ d: ellipse(0, 0, 100, 54), fill: 'deep', line: false },
|
|
45
|
+
...BACK,
|
|
46
|
+
...LOGS,
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
parent: 'fire',
|
|
51
|
+
p: BASE,
|
|
52
|
+
shapes: [
|
|
53
|
+
{ d: flicker([fire(50, 150, 0), fire(46, 164, 12), fire(52, 142, -10)], 60), fill: 'hot' },
|
|
54
|
+
{ d: flicker([fire(26, 80, 0), fire(24, 90, 6), fire(28, 74, -6)], 60), fill: 'gold' },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{ parent: 'fire', shapes: FRONT },
|
|
58
|
+
ember(-30, 20),
|
|
59
|
+
ember(24, 70),
|
|
60
|
+
ember(-6, 120),
|
|
61
|
+
glow('fire', [150, -190], 22, [twinkle(40), twinkle(140, true)]),
|
|
62
|
+
],
|
|
63
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { sway, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, solid } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A bullet security camera looking out from a wall plate on an arm; it pans slowly, a red light shows it records
|
|
6
|
+
const PLATE = block([-81, 202, 54], [162, 0, 0], [0, 19, 0], [0, 0, 202]);
|
|
7
|
+
const ARM = block([-16, 122, 130], [32, 0, 0], [0, 81, 0], [0, 0, 32]);
|
|
8
|
+
const BODY = block([-62, -148, 148], [124, 0, 0], [0, 270, 0], [0, 0, 100]);
|
|
9
|
+
const HOOD = block([-73, -176, 246], [146, 0, 0], [0, 310, 0], [0, 0, 16]);
|
|
10
|
+
const LENS = block([-51, -165, 159], [103, 0, 0], [0, 16, 0], [0, 0, 78]);
|
|
11
|
+
const lens = faceOf(LENS, 'front');
|
|
12
|
+
const side = faceOf(BODY, 'right');
|
|
13
|
+
export const cctv = {
|
|
14
|
+
name: 'cctv',
|
|
15
|
+
frames: 180,
|
|
16
|
+
line: LINE,
|
|
17
|
+
extrude: [0, 0],
|
|
18
|
+
layers: [
|
|
19
|
+
{ id: 'wall', p: [230, 390], shapes: solid(PLATE, { fill: 'grey', front: 'white' }, 3) },
|
|
20
|
+
{ parent: 'wall', shapes: solid(ARM, { fill: 'grey', top: 'white' }, 2) },
|
|
21
|
+
{
|
|
22
|
+
id: 'cam',
|
|
23
|
+
parent: 'wall',
|
|
24
|
+
a: [26, -200],
|
|
25
|
+
p: [26, -200],
|
|
26
|
+
m: { ...sway, k: 0.9 },
|
|
27
|
+
shapes: [
|
|
28
|
+
...solid(BODY, { fill: 'grey', top: 'white', front: 'white' }, 6),
|
|
29
|
+
...solid(LENS, { fill: 'ink' }, 3),
|
|
30
|
+
{ d: dot(lens, 0.5, 0.5, 0.36, 0.34), fill: 'deep' },
|
|
31
|
+
{ d: dot(lens, 0.4, 0.62, 0.12), fill: 'white' },
|
|
32
|
+
{ d: dot(side, 0.82, 0.62, 0.04, 0.09), fill: 'hot' },
|
|
33
|
+
...solid(HOOD, { fill: 'grey', top: 'white' }, 4),
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
glow('cam', [-110, -280], 20, [twinkle(50), twinkle(140, true)]),
|
|
37
|
+
],
|
|
38
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a certificate of completion, ruled border, a signature, and a medal that hops on.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { line, poly, rect, rosette, star } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const tail = (x, lean) => poly([
|
|
6
|
+
[x - 13, 100],
|
|
7
|
+
[x + 13, 100],
|
|
8
|
+
[x + 13 + lean, 164],
|
|
9
|
+
[x + lean, 150],
|
|
10
|
+
[x - 13 + lean, 164],
|
|
11
|
+
], 2);
|
|
12
|
+
export const certificate = {
|
|
13
|
+
name: 'certificate',
|
|
14
|
+
frames: 160,
|
|
15
|
+
line: LINE,
|
|
16
|
+
extrude: EXT,
|
|
17
|
+
layers: [
|
|
18
|
+
{ id: 'root', a: [0, 150], p: [244, 380], m: { ...hop, k: 0.6 }, shapes: [] },
|
|
19
|
+
{
|
|
20
|
+
id: 'paper',
|
|
21
|
+
parent: 'root',
|
|
22
|
+
tilt: FACE,
|
|
23
|
+
shapes: [
|
|
24
|
+
{ d: rect(-124, -164, 248, 328, 10), fill: 'white', depth: 0.5 },
|
|
25
|
+
{ d: rect(-108, -148, 216, 296, 6), fill: 'main' },
|
|
26
|
+
{ d: rect(-96, -136, 192, 272, 4), fill: 'white' },
|
|
27
|
+
{ d: line([-56, -100], [56, -100]), line: 10 },
|
|
28
|
+
{ d: line([-70, -60], [70, -60]) },
|
|
29
|
+
{ d: line([-70, -34], [70, -34]) },
|
|
30
|
+
{ d: line([-50, -8], [50, -8]) },
|
|
31
|
+
{ d: 'M-74 74q10 -18 20 0t20 0t20 -6', round: true },
|
|
32
|
+
{ d: line([-80, 92], [-6, 92]) },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
parent: 'paper',
|
|
37
|
+
a: [56, 92],
|
|
38
|
+
p: [56, 92],
|
|
39
|
+
m: { ...hop, at: 6, k: 1.3 },
|
|
40
|
+
shapes: [
|
|
41
|
+
{ d: tail(42, -10), fill: 'hot', depth: 0.3 },
|
|
42
|
+
{ d: tail(70, 10), fill: 'hot', depth: 0.3 },
|
|
43
|
+
{ d: rosette(56, 92, 46, 12), fill: 'gold', depth: 0.6 },
|
|
44
|
+
{ d: star(56, 94, 22, 0.48, 5, 3), fill: 'white' },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
glow('root', [-170, -170], 24, [twinkle(40), twinkle(130, true)]),
|
|
48
|
+
glow('root', [160, -120], 16, [twinkle(56), twinkle(140, true)]),
|
|
49
|
+
],
|
|
50
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: cha yen, Thai iced tea in a tall cup, milk on top, a domed lid and a straw.
|
|
2
|
+
import { flick, jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { poly, rect, VIEWS } from '../sticker.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
const { tilt: UP, extrude: BACK } = VIEWS.front;
|
|
6
|
+
const ice = (x, y) => ({ d: rect(x, y, 34, 34, 8), fill: 'white', line: 4 });
|
|
7
|
+
export const chaYen = {
|
|
8
|
+
name: 'cha-yen',
|
|
9
|
+
frames: 160,
|
|
10
|
+
line: LINE,
|
|
11
|
+
extrude: BACK,
|
|
12
|
+
layers: [
|
|
13
|
+
{ id: 'root', a: [0, 150], p: [250, 380], m: jolt([-4, 8]), shapes: [] },
|
|
14
|
+
{
|
|
15
|
+
parent: 'cup',
|
|
16
|
+
a: [20, -150],
|
|
17
|
+
p: [20, -150],
|
|
18
|
+
m: { ...flick, k: 1.4 },
|
|
19
|
+
shapes: [
|
|
20
|
+
{
|
|
21
|
+
d: poly([
|
|
22
|
+
[10, -100],
|
|
23
|
+
[28, -100],
|
|
24
|
+
[28, -190],
|
|
25
|
+
[70, -236],
|
|
26
|
+
[82, -224],
|
|
27
|
+
[44, -184],
|
|
28
|
+
[44, -100],
|
|
29
|
+
], 3),
|
|
30
|
+
fill: 'hot',
|
|
31
|
+
depth: 0.4,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'cup',
|
|
37
|
+
parent: 'root',
|
|
38
|
+
tilt: UP,
|
|
39
|
+
shapes: [
|
|
40
|
+
{
|
|
41
|
+
d: poly([
|
|
42
|
+
[-82, -100],
|
|
43
|
+
[82, -100],
|
|
44
|
+
[62, 150],
|
|
45
|
+
[-62, 150],
|
|
46
|
+
], [4, 4, 14, 14]),
|
|
47
|
+
fill: 'gold',
|
|
48
|
+
depth: 1,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
d: poly([
|
|
52
|
+
[-82, -100],
|
|
53
|
+
[82, -100],
|
|
54
|
+
[78, -50],
|
|
55
|
+
[-78, -50],
|
|
56
|
+
], 2),
|
|
57
|
+
fill: 'white',
|
|
58
|
+
},
|
|
59
|
+
ice(-50, -30),
|
|
60
|
+
ice(10, 0),
|
|
61
|
+
ice(-30, 50),
|
|
62
|
+
{ d: 'M-92 -100A92 70 0 0 1 92 -100Z', fill: 'white', depth: 0.5 },
|
|
63
|
+
{ d: rect(-96, -112, 192, 18, 9), fill: 'white', depth: 0.5 },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
glow('root', [-150, -170], 22, [twinkle(40), twinkle(130, true)]),
|
|
67
|
+
],
|
|
68
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a Thai bell-shaped chedi in 2.5d (see iso.ts, nature-iso.ts); the gold spire glints.
|
|
2
|
+
import { glint, hop, twinkle } from '../motions.js';
|
|
3
|
+
import { spark } from '../sticker.js';
|
|
4
|
+
import { block, ISO, solid } from '../iso.js';
|
|
5
|
+
import { band, lathe } from './nature-iso.js';
|
|
6
|
+
import { glow, LINE } from './shared.js';
|
|
7
|
+
// three square steps, a whitewashed bell, a small square throne, and a ringed gold spire
|
|
8
|
+
const STEPS = [
|
|
9
|
+
[200, 0, 30],
|
|
10
|
+
[160, 30, 26],
|
|
11
|
+
[124, 56, 22],
|
|
12
|
+
];
|
|
13
|
+
const BASE = 78;
|
|
14
|
+
const BELL = [
|
|
15
|
+
[56, 0],
|
|
16
|
+
[62, 14],
|
|
17
|
+
[60, 42],
|
|
18
|
+
[50, 70],
|
|
19
|
+
[32, 92],
|
|
20
|
+
[16, 100],
|
|
21
|
+
];
|
|
22
|
+
const THRONE = BASE + 100;
|
|
23
|
+
const SPIRE_AT = THRONE + 16;
|
|
24
|
+
const SPIRE = [
|
|
25
|
+
[14, 0],
|
|
26
|
+
[0, 112],
|
|
27
|
+
];
|
|
28
|
+
const TIP = ISO([0, 0, SPIRE_AT + 92]);
|
|
29
|
+
export const chedi = {
|
|
30
|
+
name: 'chedi',
|
|
31
|
+
frames: 180,
|
|
32
|
+
line: LINE,
|
|
33
|
+
extrude: [0, 0],
|
|
34
|
+
layers: [
|
|
35
|
+
{ id: 'chedi', p: [250, 372], m: { ...hop, k: 0.35 }, shapes: [] },
|
|
36
|
+
{
|
|
37
|
+
parent: 'chedi',
|
|
38
|
+
shapes: [
|
|
39
|
+
...STEPS.flatMap(([s, z, h]) => solid(block([-s / 2, -s / 2, z], [s, 0, 0], [0, s, 0], [0, 0, h]), { fill: 'grey', top: 'white' }, 3)),
|
|
40
|
+
{ d: lathe([0, 0, BASE], BELL), fill: 'white' },
|
|
41
|
+
...[12, 26].map((z) => ({ d: band([0, 0, BASE], 62 - z / 8, z) })),
|
|
42
|
+
...solid(block([-20, -20, THRONE], [40, 0, 0], [0, 40, 0], [0, 0, 16]), { fill: 'grey', top: 'white' }, 2),
|
|
43
|
+
{ d: lathe([0, 0, SPIRE_AT], SPIRE), fill: 'gold' },
|
|
44
|
+
...[14, 30, 46, 62].map((z) => ({ d: band([0, 0, SPIRE_AT], 14 - z / 8, z) })),
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
parent: 'chedi',
|
|
49
|
+
a: TIP,
|
|
50
|
+
p: TIP,
|
|
51
|
+
m: glint(30, 100),
|
|
52
|
+
shapes: [{ d: spark(TIP[0], TIP[1], 26), fill: 'white' }],
|
|
53
|
+
},
|
|
54
|
+
glow('chedi', [-150, -200], 20, [twinkle(60), twinkle(140, true)]),
|
|
55
|
+
],
|
|
56
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers after the network diagrams of Protocol Explorer (redrawn as a slab).
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, pill, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
// An older phone: wide bezels, an earpiece slot above the screen, a round home button below, a grid of apps
|
|
6
|
+
const apps = [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => ({
|
|
7
|
+
d: rect(-50 + c * 36, -78 + r * 40, 26, 26, 7),
|
|
8
|
+
fill: r === 1 && c === 1 ? 'gold' : 'main',
|
|
9
|
+
depth: 0.2,
|
|
10
|
+
})));
|
|
11
|
+
export const classicPhone = {
|
|
12
|
+
name: 'classic-phone',
|
|
13
|
+
frames: 180,
|
|
14
|
+
line: LINE,
|
|
15
|
+
extrude: EXT,
|
|
16
|
+
layers: [
|
|
17
|
+
{ id: 'ph', p: [250, 260], m: hop, shapes: [] },
|
|
18
|
+
{
|
|
19
|
+
parent: 'ph',
|
|
20
|
+
tilt: FACE,
|
|
21
|
+
shapes: [
|
|
22
|
+
{ d: rect(-90, -170, 180, 340, 34), fill: 'white', depth: 0.9 },
|
|
23
|
+
{ d: rect(-72, -120, 144, 216, 6), fill: 'tint' },
|
|
24
|
+
{ d: pill(-22, -146, 44, 9), fill: 'ink', line: false },
|
|
25
|
+
...apps,
|
|
26
|
+
{ d: ellipse(0, 134, 22), fill: 'white', depth: 0.3 },
|
|
27
|
+
{ d: rect(-8, 126, 16, 16, 4) },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
glow('ph', [120, -170], 24, [twinkle(44), twinkle(140, true)]),
|
|
31
|
+
],
|
|
32
|
+
};
|