@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,56 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: three tulips in a vase in 2.5d (vase in 3d, see plant-kit.ts); the heads sway.
|
|
2
|
+
import { sway, twinkle } from '../motions.js';
|
|
3
|
+
import { line } from '../sticker.js';
|
|
4
|
+
import { leaf, rib, rod, spot } from './plant-kit.js';
|
|
5
|
+
import { ISO } from '../iso.js';
|
|
6
|
+
import { glow, LINE } from './shared.js';
|
|
7
|
+
const VASE = [
|
|
8
|
+
...rod([0, 0, 0], [0, 0, 112], 46, 34, 'main'),
|
|
9
|
+
...rod([0, 0, 108], [0, 0, 124], 38, 38, 'main', 'deep'),
|
|
10
|
+
];
|
|
11
|
+
const MOUTH = ISO([0, 0, 124]);
|
|
12
|
+
const n = (v) => v.toFixed(1);
|
|
13
|
+
// a tulip cup from the top of its stem, three points on top
|
|
14
|
+
const head = (o, deg) => {
|
|
15
|
+
const p = (x, y) => spot(o, deg, [x, y]).map(n).join(' ');
|
|
16
|
+
return (`M${p(-20, 0)}C${p(-27, -24)} ${p(-22, -44)} ${p(-15, -52)}L${p(-6, -38)}L${p(0, -54)}L${p(6, -38)}L${p(15, -52)}` +
|
|
17
|
+
`C${p(22, -44)} ${p(27, -24)} ${p(20, 0)}C${p(11, 9)} ${p(-11, 9)} ${p(-20, 0)}Z`);
|
|
18
|
+
};
|
|
19
|
+
const STEMS = [
|
|
20
|
+
[-50, 150, -16, 'hot'],
|
|
21
|
+
[52, 140, 18, 'gold'],
|
|
22
|
+
[0, 176, 0, 'hot'],
|
|
23
|
+
];
|
|
24
|
+
export const tulip = {
|
|
25
|
+
name: 'tulip',
|
|
26
|
+
frames: 180,
|
|
27
|
+
line: LINE,
|
|
28
|
+
extrude: [5, 10],
|
|
29
|
+
layers: [
|
|
30
|
+
{ id: 'vase', p: [250, 386], shapes: [] },
|
|
31
|
+
...STEMS.map(([dx, h, deg, fill], i) => {
|
|
32
|
+
const top = [MOUTH[0] + dx, MOUTH[1] - h];
|
|
33
|
+
return {
|
|
34
|
+
parent: 'vase',
|
|
35
|
+
a: MOUTH,
|
|
36
|
+
p: MOUTH,
|
|
37
|
+
m: { ...sway, at: i * 16, k: i === 1 ? -1.2 : 1.2 },
|
|
38
|
+
shapes: [
|
|
39
|
+
{ d: line(MOUTH, top), line: 6, round: true },
|
|
40
|
+
{ d: head(top, deg), fill, depth: 0.5 },
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
}),
|
|
44
|
+
{
|
|
45
|
+
parent: 'vase',
|
|
46
|
+
shapes: [
|
|
47
|
+
{ d: leaf(MOUTH, -30, 120, 20), fill: 'ok', depth: 0.3 },
|
|
48
|
+
{ d: rib(MOUTH, -30, 120) },
|
|
49
|
+
{ d: leaf(MOUTH, 26, 104, 18), fill: 'ok', depth: 0.3 },
|
|
50
|
+
{ d: rib(MOUTH, 26, 104) },
|
|
51
|
+
...VASE,
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
glow('vase', [130, -270], 22, [twinkle(44), twinkle(140, true)]),
|
|
55
|
+
],
|
|
56
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a secure tunnel; packets come out of the dark arch, a padlock on its keystone.
|
|
2
|
+
import { SNAP, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const ARCH = 'M-150 80L-150 -10A150 150 0 0 1 150 -10L150 80L100 80L100 -10A100 100 0 0 0 -100 -10L-100 80Z';
|
|
6
|
+
const MOUTH = 'M-100 80L-100 -10A100 100 0 0 1 100 -10L100 80Z';
|
|
7
|
+
const packet = (x, start) => ({
|
|
8
|
+
parent: 'arch',
|
|
9
|
+
a: [x, 20],
|
|
10
|
+
p: [x, 20],
|
|
11
|
+
m: [
|
|
12
|
+
twinkle(start),
|
|
13
|
+
{
|
|
14
|
+
p: [
|
|
15
|
+
[start + 4, [0, 0], SNAP],
|
|
16
|
+
[start + 44, [x * 0.6, 110]],
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
twinkle(start + 40, true),
|
|
20
|
+
],
|
|
21
|
+
shapes: [{ d: ellipse(x, 20, 14), fill: 'gold' }],
|
|
22
|
+
});
|
|
23
|
+
export const tunnel = {
|
|
24
|
+
name: 'tunnel',
|
|
25
|
+
frames: 180,
|
|
26
|
+
line: LINE,
|
|
27
|
+
extrude: EXT,
|
|
28
|
+
layers: [
|
|
29
|
+
{ id: 'root', p: [250, 250], shapes: [] },
|
|
30
|
+
{
|
|
31
|
+
id: 'arch',
|
|
32
|
+
parent: 'root',
|
|
33
|
+
tilt: FACE,
|
|
34
|
+
shapes: [
|
|
35
|
+
{ d: MOUTH, fill: 'deep', depth: 0.2 },
|
|
36
|
+
{ d: ARCH, fill: 'main', depth: 3 },
|
|
37
|
+
...[200, 230, 270, 310, 340].map((a) => {
|
|
38
|
+
const [c, n] = [Math.cos((a * Math.PI) / 180), Math.sin((a * Math.PI) / 180)];
|
|
39
|
+
return { d: line([c * 100, n * 100 - 10], [c * 150, n * 150 - 10]) };
|
|
40
|
+
}),
|
|
41
|
+
{ d: rect(-24, -186, 48, 40, 8), fill: 'ok', depth: 0.6 },
|
|
42
|
+
{ d: 'M-14 -186L-14 -198A14 14 0 0 1 14 -198L14 -186', round: true },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
packet(-30, 10),
|
|
46
|
+
packet(30, 50),
|
|
47
|
+
packet(0, 90),
|
|
48
|
+
glow('root', [-180, -120], 22, [twinkle(30), twinkle(140, true)]),
|
|
49
|
+
],
|
|
50
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: two-factor sign-in, an authenticator code under a shield on a phone, its timer
|
|
2
|
+
// running down, and a key that turns as the second factor.
|
|
3
|
+
import { EASY, twinkle, twist, wiggle } from '../motions.js';
|
|
4
|
+
import { arc, ellipse, line, poly, rect, ring } from '../sticker.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
const XS = [-98, -80, -62, -36, -18, 0];
|
|
7
|
+
export const twoFactor = {
|
|
8
|
+
name: 'two-factor',
|
|
9
|
+
frames: 180,
|
|
10
|
+
line: LINE,
|
|
11
|
+
extrude: EXT,
|
|
12
|
+
still: 100,
|
|
13
|
+
layers: [
|
|
14
|
+
{ id: 'root', a: [0, 150], p: [230, 390], m: { ...wiggle, k: 0.4 }, shapes: [] },
|
|
15
|
+
{
|
|
16
|
+
id: 'scr',
|
|
17
|
+
parent: 'root',
|
|
18
|
+
tilt: FACE,
|
|
19
|
+
shapes: [
|
|
20
|
+
{ d: rect(-124, -156, 168, 312, 32), fill: 'deep', depth: 0.8 },
|
|
21
|
+
{ d: rect(-112, -144, 144, 288, 24), fill: 'tint' },
|
|
22
|
+
{
|
|
23
|
+
d: 'M-40 -126L0 -112L0 -78Q0 -48 -40 -32Q-80 -48 -80 -78L-80 -112Z',
|
|
24
|
+
fill: 'ok',
|
|
25
|
+
depth: 0.3,
|
|
26
|
+
},
|
|
27
|
+
{ d: line([-56, -80], [-44, -68], [-22, -92]) },
|
|
28
|
+
{ d: ellipse(-40, 76, 28), fill: 'white' },
|
|
29
|
+
{
|
|
30
|
+
d: arc(-40, 76, 28, -90, 270),
|
|
31
|
+
trim: [
|
|
32
|
+
[0, 1, EASY],
|
|
33
|
+
[160, 0, EASY],
|
|
34
|
+
[180, 1],
|
|
35
|
+
],
|
|
36
|
+
line: 7,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
...XS.map((x, i) => ({
|
|
41
|
+
parent: 'scr',
|
|
42
|
+
a: [x + 7, 0],
|
|
43
|
+
p: [x + 7, 0],
|
|
44
|
+
m: [twinkle(12 + i * 6), twinkle(150, true)],
|
|
45
|
+
shapes: [{ d: rect(x, -12, 14, 24, 5), fill: 'main', line: 3 }],
|
|
46
|
+
})),
|
|
47
|
+
{
|
|
48
|
+
parent: 'root',
|
|
49
|
+
tilt: FACE,
|
|
50
|
+
p: [130, 20],
|
|
51
|
+
shapes: [],
|
|
52
|
+
id: 'keyface',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
parent: 'keyface',
|
|
56
|
+
a: [0, 0],
|
|
57
|
+
p: [0, 0],
|
|
58
|
+
m: { ...twist, at: 30 },
|
|
59
|
+
shapes: [
|
|
60
|
+
{
|
|
61
|
+
d: poly([
|
|
62
|
+
[20, -12],
|
|
63
|
+
[110, -12],
|
|
64
|
+
[110, 26],
|
|
65
|
+
[96, 26],
|
|
66
|
+
[96, 12],
|
|
67
|
+
[82, 12],
|
|
68
|
+
[82, 30],
|
|
69
|
+
[66, 30],
|
|
70
|
+
[66, 12],
|
|
71
|
+
[20, 12],
|
|
72
|
+
], 4),
|
|
73
|
+
fill: 'gold',
|
|
74
|
+
depth: 1,
|
|
75
|
+
},
|
|
76
|
+
{ d: ring(0, 0, 44, 18), fill: 'gold', depth: 1 },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
glow('root', [-150, -170], 22, [twinkle(40), twinkle(140, true)]),
|
|
80
|
+
],
|
|
81
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { nudge, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A UPS: a heavy navy box, a pale screen showing a charged battery, a power button and vents
|
|
6
|
+
const W = 170;
|
|
7
|
+
const D = 230;
|
|
8
|
+
const H = 210;
|
|
9
|
+
const BOX = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
|
|
10
|
+
const front = faceOf(BOX, 'front');
|
|
11
|
+
export const ups = {
|
|
12
|
+
name: 'ups',
|
|
13
|
+
frames: 180,
|
|
14
|
+
line: LINE,
|
|
15
|
+
extrude: [0, 0],
|
|
16
|
+
layers: [
|
|
17
|
+
{ id: 'ups', p: [250, 350], m: nudge, shapes: [] },
|
|
18
|
+
{
|
|
19
|
+
parent: 'ups',
|
|
20
|
+
shapes: [
|
|
21
|
+
...solid(BOX, { fill: 'deep', top: 'main' }, 3),
|
|
22
|
+
{ d: quad(front, 0.14, 0.56, 0.72, 0.3, 3), fill: 'tint' },
|
|
23
|
+
// the battery: a shell, its nub and three charge bars
|
|
24
|
+
{ d: quad(front, 0.24, 0.62, 0.44, 0.18, 2), fill: 'white' },
|
|
25
|
+
{ d: quad(front, 0.68, 0.67, 0.05, 0.08, 1), fill: 'white' },
|
|
26
|
+
...[0, 1, 2].map((i) => ({
|
|
27
|
+
d: quad(front, 0.28 + i * 0.13, 0.65, 0.1, 0.12, 1),
|
|
28
|
+
fill: 'ok',
|
|
29
|
+
line: 3,
|
|
30
|
+
})),
|
|
31
|
+
{ d: dot(front, 0.5, 0.36, 0.08, 0.08 * (W / H)), fill: 'gold' },
|
|
32
|
+
...[0.1, 0.16].map((t) => ({ d: stroke(front, [0.22, t], [0.78, t]) })),
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
glow('ups', [118, -270], 24, [twinkle(50), twinkle(140, true)]),
|
|
36
|
+
],
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a USB flash drive modelled in 3d (see iso.ts); it plugs in and its light blinks.
|
|
2
|
+
import { slide, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, ISO, quad, solid } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
const BODY = block([-80, -150, 0], [160, 0, 0], [0, 300, 0], [0, 0, 52]);
|
|
6
|
+
const PLUG = block([-54, -260, 8], [108, 0, 0], [0, 110, 0], [0, 0, 36]);
|
|
7
|
+
const plugTop = faceOf(PLUG, 'top');
|
|
8
|
+
const top = faceOf(BODY, 'top');
|
|
9
|
+
export const usbDrive = {
|
|
10
|
+
name: 'usb-drive',
|
|
11
|
+
frames: 160,
|
|
12
|
+
line: LINE,
|
|
13
|
+
extrude: [0, 0],
|
|
14
|
+
layers: [
|
|
15
|
+
{ id: 'usb', p: [280, 300], m: slide(ISO([0, -40, 0]), 14, 70, 30), shapes: [] },
|
|
16
|
+
{
|
|
17
|
+
parent: 'usb',
|
|
18
|
+
shapes: [
|
|
19
|
+
...solid(PLUG, { fill: 'grey', top: 'white' }, 2),
|
|
20
|
+
{ d: quad(plugTop, 0.2, 0.3, 0.2, 0.25), fill: 'ink' },
|
|
21
|
+
{ d: quad(plugTop, 0.6, 0.3, 0.2, 0.25), fill: 'ink' },
|
|
22
|
+
...solid(BODY, { fill: 'deep', top: 'main' }, 6),
|
|
23
|
+
{ d: quad(top, 0.2, 0.45, 0.6, 0.35, 6), fill: 'white' },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
parent: 'usb',
|
|
28
|
+
a: top.at(0.5, 0.2),
|
|
29
|
+
p: top.at(0.5, 0.2),
|
|
30
|
+
m: [twinkle(46), twinkle(100, true)],
|
|
31
|
+
shapes: [{ d: dot(top, 0.5, 0.2, 0.08, 0.05), fill: 'ok' }],
|
|
32
|
+
},
|
|
33
|
+
glow('usb', [-150, -100], 22, [twinkle(50), twinkle(130, true)]),
|
|
34
|
+
],
|
|
35
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a verified rosette with a check, hopping and glinting.
|
|
2
|
+
import { glint, hop, sparkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, rosette, spark } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
export const verified = {
|
|
6
|
+
name: 'verified',
|
|
7
|
+
frames: 160,
|
|
8
|
+
line: LINE,
|
|
9
|
+
extrude: EXT,
|
|
10
|
+
layers: [
|
|
11
|
+
{ id: 'root', a: [0, 120], p: [250, 370], m: hop, shapes: [] },
|
|
12
|
+
{
|
|
13
|
+
id: 'badge',
|
|
14
|
+
parent: 'root',
|
|
15
|
+
tilt: FACE,
|
|
16
|
+
shapes: [
|
|
17
|
+
{ d: rosette(0, 0, 120, 12), fill: 'ok', depth: 1 },
|
|
18
|
+
{ d: ellipse(0, 0, 74), fill: 'white', depth: 0.3 },
|
|
19
|
+
{ d: line([-34, 2], [-8, 28], [38, -24]), line: 16 },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
parent: 'badge',
|
|
24
|
+
a: [40, -40],
|
|
25
|
+
p: [40, -40],
|
|
26
|
+
m: glint(28, 80),
|
|
27
|
+
shapes: [{ d: spark(40, -40, 22), fill: 'white' }],
|
|
28
|
+
},
|
|
29
|
+
glow('root', [-150, -110], 26, sparkle(20)),
|
|
30
|
+
glow('root', [150, -40], 16, sparkle(60)),
|
|
31
|
+
],
|
|
32
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers (konmek asked for one), modelled in 3d (see iso.ts): a virtual machine, a computer
|
|
2
|
+
// with a prompt on its screen hovering over the host it runs on, never touching it.
|
|
3
|
+
import { hop, twinkle } from '../motions.js';
|
|
4
|
+
import { poly } from '../sticker.js';
|
|
5
|
+
import { block, dot, faceOf, quad, solid } from '../iso.js';
|
|
6
|
+
import { glow, LINE } from './shared.js';
|
|
7
|
+
// the host: a low wide box, lights along its front
|
|
8
|
+
const HOST = block([-136, -110, 0], [272, 0, 0], [0, 220, 0], [0, 0, 50]);
|
|
9
|
+
const hostFront = faceOf(HOST, 'front');
|
|
10
|
+
const hostTop = faceOf(HOST, 'top');
|
|
11
|
+
// the guest: a cube hovering over a pad on the host, a screen on its front
|
|
12
|
+
const S = 132;
|
|
13
|
+
const LIFT = 136;
|
|
14
|
+
const GUEST = block([-S / 2, -S / 2, LIFT], [S, 0, 0], [0, S, 0], [0, 0, S]);
|
|
15
|
+
const screen = faceOf(GUEST, 'front');
|
|
16
|
+
/** A filled polygon in a face's 0..1 space. */
|
|
17
|
+
const onFace = (f, pts, r = 0) => poly(pts.map(([s, t]) => f.at(s, t)), r);
|
|
18
|
+
// a prompt: a chevron and a cursor, white on the dark screen
|
|
19
|
+
const PROMPT = [
|
|
20
|
+
{
|
|
21
|
+
d: onFace(screen, [
|
|
22
|
+
[0.24, 0.66],
|
|
23
|
+
[0.42, 0.53],
|
|
24
|
+
[0.24, 0.4],
|
|
25
|
+
[0.24, 0.48],
|
|
26
|
+
[0.32, 0.53],
|
|
27
|
+
[0.24, 0.58],
|
|
28
|
+
], 2),
|
|
29
|
+
fill: 'white',
|
|
30
|
+
line: 3,
|
|
31
|
+
},
|
|
32
|
+
{ d: quad(screen, 0.48, 0.4, 0.24, 0.08, 2), fill: 'white', line: 3 },
|
|
33
|
+
];
|
|
34
|
+
export const virtualMachine = {
|
|
35
|
+
name: 'virtual-machine',
|
|
36
|
+
frames: 180,
|
|
37
|
+
line: LINE,
|
|
38
|
+
extrude: [0, 0],
|
|
39
|
+
layers: [
|
|
40
|
+
{ id: 'root', p: [250, 372], shapes: [] },
|
|
41
|
+
{
|
|
42
|
+
parent: 'root',
|
|
43
|
+
shapes: [
|
|
44
|
+
...solid(HOST, { fill: 'grey', top: 'white', front: 'white' }, 4),
|
|
45
|
+
...[0.12, 0.2, 0.28].map((s) => ({
|
|
46
|
+
d: dot(hostFront, s, 0.5, 0.018, 0.12),
|
|
47
|
+
fill: 'ok',
|
|
48
|
+
})),
|
|
49
|
+
{ d: quad(hostFront, 0.5, 0.36, 0.4, 0.28, 2), fill: 'grey' },
|
|
50
|
+
{ d: dot(hostTop, 0.5, 0.5, 0.3, 0.38), fill: 'tint' },
|
|
51
|
+
{ d: dot(hostTop, 0.5, 0.5, 0.18, 0.23), fill: 'main' },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{ id: 'guest', parent: 'root', a: [0, -190], p: [0, -190], m: { ...hop, k: 0.7 }, shapes: [] },
|
|
55
|
+
{
|
|
56
|
+
parent: 'guest',
|
|
57
|
+
shapes: [
|
|
58
|
+
...solid(GUEST, { fill: 'main', top: 'tint', front: 'white' }, 4),
|
|
59
|
+
{ d: quad(screen, 0.12, 0.2, 0.76, 0.66, 3), fill: 'deep' },
|
|
60
|
+
...PROMPT,
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
glow('guest', [150, -260], 24, [twinkle(40), twinkle(140, true)]),
|
|
64
|
+
glow('guest', [-160, -150], 16, [twinkle(52), twinkle(150, true)]),
|
|
65
|
+
],
|
|
66
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Shape, Swatch } from '../sticker.js';
|
|
2
|
+
import type { V3 } from '../iso.js';
|
|
3
|
+
export declare const box: (o: V3, size: V3, fill?: Swatch, top?: Swatch, front?: Swatch) => Shape[];
|
|
4
|
+
export declare const wire: (points: V3[], width?: number) => Shape;
|
|
5
|
+
/** A drum along y: curved side wall and a circular front, not an offset slab. */
|
|
6
|
+
export declare function drum(c: V3, rx: number, rz: number, depth: number, fill: Swatch, side?: Swatch): Shape[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Solid primitives in the same world coordinates and camera as notebook.
|
|
2
|
+
import { line, poly } from '../sticker.js';
|
|
3
|
+
import { add, block, ISO, solid } from '../iso.js';
|
|
4
|
+
export const box = (o, size, fill = 'main', top = 'tint', front = fill) => solid(block(o, [size[0], 0, 0], [0, size[1], 0], [0, 0, size[2]]), { fill, top, front }, 6);
|
|
5
|
+
export const wire = (points, width = 5) => ({
|
|
6
|
+
d: line(...points.map(ISO)),
|
|
7
|
+
line: width,
|
|
8
|
+
round: true,
|
|
9
|
+
});
|
|
10
|
+
/** A drum along y: curved side wall and a circular front, not an offset slab. */
|
|
11
|
+
export function drum(c, rx, rz, depth, fill, side = 'deep') {
|
|
12
|
+
const ring = (y) => Array.from({ length: 48 }, (_, i) => {
|
|
13
|
+
const a = (i * Math.PI) / 24;
|
|
14
|
+
return ISO(add(c, [rx * Math.cos(a), y, rz * Math.sin(a)]));
|
|
15
|
+
});
|
|
16
|
+
const front = ring(0);
|
|
17
|
+
const back = ring(depth);
|
|
18
|
+
// The convex silhouette hides the rear cap and avoids drawing hidden rim edges.
|
|
19
|
+
const points = [...front, ...back].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
|
|
20
|
+
const cross = (a, b, c) => (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
|
|
21
|
+
const half = (ordered) => {
|
|
22
|
+
const hull = [];
|
|
23
|
+
for (const p of ordered) {
|
|
24
|
+
while (hull.length > 1 && cross(hull[hull.length - 2], hull[hull.length - 1], p) <= 0)
|
|
25
|
+
hull.pop();
|
|
26
|
+
hull.push(p);
|
|
27
|
+
}
|
|
28
|
+
return hull.slice(0, -1);
|
|
29
|
+
};
|
|
30
|
+
const outline = [...half(points), ...half([...points].reverse())];
|
|
31
|
+
return [
|
|
32
|
+
{ d: poly(outline), fill: side },
|
|
33
|
+
{ d: poly(front), fill },
|
|
34
|
+
];
|
|
35
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { clasp, shackle, twinkle } from '../motions.js';
|
|
3
|
+
import { arc } from '../sticker.js';
|
|
4
|
+
import { block, dot, faceOf, quad, solid } from '../iso.js';
|
|
5
|
+
import { glow, LINE } from './shared.js';
|
|
6
|
+
// A small VPN box with a padlock standing on its lid: the shackle springs open and snaps shut
|
|
7
|
+
const BOX = block([-130, -90, 0], [260, 0, 0], [0, 180, 0], [0, 0, 60]);
|
|
8
|
+
const front = faceOf(BOX, 'front');
|
|
9
|
+
const BODY = block([-48, -20, 60], [96, 0, 0], [0, 34, 0], [0, 0, 74]);
|
|
10
|
+
const lockFront = faceOf(BODY, 'front');
|
|
11
|
+
const top = faceOf(BODY, 'top').at(0.5, 0.5);
|
|
12
|
+
export const vpnGateway = {
|
|
13
|
+
name: 'vpn-gateway',
|
|
14
|
+
frames: 180,
|
|
15
|
+
line: LINE,
|
|
16
|
+
extrude: [0, 0],
|
|
17
|
+
layers: [
|
|
18
|
+
{ id: 'vpn', p: [250, 360], m: clasp, shapes: [] },
|
|
19
|
+
{
|
|
20
|
+
parent: 'vpn',
|
|
21
|
+
shapes: [
|
|
22
|
+
...solid(BOX, { fill: 'deep', top: 'main' }, 4),
|
|
23
|
+
...[0, 1, 2].map((i) => ({
|
|
24
|
+
d: dot(front, 0.1 + i * 0.07, 0.5, 0.018, 0.1),
|
|
25
|
+
fill: i === 2 ? 'gold' : 'ok',
|
|
26
|
+
})),
|
|
27
|
+
...[0, 1].map((i) => ({
|
|
28
|
+
d: quad(front, 0.7 + i * 0.1, 0.3, 0.06, 0.4, 1),
|
|
29
|
+
fill: 'ink',
|
|
30
|
+
line: false,
|
|
31
|
+
})),
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
// the shackle hinges on its left foot, behind the lock body
|
|
35
|
+
{
|
|
36
|
+
parent: 'vpn',
|
|
37
|
+
a: [top[0] - 30, top[1] - 4],
|
|
38
|
+
p: [top[0] - 30, top[1] - 4],
|
|
39
|
+
m: shackle,
|
|
40
|
+
shapes: [{ d: arc(top[0], top[1] - 4, 30, 180, 360), line: 14, round: true }],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
parent: 'vpn',
|
|
44
|
+
shapes: [
|
|
45
|
+
...solid(BODY, { fill: 'gold', front: 'gold' }, 6),
|
|
46
|
+
{ d: dot(lockFront, 0.5, 0.55, 0.1, 0.14), fill: 'ink', line: false },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
glow('vpn', [160, -200], 22, [twinkle(50), twinkle(140, true)]),
|
|
50
|
+
],
|
|
51
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: wake-on-LAN, a power button pressed from afar; it lights up and the magic packet
|
|
2
|
+
// ripples out.
|
|
3
|
+
import { erase, press, twinkle } from '../motions.js';
|
|
4
|
+
import { arc, ellipse, line, ring } from '../sticker.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
const WAVES = [150, 180, 210].map((r, i) => ({
|
|
7
|
+
d: arc(0, 0, r, -70, -20),
|
|
8
|
+
round: true,
|
|
9
|
+
trim: erase(30 + i * 6, 110 + i * 6),
|
|
10
|
+
}));
|
|
11
|
+
export const wakeOnLan = {
|
|
12
|
+
name: 'wake-on-lan',
|
|
13
|
+
frames: 160,
|
|
14
|
+
line: LINE,
|
|
15
|
+
extrude: EXT,
|
|
16
|
+
layers: [
|
|
17
|
+
{ id: 'root', p: [230, 290], shapes: [] },
|
|
18
|
+
{
|
|
19
|
+
id: 'base',
|
|
20
|
+
parent: 'root',
|
|
21
|
+
tilt: FACE,
|
|
22
|
+
shapes: [{ d: ellipse(0, 0, 128), fill: 'deep', depth: 1 }, ...WAVES],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
parent: 'base',
|
|
26
|
+
m: [twinkle(36), twinkle(140, true)],
|
|
27
|
+
shapes: [{ d: ring(0, 0, 118, 100), fill: 'ok' }],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
parent: 'base',
|
|
31
|
+
m: { ...press, k: 0.6 },
|
|
32
|
+
shapes: [
|
|
33
|
+
{ d: ellipse(0, 0, 92), fill: 'white', depth: 1.2 },
|
|
34
|
+
{ d: arc(0, 6, 40, -55, 235), line: 10, round: true },
|
|
35
|
+
{ d: line([0, -48], [0, 0]), line: 10, round: true },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
glow('root', [-150, -110], 22, [twinkle(40), twinkle(130, true)]),
|
|
39
|
+
],
|
|
40
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// From bearfee's sticker set, drawn on the fun-isometric kit by Kelvin Adithya (MIT, see LICENSE).
|
|
2
|
+
import { toss, tossLag, tossLag2 } from '../motions.js';
|
|
3
|
+
import { ellipse, line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, LINE } from './shared.js';
|
|
5
|
+
/** Wallet: flips open on a toss, the banknote and the card riding inside it. */
|
|
6
|
+
export const wallet = {
|
|
7
|
+
name: 'wallet',
|
|
8
|
+
frames: 180,
|
|
9
|
+
line: LINE,
|
|
10
|
+
extrude: EXT,
|
|
11
|
+
layers: [
|
|
12
|
+
{ parent: 'body', shapes: [{ d: rect(-130, -100, 260, 192, 22), fill: 'deep', depth: 1 }] },
|
|
13
|
+
{
|
|
14
|
+
parent: 'body',
|
|
15
|
+
a: [-108, 50],
|
|
16
|
+
p: [-108, 50],
|
|
17
|
+
m: tossLag2,
|
|
18
|
+
shapes: [
|
|
19
|
+
{ d: rect(-104, -150, 200, 140, 10), fill: 'ok', depth: 0.3 },
|
|
20
|
+
{ d: ellipse(-4, -104, 30, 22), fill: 'white' },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
parent: 'body',
|
|
25
|
+
a: [-116, 52],
|
|
26
|
+
p: [-116, 52],
|
|
27
|
+
m: tossLag,
|
|
28
|
+
shapes: [
|
|
29
|
+
{ d: rect(-118, -122, 210, 132, 14), fill: 'gold', depth: 0.3 },
|
|
30
|
+
{ d: line([-96, -96], [-36, -96]) },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'body',
|
|
35
|
+
a: [-130, 20],
|
|
36
|
+
p: [126, 294],
|
|
37
|
+
tilt: FACE,
|
|
38
|
+
m: toss,
|
|
39
|
+
shapes: [
|
|
40
|
+
{ d: rect(-130, -46, 260, 138, 22), fill: 'main', depth: 1 },
|
|
41
|
+
{
|
|
42
|
+
d: poly([
|
|
43
|
+
[44, -16],
|
|
44
|
+
[152, -16],
|
|
45
|
+
[152, 44],
|
|
46
|
+
[44, 44],
|
|
47
|
+
], [16, 8, 8, 16]),
|
|
48
|
+
fill: 'deep',
|
|
49
|
+
depth: 0.4,
|
|
50
|
+
},
|
|
51
|
+
{ d: ellipse(84, 14, 12), fill: 'gold' },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a glazed Thai water jar (ong) with a dipper bowl afloat, in 3d (see street-kit.ts).
|
|
2
|
+
import { bob, glint, twinkle } from '../motions.js';
|
|
3
|
+
import { poly } from '../sticker.js';
|
|
4
|
+
import { ISO } from '../iso.js';
|
|
5
|
+
import { frontArc, lathe, ring } from './street-kit.js';
|
|
6
|
+
import { glow, LINE } from './shared.js';
|
|
7
|
+
// A wide dark-glazed jar with a gold band of cloud scrolls and a glint, filled to the brim; a silver bowl bobs on top
|
|
8
|
+
const K = 1.25;
|
|
9
|
+
const RAW = [
|
|
10
|
+
[0, 60],
|
|
11
|
+
[30, 88],
|
|
12
|
+
[80, 112],
|
|
13
|
+
[120, 110],
|
|
14
|
+
[160, 88],
|
|
15
|
+
[188, 60],
|
|
16
|
+
[198, 50],
|
|
17
|
+
[208, 56],
|
|
18
|
+
];
|
|
19
|
+
const PROFILE = RAW.map(([z, r]) => [z * K, r * K]);
|
|
20
|
+
const JAR = lathe([0, 0, 0], PROFILE);
|
|
21
|
+
const LIP = 208 * K;
|
|
22
|
+
const WATER = ring([0, 0, LIP], 46 * K).map((p) => ISO(p));
|
|
23
|
+
const band = (z0, r0, z1, r1) => poly([...frontArc([0, 0, z0], r0), ...frontArc([0, 0, z1], r1).reverse()]);
|
|
24
|
+
const BOWL = [8, -10, LIP + 2];
|
|
25
|
+
const bowl = (r) => ring(BOWL, r).map((p) => ISO(p));
|
|
26
|
+
const [hx, hy] = ISO([-88 * K, -40 * K, 120 * K]);
|
|
27
|
+
export const waterJar = {
|
|
28
|
+
name: 'water-jar',
|
|
29
|
+
frames: 160,
|
|
30
|
+
line: LINE,
|
|
31
|
+
extrude: [0, 0],
|
|
32
|
+
layers: [
|
|
33
|
+
{ id: 'jar', p: [250, 410], shapes: [] },
|
|
34
|
+
{
|
|
35
|
+
parent: 'jar',
|
|
36
|
+
shapes: [
|
|
37
|
+
{ d: poly(JAR.outline, 2), fill: 'deep' },
|
|
38
|
+
{ d: band(98 * K, 111 * K, 122 * K, 109.6 * K), fill: 'gold' },
|
|
39
|
+
{ d: band(40 * K, 93 * K, 50 * K, 98 * K), fill: 'gold' },
|
|
40
|
+
{ d: poly(JAR.top, 2), fill: 'deep' },
|
|
41
|
+
{ d: poly(WATER, 2), fill: 'tint' },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
parent: 'jar',
|
|
46
|
+
m: { ...bob, k: 1.6 },
|
|
47
|
+
shapes: [
|
|
48
|
+
{ d: poly(bowl(24), 2), fill: 'grey' },
|
|
49
|
+
{ d: poly(bowl(17), 2), fill: 'white' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
parent: 'jar',
|
|
54
|
+
a: [hx, hy],
|
|
55
|
+
p: [hx, hy],
|
|
56
|
+
m: glint(30, 90),
|
|
57
|
+
shapes: [
|
|
58
|
+
{
|
|
59
|
+
d: poly([
|
|
60
|
+
[hx - 6, hy - 30],
|
|
61
|
+
[hx + 4, hy - 30],
|
|
62
|
+
[hx + 6, hy + 30],
|
|
63
|
+
[hx - 4, hy + 30],
|
|
64
|
+
], 4),
|
|
65
|
+
fill: 'white',
|
|
66
|
+
line: false,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
glow('jar', [140, -250], 24, [twinkle(60), twinkle(130, true)]),
|
|
71
|
+
],
|
|
72
|
+
};
|