@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,61 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: copied to the clipboard; a snipped picture is dealt onto the board and a check pops.
|
|
2
|
+
import { deal, hop, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
export const clipboard = {
|
|
6
|
+
name: 'clipboard',
|
|
7
|
+
frames: 180,
|
|
8
|
+
line: LINE,
|
|
9
|
+
extrude: EXT,
|
|
10
|
+
still: 100,
|
|
11
|
+
layers: [
|
|
12
|
+
{ id: 'root', a: [0, 150], p: [244, 390], m: { ...hop, at: 40, k: 0.5 }, shapes: [] },
|
|
13
|
+
{
|
|
14
|
+
id: 'board',
|
|
15
|
+
parent: 'root',
|
|
16
|
+
tilt: FACE,
|
|
17
|
+
shapes: [
|
|
18
|
+
{ d: rect(-120, -150, 240, 300, 20), fill: 'main', depth: 1 },
|
|
19
|
+
{ d: rect(-100, -124, 200, 256, 8), fill: 'white', depth: 0.2 },
|
|
20
|
+
{ d: rect(-50, -170, 100, 44, 12), fill: 'grey', depth: 0.6 },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
parent: 'board',
|
|
25
|
+
a: [0, 0],
|
|
26
|
+
p: [0, 0],
|
|
27
|
+
m: [deal([160, -60], 14, 4), twinkle(160, true)],
|
|
28
|
+
shapes: [
|
|
29
|
+
{ d: rect(-80, -90, 160, 120, 8), fill: 'tint', depth: 0.3 },
|
|
30
|
+
{ d: ellipse(40, -60, 14), fill: 'gold' },
|
|
31
|
+
{
|
|
32
|
+
d: poly([
|
|
33
|
+
[-80, 30],
|
|
34
|
+
[-80, 0],
|
|
35
|
+
[-30, -40],
|
|
36
|
+
[20, 10],
|
|
37
|
+
[44, -10],
|
|
38
|
+
[80, 20],
|
|
39
|
+
[80, 30],
|
|
40
|
+
], [6, 3, 6, 4, 6, 3, 6]),
|
|
41
|
+
fill: 'ok',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
parent: 'board',
|
|
47
|
+
shapes: [{ d: line([-70, 70], [70, 70]) }, { d: line([-70, 100], [20, 100]) }],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
parent: 'board',
|
|
51
|
+
a: [100, 120],
|
|
52
|
+
p: [100, 120],
|
|
53
|
+
m: [twinkle(50), twinkle(150, true)],
|
|
54
|
+
shapes: [
|
|
55
|
+
{ d: ellipse(100, 120, 30), fill: 'ok', depth: 0.5 },
|
|
56
|
+
{ d: line([86, 120], [96, 130], [116, 108]) },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
glow('root', [-170, -170], 22, [twinkle(60), twinkle(140, true)]),
|
|
60
|
+
],
|
|
61
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers (new; not the fun-isometric cloud): a puffy cloud slab drifting, a small one behind.
|
|
2
|
+
import { drift, twinkle } from '../motions.js';
|
|
3
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
4
|
+
import { cloud as puffs } from './sky-kit.js';
|
|
5
|
+
export const cloud = {
|
|
6
|
+
name: 'cloud',
|
|
7
|
+
frames: 180,
|
|
8
|
+
line: LINE,
|
|
9
|
+
extrude: EXT,
|
|
10
|
+
layers: [
|
|
11
|
+
{ id: 'back', p: [320, 190], m: drift.map((m) => ({ ...m, at: 14, k: 0.6 })), shapes: [] },
|
|
12
|
+
{
|
|
13
|
+
parent: 'back',
|
|
14
|
+
tilt: FACE,
|
|
15
|
+
shapes: [{ d: puffs(0, 0, 0.55), fill: 'tint', depth: 0.8, crease: false }],
|
|
16
|
+
},
|
|
17
|
+
{ id: 'cl', p: [230, 280], m: drift, shapes: [] },
|
|
18
|
+
{
|
|
19
|
+
parent: 'cl',
|
|
20
|
+
tilt: FACE,
|
|
21
|
+
shapes: [
|
|
22
|
+
{ d: puffs(0, 0), fill: 'white', side: 'tint', depth: 1.2, crease: false },
|
|
23
|
+
{ d: puffs(-36, -14, 0.3), fill: 'tint', line: false },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
glow('cl', [-150, -90], 22, [twinkle(40), twinkle(140, true)]),
|
|
27
|
+
],
|
|
28
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: two stacks of baht coins lying flat; the top coin springs up and drops back.
|
|
2
|
+
import { bounce, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, VIEWS } from '../sticker.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
const { tilt: FLAT, extrude: DOWN } = VIEWS.flat;
|
|
6
|
+
const STEP = 18;
|
|
7
|
+
// a baht sign for the top face: the bar through it and the two bowls of the B
|
|
8
|
+
const BAHT = 'M-4 -40L-4 40M-20 -26L4 -26Q22 -26 22 -12Q22 0 4 0L-20 0ZM-20 0L8 0Q26 0 26 14Q26 28 8 28L-20 28Z';
|
|
9
|
+
const face = (sign) => [
|
|
10
|
+
{ d: ellipse(0, 0, 80), fill: 'gold', depth: 0.6 },
|
|
11
|
+
{ d: ellipse(0, 0, 64) },
|
|
12
|
+
...(sign ? [{ d: BAHT }] : []),
|
|
13
|
+
];
|
|
14
|
+
const stack = (id, at, n) => Array.from({ length: n }, (_, i) => ({
|
|
15
|
+
...(i === n - 1 ? { id } : {}),
|
|
16
|
+
parent: 'pile',
|
|
17
|
+
tilt: FLAT,
|
|
18
|
+
p: [at[0], at[1] - i * STEP],
|
|
19
|
+
shapes: face(i === n - 1),
|
|
20
|
+
}));
|
|
21
|
+
export const coins = {
|
|
22
|
+
name: 'coins',
|
|
23
|
+
frames: 180,
|
|
24
|
+
line: LINE,
|
|
25
|
+
extrude: DOWN,
|
|
26
|
+
layers: [
|
|
27
|
+
{ id: 'pile', p: [250, 270], shapes: [] },
|
|
28
|
+
...stack('back', [90, 0], 3),
|
|
29
|
+
...stack('front', [-70, 80], 5),
|
|
30
|
+
{ parent: 'pile', tilt: FLAT, p: [-70, 80 - 5 * STEP], m: bounce, shapes: face(true) },
|
|
31
|
+
glow('pile', [-150, -120], 24, [twinkle(12), twinkle(130, true)]),
|
|
32
|
+
glow('pile', [140, -80], 16, [twinkle(20), twinkle(136, true)]),
|
|
33
|
+
],
|
|
34
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: comparing two files side by side; the changed lines light up red and green.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, LINE } from './shared.js';
|
|
5
|
+
const sheet = (x) => [
|
|
6
|
+
{ d: rect(x, -130, 150, 250, 12), fill: 'white', depth: 0.6 },
|
|
7
|
+
...[-100, -70, -10, 50, 80].map((y) => ({
|
|
8
|
+
d: rect(x + 18, y, 100, 12, 6),
|
|
9
|
+
fill: 'tint',
|
|
10
|
+
line: 3,
|
|
11
|
+
})),
|
|
12
|
+
];
|
|
13
|
+
const mark = (x, y, fill, start) => ({
|
|
14
|
+
parent: 'pair',
|
|
15
|
+
a: [x, y + 6],
|
|
16
|
+
p: [x, y + 6],
|
|
17
|
+
m: [twinkle(start), twinkle(140, true)],
|
|
18
|
+
shapes: [{ d: rect(x, y - 2, 120, 16, 6), fill, line: 3 }],
|
|
19
|
+
});
|
|
20
|
+
export const compare = {
|
|
21
|
+
name: 'compare',
|
|
22
|
+
frames: 160,
|
|
23
|
+
line: LINE,
|
|
24
|
+
extrude: EXT,
|
|
25
|
+
layers: [
|
|
26
|
+
{ id: 'root', a: [0, 120], p: [250, 360], m: { ...hop, k: 0.5 }, shapes: [] },
|
|
27
|
+
{ id: 'pair', parent: 'root', tilt: FACE, shapes: [...sheet(-166), ...sheet(16)] },
|
|
28
|
+
mark(-156, -40, 'hot', 20),
|
|
29
|
+
mark(26, -40, 'ok', 28),
|
|
30
|
+
mark(-156, 20, 'hot', 40),
|
|
31
|
+
mark(26, 20, 'ok', 48),
|
|
32
|
+
],
|
|
33
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a party popper modelled in 3d (see object-drum.ts); it kicks and bursts confetti.
|
|
2
|
+
import { deal, fall, jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, spark } 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 = [-60, 0, 0];
|
|
8
|
+
const AXIS = [70, -30, 190];
|
|
9
|
+
const CONE = drum(BASE, AXIS, 14, 70, { side: 'gold', cap: 'deep' }, [1, 0, 0]);
|
|
10
|
+
const MOUTH = ISO([BASE[0] + AXIS[0], BASE[1] + AXIS[1], BASE[2] + AXIS[2]]);
|
|
11
|
+
const PIECES = [
|
|
12
|
+
[[-120, -230], 'main', 'strip', 30],
|
|
13
|
+
[[-40, -300], 'hot', 'dot', -40],
|
|
14
|
+
[[60, -270], 'ok', 'strip', -20],
|
|
15
|
+
[[130, -200], 'gold', 'star', 0],
|
|
16
|
+
[[-160, -150], 'ok', 'star', 0],
|
|
17
|
+
[[120, -110], 'main', 'dot', 0],
|
|
18
|
+
[[10, -220], 'tint', 'strip', 50],
|
|
19
|
+
[[-90, -330], 'gold', 'strip', -60],
|
|
20
|
+
];
|
|
21
|
+
const shape = (kind, fill, turn) => {
|
|
22
|
+
if (kind === 'dot')
|
|
23
|
+
return { d: ellipse(0, 0, 12), fill, depth: 0.4 };
|
|
24
|
+
if (kind === 'star')
|
|
25
|
+
return { d: spark(0, 0, 18), fill };
|
|
26
|
+
const a = (turn * Math.PI) / 180;
|
|
27
|
+
const [c, s] = [Math.cos(a), Math.sin(a)];
|
|
28
|
+
const pts = [
|
|
29
|
+
[-24, -8],
|
|
30
|
+
[24, -8],
|
|
31
|
+
[24, 8],
|
|
32
|
+
[-24, 8],
|
|
33
|
+
].map(([x = 0, y = 0]) => `${(x * c - y * s).toFixed(1)} ${(x * s + y * c).toFixed(1)}`);
|
|
34
|
+
return { d: `M${pts.join('L')}Z`, fill, depth: 0.4 };
|
|
35
|
+
};
|
|
36
|
+
const BURST = 26;
|
|
37
|
+
export const confetti = {
|
|
38
|
+
name: 'confetti',
|
|
39
|
+
frames: 180,
|
|
40
|
+
still: 100,
|
|
41
|
+
line: LINE,
|
|
42
|
+
extrude: [0, -6],
|
|
43
|
+
layers: [
|
|
44
|
+
{ id: 'scene', p: [250, 380], shapes: [] },
|
|
45
|
+
...PIECES.map(([at, fill, kind, turn], i) => {
|
|
46
|
+
const start = BURST + (i % 4) * 2;
|
|
47
|
+
const p = [at[0], at[1]];
|
|
48
|
+
return {
|
|
49
|
+
parent: 'scene',
|
|
50
|
+
p,
|
|
51
|
+
ip: start,
|
|
52
|
+
op: 170,
|
|
53
|
+
m: [
|
|
54
|
+
deal([MOUTH[0] - p[0], MOUTH[1] - p[1]], i % 2 ? 160 : -160, start),
|
|
55
|
+
fall([i % 2 ? 14 : -14, 70], 110 + i * 3, 40),
|
|
56
|
+
twinkle(130 + i * 2, true),
|
|
57
|
+
],
|
|
58
|
+
shapes: [shape(kind, fill, turn)],
|
|
59
|
+
};
|
|
60
|
+
}),
|
|
61
|
+
{
|
|
62
|
+
id: 'pop',
|
|
63
|
+
parent: 'scene',
|
|
64
|
+
a: ISO(BASE),
|
|
65
|
+
p: ISO(BASE),
|
|
66
|
+
m: { ...jolt([-10, 16]), at: BURST - 4 },
|
|
67
|
+
shapes: [],
|
|
68
|
+
},
|
|
69
|
+
{ parent: 'pop', shapes: [...CONE.shapes, { d: CONE.disc(0, 0, 0.7), fill: 'hot' }] },
|
|
70
|
+
glow('scene', [170, -320], 22, [twinkle(BURST + 20), twinkle(140, true)]),
|
|
71
|
+
],
|
|
72
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a convenience store carrier bag, a drink and a snack peeking out. No store mark.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
const BAG = poly([
|
|
6
|
+
[-112, -40],
|
|
7
|
+
[112, -40],
|
|
8
|
+
[98, 150],
|
|
9
|
+
[-98, 150],
|
|
10
|
+
], [6, 6, 20, 20]);
|
|
11
|
+
export const convenienceBag = {
|
|
12
|
+
name: 'convenience-bag',
|
|
13
|
+
frames: 160,
|
|
14
|
+
line: LINE,
|
|
15
|
+
extrude: EXT,
|
|
16
|
+
layers: [
|
|
17
|
+
{ id: 'bag', a: [0, 150], p: [250, 400], m: hop, shapes: [] },
|
|
18
|
+
{
|
|
19
|
+
parent: 'bag',
|
|
20
|
+
tilt: FACE,
|
|
21
|
+
shapes: [{ d: 'M-104 -30C-110 -210 -10 -210 -14 -30', line: 10, round: true }],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
parent: 'bag',
|
|
25
|
+
tilt: FACE,
|
|
26
|
+
a: [0, -40],
|
|
27
|
+
p: [0, -40],
|
|
28
|
+
m: { ...hop, at: 5, k: 0.5 },
|
|
29
|
+
shapes: [
|
|
30
|
+
{ d: rect(-80, -150, 52, 130, 12), fill: 'tint', depth: 0.6 },
|
|
31
|
+
{ d: rect(-74, -172, 40, 26, 6), fill: 'main', depth: 0.6 },
|
|
32
|
+
{ d: rect(-80, -110, 52, 34, 0), fill: 'white', line: false },
|
|
33
|
+
{ d: line([-80, -110], [-28, -110]) },
|
|
34
|
+
{ d: line([-80, -76], [-28, -76]) },
|
|
35
|
+
{ d: rect(-6, -112, 96, 90, 18), fill: 'gold', depth: 0.6 },
|
|
36
|
+
{ d: rect(14, -84, 56, 22, 11), fill: 'hot', depth: 0.2 },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
parent: 'bag',
|
|
41
|
+
tilt: FACE,
|
|
42
|
+
shapes: [
|
|
43
|
+
{ d: 'M14 -30C10 -210 110 -210 104 -30', line: 10, round: true },
|
|
44
|
+
{ d: BAG, fill: 'white', depth: 0.5 },
|
|
45
|
+
{ d: line([-70, 20], [-40, 60]) },
|
|
46
|
+
{ d: line([60, 0], [80, 40]) },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
glow('bag', [140, -180], 24, [twinkle(30), twinkle(130, true)]),
|
|
50
|
+
],
|
|
51
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { erase, sway } from '../motions.js';
|
|
3
|
+
import { line } from '../sticker.js';
|
|
4
|
+
import { block, dot, faceOf, quad, solid, stroke } from '../iso.js';
|
|
5
|
+
import { LINE } from './shared.js';
|
|
6
|
+
// A precision air conditioner: a tall white unit, a big fan grille in its front, a panel, and cold air blowing out
|
|
7
|
+
const W = 170;
|
|
8
|
+
const D = 150;
|
|
9
|
+
const H = 280;
|
|
10
|
+
const K = W / H;
|
|
11
|
+
const UNIT = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
|
|
12
|
+
const front = faceOf(UNIT, 'front');
|
|
13
|
+
// the air leaves the grille towards the viewer's left, in three strokes redrawn one after another
|
|
14
|
+
const [gx, gy] = front.at(0, 0.62);
|
|
15
|
+
const WIND = [-30, 0, 30].map((dy, i) => ({
|
|
16
|
+
d: line([gx - 18, gy + dy], [gx - 70, gy + dy + 10], [gx - 110, gy + dy - 4]),
|
|
17
|
+
round: true,
|
|
18
|
+
trim: erase(20 + i * 6, 96 + i * 6),
|
|
19
|
+
}));
|
|
20
|
+
export const cooling = {
|
|
21
|
+
name: 'cooling',
|
|
22
|
+
frames: 180,
|
|
23
|
+
still: 150,
|
|
24
|
+
line: LINE,
|
|
25
|
+
extrude: [0, 0],
|
|
26
|
+
layers: [
|
|
27
|
+
{ id: 'ac', p: [280, 376], m: { ...sway, k: 0.5 }, shapes: [] },
|
|
28
|
+
{ parent: 'ac', shapes: WIND },
|
|
29
|
+
{
|
|
30
|
+
parent: 'ac',
|
|
31
|
+
shapes: [
|
|
32
|
+
...solid(UNIT, { fill: 'grey', top: 'white', front: 'white' }, 3),
|
|
33
|
+
{ d: dot(front, 0.5, 0.62, 0.36, 0.36 * K), fill: 'deep' },
|
|
34
|
+
{ d: dot(front, 0.5, 0.62, 0.27, 0.27 * K), fill: 'main' },
|
|
35
|
+
...[0, 45, 90, 135].map((deg) => {
|
|
36
|
+
const a = (deg * Math.PI) / 180;
|
|
37
|
+
const [dx, dy] = [Math.cos(a) * 0.25, Math.sin(a) * 0.25 * K];
|
|
38
|
+
return { d: stroke(front, [0.5 - dx, 0.62 - dy], [0.5 + dx, 0.62 + dy]) };
|
|
39
|
+
}),
|
|
40
|
+
{ d: dot(front, 0.5, 0.62, 0.07, 0.07 * K), fill: 'tint' },
|
|
41
|
+
{ d: quad(front, 0.18, 0.1, 0.64, 0.16, 3), fill: 'tint' },
|
|
42
|
+
{ d: dot(front, 0.7, 0.18, 0.04, 0.04 * K), fill: 'ok' },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: copying a file; the copy slides out from behind the original as the bar fills.
|
|
2
|
+
import { SNAP, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { rect } from '../sticker.js';
|
|
4
|
+
import { page } from './paper.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
export const copyFiles = {
|
|
7
|
+
name: 'copy-files',
|
|
8
|
+
frames: 180,
|
|
9
|
+
line: LINE,
|
|
10
|
+
extrude: EXT,
|
|
11
|
+
layers: [
|
|
12
|
+
{ id: 'root', p: [250, 240], shapes: [] },
|
|
13
|
+
{
|
|
14
|
+
id: 'desk',
|
|
15
|
+
parent: 'root',
|
|
16
|
+
tilt: FACE,
|
|
17
|
+
shapes: [{ d: rect(-120, 150, 240, 24, 12), fill: 'white', depth: 0.4 }],
|
|
18
|
+
},
|
|
19
|
+
{ parent: 'desk', m: slide([100, 20], 20, 80, 40), shapes: page(-110, -130, 160, 210, 'ok') },
|
|
20
|
+
{ parent: 'desk', shapes: page(-130, -150, 160, 210, 'main') },
|
|
21
|
+
{
|
|
22
|
+
parent: 'desk',
|
|
23
|
+
a: [-120, 162],
|
|
24
|
+
p: [-120, 162],
|
|
25
|
+
m: {
|
|
26
|
+
s: [
|
|
27
|
+
[20, [0, 100], SNAP],
|
|
28
|
+
[60, [100, 100], 0],
|
|
29
|
+
[140, [100, 100], SNAP],
|
|
30
|
+
[180, [0, 100]],
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
shapes: [{ d: rect(-120, 150, 240, 24, 12), fill: 'ok', line: 3 }],
|
|
34
|
+
},
|
|
35
|
+
glow('root', [170, -150], 22, [twinkle(60), twinkle(140, true)]),
|
|
36
|
+
],
|
|
37
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { slide, sway, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, ISO, quad, solid } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A chassis switch: a tall frame holding line cards, each a thin tray with ports and a light; one card slides out
|
|
6
|
+
const W = 220;
|
|
7
|
+
const D = 180;
|
|
8
|
+
const H = 290;
|
|
9
|
+
const CHASSIS = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
|
|
10
|
+
const card = (z, light) => {
|
|
11
|
+
const b = block([-W / 2 + 12, -D / 2 - 8, z], [W - 24, 0, 0], [0, 8, 0], [0, 0, 44]);
|
|
12
|
+
const f = faceOf(b, 'front');
|
|
13
|
+
return [
|
|
14
|
+
...solid(b, { fill: 'deep', front: 'main' }, 2),
|
|
15
|
+
...[0, 1, 2, 3, 4].map((i) => ({
|
|
16
|
+
d: quad(f, 0.08 + i * 0.12, 0.28, 0.08, 0.44, 1),
|
|
17
|
+
fill: 'ink',
|
|
18
|
+
line: false,
|
|
19
|
+
})),
|
|
20
|
+
{ d: dot(f, 0.86, 0.5, 0.035, 0.16), fill: light },
|
|
21
|
+
];
|
|
22
|
+
};
|
|
23
|
+
export const coreSwitch = {
|
|
24
|
+
name: 'core-switch',
|
|
25
|
+
frames: 180,
|
|
26
|
+
line: LINE,
|
|
27
|
+
extrude: [0, 0],
|
|
28
|
+
layers: [
|
|
29
|
+
{ id: 'core', p: [250, 410], m: { ...sway, k: 0.5 }, shapes: [] },
|
|
30
|
+
{
|
|
31
|
+
parent: 'core',
|
|
32
|
+
shapes: [
|
|
33
|
+
...solid(CHASSIS, { fill: 'deep', top: 'grey', front: 'grey' }, 3),
|
|
34
|
+
...card(230, 'ok'),
|
|
35
|
+
...card(120, 'ok'),
|
|
36
|
+
...card(65, 'ok'),
|
|
37
|
+
...[0, 1, 2].map((i) => ({
|
|
38
|
+
d: quad(faceOf(CHASSIS, 'front'), 0.12 + i * 0.28, 0.04, 0.2, 0.08, 2),
|
|
39
|
+
fill: 'ink',
|
|
40
|
+
line: false,
|
|
41
|
+
})),
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
// the second card is pulled and pushed home
|
|
45
|
+
{ parent: 'core', m: slide(ISO([0, -24, 0]), 24, 40, 40), shapes: card(175, 'gold') },
|
|
46
|
+
glow('core', [140, -320], 24, [twinkle(56), twinkle(140, true)]),
|
|
47
|
+
],
|
|
48
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers (kammacron's cron jobs): a week planner on the leaned face, the same day marked
|
|
2
|
+
// week after week, and a repeat arrow that spins once round its disc.
|
|
3
|
+
import { jolt, springTurn, twinkle } from '../motions.js';
|
|
4
|
+
import { arc, ellipse, line, pill, poly, rect } from '../sticker.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
const X0 = -122;
|
|
7
|
+
const Y0 = -50;
|
|
8
|
+
const CW = 49;
|
|
9
|
+
const RH = 46;
|
|
10
|
+
// the grid of days: five columns, three weeks
|
|
11
|
+
const grid = [
|
|
12
|
+
...[1, 2].map((r) => ({ d: line([X0, Y0 + r * RH], [X0 + 5 * CW, Y0 + r * RH]) })),
|
|
13
|
+
...[1, 2, 3, 4].map((c) => ({
|
|
14
|
+
d: line([X0 + c * CW, Y0 + 8], [X0 + c * CW, Y0 + 3 * RH - 8]),
|
|
15
|
+
})),
|
|
16
|
+
];
|
|
17
|
+
// the day that repeats: Tuesday, every week
|
|
18
|
+
const day = (week) => [X0 + 1.5 * CW, Y0 + (week + 0.5) * RH];
|
|
19
|
+
const mark = (week, start) => {
|
|
20
|
+
const [x, y] = day(week);
|
|
21
|
+
return {
|
|
22
|
+
parent: 'face',
|
|
23
|
+
a: [x, y],
|
|
24
|
+
p: [x, y],
|
|
25
|
+
m: [twinkle(start), twinkle(130 + week * 4, true)],
|
|
26
|
+
shapes: [{ d: rect(x - 15, y - 13, 30, 26, 7), fill: 'main', depth: 0.3 }],
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const DISC = [104, 104];
|
|
30
|
+
const R = 30;
|
|
31
|
+
const head = () => {
|
|
32
|
+
const a = (200 * Math.PI) / 180;
|
|
33
|
+
const [x, y] = [DISC[0] + Math.cos(a) * R, DISC[1] + Math.sin(a) * R];
|
|
34
|
+
return poly([
|
|
35
|
+
[x - 11, y + 2],
|
|
36
|
+
[x + 11, y + 2],
|
|
37
|
+
[x, y - 14],
|
|
38
|
+
], 3);
|
|
39
|
+
};
|
|
40
|
+
export const cron = {
|
|
41
|
+
name: 'cron',
|
|
42
|
+
frames: 180,
|
|
43
|
+
still: 100,
|
|
44
|
+
line: LINE,
|
|
45
|
+
extrude: EXT,
|
|
46
|
+
layers: [
|
|
47
|
+
{ id: 'cron', p: [250, 280], m: { ...jolt(), at: 8 }, shapes: [] },
|
|
48
|
+
{
|
|
49
|
+
id: 'face',
|
|
50
|
+
parent: 'cron',
|
|
51
|
+
tilt: FACE,
|
|
52
|
+
shapes: [
|
|
53
|
+
{ d: rect(-140, -126, 280, 260, 22), fill: 'tint', depth: 0.6 },
|
|
54
|
+
{ d: rect(-140, -140, 280, 260, 22), fill: 'white', depth: 0.4 },
|
|
55
|
+
{ d: rect(-140, -140, 280, 72, 22), fill: 'deep' },
|
|
56
|
+
...grid,
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
mark(0, 30),
|
|
60
|
+
mark(1, 42),
|
|
61
|
+
mark(2, 54),
|
|
62
|
+
{
|
|
63
|
+
parent: 'face',
|
|
64
|
+
shapes: [-70, 70].map((x) => ({
|
|
65
|
+
d: pill(x - 10, -160, 20, 46),
|
|
66
|
+
fill: 'main',
|
|
67
|
+
depth: 0.6,
|
|
68
|
+
})),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'disc',
|
|
72
|
+
parent: 'face',
|
|
73
|
+
a: DISC,
|
|
74
|
+
p: DISC,
|
|
75
|
+
shapes: [{ d: ellipse(DISC[0], DISC[1], 54), fill: 'gold', depth: 0.8 }],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
parent: 'disc',
|
|
79
|
+
a: DISC,
|
|
80
|
+
p: DISC,
|
|
81
|
+
m: { r: springTurn(360, 18, 1.2) },
|
|
82
|
+
shapes: [{ d: arc(DISC[0], DISC[1], R, -150, 190) }, { d: head(), fill: 'ink' }],
|
|
83
|
+
},
|
|
84
|
+
glow('cron', [150, -150], 24, [twinkle(64), twinkle(140, true)]),
|
|
85
|
+
],
|
|
86
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a mouse pointer that clicks, a ripple swelling out from its tip.
|
|
2
|
+
import { glint, press, twinkle } from '../motions.js';
|
|
3
|
+
import { ring } from '../sticker.js';
|
|
4
|
+
import { arrow } from './pointer.js';
|
|
5
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
6
|
+
export const cursor = {
|
|
7
|
+
name: 'cursor',
|
|
8
|
+
frames: 150,
|
|
9
|
+
line: LINE,
|
|
10
|
+
extrude: EXT,
|
|
11
|
+
layers: [
|
|
12
|
+
{ id: 'root', p: [176, 116], shapes: [] },
|
|
13
|
+
{
|
|
14
|
+
parent: 'root',
|
|
15
|
+
tilt: FACE,
|
|
16
|
+
m: glint(30, 100),
|
|
17
|
+
shapes: [{ d: ring(0, 0, 90, 66), fill: 'main', depth: 0.3 }],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
parent: 'root',
|
|
21
|
+
tilt: FACE,
|
|
22
|
+
m: { ...press, k: 0.6 },
|
|
23
|
+
shapes: [{ d: arrow(0, 0, 5.6), fill: 'white', depth: 1 }],
|
|
24
|
+
},
|
|
25
|
+
glow('root', [-80, -60], 22, [twinkle(34), twinkle(120, true)]),
|
|
26
|
+
],
|
|
27
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers after the network diagrams of Protocol Explorer (redrawn as a slab).
|
|
2
|
+
import { deal, fall } from '../motions.js';
|
|
3
|
+
import { ellipse } from '../sticker.js';
|
|
4
|
+
import { LINE } from './shared.js';
|
|
5
|
+
// Stacked discs, foreshortened like coins: dealt in from the bottom disc up, dropped one after another before the loop
|
|
6
|
+
const disc = (y, start, top) => ({
|
|
7
|
+
p: [250, y],
|
|
8
|
+
r: -6,
|
|
9
|
+
ip: start,
|
|
10
|
+
op: 168 + start / 4,
|
|
11
|
+
m: [deal([0, -70], 0, start), fall([0, 20], 132 + start / 2)],
|
|
12
|
+
shapes: [
|
|
13
|
+
{ d: ellipse(0, 0, 130, 54), fill: 'tint', side: 'main', depth: 1 },
|
|
14
|
+
...(top ? [{ d: ellipse(0, 0, 96, 36) }] : []),
|
|
15
|
+
],
|
|
16
|
+
});
|
|
17
|
+
export const database = {
|
|
18
|
+
name: 'database',
|
|
19
|
+
frames: 180,
|
|
20
|
+
line: LINE,
|
|
21
|
+
extrude: [0, 46],
|
|
22
|
+
still: 120,
|
|
23
|
+
layers: [disc(330, 0, false), disc(268, 16, false), disc(206, 32, true)],
|
|
24
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { erase, jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A desktop PC: a tower case behind and to the right, a separate monitor on a stand in front of it
|
|
6
|
+
const CASE = block([70, 40, 0], [90, 0, 0], [0, 170, 0], [0, 0, 210]);
|
|
7
|
+
const caseFront = faceOf(CASE, 'front');
|
|
8
|
+
const FOOT = block([-110, -60, 0], [100, 0, 0], [0, 70, 0], [0, 0, 8]);
|
|
9
|
+
const NECK = block([-72, -14, 8], [24, 0, 0], [0, 10, 0], [0, 0, 56]);
|
|
10
|
+
const PANEL = block([-170, -24, 56], [220, 0, 0], [0, 10, 0], [0, 0, 150]);
|
|
11
|
+
const screen = faceOf(PANEL, 'front');
|
|
12
|
+
export const desktopTower = {
|
|
13
|
+
name: 'desktop-tower',
|
|
14
|
+
frames: 180,
|
|
15
|
+
// the lines are all drawn back in by here
|
|
16
|
+
still: 150,
|
|
17
|
+
line: LINE,
|
|
18
|
+
extrude: [0, 0],
|
|
19
|
+
layers: [
|
|
20
|
+
{ id: 'pc', p: [214, 360], m: jolt([-6, 10]), shapes: [] },
|
|
21
|
+
{
|
|
22
|
+
parent: 'pc',
|
|
23
|
+
shapes: [
|
|
24
|
+
...solid(CASE, { fill: 'deep', top: 'main', front: 'main' }, 4),
|
|
25
|
+
{ d: quad(caseFront, 0.18, 0.62, 0.64, 0.12, 2), fill: 'deep' },
|
|
26
|
+
{ d: quad(caseFront, 0.18, 0.44, 0.64, 0.12, 2), fill: 'deep' },
|
|
27
|
+
{ d: dot(caseFront, 0.5, 0.86, 0.14, 0.05), fill: 'ok' },
|
|
28
|
+
...[0.12, 0.18, 0.24].map((t) => ({ d: stroke(caseFront, [0.2, t], [0.8, t]) })),
|
|
29
|
+
...solid(FOOT, { fill: 'grey', top: 'white' }, 3),
|
|
30
|
+
...solid(NECK, { fill: 'grey', front: 'white' }, 2),
|
|
31
|
+
...solid(PANEL, { fill: 'grey', front: 'deep' }, 4),
|
|
32
|
+
{ d: quad(screen, 0.05, 0.08, 0.9, 0.84, 3), fill: 'tint' },
|
|
33
|
+
...[0.72, 0.56, 0.4].map((t, i) => ({
|
|
34
|
+
d: stroke(screen, [0.14, t], [i === 1 ? 0.6 : 0.82, t]),
|
|
35
|
+
trim: erase(24 - i * 5, 90 + i * 5),
|
|
36
|
+
})),
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
glow('pc', [-60, -270], 22, [twinkle(40), twinkle(140, true)]),
|
|
40
|
+
],
|
|
41
|
+
};
|