@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,76 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers after the network diagrams of Protocol Explorer, modelled in 3d (see iso.ts).
|
|
2
|
+
import { hop, jolt } from '../motions.js';
|
|
3
|
+
import { poly } from '../sticker.js';
|
|
4
|
+
import { block, ISO, solid } from '../iso.js';
|
|
5
|
+
import { LINE } from './shared.js';
|
|
6
|
+
// A brick wall: raised bricks in running bond on a pale wall, a shield with a check standing in front
|
|
7
|
+
const WALL = block([-160, -10, 0], [320, 0, 0], [0, 40, 0], [0, 0, 196]);
|
|
8
|
+
const ROWS = 4;
|
|
9
|
+
const GAP = 6;
|
|
10
|
+
const RH = (196 - GAP * (ROWS + 1)) / ROWS;
|
|
11
|
+
// each row: brick x spans across the 320 wide wall, offset half a brick on odd rows
|
|
12
|
+
const SPANS = [
|
|
13
|
+
[
|
|
14
|
+
[-154, -54],
|
|
15
|
+
[-48, 52],
|
|
16
|
+
[58, 154],
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
[-154, -104],
|
|
20
|
+
[-98, 2],
|
|
21
|
+
[8, 108],
|
|
22
|
+
[114, 154],
|
|
23
|
+
],
|
|
24
|
+
];
|
|
25
|
+
const bricks = Array.from({ length: ROWS }, (_, r) => r).flatMap((r) => {
|
|
26
|
+
const z = GAP + (ROWS - 1 - r) * (RH + GAP);
|
|
27
|
+
return (SPANS[r % 2] ?? []).flatMap(([x0, x1]) => solid(block([x0, -18, z], [x1 - x0, 0, 0], [0, 8, 0], [0, 0, RH]), { fill: 'hot', top: 'white', right: 'white' }, 2));
|
|
28
|
+
});
|
|
29
|
+
// the shield stands on its own plane in front of the wall, drawn twice for its thickness
|
|
30
|
+
const SHIELD = [
|
|
31
|
+
[-50, 120],
|
|
32
|
+
[0, 136],
|
|
33
|
+
[50, 120],
|
|
34
|
+
[50, 64],
|
|
35
|
+
[0, 20],
|
|
36
|
+
[-50, 64],
|
|
37
|
+
];
|
|
38
|
+
const shieldAt = (y) => SHIELD.map(([x, z]) => ISO([x + 60, y, z]));
|
|
39
|
+
const BASE = ISO([60, -60, 20]);
|
|
40
|
+
// a thick check, as a filled outline in the shield's plane
|
|
41
|
+
const CHECK = [
|
|
42
|
+
[26, 82],
|
|
43
|
+
[52, 56],
|
|
44
|
+
[96, 100],
|
|
45
|
+
[86, 110],
|
|
46
|
+
[52, 76],
|
|
47
|
+
[36, 92],
|
|
48
|
+
];
|
|
49
|
+
export const firewall = {
|
|
50
|
+
name: 'firewall',
|
|
51
|
+
frames: 180,
|
|
52
|
+
line: LINE,
|
|
53
|
+
extrude: [0, 0],
|
|
54
|
+
layers: [
|
|
55
|
+
{ id: 'wall', p: [222, 350], m: jolt([8, 12]), shapes: [] },
|
|
56
|
+
{
|
|
57
|
+
parent: 'wall',
|
|
58
|
+
shapes: [...solid(WALL, { fill: 'grey', front: 'tint', top: 'white' }, 3), ...bricks],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
parent: 'wall',
|
|
62
|
+
a: BASE,
|
|
63
|
+
p: BASE,
|
|
64
|
+
m: { ...hop, at: 6, k: 0.8 },
|
|
65
|
+
shapes: [
|
|
66
|
+
{ d: poly(shieldAt(-52), [8, 6, 8, 10, 6, 10]), fill: 'main' },
|
|
67
|
+
{ d: poly(shieldAt(-62), [8, 6, 8, 10, 6, 10]), fill: 'deep' },
|
|
68
|
+
{
|
|
69
|
+
d: poly(CHECK.map(([x, z]) => ISO([x, -62, z])), 2),
|
|
70
|
+
fill: 'white',
|
|
71
|
+
line: 3,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers (konmek asked for one): a floating IP, an address tag on a loose string, drifting
|
|
2
|
+
// free until it is tied to a machine.
|
|
3
|
+
import { drift, sparkle } from '../motions.js';
|
|
4
|
+
import { ellipse, line, poly, rect, ring } from '../sticker.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
// a luggage tag pointing left, its eyelet near the point
|
|
7
|
+
const TAG = poly([
|
|
8
|
+
[-176, 0],
|
|
9
|
+
[-124, -84],
|
|
10
|
+
[156, -84],
|
|
11
|
+
[156, 84],
|
|
12
|
+
[-124, 84],
|
|
13
|
+
], [10, 12, 18, 18, 12]);
|
|
14
|
+
const EYE = [-122, 0];
|
|
15
|
+
// "IP" in heavy ink strokes, the address under it as four groups and three dots
|
|
16
|
+
const IP = [
|
|
17
|
+
{ d: line([-50, -44], [-50, 4]), line: 11 },
|
|
18
|
+
{ d: 'M-24 4V-44H-6A14 14 0 0 1 -6 -16H-24', line: 11 },
|
|
19
|
+
];
|
|
20
|
+
const ADDRESS = [
|
|
21
|
+
...[-52, 2, 56].map((x) => ({ d: ellipse(x + 20, 44, 5), fill: 'ink' })),
|
|
22
|
+
...[-74, -20, 34, 88].map((x) => ({ d: line([x, 44], [x + 24, 44]), line: 9 })),
|
|
23
|
+
];
|
|
24
|
+
export const floatingIp = {
|
|
25
|
+
name: 'floating-ip',
|
|
26
|
+
frames: 180,
|
|
27
|
+
line: LINE,
|
|
28
|
+
extrude: EXT,
|
|
29
|
+
layers: [
|
|
30
|
+
{ id: 'root', a: [0, 0], p: [270, 256], m: drift, shapes: [] },
|
|
31
|
+
{ id: 'face', parent: 'root', tilt: FACE, shapes: [] },
|
|
32
|
+
// the loose string trails the bank, a beat late
|
|
33
|
+
{
|
|
34
|
+
parent: 'face',
|
|
35
|
+
a: EYE,
|
|
36
|
+
p: EYE,
|
|
37
|
+
m: { ...drift[0], at: 8, k: -2.5 },
|
|
38
|
+
shapes: [
|
|
39
|
+
{
|
|
40
|
+
d: `M${String(EYE[0])} ${String(EYE[1])}C-160 -50 -198 -18 -204 -70`,
|
|
41
|
+
line: 7,
|
|
42
|
+
round: true,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
parent: 'face',
|
|
48
|
+
shapes: [
|
|
49
|
+
{ d: TAG, fill: 'main', depth: 1 },
|
|
50
|
+
{ d: ring(EYE[0], EYE[1], 22, 11), fill: 'gold', depth: 0.4 },
|
|
51
|
+
{ d: rect(-80, -64, 212, 128, 12), fill: 'white', depth: 0.3 },
|
|
52
|
+
...IP,
|
|
53
|
+
...ADDRESS,
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
glow('root', [136, -128], 24, sparkle(30)),
|
|
57
|
+
glow('root', [-150, 96], 16, sparkle(96)),
|
|
58
|
+
],
|
|
59
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a single flower in a pot in 2.5d (pot in 3d, see plant-kit.ts); its petals open.
|
|
2
|
+
import { SNAP, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, rect, rosette } from '../sticker.js';
|
|
4
|
+
import { leaf, pot, rib, spot } from './plant-kit.js';
|
|
5
|
+
import { FACE, glow, LINE } from './shared.js';
|
|
6
|
+
const [POT, [, sy]] = pot(86, 42, 52, 'gold');
|
|
7
|
+
const STEM = 150;
|
|
8
|
+
const HEAD = [0, sy - STEM];
|
|
9
|
+
const mid = spot([0, sy], 0, [0, -64]);
|
|
10
|
+
export const flower = {
|
|
11
|
+
name: 'flower',
|
|
12
|
+
frames: 180,
|
|
13
|
+
still: 90,
|
|
14
|
+
line: LINE,
|
|
15
|
+
extrude: [5, 10],
|
|
16
|
+
layers: [
|
|
17
|
+
{ id: 'pot', p: [250, 382], shapes: [] },
|
|
18
|
+
{
|
|
19
|
+
parent: 'pot',
|
|
20
|
+
shapes: [
|
|
21
|
+
{ d: rect(-6, HEAD[1], 12, STEM, 6), fill: 'ok', depth: 0.3 },
|
|
22
|
+
{ d: leaf(mid, -58, 66, 20), fill: 'ok', depth: 0.3 },
|
|
23
|
+
{ d: rib(mid, -58, 66) },
|
|
24
|
+
{ d: leaf([0, mid[1] + 24], 54, 58, 18), fill: 'ok', depth: 0.3 },
|
|
25
|
+
{ d: rib([0, mid[1] + 24], 54, 58) },
|
|
26
|
+
...POT,
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
parent: 'pot',
|
|
31
|
+
p: HEAD,
|
|
32
|
+
tilt: FACE,
|
|
33
|
+
m: {
|
|
34
|
+
s: [
|
|
35
|
+
[10, [34, 34], SNAP],
|
|
36
|
+
[52, [100, 100], 0],
|
|
37
|
+
[140, [100, 100], SNAP],
|
|
38
|
+
[176, [34, 34]],
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
shapes: [
|
|
42
|
+
{ d: rosette(0, 0, 70, 8), fill: 'hot', depth: 0.5 },
|
|
43
|
+
{ d: rosette(0, 0, 40, 8), fill: 'white', depth: 0.2 },
|
|
44
|
+
{ d: ellipse(0, 0, 18), fill: 'gold', depth: 0.3 },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
glow('pot', [110, -290], 24, [twinkle(48), twinkle(140, true)]),
|
|
48
|
+
],
|
|
49
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Layer, Shape } from '../sticker.js';
|
|
2
|
+
export declare const TABLE: readonly [-45, 55], DOWN: readonly [0, 20];
|
|
3
|
+
/** A plate with a coloured rim, lying flat. */
|
|
4
|
+
export declare const plate: (r: number) => Shape[];
|
|
5
|
+
/** Wisps of steam riding an untilted parent, redrawn one after another. */
|
|
6
|
+
export declare const steam: (parent: string, xs: readonly number[], y: number) => Layer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Helpers the food stickers share: dishes lie on the table (the flat view), steam rises upright above them.
|
|
2
|
+
import { erase } from '../motions.js';
|
|
3
|
+
import { ellipse, VIEWS } from '../sticker.js';
|
|
4
|
+
export const { tilt: TABLE, extrude: DOWN } = VIEWS.flat;
|
|
5
|
+
/** A plate with a coloured rim, lying flat. */
|
|
6
|
+
export const plate = (r) => [
|
|
7
|
+
{ d: ellipse(0, 0, r), fill: 'main', depth: 0.6 },
|
|
8
|
+
{ d: ellipse(0, 0, r * 0.86), fill: 'white' },
|
|
9
|
+
];
|
|
10
|
+
/** Wisps of steam riding an untilted parent, redrawn one after another. */
|
|
11
|
+
export const steam = (parent, xs, y) => ({
|
|
12
|
+
parent,
|
|
13
|
+
shapes: xs.map((x, i) => ({
|
|
14
|
+
d: `M${String(x)} ${String(y)}q-14 -22 0 -44q14 -22 0 -44`,
|
|
15
|
+
round: true,
|
|
16
|
+
trim: erase(12 + i * 6, 70 + i * 6),
|
|
17
|
+
})),
|
|
18
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a laptop in 3d (see iso.ts) with an invoice on the screen; a coin pops out of it.
|
|
2
|
+
import { bounce, jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse } from '../sticker.js';
|
|
4
|
+
import { block, faceOf, quad, solid, stroke } from '../iso.js';
|
|
5
|
+
import { glow, LINE } from './shared.js';
|
|
6
|
+
const W = 250;
|
|
7
|
+
const D = 170;
|
|
8
|
+
const T = 16;
|
|
9
|
+
const LID = 160;
|
|
10
|
+
const LEAN = (18 * Math.PI) / 180;
|
|
11
|
+
const DECK = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, T]);
|
|
12
|
+
const deck = faceOf(DECK, 'top');
|
|
13
|
+
const LIDB = block([-W / 2, D / 2, T], [W, 0, 0], [0, Math.cos(LEAN) * 10, -Math.sin(LEAN) * 10], [0, Math.sin(LEAN) * LID, Math.cos(LEAN) * LID]);
|
|
14
|
+
const screen = faceOf(LIDB, 'front');
|
|
15
|
+
const C = screen.at(0.5, 1.15);
|
|
16
|
+
export const freelance = {
|
|
17
|
+
name: 'freelance',
|
|
18
|
+
frames: 160,
|
|
19
|
+
line: LINE,
|
|
20
|
+
extrude: [0, 0],
|
|
21
|
+
layers: [
|
|
22
|
+
{ id: 'pc', p: [250, 350], m: jolt(), shapes: [] },
|
|
23
|
+
{
|
|
24
|
+
parent: 'pc',
|
|
25
|
+
shapes: [
|
|
26
|
+
...solid(LIDB, { fill: 'grey', front: 'deep' }, 4),
|
|
27
|
+
{ d: quad(screen, 0.06, 0.07, 0.88, 0.86, 3), fill: 'tint' },
|
|
28
|
+
{ d: quad(screen, 0.18, 0.14, 0.42, 0.72, 2), fill: 'white' },
|
|
29
|
+
...[0.7, 0.58, 0.46].map((t) => ({ d: stroke(screen, [0.24, t], [0.52, t]) })),
|
|
30
|
+
{ d: quad(screen, 0.24, 0.22, 0.2, 0.1, 2), fill: 'ok' },
|
|
31
|
+
{ d: quad(screen, 0.66, 0.5, 0.2, 0.24, 3), fill: 'main' },
|
|
32
|
+
...solid(DECK, { fill: 'grey', top: 'white' }, 4),
|
|
33
|
+
{ d: quad(deck, 0.08, 0.48, 0.84, 0.42, 3), fill: 'tint' },
|
|
34
|
+
...[0.62, 0.76].map((t) => ({ d: stroke(deck, [0.12, t], [0.88, t]) })),
|
|
35
|
+
{ d: quad(deck, 0.32, 0.08, 0.36, 0.3, 4), fill: 'tint' },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
parent: 'pc',
|
|
40
|
+
a: C,
|
|
41
|
+
p: C,
|
|
42
|
+
m: [twinkle(10), { ...bounce, at: 14, k: 0.6 }, twinkle(124, true)],
|
|
43
|
+
shapes: [
|
|
44
|
+
{ d: ellipse(C[0] + 6, C[1] + 2, 34), fill: 'gold' },
|
|
45
|
+
{ d: ellipse(C[0], C[1], 34), fill: 'gold' },
|
|
46
|
+
{ d: ellipse(C[0], C[1], 20) },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
glow('pc', [-160, -180], 20, [twinkle(44), twinkle(140, true)]),
|
|
50
|
+
],
|
|
51
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a fuel pump nozzle on its black hose; the trigger squeezes and a drop falls.
|
|
2
|
+
import { fall, press, twinkle, wiggle } from '../motions.js';
|
|
3
|
+
import { onFace, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const TIP = onFace(FACE, [164, 46]);
|
|
6
|
+
const drop = ([x, y]) => `M${x} ${y - 20}Q${x + 16} ${y + 2} ${x + 13} ${y + 9}Q${x} ${y + 26} ${x - 13} ${y + 9}Q${x - 16} ${y + 2} ${x} ${y - 20}Z`;
|
|
7
|
+
const DROP = [TIP[0], TIP[1] + 30];
|
|
8
|
+
export const fuel = {
|
|
9
|
+
name: 'fuel',
|
|
10
|
+
frames: 180,
|
|
11
|
+
still: 60,
|
|
12
|
+
line: LINE,
|
|
13
|
+
extrude: EXT,
|
|
14
|
+
layers: [
|
|
15
|
+
{ id: 'root', a: [-100, 40], p: [128, 290], m: { ...wiggle, k: 0.3 }, shapes: [] },
|
|
16
|
+
{
|
|
17
|
+
parent: 'root',
|
|
18
|
+
a: DROP,
|
|
19
|
+
p: DROP,
|
|
20
|
+
m: [twinkle(30), fall([0, 150], 52, 26)],
|
|
21
|
+
op: 78,
|
|
22
|
+
shapes: [{ d: drop(DROP), fill: 'gold' }],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'gun',
|
|
26
|
+
parent: 'root',
|
|
27
|
+
tilt: FACE,
|
|
28
|
+
shapes: [
|
|
29
|
+
{ d: 'M-96 4Q-180 4 -176 150', line: 24, round: true },
|
|
30
|
+
{ d: 'M-66 30L-66 86L36 86L36 30', line: 12 },
|
|
31
|
+
{ d: rect(54, -22, 112, 24, 8), fill: 'grey', depth: 0.6 },
|
|
32
|
+
{ d: rect(144, -22, 24, 62, 8), fill: 'grey', depth: 0.6 },
|
|
33
|
+
{ d: rect(-100, -44, 166, 76, 22), fill: 'main', depth: 1 },
|
|
34
|
+
{ d: rect(-74, -26, 96, 18, 9), fill: 'white', depth: 0.2 },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
parent: 'gun',
|
|
39
|
+
a: [-10, 30],
|
|
40
|
+
p: [-10, 30],
|
|
41
|
+
m: { ...press, at: 16, k: 0.3 },
|
|
42
|
+
shapes: [{ d: rect(-40, 30, 56, 34, 8), fill: 'deep', depth: 0.5 }],
|
|
43
|
+
},
|
|
44
|
+
glow('root', [150, -100], 22, [twinkle(40), twinkle(140, true)]),
|
|
45
|
+
],
|
|
46
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a savings goal; a flag stands on the tall pile and one more coin lands on the short one.
|
|
2
|
+
import { fall, hop, sway, twinkle } from '../motions.js';
|
|
3
|
+
import { poly, rect, star } from '../sticker.js';
|
|
4
|
+
import { coin, PILE, stack, STEP } from './finance-b-coins.js';
|
|
5
|
+
import { glow, LINE } from './shared.js';
|
|
6
|
+
const TALL = [-64, 40];
|
|
7
|
+
const TOP = TALL[1] - STEP * 4;
|
|
8
|
+
const SHORT = [72, 104];
|
|
9
|
+
const DROP = [SHORT[0], SHORT[1] - STEP * 3 - 120];
|
|
10
|
+
export const goal = {
|
|
11
|
+
name: 'goal',
|
|
12
|
+
frames: 180,
|
|
13
|
+
still: 110,
|
|
14
|
+
line: LINE,
|
|
15
|
+
extrude: PILE,
|
|
16
|
+
layers: [
|
|
17
|
+
{ id: 'pile', a: [0, 120], p: [250, 412], m: { ...hop, k: 0.4, at: 50 }, shapes: [] },
|
|
18
|
+
{ parent: 'pile', shapes: stack(TALL[0], TALL[1], 5) },
|
|
19
|
+
{
|
|
20
|
+
parent: 'pile',
|
|
21
|
+
shapes: [{ d: rect(TALL[0] - 5, TOP - 186, 10, 186, 4), fill: 'deep', depth: 0.3 }],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
parent: 'pile',
|
|
25
|
+
a: [TALL[0] + 5, TOP - 182],
|
|
26
|
+
p: [TALL[0] + 5, TOP - 182],
|
|
27
|
+
m: sway,
|
|
28
|
+
shapes: [
|
|
29
|
+
{
|
|
30
|
+
d: poly([
|
|
31
|
+
[TALL[0] + 5, TOP - 184],
|
|
32
|
+
[TALL[0] + 120, TOP - 152],
|
|
33
|
+
[TALL[0] + 5, TOP - 116],
|
|
34
|
+
], [2, 6, 2]),
|
|
35
|
+
fill: 'ok',
|
|
36
|
+
depth: 0.4,
|
|
37
|
+
},
|
|
38
|
+
{ d: star(TALL[0] + 44, TOP - 150, 15), fill: 'white' },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{ parent: 'pile', shapes: stack(SHORT[0], SHORT[1], 3) },
|
|
42
|
+
{
|
|
43
|
+
parent: 'pile',
|
|
44
|
+
a: DROP,
|
|
45
|
+
p: DROP,
|
|
46
|
+
m: [twinkle(6), fall([0, 120], 30, 20), twinkle(148, true)],
|
|
47
|
+
shapes: coin(DROP[0], DROP[1]),
|
|
48
|
+
},
|
|
49
|
+
glow('pile', [150, -150], 24, [twinkle(52), twinkle(140, true)]),
|
|
50
|
+
],
|
|
51
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: Thai gold bars, modelled in 3d as trapezoid ingots; the top bar bounces and glints.
|
|
2
|
+
import { bounce, glint } from '../motions.js';
|
|
3
|
+
import { line, poly, spark } from '../sticker.js';
|
|
4
|
+
import { add, ISO } from '../iso.js';
|
|
5
|
+
import { glow, LINE } from './shared.js';
|
|
6
|
+
const [L, W, H, IN] = [200, 96, 50, 16];
|
|
7
|
+
const area = (pts) => pts.reduce((a, p, i) => {
|
|
8
|
+
const q = pts[(i + 1) % pts.length] ?? p;
|
|
9
|
+
return a + p[0] * q[1] - q[0] * p[1];
|
|
10
|
+
}, 0);
|
|
11
|
+
/** An ingot at o: a wide base, a top inset by IN, its visible faces, and a stamp on the top. */
|
|
12
|
+
const ingot = (o) => {
|
|
13
|
+
const at = (x, y, z) => ISO(add(o, [x, y, z]));
|
|
14
|
+
const [b0, b1, b2, b3] = [
|
|
15
|
+
at(-L / 2, -W / 2, 0),
|
|
16
|
+
at(L / 2, -W / 2, 0),
|
|
17
|
+
at(L / 2, W / 2, 0),
|
|
18
|
+
at(-L / 2, W / 2, 0),
|
|
19
|
+
];
|
|
20
|
+
const [t0, t1, t2, t3] = [
|
|
21
|
+
at(-L / 2 + IN, -W / 2 + IN, H),
|
|
22
|
+
at(L / 2 - IN, -W / 2 + IN, H),
|
|
23
|
+
at(L / 2 - IN, W / 2 - IN, H),
|
|
24
|
+
at(-L / 2 + IN, W / 2 - IN, H),
|
|
25
|
+
];
|
|
26
|
+
const faces = [
|
|
27
|
+
[[t0, t1, t2, t3], 'gold'],
|
|
28
|
+
[[b0, b1, t1, t0], 'gold'],
|
|
29
|
+
[[b1, b2, t2, t1], 'gold'],
|
|
30
|
+
[[b0, t0, t3, b3], 'gold'],
|
|
31
|
+
[[b3, t3, t2, b2], 'gold'],
|
|
32
|
+
];
|
|
33
|
+
const s = (x, y) => at(x, y, H);
|
|
34
|
+
return [
|
|
35
|
+
...faces
|
|
36
|
+
.filter(([pts]) => area(pts) < 0)
|
|
37
|
+
.map(([pts, fill]) => ({ d: poly(pts, 2), fill })),
|
|
38
|
+
{ d: poly([s(-50, -18), s(50, -18), s(50, 18), s(-50, 18)], 2), fill: 'white' },
|
|
39
|
+
{ d: line(s(-34, 0), s(34, 0)) },
|
|
40
|
+
];
|
|
41
|
+
};
|
|
42
|
+
export const goldBar = {
|
|
43
|
+
name: 'gold-bar',
|
|
44
|
+
frames: 180,
|
|
45
|
+
line: LINE,
|
|
46
|
+
extrude: [0, 0],
|
|
47
|
+
layers: [
|
|
48
|
+
{ id: 'stack', p: [250, 340], shapes: [] },
|
|
49
|
+
{ parent: 'stack', shapes: [...ingot([-106, 0, 0]), ...ingot([106, 0, 0])] },
|
|
50
|
+
{ id: 'top', parent: 'stack', m: bounce, shapes: ingot([0, 0, H]) },
|
|
51
|
+
{
|
|
52
|
+
parent: 'top',
|
|
53
|
+
a: ISO([60, -20, H * 2]),
|
|
54
|
+
p: ISO([60, -20, H * 2]),
|
|
55
|
+
m: glint(10, 100),
|
|
56
|
+
shapes: [{ d: spark(...ISO([60, -20, H * 2]), 24), fill: 'white' }],
|
|
57
|
+
},
|
|
58
|
+
glow('stack', [-170, -120], 22, glint(70, 110)),
|
|
59
|
+
],
|
|
60
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a hard drive modelled in 3d (see iso.ts); the head swings over the platter.
|
|
2
|
+
import { hop, SNAP, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
const BODY = block([-120, -160, 0], [240, 0, 0], [0, 320, 0], [0, 0, 40]);
|
|
6
|
+
const top = faceOf(BODY, 'top');
|
|
7
|
+
const front = faceOf(BODY, 'front');
|
|
8
|
+
const HUB = [0.5, 0.62];
|
|
9
|
+
export const hardDrive = {
|
|
10
|
+
name: 'hard-drive',
|
|
11
|
+
frames: 160,
|
|
12
|
+
line: LINE,
|
|
13
|
+
extrude: [0, 0],
|
|
14
|
+
layers: [
|
|
15
|
+
{ id: 'hd', p: [250, 300], m: { ...hop, k: 0.6 }, shapes: [] },
|
|
16
|
+
{
|
|
17
|
+
parent: 'hd',
|
|
18
|
+
shapes: [
|
|
19
|
+
...solid(BODY, { fill: 'grey', top: 'white', front: 'grey' }, 4),
|
|
20
|
+
{ d: dot(top, HUB[0], HUB[1], 0.36, 0.27), fill: 'tint' },
|
|
21
|
+
{ d: dot(top, HUB[0], HUB[1], 0.08, 0.06), fill: 'grey' },
|
|
22
|
+
{ d: quad(front, 0.06, 0.3, 0.3, 0.4, 2), fill: 'deep' },
|
|
23
|
+
{ d: dot(front, 0.88, 0.5, 0.025, 0.2), fill: 'ok' },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
parent: 'hd',
|
|
28
|
+
a: top.at(0.85, 0.2),
|
|
29
|
+
p: top.at(0.85, 0.2),
|
|
30
|
+
m: {
|
|
31
|
+
r: [
|
|
32
|
+
[10, 0, SNAP],
|
|
33
|
+
[40, 18, 0],
|
|
34
|
+
[90, 18, SNAP],
|
|
35
|
+
[120, 0],
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
shapes: [{ d: stroke(top, [0.85, 0.2], [0.58, 0.5]), line: 9, round: true }],
|
|
39
|
+
},
|
|
40
|
+
glow('hd', [160, -150], 22, [twinkle(40), twinkle(140, true)]),
|
|
41
|
+
],
|
|
42
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a highlighter drawing a stroke across the page; the marker rides the stroke's end.
|
|
2
|
+
import { SNAP, twinkle } from '../motions.js';
|
|
3
|
+
import { line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const STROKE = [
|
|
6
|
+
[10, 6, SNAP],
|
|
7
|
+
[70, 100, 0],
|
|
8
|
+
[140, 100, SNAP],
|
|
9
|
+
[170, 6],
|
|
10
|
+
];
|
|
11
|
+
const [X0, LEN] = [-140, 250];
|
|
12
|
+
export const highlighter = {
|
|
13
|
+
name: 'highlighter',
|
|
14
|
+
frames: 180,
|
|
15
|
+
line: LINE,
|
|
16
|
+
extrude: EXT,
|
|
17
|
+
layers: [
|
|
18
|
+
{ id: 'root', p: [250, 270], shapes: [] },
|
|
19
|
+
{
|
|
20
|
+
id: 'page',
|
|
21
|
+
parent: 'root',
|
|
22
|
+
tilt: FACE,
|
|
23
|
+
shapes: [
|
|
24
|
+
{ d: rect(-170, -110, 340, 220, 14), fill: 'white', depth: 0.5 },
|
|
25
|
+
{ d: line([-140, -60], [100, -60]) },
|
|
26
|
+
{ d: line([-140, 60], [60, 60]) },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
parent: 'page',
|
|
31
|
+
a: [X0, 0],
|
|
32
|
+
p: [X0, 0],
|
|
33
|
+
m: { s: STROKE.map(([f, k, e]) => [f, [k, 100], e]) },
|
|
34
|
+
shapes: [{ d: rect(X0, -16, LEN, 32, 6), fill: 'gold', line: 3 }],
|
|
35
|
+
},
|
|
36
|
+
{ parent: 'page', shapes: [{ d: line([-140, 0], [110, 0]) }] },
|
|
37
|
+
{
|
|
38
|
+
parent: 'page',
|
|
39
|
+
m: { p: STROKE.map(([f, k, e]) => [f, [-LEN * (1 - k / 100), 0], e]) },
|
|
40
|
+
shapes: [
|
|
41
|
+
{
|
|
42
|
+
d: poly([
|
|
43
|
+
[X0 + LEN - 10, -10],
|
|
44
|
+
[X0 + LEN + 14, -40],
|
|
45
|
+
[X0 + LEN + 40, -24],
|
|
46
|
+
[X0 + LEN + 10, 6],
|
|
47
|
+
], 3),
|
|
48
|
+
fill: 'gold',
|
|
49
|
+
depth: 0.6,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
d: poly([
|
|
53
|
+
[X0 + LEN + 14, -40],
|
|
54
|
+
[X0 + LEN + 120, -170],
|
|
55
|
+
[X0 + LEN + 156, -146],
|
|
56
|
+
[X0 + LEN + 40, -24],
|
|
57
|
+
], 8),
|
|
58
|
+
fill: 'white',
|
|
59
|
+
depth: 1,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
d: poly([
|
|
63
|
+
[X0 + LEN + 84, -126],
|
|
64
|
+
[X0 + LEN + 120, -170],
|
|
65
|
+
[X0 + LEN + 156, -146],
|
|
66
|
+
[X0 + LEN + 118, -104],
|
|
67
|
+
], 8),
|
|
68
|
+
fill: 'deep',
|
|
69
|
+
depth: 1,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
glow('root', [-190, -110], 22, [twinkle(70), twinkle(150, true)]),
|
|
74
|
+
],
|
|
75
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers after the network diagrams of Protocol Explorer (redrawn as a slab).
|
|
2
|
+
import { erase, hop, twinkle } from '../motions.js';
|
|
3
|
+
import { arc, pill, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
// A home mesh unit: a rounded white pod with a status light, its signal redrawn outward above it
|
|
6
|
+
const WAVES = [40, 66, 92].map((r, i) => ({
|
|
7
|
+
d: arc(0, 0, r, 220, 320),
|
|
8
|
+
trim: erase(30 + i * 6, 96 + i * 6),
|
|
9
|
+
round: true,
|
|
10
|
+
}));
|
|
11
|
+
export const homeRouter = {
|
|
12
|
+
name: 'home-router',
|
|
13
|
+
frames: 180,
|
|
14
|
+
// the arcs are all drawn back in by here
|
|
15
|
+
still: 150,
|
|
16
|
+
line: LINE,
|
|
17
|
+
extrude: EXT,
|
|
18
|
+
layers: [
|
|
19
|
+
{ id: 'pod', p: [250, 300], m: hop, shapes: [] },
|
|
20
|
+
{
|
|
21
|
+
parent: 'pod',
|
|
22
|
+
tilt: FACE,
|
|
23
|
+
shapes: [
|
|
24
|
+
{ d: rect(-86, -120, 172, 240, 72), fill: 'white', depth: 1 },
|
|
25
|
+
{ d: rect(-66, -100, 132, 120, 54), fill: 'tint', depth: 0.15 },
|
|
26
|
+
{ d: pill(-32, 66, 64, 16), fill: 'ok' },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{ parent: 'pod', p: [10, -150], shapes: WAVES },
|
|
30
|
+
glow('pod', [130, -150], 22, [twinkle(48), twinkle(140, true)]),
|
|
31
|
+
],
|
|
32
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a mug of coffee on a saucer, modelled in 3d (see object-drum.ts); steam curls up.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { ring } from '../sticker.js';
|
|
4
|
+
import { ISO } from '../iso.js';
|
|
5
|
+
import { drum } from './object-drum.js';
|
|
6
|
+
import { steam } from './food.js';
|
|
7
|
+
import { glow, LINE } from './shared.js';
|
|
8
|
+
const SAUCER = drum([0, 0, 0], [0, 0, 16], 132, 132, { side: 'white', cap: 'white' });
|
|
9
|
+
const MUG = drum([0, 0, 16], [0, 0, 150], 74, 80, { side: 'main', cap: 'white' });
|
|
10
|
+
const [hx, hy] = ISO([96, 0, 100]);
|
|
11
|
+
const [tx, ty] = ISO([0, 0, 166]);
|
|
12
|
+
export const hotDrink = {
|
|
13
|
+
name: 'hot-drink',
|
|
14
|
+
frames: 160,
|
|
15
|
+
line: LINE,
|
|
16
|
+
extrude: [0, 0],
|
|
17
|
+
layers: [
|
|
18
|
+
{ id: 'cup', p: [250, 330], m: { ...hop, k: 0.5 }, shapes: [] },
|
|
19
|
+
{
|
|
20
|
+
parent: 'cup',
|
|
21
|
+
shapes: [
|
|
22
|
+
...SAUCER.shapes,
|
|
23
|
+
{ d: SAUCER.disc(0, 0, 0.66), fill: 'tint' },
|
|
24
|
+
{ d: ring(hx, hy, 40, 22), fill: 'main' },
|
|
25
|
+
...MUG.shapes,
|
|
26
|
+
{ d: MUG.disc(0, 0, 0.84), fill: 'deep' },
|
|
27
|
+
{ d: MUG.disc(-0.3, -0.25, 0.16), fill: 'gold', line: false },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
steam('cup', [tx - 34, tx, tx + 34], ty - 34),
|
|
31
|
+
glow('cup', [150, -190], 22, [twinkle(40), twinkle(120, true)]),
|
|
32
|
+
],
|
|
33
|
+
};
|