@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.
- 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/cron.d.ts +2 -0
- package/dist/icons/cron.js +86 -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 +187 -0
- package/dist/icons/index.js +370 -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/kanban.d.ts +2 -0
- package/dist/icons/kanban.js +85 -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 +199 -0
- package/dist/load.js +199 -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,85 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers (kammacron's board): three columns of cards on the leaned face; one card is
|
|
2
|
+
// lifted out of To do, carried to Doing and set down there.
|
|
3
|
+
import { SNAP, twinkle } from '../motions.js';
|
|
4
|
+
import { line, pill, rect } from '../sticker.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
const COL = 92;
|
|
7
|
+
const X0 = -146;
|
|
8
|
+
const TOP = -70;
|
|
9
|
+
const CARD_H = 52;
|
|
10
|
+
const GAP = 14;
|
|
11
|
+
const colX = (c) => X0 + c * (COL + 8);
|
|
12
|
+
// a card: a white slab with a line of text on it
|
|
13
|
+
const card = (c, row, fill = 'white') => {
|
|
14
|
+
const x = colX(c) + 8;
|
|
15
|
+
const y = TOP + row * (CARD_H + GAP);
|
|
16
|
+
return [
|
|
17
|
+
{ d: rect(x, y, COL - 16, CARD_H, 10), fill, depth: 0.3 },
|
|
18
|
+
{ d: line([x + 12, y + 20], [x + COL - 30, y + 20]) },
|
|
19
|
+
{ d: line([x + 12, y + 34], [x + 38, y + 34]) },
|
|
20
|
+
];
|
|
21
|
+
};
|
|
22
|
+
const FROM = [colX(0) + COL / 2, TOP + CARD_H + GAP + CARD_H / 2];
|
|
23
|
+
const MOVE = [COL + 8, -(CARD_H + GAP)];
|
|
24
|
+
export const kanban = {
|
|
25
|
+
name: 'kanban',
|
|
26
|
+
frames: 180,
|
|
27
|
+
still: 110,
|
|
28
|
+
line: LINE,
|
|
29
|
+
extrude: EXT,
|
|
30
|
+
layers: [
|
|
31
|
+
{ id: 'kanban', p: [250, 290], shapes: [] },
|
|
32
|
+
{
|
|
33
|
+
id: 'face',
|
|
34
|
+
parent: 'kanban',
|
|
35
|
+
tilt: FACE,
|
|
36
|
+
shapes: [
|
|
37
|
+
{ d: rect(-160, -116, 316, 220, 22), fill: 'tint', depth: 0.6 },
|
|
38
|
+
{ d: rect(-160, -130, 316, 220, 22), fill: 'white', depth: 0.4 },
|
|
39
|
+
...[0, 1, 2].map((c) => ({
|
|
40
|
+
d: pill(colX(c) + 8, -116, COL - 16, 26),
|
|
41
|
+
fill: c === 2 ? 'ok' : 'main',
|
|
42
|
+
depth: 0.3,
|
|
43
|
+
})),
|
|
44
|
+
...[1, 2].map((c) => ({ d: line([colX(c) - 4, -110], [colX(c) - 4, 76]) })),
|
|
45
|
+
...card(0, 0),
|
|
46
|
+
...card(2, 0),
|
|
47
|
+
...card(2, 1),
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'card',
|
|
52
|
+
parent: 'face',
|
|
53
|
+
a: FROM,
|
|
54
|
+
p: FROM,
|
|
55
|
+
m: [
|
|
56
|
+
{
|
|
57
|
+
p: [
|
|
58
|
+
[20, [0, 0], SNAP],
|
|
59
|
+
[64, MOVE, 0],
|
|
60
|
+
[140, MOVE, SNAP],
|
|
61
|
+
[170, [0, 0]],
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
s: [
|
|
66
|
+
[14, [100, 100], SNAP],
|
|
67
|
+
[26, [112, 112], 0],
|
|
68
|
+
[58, [112, 112], SNAP],
|
|
69
|
+
[70, [100, 100], 0],
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
x: [
|
|
74
|
+
[14, 0, SNAP],
|
|
75
|
+
[26, 10, 0],
|
|
76
|
+
[58, 10, SNAP],
|
|
77
|
+
[70, 0],
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
shapes: card(0, 1, 'gold'),
|
|
82
|
+
},
|
|
83
|
+
glow('kanban', [70, -170], 22, [twinkle(66), twinkle(140, true)]),
|
|
84
|
+
],
|
|
85
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: khao kaprao, stir-fried holy basil with minced pork on rice, a fried egg on top.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, poly, ring } from '../sticker.js';
|
|
4
|
+
import { DOWN, plate, steam, TABLE } from './food.js';
|
|
5
|
+
import { glow, LINE } from './shared.js';
|
|
6
|
+
const leaf = (x, y) => ({
|
|
7
|
+
d: ellipse(x, y, 22, 12),
|
|
8
|
+
fill: 'ok',
|
|
9
|
+
depth: 0.2,
|
|
10
|
+
});
|
|
11
|
+
const chilli = (x, y) => ({ d: ring(x, y, 11, 5), fill: 'hot', depth: 0.2 });
|
|
12
|
+
const EGG = poly([
|
|
13
|
+
[-130, -70],
|
|
14
|
+
[-80, -96],
|
|
15
|
+
[-30, -84],
|
|
16
|
+
[-12, -40],
|
|
17
|
+
[-30, 4],
|
|
18
|
+
[-84, 12],
|
|
19
|
+
[-128, -16],
|
|
20
|
+
], 30);
|
|
21
|
+
export const kaprao = {
|
|
22
|
+
name: 'kaprao',
|
|
23
|
+
frames: 160,
|
|
24
|
+
line: LINE,
|
|
25
|
+
extrude: DOWN,
|
|
26
|
+
layers: [
|
|
27
|
+
{ id: 'root', p: [250, 300], shapes: [] },
|
|
28
|
+
{
|
|
29
|
+
id: 'dish',
|
|
30
|
+
parent: 'root',
|
|
31
|
+
tilt: TABLE,
|
|
32
|
+
shapes: [
|
|
33
|
+
...plate(180),
|
|
34
|
+
{ d: ellipse(-60, -30, 96, 80), fill: 'paper', depth: 1.6 },
|
|
35
|
+
{
|
|
36
|
+
d: poly([
|
|
37
|
+
[10, -10],
|
|
38
|
+
[70, -60],
|
|
39
|
+
[130, -30],
|
|
40
|
+
[140, 40],
|
|
41
|
+
[90, 100],
|
|
42
|
+
[10, 90],
|
|
43
|
+
[-20, 40],
|
|
44
|
+
], 24),
|
|
45
|
+
fill: 'deep',
|
|
46
|
+
depth: 0.8,
|
|
47
|
+
},
|
|
48
|
+
leaf(40, 0),
|
|
49
|
+
leaf(100, 20),
|
|
50
|
+
leaf(70, 70),
|
|
51
|
+
leaf(110, -20),
|
|
52
|
+
chilli(60, 40),
|
|
53
|
+
chilli(20, 60),
|
|
54
|
+
chilli(120, 60),
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
parent: 'dish',
|
|
59
|
+
a: [-70, -40],
|
|
60
|
+
p: [-70, -40],
|
|
61
|
+
m: { ...hop, k: 0.7 },
|
|
62
|
+
shapes: [
|
|
63
|
+
{ d: EGG, fill: 'white', depth: 0.4 },
|
|
64
|
+
{ d: ellipse(-70, -40, 26), fill: 'gold', depth: 0.6 },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
steam('root', [-40, 10, 60], -90),
|
|
68
|
+
glow('root', [170, -60], 20, [twinkle(40), twinkle(130, true)]),
|
|
69
|
+
],
|
|
70
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers (konmek asked for one): an SSH key pair, two keys cut alike on one ring, the
|
|
2
|
+
// private one in gold, the public one in white. The front key twists, the back one follows a beat later.
|
|
3
|
+
import { sparkle, sway, twist } from '../motions.js';
|
|
4
|
+
import { poly, rect, ring } from '../sticker.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
// a key with its bow centred on the origin, the blade running right along +x
|
|
7
|
+
const BLADE = poly([
|
|
8
|
+
[30, -16],
|
|
9
|
+
[196, -16],
|
|
10
|
+
[196, 34],
|
|
11
|
+
[178, 34],
|
|
12
|
+
[178, 16],
|
|
13
|
+
[170, 16],
|
|
14
|
+
[170, 46],
|
|
15
|
+
[146, 46],
|
|
16
|
+
[146, 16],
|
|
17
|
+
[30, 16],
|
|
18
|
+
], 4);
|
|
19
|
+
const keyShapes = (fill) => [
|
|
20
|
+
{ d: BLADE, fill, depth: 1 },
|
|
21
|
+
{ d: ring(0, 0, 62, 24), fill, depth: 1 },
|
|
22
|
+
{ d: rect(40, -24, 18, 48, 5), fill: 'deep', depth: 1 },
|
|
23
|
+
];
|
|
24
|
+
// where each bow sits on the leaned face; each key turns about its bow
|
|
25
|
+
const BACK = [-70, -66];
|
|
26
|
+
const FRONT = [-92, 4];
|
|
27
|
+
export const keyPair = {
|
|
28
|
+
name: 'key-pair',
|
|
29
|
+
frames: 180,
|
|
30
|
+
line: LINE,
|
|
31
|
+
extrude: EXT,
|
|
32
|
+
layers: [
|
|
33
|
+
{ id: 'root', a: [0, 0], p: [276, 282], m: { ...sway, k: 0.4 }, shapes: [] },
|
|
34
|
+
{ id: 'face', parent: 'root', tilt: FACE, shapes: [] },
|
|
35
|
+
// the split ring both bows hang on
|
|
36
|
+
{ parent: 'face', shapes: [{ d: ring(-112, -50, 76, 62), fill: 'grey', depth: 0.4 }] },
|
|
37
|
+
{
|
|
38
|
+
parent: 'face',
|
|
39
|
+
p: BACK,
|
|
40
|
+
r: -24,
|
|
41
|
+
m: { ...twist, at: 6, k: 0.7 },
|
|
42
|
+
shapes: keyShapes('white'),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
parent: 'face',
|
|
46
|
+
p: FRONT,
|
|
47
|
+
r: 10,
|
|
48
|
+
m: twist,
|
|
49
|
+
shapes: keyShapes('gold'),
|
|
50
|
+
},
|
|
51
|
+
glow('root', [-160, -140], 24, sparkle(24)),
|
|
52
|
+
glow('root', [144, -162], 16, sparkle(96)),
|
|
53
|
+
],
|
|
54
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// From identity-service's sticker set, drawn on the fun-isometric kit by Kelvin Adithya (MIT, see LICENSE).
|
|
2
|
+
import { sparkle, twist } from '../motions.js';
|
|
3
|
+
import { poly, rect, ring } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const BLADE = poly([
|
|
6
|
+
[-20, -20],
|
|
7
|
+
[176, -20],
|
|
8
|
+
[176, 46],
|
|
9
|
+
[154, 46],
|
|
10
|
+
[154, 20],
|
|
11
|
+
[148, 20],
|
|
12
|
+
[148, 62],
|
|
13
|
+
[118, 62],
|
|
14
|
+
[118, 20],
|
|
15
|
+
[-20, 20],
|
|
16
|
+
], 5);
|
|
17
|
+
/** A key turning in an unseen lock: one account that opens every app. */
|
|
18
|
+
export const key = {
|
|
19
|
+
name: 'key',
|
|
20
|
+
frames: 180,
|
|
21
|
+
line: LINE,
|
|
22
|
+
extrude: EXT,
|
|
23
|
+
layers: [
|
|
24
|
+
{ id: 'key', p: [258, 262], m: twist, shapes: [] },
|
|
25
|
+
{
|
|
26
|
+
parent: 'key',
|
|
27
|
+
tilt: FACE,
|
|
28
|
+
shapes: [
|
|
29
|
+
{ d: BLADE, fill: 'gold', depth: 1 },
|
|
30
|
+
{ d: ring(-90, 0, 86, 36), fill: 'gold', depth: 1 },
|
|
31
|
+
{ d: rect(-24, -32, 22, 64, 6), fill: 'deep', depth: 1 },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
glow('key', [-110, -96], 24, sparkle(20)),
|
|
35
|
+
glow('key', [150, -64], 16, sparkle(96)),
|
|
36
|
+
],
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a keyboard modelled in 3d (see iso.ts); keys press one after another as text is typed.
|
|
2
|
+
import { press, twinkle } from '../motions.js';
|
|
3
|
+
import { block, solid } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
const BODY = block([-180, -80, 0], [360, 0, 0], [0, 160, 0], [0, 0, 24]);
|
|
6
|
+
const key = (c, r, w = 26) => solid(block([-164 + c * 33 + (r % 2) * 8, -64 + r * 32, 24], [w, 0, 0], [0, 24, 0], [0, 0, 12]), {
|
|
7
|
+
fill: 'grey',
|
|
8
|
+
top: 'white',
|
|
9
|
+
}, 2);
|
|
10
|
+
const PRESSED = [
|
|
11
|
+
[3, 2],
|
|
12
|
+
[6, 1],
|
|
13
|
+
[8, 3],
|
|
14
|
+
];
|
|
15
|
+
const isPressed = (c, r) => PRESSED.some(([pc, pr]) => pc === c && pr === r);
|
|
16
|
+
const KEYS = [3, 2, 1].flatMap((r) => Array.from({ length: 10 }, (_, c) => c)
|
|
17
|
+
.filter((c) => !isPressed(c, r))
|
|
18
|
+
.flatMap((c) => key(c, r)));
|
|
19
|
+
export const keyboard = {
|
|
20
|
+
name: 'keyboard',
|
|
21
|
+
frames: 160,
|
|
22
|
+
line: LINE,
|
|
23
|
+
extrude: [0, 0],
|
|
24
|
+
layers: [
|
|
25
|
+
{ id: 'kb', p: [250, 290], shapes: [] },
|
|
26
|
+
{ parent: 'kb', shapes: [...solid(BODY, { fill: 'deep', top: 'main' }, 4), ...KEYS] },
|
|
27
|
+
...PRESSED.map(([c, r], i) => ({
|
|
28
|
+
parent: 'kb',
|
|
29
|
+
m: { ...press, at: 10 + i * 18, k: 0.35 },
|
|
30
|
+
shapes: key(c, r),
|
|
31
|
+
})),
|
|
32
|
+
{ parent: 'kb', m: { ...press, at: 70, k: 0.35 }, shapes: key(2, 0, 170) },
|
|
33
|
+
glow('kb', [170, -120], 22, [twinkle(40), twinkle(140, true)]),
|
|
34
|
+
],
|
|
35
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a diamond kite as a slab on the leaned face, its tail of bows lagging as it drifts.
|
|
2
|
+
import { drift, sway, twinkle } from '../motions.js';
|
|
3
|
+
import { line, onFace, poly } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const TOP = [0, -150];
|
|
6
|
+
const RIGHT = [104, -24];
|
|
7
|
+
const FOOT = [0, 150];
|
|
8
|
+
const LEFT = [-104, -24];
|
|
9
|
+
const MID = [0, -24];
|
|
10
|
+
const bow = (x, y) => ({
|
|
11
|
+
d: poly([
|
|
12
|
+
[x - 24, y - 16],
|
|
13
|
+
[x + 24, y + 16],
|
|
14
|
+
[x + 24, y - 16],
|
|
15
|
+
[x - 24, y + 16],
|
|
16
|
+
], 3),
|
|
17
|
+
fill: 'gold',
|
|
18
|
+
depth: 0.4,
|
|
19
|
+
});
|
|
20
|
+
export const kite = {
|
|
21
|
+
name: 'kite',
|
|
22
|
+
frames: 180,
|
|
23
|
+
line: LINE,
|
|
24
|
+
extrude: EXT,
|
|
25
|
+
layers: [
|
|
26
|
+
{ id: 'kite', p: [260, 220], m: drift, shapes: [] },
|
|
27
|
+
{
|
|
28
|
+
parent: 'kite',
|
|
29
|
+
tilt: FACE,
|
|
30
|
+
a: FOOT,
|
|
31
|
+
p: onFace(FACE, FOOT),
|
|
32
|
+
m: { ...sway, k: 2.4, at: 6 },
|
|
33
|
+
shapes: [
|
|
34
|
+
{ d: line(FOOT, [-28, 190], [18, 230], [-22, 270]), line: 7 },
|
|
35
|
+
bow(-28, 190),
|
|
36
|
+
bow(18, 230),
|
|
37
|
+
bow(-22, 270),
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
parent: 'kite',
|
|
42
|
+
tilt: FACE,
|
|
43
|
+
shapes: [
|
|
44
|
+
{ d: poly([TOP, RIGHT, FOOT, LEFT], 6), fill: 'hot', depth: 0.8 },
|
|
45
|
+
{ d: poly([TOP, MID, LEFT], 4), fill: 'white' },
|
|
46
|
+
{ d: poly([MID, RIGHT, FOOT], 4), fill: 'white' },
|
|
47
|
+
{ d: line(TOP, FOOT), line: 4 },
|
|
48
|
+
{ d: line(LEFT, RIGHT), line: 4 },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
glow('kite', [140, -150], 24, [twinkle(50), twinkle(140, true)]),
|
|
52
|
+
],
|
|
53
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { slide, twinkle } from '../motions.js';
|
|
3
|
+
import { block, faceOf, ISO, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A rack console drawer: a 1U housing, its tray slid out with a keyboard, and a slim screen flipped up off the tray
|
|
6
|
+
const W = 270;
|
|
7
|
+
const LEAN = (12 * Math.PI) / 180;
|
|
8
|
+
// the rack it lives in: two posts and a top rail behind the drawer, and the 1U housing it slides out of
|
|
9
|
+
const POST = (x) => block([x, 40, -40], [18, 0, 0], [0, 18, 0], [0, 0, 270]);
|
|
10
|
+
const RAIL = block([-W / 2 - 30, 40, 212], [W + 60, 0, 0], [0, 18, 0], [0, 0, 18]);
|
|
11
|
+
const HOUSING = block([-W / 2 - 12, 40, -8], [W + 24, 0, 0], [0, 130, 0], [0, 0, 26]);
|
|
12
|
+
const TRAY = block([-W / 2, -130, 0], [W, 0, 0], [0, 170, 0], [0, 0, 12]);
|
|
13
|
+
const tray = faceOf(TRAY, 'top');
|
|
14
|
+
const UP = [0, Math.sin(LEAN) * 170, Math.cos(LEAN) * 170];
|
|
15
|
+
const BACK = [0, Math.cos(LEAN) * 8, -Math.sin(LEAN) * 8];
|
|
16
|
+
const LID = block([-W / 2, 40, 12], [W, 0, 0], BACK, UP);
|
|
17
|
+
const screen = faceOf(LID, 'front');
|
|
18
|
+
export const kvm = {
|
|
19
|
+
name: 'kvm',
|
|
20
|
+
frames: 180,
|
|
21
|
+
still: 0,
|
|
22
|
+
line: LINE,
|
|
23
|
+
extrude: [0, 0],
|
|
24
|
+
layers: [
|
|
25
|
+
{ id: 'kvm', p: [250, 330], shapes: [] },
|
|
26
|
+
{
|
|
27
|
+
parent: 'kvm',
|
|
28
|
+
shapes: [
|
|
29
|
+
...solid(POST(-W / 2 - 30), { fill: 'grey', front: 'white' }, 2),
|
|
30
|
+
...solid(POST(W / 2 + 12), { fill: 'grey', front: 'white' }, 2),
|
|
31
|
+
...solid(RAIL, { fill: 'grey', front: 'white' }, 2),
|
|
32
|
+
...solid(HOUSING, { fill: 'deep', top: 'main' }, 3),
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
// the drawer runs back into the housing and out again on its rails
|
|
36
|
+
{
|
|
37
|
+
parent: 'kvm',
|
|
38
|
+
m: slide(ISO([0, 34, 0]), 20, 40, 40),
|
|
39
|
+
shapes: [
|
|
40
|
+
...solid(LID, { fill: 'grey', front: 'deep' }, 3),
|
|
41
|
+
{ d: quad(screen, 0.05, 0.08, 0.9, 0.84, 3), fill: 'tint' },
|
|
42
|
+
...[0.7, 0.55, 0.4].map((t, i) => ({
|
|
43
|
+
d: stroke(screen, [0.14, t], [i === 1 ? 0.6 : 0.8, t]),
|
|
44
|
+
})),
|
|
45
|
+
...solid(TRAY, { fill: 'grey', top: 'white' }, 3),
|
|
46
|
+
{ d: quad(tray, 0.07, 0.42, 0.86, 0.46, 3), fill: 'paper' },
|
|
47
|
+
...[0.58, 0.72].map((t) => ({ d: stroke(tray, [0.12, t], [0.88, t]) })),
|
|
48
|
+
{ d: quad(tray, 0.38, 0.08, 0.24, 0.26, 3), fill: 'paper' },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
glow('kvm', [160, -230], 24, [twinkle(60), twinkle(150, true)]),
|
|
52
|
+
],
|
|
53
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: an angled desk lamp modelled in 3d (see object-drum.ts); its switch clicks and it lights.
|
|
2
|
+
import { press, 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 BASE = drum([-60, 20, 0], [0, 0, 26], 84, 80, { side: 'deep', cap: 'main' });
|
|
8
|
+
const ELBOW = [-30, 20, 190];
|
|
9
|
+
const HEAD = [70, 0, 250];
|
|
10
|
+
const MOUTH_AXIS = [40, -20, -80];
|
|
11
|
+
const SHADE = drum(HEAD, MOUTH_AXIS, 28, 72, { side: 'main', cap: 'gold' }, [0, 1, 0]);
|
|
12
|
+
const SWITCH = drum([-104, -20, 22], [0, 0, 14], 14, 14, { side: 'deep', cap: 'hot' });
|
|
13
|
+
// the light falls from the shade's mouth onto the desk in front of the base
|
|
14
|
+
const MOUTH = [HEAD[0] + MOUTH_AXIS[0], HEAD[1] + MOUTH_AXIS[1], HEAD[2] + MOUTH_AXIS[2]];
|
|
15
|
+
const POOL = drum([150, -50, 0], [0, 0, 1], 80, 80, { side: 'gold', cap: 'gold' });
|
|
16
|
+
const [mx, my] = ISO(MOUTH);
|
|
17
|
+
const BEAM = poly([
|
|
18
|
+
ISO([MOUTH[0] - 60, MOUTH[1] + 20, MOUTH[2]]),
|
|
19
|
+
ISO([MOUTH[0] + 60, MOUTH[1] - 20, MOUTH[2]]),
|
|
20
|
+
ISO([250, -60, 0]),
|
|
21
|
+
ISO([40, -20, 0]),
|
|
22
|
+
], 2);
|
|
23
|
+
export const lamp = {
|
|
24
|
+
name: 'lamp',
|
|
25
|
+
frames: 180,
|
|
26
|
+
still: 100,
|
|
27
|
+
line: LINE,
|
|
28
|
+
extrude: [0, 0],
|
|
29
|
+
layers: [
|
|
30
|
+
{ id: 'lamp', p: [240, 360], shapes: [] },
|
|
31
|
+
{
|
|
32
|
+
parent: 'lamp',
|
|
33
|
+
a: [mx, my],
|
|
34
|
+
p: [mx, my],
|
|
35
|
+
m: [twinkle(38), twinkle(140, true)],
|
|
36
|
+
shapes: [...POOL.shapes.slice(1), { d: BEAM, fill: 'gold', line: false }],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
parent: 'lamp',
|
|
40
|
+
shapes: [
|
|
41
|
+
...BASE.shapes,
|
|
42
|
+
{ d: line(ISO([-60, 20, 22]), ISO(ELBOW), ISO(HEAD)), line: 18 },
|
|
43
|
+
...SHADE.shapes,
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{ parent: 'lamp', m: { ...press, k: 0.3 }, shapes: SWITCH.shapes },
|
|
47
|
+
glow('lamp', [170, -280], 24, [twinkle(44), twinkle(140, true)]),
|
|
48
|
+
],
|
|
49
|
+
};
|
|
@@ -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 chunky navy laptop, lid open about 105 degrees: thick deck, pale keyboard and trackpad, code on the screen
|
|
6
|
+
const W = 250;
|
|
7
|
+
const D = 164;
|
|
8
|
+
const T = 20;
|
|
9
|
+
const LID = 166;
|
|
10
|
+
const LEAN = (15 * Math.PI) / 180;
|
|
11
|
+
const DECK = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, T]);
|
|
12
|
+
const deckTop = faceOf(DECK, 'top');
|
|
13
|
+
// the lid hinges on the deck's back edge and leans back; its thickness runs behind the screen
|
|
14
|
+
const UP = [0, Math.sin(LEAN) * LID, Math.cos(LEAN) * LID];
|
|
15
|
+
const BACK = [0, Math.cos(LEAN) * 12, -Math.sin(LEAN) * 12];
|
|
16
|
+
const LIDB = block([-W / 2, D / 2, T], [W, 0, 0], BACK, UP);
|
|
17
|
+
const screen = faceOf(LIDB, 'front');
|
|
18
|
+
export const laptop = {
|
|
19
|
+
name: 'laptop',
|
|
20
|
+
frames: 180,
|
|
21
|
+
// the lines are all drawn back in by here
|
|
22
|
+
still: 150,
|
|
23
|
+
line: LINE,
|
|
24
|
+
extrude: [0, 0],
|
|
25
|
+
layers: [
|
|
26
|
+
{ id: 'pc', p: [250, 330], m: jolt(), shapes: [] },
|
|
27
|
+
{
|
|
28
|
+
parent: 'pc',
|
|
29
|
+
shapes: [
|
|
30
|
+
...solid(LIDB, { fill: 'deep' }, 4),
|
|
31
|
+
{ d: quad(screen, 0.06, 0.08, 0.88, 0.86, 4), fill: 'tint' },
|
|
32
|
+
...[0.78, 0.62, 0.46, 0.3].map((t, i) => ({
|
|
33
|
+
d: stroke(screen, [0.14 + (i % 2 ? 0.08 : 0), t], [i === 3 ? 0.5 : 0.82, t]),
|
|
34
|
+
trim: erase(24 - i * 5, 90 + i * 5),
|
|
35
|
+
})),
|
|
36
|
+
...solid(DECK, { fill: 'deep', top: 'main' }, 4),
|
|
37
|
+
{ d: quad(deckTop, 0.08, 0.48, 0.84, 0.42, 4), fill: 'tint' },
|
|
38
|
+
...[0.62, 0.76].map((t) => ({ d: stroke(deckTop, [0.14, t], [0.86, t]) })),
|
|
39
|
+
{ d: quad(deckTop, 0.32, 0.08, 0.36, 0.3, 5), fill: 'tint' },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
glow('pc', [178, -222], 22, [twinkle(40), twinkle(140, true)]),
|
|
43
|
+
],
|
|
44
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, quad, solid } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A 2U appliance: a small screen and buttons on the left of the front, a row of ports, and three lights that pop
|
|
6
|
+
// one after another as traffic is shared out
|
|
7
|
+
const H = 70;
|
|
8
|
+
const BOX = block([-160, -90, 0], [320, 0, 0], [0, 180, 0], [0, 0, H]);
|
|
9
|
+
const front = faceOf(BOX, 'front');
|
|
10
|
+
const light = (i) => {
|
|
11
|
+
const at = front.at(0.86, 0.32 + i * 0.18);
|
|
12
|
+
return {
|
|
13
|
+
parent: 'lb',
|
|
14
|
+
a: at,
|
|
15
|
+
p: at,
|
|
16
|
+
m: [twinkle(20 + i * 12), twinkle(130 + i * 6, true)],
|
|
17
|
+
shapes: [{ d: dot(front, 0.86, 0.32 + i * 0.18, 0.018, 0.07), fill: 'ok' }],
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export const loadBalancer = {
|
|
21
|
+
name: 'load-balancer',
|
|
22
|
+
frames: 180,
|
|
23
|
+
still: 100,
|
|
24
|
+
line: LINE,
|
|
25
|
+
extrude: [0, 0],
|
|
26
|
+
layers: [
|
|
27
|
+
{ id: 'lb', p: [250, 320], m: jolt([-4, 8]), shapes: [] },
|
|
28
|
+
{
|
|
29
|
+
parent: 'lb',
|
|
30
|
+
shapes: [
|
|
31
|
+
...solid(BOX, { fill: 'deep', top: 'main' }, 4),
|
|
32
|
+
{ d: quad(front, 0.05, 0.22, 0.22, 0.56, 3), fill: 'tint' },
|
|
33
|
+
{ d: quad(front, 0.08, 0.42, 0.12, 0.14, 1), fill: 'ink', line: false },
|
|
34
|
+
...[0, 1].map((i) => ({
|
|
35
|
+
d: dot(front, 0.31, 0.36 + i * 0.28, 0.02, 0.08),
|
|
36
|
+
fill: 'white',
|
|
37
|
+
})),
|
|
38
|
+
...[0, 1, 2, 3, 4, 5].map((i) => ({
|
|
39
|
+
d: quad(front, 0.38 + i * 0.065, 0.32, 0.045, 0.34, 1),
|
|
40
|
+
fill: 'ink',
|
|
41
|
+
line: false,
|
|
42
|
+
})),
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
light(0),
|
|
46
|
+
light(1),
|
|
47
|
+
light(2),
|
|
48
|
+
glow('lb', [180, -150], 22, [twinkle(56), twinkle(140, true)]),
|
|
49
|
+
],
|
|
50
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a locked screen, the clock on top and a padlock that snaps shut in the middle.
|
|
2
|
+
import { clasp, shackle, twinkle } from '../motions.js';
|
|
3
|
+
import { line, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const SHACKLE = 'M-26 -6L-26 -30A26 26 0 0 1 26 -30L26 -6L14 -6L14 -30A14 14 0 0 0 -14 -30L-14 -6Z';
|
|
6
|
+
export const lockScreen = {
|
|
7
|
+
name: 'lock-screen',
|
|
8
|
+
frames: 160,
|
|
9
|
+
line: LINE,
|
|
10
|
+
extrude: EXT,
|
|
11
|
+
still: 120,
|
|
12
|
+
layers: [
|
|
13
|
+
{ id: 'root', p: [250, 250], shapes: [] },
|
|
14
|
+
{
|
|
15
|
+
id: 'mon',
|
|
16
|
+
parent: 'root',
|
|
17
|
+
tilt: FACE,
|
|
18
|
+
shapes: [
|
|
19
|
+
{ d: rect(-20, 100, 40, 40), fill: 'grey', depth: 0.5 },
|
|
20
|
+
{ d: rect(-74, 134, 148, 18, 9), fill: 'grey', depth: 0.6 },
|
|
21
|
+
{ d: rect(-176, -124, 352, 230, 16), fill: 'deep', depth: 0.8 },
|
|
22
|
+
{ d: rect(-162, -110, 324, 202, 10), fill: 'tint' },
|
|
23
|
+
{ d: line([-46, -78], [46, -78]), line: 12 },
|
|
24
|
+
{ d: line([-30, 64], [30, 64]) },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{ id: 'lock', parent: 'mon', m: { ...clasp, k: 0.7 }, shapes: [] },
|
|
28
|
+
{
|
|
29
|
+
parent: 'lock',
|
|
30
|
+
a: [20, -6],
|
|
31
|
+
p: [20, -6],
|
|
32
|
+
m: { ...shackle, k: 0.7 },
|
|
33
|
+
shapes: [{ d: SHACKLE, fill: 'grey', depth: 0.4 }],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
parent: 'lock',
|
|
37
|
+
shapes: [
|
|
38
|
+
{ d: rect(-40, -10, 80, 60, 10), fill: 'gold', depth: 0.6 },
|
|
39
|
+
{ d: rect(-4, 8, 8, 22, 4), fill: 'ink', line: false },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
glow('root', [180, -150], 22, [twinkle(70), twinkle(130, true)]),
|
|
43
|
+
],
|
|
44
|
+
};
|