@20baht/stickers 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +48 -0
- package/README.md +173 -2
- package/dist/all.d.ts +4 -0
- package/dist/all.js +7 -0
- package/dist/element.d.ts +103 -0
- package/dist/element.js +181 -0
- package/dist/graph.d.ts +172 -0
- package/dist/graph.js +374 -0
- package/dist/icons/access-point.d.ts +2 -0
- package/dist/icons/access-point.js +34 -0
- package/dist/icons/ai-agent.d.ts +2 -0
- package/dist/icons/ai-agent.js +50 -0
- package/dist/icons/alarm-clock.d.ts +2 -0
- package/dist/icons/alarm-clock.js +46 -0
- package/dist/icons/all-in-one.d.ts +2 -0
- package/dist/icons/all-in-one.js +37 -0
- package/dist/icons/angpao.d.ts +2 -0
- package/dist/icons/angpao.js +46 -0
- package/dist/icons/badge-reader.d.ts +2 -0
- package/dist/icons/badge-reader.js +51 -0
- package/dist/icons/baht-note.d.ts +2 -0
- package/dist/icons/baht-note.js +42 -0
- package/dist/icons/bamboo.d.ts +2 -0
- package/dist/icons/bamboo.js +57 -0
- package/dist/icons/banana-leaf.d.ts +2 -0
- package/dist/icons/banana-leaf.js +87 -0
- package/dist/icons/banana-tree.d.ts +2 -0
- package/dist/icons/banana-tree.js +75 -0
- package/dist/icons/bear.d.ts +2 -0
- package/dist/icons/bear.js +39 -0
- package/dist/icons/blade-chassis.d.ts +2 -0
- package/dist/icons/blade-chassis.js +43 -0
- package/dist/icons/bond.d.ts +2 -0
- package/dist/icons/bond.js +48 -0
- package/dist/icons/books.d.ts +2 -0
- package/dist/icons/books.js +44 -0
- package/dist/icons/bts-card.d.ts +2 -0
- package/dist/icons/bts-card.js +47 -0
- package/dist/icons/budget-jar.d.ts +2 -0
- package/dist/icons/budget-jar.js +43 -0
- package/dist/icons/cactus.d.ts +2 -0
- package/dist/icons/cactus.js +42 -0
- package/dist/icons/calculator.d.ts +2 -0
- package/dist/icons/calculator.js +46 -0
- package/dist/icons/calendar-month.d.ts +2 -0
- package/dist/icons/calendar-month.js +66 -0
- package/dist/icons/campfire.d.ts +2 -0
- package/dist/icons/campfire.js +63 -0
- package/dist/icons/cctv.d.ts +2 -0
- package/dist/icons/cctv.js +38 -0
- package/dist/icons/certificate.d.ts +2 -0
- package/dist/icons/certificate.js +50 -0
- package/dist/icons/cha-yen.d.ts +2 -0
- package/dist/icons/cha-yen.js +68 -0
- package/dist/icons/chedi.d.ts +2 -0
- package/dist/icons/chedi.js +56 -0
- package/dist/icons/classic-phone.d.ts +2 -0
- package/dist/icons/classic-phone.js +32 -0
- package/dist/icons/clipboard.d.ts +2 -0
- package/dist/icons/clipboard.js +61 -0
- package/dist/icons/cloud.d.ts +2 -0
- package/dist/icons/cloud.js +28 -0
- package/dist/icons/coins.d.ts +2 -0
- package/dist/icons/coins.js +34 -0
- package/dist/icons/compare.d.ts +2 -0
- package/dist/icons/compare.js +33 -0
- package/dist/icons/confetti.d.ts +2 -0
- package/dist/icons/confetti.js +72 -0
- package/dist/icons/convenience-bag.d.ts +2 -0
- package/dist/icons/convenience-bag.js +51 -0
- package/dist/icons/cooling.d.ts +2 -0
- package/dist/icons/cooling.js +46 -0
- package/dist/icons/copy-files.d.ts +2 -0
- package/dist/icons/copy-files.js +37 -0
- package/dist/icons/core-switch.d.ts +2 -0
- package/dist/icons/core-switch.js +48 -0
- package/dist/icons/cursor.d.ts +2 -0
- package/dist/icons/cursor.js +27 -0
- package/dist/icons/database.d.ts +2 -0
- package/dist/icons/database.js +24 -0
- package/dist/icons/desktop-tower.d.ts +2 -0
- package/dist/icons/desktop-tower.js +41 -0
- package/dist/icons/disc-image.d.ts +2 -0
- package/dist/icons/disc-image.js +54 -0
- package/dist/icons/dollar-note.d.ts +2 -0
- package/dist/icons/dollar-note.js +44 -0
- package/dist/icons/electric-bill.d.ts +2 -0
- package/dist/icons/electric-bill.js +51 -0
- package/dist/icons/email.d.ts +2 -0
- package/dist/icons/email.js +57 -0
- package/dist/icons/empty-state.d.ts +2 -0
- package/dist/icons/empty-state.js +75 -0
- package/dist/icons/expense.d.ts +2 -0
- package/dist/icons/expense.js +36 -0
- package/dist/icons/export-file.d.ts +2 -0
- package/dist/icons/export-file.js +35 -0
- package/dist/icons/eyedropper.d.ts +2 -0
- package/dist/icons/eyedropper.js +69 -0
- package/dist/icons/face-id.d.ts +2 -0
- package/dist/icons/face-id.js +51 -0
- package/dist/icons/file.d.ts +2 -0
- package/dist/icons/file.js +15 -0
- package/dist/icons/finance-b-coins.d.ts +8 -0
- package/dist/icons/finance-b-coins.js +14 -0
- package/dist/icons/finance-tray.d.ts +11 -0
- package/dist/icons/finance-tray.js +41 -0
- package/dist/icons/fingerprint.d.ts +2 -0
- package/dist/icons/fingerprint.js +45 -0
- package/dist/icons/firewall.d.ts +2 -0
- package/dist/icons/firewall.js +76 -0
- package/dist/icons/floating-ip.d.ts +2 -0
- package/dist/icons/floating-ip.js +59 -0
- package/dist/icons/flower.d.ts +2 -0
- package/dist/icons/flower.js +49 -0
- package/dist/icons/food.d.ts +6 -0
- package/dist/icons/food.js +18 -0
- package/dist/icons/freelance.d.ts +2 -0
- package/dist/icons/freelance.js +51 -0
- package/dist/icons/fuel.d.ts +2 -0
- package/dist/icons/fuel.js +46 -0
- package/dist/icons/goal.d.ts +2 -0
- package/dist/icons/goal.js +51 -0
- package/dist/icons/gold-bar.d.ts +2 -0
- package/dist/icons/gold-bar.js +60 -0
- package/dist/icons/hard-drive.d.ts +2 -0
- package/dist/icons/hard-drive.js +42 -0
- package/dist/icons/highlighter.d.ts +2 -0
- package/dist/icons/highlighter.js +75 -0
- package/dist/icons/home-router.d.ts +2 -0
- package/dist/icons/home-router.js +32 -0
- package/dist/icons/hot-drink.d.ts +2 -0
- package/dist/icons/hot-drink.js +33 -0
- package/dist/icons/hsm.d.ts +2 -0
- package/dist/icons/hsm.js +54 -0
- package/dist/icons/id-card.d.ts +2 -0
- package/dist/icons/id-card.js +36 -0
- package/dist/icons/income.d.ts +2 -0
- package/dist/icons/income.js +28 -0
- package/dist/icons/index.d.ts +185 -0
- package/dist/icons/index.js +366 -0
- package/dist/icons/interest.d.ts +2 -0
- package/dist/icons/interest.js +66 -0
- package/dist/icons/iot-sensor.d.ts +2 -0
- package/dist/icons/iot-sensor.js +35 -0
- package/dist/icons/ip-phone.d.ts +2 -0
- package/dist/icons/ip-phone.js +47 -0
- package/dist/icons/ipad-gen8.d.ts +2 -0
- package/dist/icons/ipad-gen8.js +58 -0
- package/dist/icons/iphone-17.d.ts +2 -0
- package/dist/icons/iphone-17.js +37 -0
- package/dist/icons/iso.d.ts +2 -0
- package/dist/icons/iso.js +3 -0
- package/dist/icons/kaprao.d.ts +2 -0
- package/dist/icons/kaprao.js +70 -0
- package/dist/icons/key-pair.d.ts +2 -0
- package/dist/icons/key-pair.js +54 -0
- package/dist/icons/key.d.ts +3 -0
- package/dist/icons/key.js +37 -0
- package/dist/icons/keyboard.d.ts +2 -0
- package/dist/icons/keyboard.js +35 -0
- package/dist/icons/kite.d.ts +2 -0
- package/dist/icons/kite.js +53 -0
- package/dist/icons/kvm.d.ts +2 -0
- package/dist/icons/kvm.js +53 -0
- package/dist/icons/lamp.d.ts +2 -0
- package/dist/icons/lamp.js +49 -0
- package/dist/icons/laptop.d.ts +2 -0
- package/dist/icons/laptop.js +44 -0
- package/dist/icons/load-balancer.d.ts +2 -0
- package/dist/icons/load-balancer.js +50 -0
- package/dist/icons/lock-screen.d.ts +2 -0
- package/dist/icons/lock-screen.js +44 -0
- package/dist/icons/long-tail-boat.d.ts +2 -0
- package/dist/icons/long-tail-boat.js +66 -0
- package/dist/icons/lottery.d.ts +2 -0
- package/dist/icons/lottery.js +51 -0
- package/dist/icons/lotus.d.ts +2 -0
- package/dist/icons/lotus.js +70 -0
- package/dist/icons/mac-mini.d.ts +2 -0
- package/dist/icons/mac-mini.js +31 -0
- package/dist/icons/macbook-air.d.ts +2 -0
- package/dist/icons/macbook-air.js +41 -0
- package/dist/icons/mailbox-thai.d.ts +2 -0
- package/dist/icons/mailbox-thai.js +66 -0
- package/dist/icons/mango-sticky-rice.d.ts +2 -0
- package/dist/icons/mango-sticky-rice.js +41 -0
- package/dist/icons/marigold.d.ts +2 -0
- package/dist/icons/marigold.js +69 -0
- package/dist/icons/market-basket.d.ts +2 -0
- package/dist/icons/market-basket.js +69 -0
- package/dist/icons/media-player.d.ts +2 -0
- package/dist/icons/media-player.js +71 -0
- package/dist/icons/metrics.d.ts +2 -0
- package/dist/icons/metrics.js +58 -0
- package/dist/icons/mini-pc.d.ts +2 -0
- package/dist/icons/mini-pc.js +26 -0
- package/dist/icons/modem.d.ts +2 -0
- package/dist/icons/modem.js +37 -0
- package/dist/icons/monitor.d.ts +2 -0
- package/dist/icons/monitor.js +40 -0
- package/dist/icons/monstera.d.ts +2 -0
- package/dist/icons/monstera.js +47 -0
- package/dist/icons/moon.d.ts +2 -0
- package/dist/icons/moon.js +55 -0
- package/dist/icons/motorbike-taxi.d.ts +2 -0
- package/dist/icons/motorbike-taxi.js +42 -0
- package/dist/icons/music-note.d.ts +2 -0
- package/dist/icons/music-note.js +63 -0
- package/dist/icons/nas-2bay.d.ts +2 -0
- package/dist/icons/nas-2bay.js +49 -0
- package/dist/icons/nas.d.ts +2 -0
- package/dist/icons/nas.js +41 -0
- package/dist/icons/nature-iso.d.ts +29 -0
- package/dist/icons/nature-iso.js +74 -0
- package/dist/icons/noodle-soup.d.ts +2 -0
- package/dist/icons/noodle-soup.js +52 -0
- package/dist/icons/notebook.d.ts +2 -0
- package/dist/icons/notebook.js +44 -0
- package/dist/icons/object-drum.d.ts +18 -0
- package/dist/icons/object-drum.js +63 -0
- package/dist/icons/otp.d.ts +2 -0
- package/dist/icons/otp.js +46 -0
- package/dist/icons/over-budget.d.ts +2 -0
- package/dist/icons/over-budget.js +48 -0
- package/dist/icons/pad-see-ew.d.ts +2 -0
- package/dist/icons/pad-see-ew.js +56 -0
- package/dist/icons/palm-tree.d.ts +2 -0
- package/dist/icons/palm-tree.js +52 -0
- package/dist/icons/paper-boat.d.ts +2 -0
- package/dist/icons/paper-boat.js +67 -0
- package/dist/icons/paper.d.ts +3 -0
- package/dist/icons/paper.js +45 -0
- package/dist/icons/password.d.ts +2 -0
- package/dist/icons/password.js +45 -0
- package/dist/icons/patch-panel.d.ts +2 -0
- package/dist/icons/patch-panel.js +41 -0
- package/dist/icons/pdu.d.ts +2 -0
- package/dist/icons/pdu.js +40 -0
- package/dist/icons/phone-topup.d.ts +2 -0
- package/dist/icons/phone-topup.js +55 -0
- package/dist/icons/photo.d.ts +2 -0
- package/dist/icons/photo.js +48 -0
- package/dist/icons/phuang-malai.d.ts +2 -0
- package/dist/icons/phuang-malai.js +59 -0
- package/dist/icons/pie-chart.d.ts +2 -0
- package/dist/icons/pie-chart.js +36 -0
- package/dist/icons/piggy-bank.d.ts +2 -0
- package/dist/icons/piggy-bank.js +64 -0
- package/dist/icons/plant-kit.d.ts +23 -0
- package/dist/icons/plant-kit.js +112 -0
- package/dist/icons/plastic-stool.d.ts +2 -0
- package/dist/icons/plastic-stool.js +67 -0
- package/dist/icons/pointer.d.ts +1 -0
- package/dist/icons/pointer.js +12 -0
- package/dist/icons/pos.d.ts +2 -0
- package/dist/icons/pos.js +59 -0
- package/dist/icons/potted-plant.d.ts +2 -0
- package/dist/icons/potted-plant.js +31 -0
- package/dist/icons/power-pole.d.ts +2 -0
- package/dist/icons/power-pole.js +60 -0
- package/dist/icons/power-station.d.ts +2 -0
- package/dist/icons/power-station.js +56 -0
- package/dist/icons/printer.d.ts +2 -0
- package/dist/icons/printer.js +46 -0
- package/dist/icons/qr-code.d.ts +2 -0
- package/dist/icons/qr-code.js +45 -0
- package/dist/icons/rack.d.ts +2 -0
- package/dist/icons/rack.js +39 -0
- package/dist/icons/rain-cloud.d.ts +2 -0
- package/dist/icons/rain-cloud.js +31 -0
- package/dist/icons/rainbow.d.ts +2 -0
- package/dist/icons/rainbow.js +46 -0
- package/dist/icons/receipt.d.ts +2 -0
- package/dist/icons/receipt.js +56 -0
- package/dist/icons/redmi-note-9s-pro.d.ts +2 -0
- package/dist/icons/redmi-note-9s-pro.js +37 -0
- package/dist/icons/register.d.ts +2 -0
- package/dist/icons/register.js +40 -0
- package/dist/icons/remote-desktop.d.ts +2 -0
- package/dist/icons/remote-desktop.js +62 -0
- package/dist/icons/remote-folder.d.ts +2 -0
- package/dist/icons/remote-folder.js +55 -0
- package/dist/icons/rent.d.ts +2 -0
- package/dist/icons/rent.js +50 -0
- package/dist/icons/rock.d.ts +2 -0
- package/dist/icons/rock.js +80 -0
- package/dist/icons/router.d.ts +2 -0
- package/dist/icons/router.js +59 -0
- package/dist/icons/salary.d.ts +2 -0
- package/dist/icons/salary.js +54 -0
- package/dist/icons/saving-streak.d.ts +2 -0
- package/dist/icons/saving-streak.js +66 -0
- package/dist/icons/scan-slip.d.ts +2 -0
- package/dist/icons/scan-slip.js +53 -0
- package/dist/icons/scissors.d.ts +2 -0
- package/dist/icons/scissors.js +52 -0
- package/dist/icons/server-cabinet.d.ts +2 -0
- package/dist/icons/server-cabinet.js +49 -0
- package/dist/icons/server.d.ts +2 -0
- package/dist/icons/server.js +41 -0
- package/dist/icons/shared.d.ts +8 -0
- package/dist/icons/shared.js +18 -0
- package/dist/icons/shield.d.ts +3 -0
- package/dist/icons/shield.js +28 -0
- package/dist/icons/shooting-star.d.ts +2 -0
- package/dist/icons/shooting-star.js +37 -0
- package/dist/icons/shopping-box.d.ts +2 -0
- package/dist/icons/shopping-box.js +46 -0
- package/dist/icons/sky-kit.d.ts +19 -0
- package/dist/icons/sky-kit.js +72 -0
- package/dist/icons/smart-tv.d.ts +2 -0
- package/dist/icons/smart-tv.js +39 -0
- package/dist/icons/smartphone.d.ts +2 -0
- package/dist/icons/smartphone.js +30 -0
- package/dist/icons/sms.d.ts +2 -0
- package/dist/icons/sms.js +45 -0
- package/dist/icons/snapshots.d.ts +2 -0
- package/dist/icons/snapshots.js +45 -0
- package/dist/icons/snip.d.ts +2 -0
- package/dist/icons/snip.js +63 -0
- package/dist/icons/spirit-house.d.ts +2 -0
- package/dist/icons/spirit-house.js +73 -0
- package/dist/icons/ssl-certificate.d.ts +2 -0
- package/dist/icons/ssl-certificate.js +56 -0
- package/dist/icons/star.d.ts +2 -0
- package/dist/icons/star.js +16 -0
- package/dist/icons/stock.d.ts +2 -0
- package/dist/icons/stock.js +62 -0
- package/dist/icons/storage-array.d.ts +2 -0
- package/dist/icons/storage-array.js +40 -0
- package/dist/icons/storm.d.ts +2 -0
- package/dist/icons/storm.js +43 -0
- package/dist/icons/street-food-cart.d.ts +2 -0
- package/dist/icons/street-food-cart.js +66 -0
- package/dist/icons/street-kit.d.ts +19 -0
- package/dist/icons/street-kit.js +67 -0
- package/dist/icons/street-sign.d.ts +2 -0
- package/dist/icons/street-sign.js +42 -0
- package/dist/icons/studio-monitors.d.ts +2 -0
- package/dist/icons/studio-monitors.js +67 -0
- package/dist/icons/sun.d.ts +2 -0
- package/dist/icons/sun.js +40 -0
- package/dist/icons/support.d.ts +2 -0
- package/dist/icons/support.js +48 -0
- package/dist/icons/switch.d.ts +2 -0
- package/dist/icons/switch.js +34 -0
- package/dist/icons/tablet.d.ts +2 -0
- package/dist/icons/tablet.js +44 -0
- package/dist/icons/tape-library.d.ts +2 -0
- package/dist/icons/tape-library.js +48 -0
- package/dist/icons/temple-donation.d.ts +2 -0
- package/dist/icons/temple-donation.js +60 -0
- package/dist/icons/tent.d.ts +2 -0
- package/dist/icons/tent.js +66 -0
- package/dist/icons/terminal.d.ts +2 -0
- package/dist/icons/terminal.js +56 -0
- package/dist/icons/thai-house.d.ts +2 -0
- package/dist/icons/thai-house.js +85 -0
- package/dist/icons/thai-lantern.d.ts +2 -0
- package/dist/icons/thai-lantern.js +61 -0
- package/dist/icons/thinkpad-l380.d.ts +2 -0
- package/dist/icons/thinkpad-l380.js +54 -0
- package/dist/icons/timer.d.ts +2 -0
- package/dist/icons/timer.js +59 -0
- package/dist/icons/train-ticket.d.ts +2 -0
- package/dist/icons/train-ticket.js +57 -0
- package/dist/icons/trash.d.ts +2 -0
- package/dist/icons/trash.js +62 -0
- package/dist/icons/tree.d.ts +2 -0
- package/dist/icons/tree.js +40 -0
- package/dist/icons/tuk-tuk.d.ts +2 -0
- package/dist/icons/tuk-tuk.js +45 -0
- package/dist/icons/tulip.d.ts +2 -0
- package/dist/icons/tulip.js +56 -0
- package/dist/icons/tunnel.d.ts +2 -0
- package/dist/icons/tunnel.js +50 -0
- package/dist/icons/two-factor.d.ts +2 -0
- package/dist/icons/two-factor.js +81 -0
- package/dist/icons/ups.d.ts +2 -0
- package/dist/icons/ups.js +37 -0
- package/dist/icons/usb-drive.d.ts +2 -0
- package/dist/icons/usb-drive.js +35 -0
- package/dist/icons/verified.d.ts +2 -0
- package/dist/icons/verified.js +32 -0
- package/dist/icons/virtual-machine.d.ts +2 -0
- package/dist/icons/virtual-machine.js +66 -0
- package/dist/icons/volume.d.ts +6 -0
- package/dist/icons/volume.js +35 -0
- package/dist/icons/vpn-gateway.d.ts +2 -0
- package/dist/icons/vpn-gateway.js +51 -0
- package/dist/icons/wake-on-lan.d.ts +2 -0
- package/dist/icons/wake-on-lan.js +40 -0
- package/dist/icons/wallet.d.ts +3 -0
- package/dist/icons/wallet.js +55 -0
- package/dist/icons/water-jar.d.ts +2 -0
- package/dist/icons/water-jar.js +72 -0
- package/dist/icons/wooden-window.d.ts +2 -0
- package/dist/icons/wooden-window.js +65 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/iso.d.ts +32 -0
- package/dist/iso.js +64 -0
- package/dist/load.d.ts +197 -0
- package/dist/load.js +197 -0
- package/dist/motions.d.ts +68 -0
- package/dist/motions.js +446 -0
- package/dist/sticker.d.ts +269 -0
- package/dist/sticker.js +1009 -0
- package/package.json +101 -4
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { jolt, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, ISO, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// Point of sale: a cash drawer, a receipt printer on it printing, a small screen leaning back on a neck
|
|
6
|
+
const LEAN = (18 * Math.PI) / 180;
|
|
7
|
+
const DRAWER = block([-140, -90, 0], [280, 0, 0], [0, 180, 0], [0, 0, 66]);
|
|
8
|
+
const drawer = faceOf(DRAWER, 'front');
|
|
9
|
+
const NECK = block([-96, 30, 66], [22, 0, 0], [0, 22, 0], [0, 0, 70]);
|
|
10
|
+
const UP = [0, Math.sin(LEAN) * 120, Math.cos(LEAN) * 120];
|
|
11
|
+
const BACK = [0, Math.cos(LEAN) * 10, -Math.sin(LEAN) * 10];
|
|
12
|
+
const SCREEN = block([-140, 30, 126], [130, 0, 0], BACK, UP);
|
|
13
|
+
const screen = faceOf(SCREEN, 'front');
|
|
14
|
+
const PRINTER = block([20, -70, 66], [100, 0, 0], [0, 110, 0], [0, 0, 58]);
|
|
15
|
+
const printer = faceOf(PRINTER, 'front');
|
|
16
|
+
const RECEIPT = block([38, -22, 100], [64, 0, 0], [0, 3, 0], [0, 0, 70]);
|
|
17
|
+
const receipt = faceOf(RECEIPT, 'front');
|
|
18
|
+
export const pos = {
|
|
19
|
+
name: 'pos',
|
|
20
|
+
frames: 180,
|
|
21
|
+
still: 90,
|
|
22
|
+
line: LINE,
|
|
23
|
+
extrude: [0, 0],
|
|
24
|
+
layers: [
|
|
25
|
+
{ id: 'till', p: [256, 360], m: jolt([-4, 6]), shapes: [] },
|
|
26
|
+
{
|
|
27
|
+
parent: 'till',
|
|
28
|
+
shapes: [
|
|
29
|
+
...solid(DRAWER, { fill: 'grey', top: 'white', front: 'white' }, 4),
|
|
30
|
+
{ d: stroke(drawer, [0.08, 0.62], [0.92, 0.62]) },
|
|
31
|
+
{ d: quad(drawer, 0.4, 0.22, 0.2, 0.16, 3), fill: 'grey' },
|
|
32
|
+
...solid(NECK, { fill: 'grey', top: 'white' }, 2),
|
|
33
|
+
...solid(SCREEN, { fill: 'grey', front: 'deep' }, 3),
|
|
34
|
+
{ d: quad(screen, 0.08, 0.1, 0.84, 0.8, 3), fill: 'tint' },
|
|
35
|
+
...[0.7, 0.52, 0.34].map((t, i) => ({
|
|
36
|
+
d: stroke(screen, [0.2, t], [i === 1 ? 0.6 : 0.8, t]),
|
|
37
|
+
})),
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
// the receipt rises out of the slot, is torn off, and slides home
|
|
41
|
+
{
|
|
42
|
+
parent: 'till',
|
|
43
|
+
m: slide(ISO([0, 0, 46]), 16, 60, 40),
|
|
44
|
+
shapes: [
|
|
45
|
+
...solid(RECEIPT, { fill: 'grey', front: 'paper' }, 2),
|
|
46
|
+
...[0.8, 0.62].map((t) => ({ d: stroke(receipt, [0.2, t], [0.8, t]) })),
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
parent: 'till',
|
|
51
|
+
shapes: [
|
|
52
|
+
...solid(PRINTER, { fill: 'deep', top: 'main' }, 4),
|
|
53
|
+
{ d: quad(printer, 0.15, 0.3, 0.35, 0.4, 3), fill: 'tint' },
|
|
54
|
+
{ d: dot(printer, 0.78, 0.5, 0.07, 0.12), fill: 'ok' },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
glow('till', [150, -200], 22, [twinkle(56), twinkle(140, true)]),
|
|
58
|
+
],
|
|
59
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a small potted plant in 2.5d, the pot modelled in 3d (see plant-kit.ts); leaves sway.
|
|
2
|
+
import { sway, twinkle } from '../motions.js';
|
|
3
|
+
import { leaf, pot, rib } from './plant-kit.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
const [POT, SOIL] = pot(96, 46, 58, 'main');
|
|
6
|
+
// outer leaves first, the tall middle one last: angle, length, width
|
|
7
|
+
const LEAVES = [
|
|
8
|
+
[-62, 104, 30],
|
|
9
|
+
[62, 104, 30],
|
|
10
|
+
[-32, 138, 34],
|
|
11
|
+
[32, 138, 34],
|
|
12
|
+
[-8, 158, 36],
|
|
13
|
+
];
|
|
14
|
+
export const pottedPlant = {
|
|
15
|
+
name: 'potted-plant',
|
|
16
|
+
frames: 180,
|
|
17
|
+
line: LINE,
|
|
18
|
+
extrude: [5, 10],
|
|
19
|
+
layers: [
|
|
20
|
+
{ id: 'plant', p: [250, 372], shapes: [] },
|
|
21
|
+
{ parent: 'plant', shapes: POT },
|
|
22
|
+
...LEAVES.map(([deg, len, w], i) => ({
|
|
23
|
+
parent: 'plant',
|
|
24
|
+
a: SOIL,
|
|
25
|
+
p: SOIL,
|
|
26
|
+
m: { ...sway, at: i * 14, k: i % 2 ? -1.1 : 1.1 },
|
|
27
|
+
shapes: [{ d: leaf(SOIL, deg, len, w), fill: 'ok', depth: 0.4 }, { d: rib(SOIL, deg, len) }],
|
|
28
|
+
})),
|
|
29
|
+
glow('plant', [120, -250], 22, [twinkle(50), twinkle(140, true)]),
|
|
30
|
+
],
|
|
31
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a Thai concrete power pole with its tangle of cables, in 3d (see street-kit.ts).
|
|
2
|
+
import { sway, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, poly } from '../sticker.js';
|
|
4
|
+
import { block, faceOf, ISO, quad, solid } from '../iso.js';
|
|
5
|
+
import { lathe, ring } from './street-kit.js';
|
|
6
|
+
import { glow, LINE } from './shared.js';
|
|
7
|
+
// A grey pole with two cross-arms and white insulators, a drum transformer, a meter box, cables sagging out both ways
|
|
8
|
+
// and loose coils wound round the pole; the cables sway
|
|
9
|
+
const POLE = block([-17, -17, 0], [34, 0, 0], [0, 34, 0], [0, 0, 380]);
|
|
10
|
+
const ARM = block([-112, -8, 332], [224, 0, 0], [0, 16, 0], [0, 0, 14]);
|
|
11
|
+
const ARM2 = block([-80, -8, 288], [160, 0, 0], [0, 16, 0], [0, 0, 12]);
|
|
12
|
+
const BOX = block([-22, -36, 110], [44, 0, 0], [0, 22, 0], [0, 0, 56]);
|
|
13
|
+
const DRUM = lathe([0, -48, 200], [
|
|
14
|
+
[0, 30],
|
|
15
|
+
[72, 30],
|
|
16
|
+
]);
|
|
17
|
+
const POSTS = [-96, -46, 46, 96];
|
|
18
|
+
const sag = (a, b, drop) => `M${String(a[0])} ${String(a[1])}Q${String((a[0] + b[0]) / 2)} ${String((a[1] + b[1]) / 2 + drop)} ${String(b[0])} ${String(b[1])}`;
|
|
19
|
+
const CABLES = POSTS.flatMap((x, i) => {
|
|
20
|
+
const from = ISO([x, 0, 352]);
|
|
21
|
+
const side = x < 0 ? -1 : 1;
|
|
22
|
+
const to = [from[0] + side * (120 - i * 6), from[1] + 70 - i * 10];
|
|
23
|
+
return [{ d: sag(from, to, 40 + i * 8) }];
|
|
24
|
+
});
|
|
25
|
+
const COILS = [250, 262, 274].map((z, i) => ({
|
|
26
|
+
d: line(...ring([0, 0, z], 30 + i * 6, 16).map((p) => ISO(p)), ISO([30 + i * 6, 0, z])),
|
|
27
|
+
}));
|
|
28
|
+
export const powerPole = {
|
|
29
|
+
name: 'power-pole',
|
|
30
|
+
frames: 180,
|
|
31
|
+
line: LINE,
|
|
32
|
+
extrude: [0, 0],
|
|
33
|
+
layers: [
|
|
34
|
+
{ id: 'pole', p: [250, 450], shapes: [] },
|
|
35
|
+
{
|
|
36
|
+
parent: 'pole',
|
|
37
|
+
shapes: [
|
|
38
|
+
...solid(POLE, { fill: 'grey', top: 'white' }, 2),
|
|
39
|
+
...solid(ARM2, { fill: 'grey', top: 'white' }, 2),
|
|
40
|
+
...solid(ARM, { fill: 'grey', top: 'white' }, 2),
|
|
41
|
+
...POSTS.map((x) => {
|
|
42
|
+
const [px, py] = ISO([x, 0, 346]);
|
|
43
|
+
return { d: ellipse(px, py - 6, 7, 9), fill: 'white' };
|
|
44
|
+
}),
|
|
45
|
+
{ d: poly(DRUM.outline, 2), fill: 'grey' },
|
|
46
|
+
{ d: poly(DRUM.top, 2), fill: 'white' },
|
|
47
|
+
...solid(BOX, { fill: 'white' }, 2),
|
|
48
|
+
{ d: quad(faceOf(BOX, 'front'), 0.2, 0.45, 0.6, 0.35, 2), fill: 'tint' },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
parent: 'pole',
|
|
53
|
+
a: ISO([0, 0, 352]),
|
|
54
|
+
p: ISO([0, 0, 352]),
|
|
55
|
+
m: { ...sway, k: 0.5 },
|
|
56
|
+
shapes: [...CABLES, ...COILS],
|
|
57
|
+
},
|
|
58
|
+
glow('pole', [150, -300], 22, [twinkle(44), twinkle(140, true)]),
|
|
59
|
+
],
|
|
60
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a portable power station in the EcoFlow manner, modelled in 3d (see iso.ts). No logo.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { block, faceOf, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// A dark box with a carry handle: a screen whose battery bars fill one by one, two AC sockets, USB ports
|
|
6
|
+
const W = 290;
|
|
7
|
+
const D = 190;
|
|
8
|
+
const H = 170;
|
|
9
|
+
const BOX = block([-W / 2, -D / 2, 0], [W, 0, 0], [0, D, 0], [0, 0, H]);
|
|
10
|
+
const f = faceOf(BOX, 'front');
|
|
11
|
+
const POST = (x) => block([x, -14, H], [24, 0, 0], [0, 28, 0], [0, 0, 40]);
|
|
12
|
+
const BAR = block([-112, -14, H + 40], [224, 0, 0], [0, 28, 0], [0, 0, 18]);
|
|
13
|
+
const socket = (s) => [
|
|
14
|
+
{ d: quad(f, s, 0.36, 0.14, 0.4, 6), fill: 'grey' },
|
|
15
|
+
...[0.045, 0.095].map((o) => ({ d: stroke(f, [s + o, 0.5], [s + o, 0.64]) })),
|
|
16
|
+
];
|
|
17
|
+
export const powerStation = {
|
|
18
|
+
name: 'power-station',
|
|
19
|
+
frames: 180,
|
|
20
|
+
still: 110,
|
|
21
|
+
line: LINE,
|
|
22
|
+
extrude: [0, 0],
|
|
23
|
+
layers: [
|
|
24
|
+
{ id: 'ps', p: [250, 330], m: { ...hop, k: 0.5 }, shapes: [] },
|
|
25
|
+
{
|
|
26
|
+
parent: 'ps',
|
|
27
|
+
shapes: [
|
|
28
|
+
...solid(POST(-112), { fill: 'grey', top: 'white' }, 2),
|
|
29
|
+
...solid(POST(88), { fill: 'grey', top: 'white' }, 2),
|
|
30
|
+
...solid(BOX, { fill: 'deep', top: 'grey' }, 6),
|
|
31
|
+
...solid(BAR, { fill: 'grey', top: 'white' }, 3),
|
|
32
|
+
{ d: quad(f, 0.06, 0.36, 0.42, 0.5, 4), fill: 'tint' },
|
|
33
|
+
{ d: quad(f, 0.1, 0.46, 0.3, 0.3, 2), fill: 'white' },
|
|
34
|
+
{ d: quad(f, 0.4, 0.55, 0.025, 0.12, 1), fill: 'white' },
|
|
35
|
+
...socket(0.56),
|
|
36
|
+
...socket(0.78),
|
|
37
|
+
...[0.08, 0.16, 0.24].map((s) => ({
|
|
38
|
+
d: quad(f, s, 0.12, 0.05, 0.1, 1),
|
|
39
|
+
fill: 'ink',
|
|
40
|
+
})),
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
...[0, 1, 2, 3].map((i) => {
|
|
44
|
+
const s = 0.12 + i * 0.07;
|
|
45
|
+
const at = f.at(s + 0.025, 0.61);
|
|
46
|
+
return {
|
|
47
|
+
parent: 'ps',
|
|
48
|
+
a: at,
|
|
49
|
+
p: at,
|
|
50
|
+
m: [twinkle(16 + i * 14), twinkle(124 + i * 4, true)],
|
|
51
|
+
shapes: [{ d: quad(f, s, 0.5, 0.05, 0.22, 1), fill: 'ok', line: false }],
|
|
52
|
+
};
|
|
53
|
+
}),
|
|
54
|
+
glow('ps', [160, -240], 24, [twinkle(64), twinkle(140, true)]),
|
|
55
|
+
],
|
|
56
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers, modelled in 3d (see iso.ts).
|
|
2
|
+
import { nudge, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, ISO, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { glow, LINE } from './shared.js';
|
|
5
|
+
// An office printer: a boxy body with a dark output slot, a paper tray under it, and a sheet that slides out
|
|
6
|
+
const BODY = block([-140, -90, 30], [280, 0, 0], [0, 180, 0], [0, 0, 120]);
|
|
7
|
+
const TRAY = block([-120, -110, 0], [240, 0, 0], [0, 180, 0], [0, 0, 32]);
|
|
8
|
+
const top = faceOf(BODY, 'top');
|
|
9
|
+
const front = faceOf(BODY, 'front');
|
|
10
|
+
const trayFront = faceOf(TRAY, 'front');
|
|
11
|
+
// the sheet lies on the output shelf and travels out of the front
|
|
12
|
+
const SHEET = block([-90, -60, 116], [180, 0, 0], [0, 130, 0], [0, 0, 2]);
|
|
13
|
+
const sheet = faceOf(SHEET, 'top');
|
|
14
|
+
export const printer = {
|
|
15
|
+
name: 'printer',
|
|
16
|
+
frames: 180,
|
|
17
|
+
line: LINE,
|
|
18
|
+
extrude: [0, 0],
|
|
19
|
+
layers: [
|
|
20
|
+
{ id: 'pr', p: [250, 320], m: { ...nudge, k: 0.6 }, shapes: [] },
|
|
21
|
+
{
|
|
22
|
+
parent: 'pr',
|
|
23
|
+
shapes: [
|
|
24
|
+
...solid(TRAY, { fill: 'grey', top: 'white', front: 'paper' }, 3),
|
|
25
|
+
{ d: stroke(trayFront, [0.36, 0.5], [0.64, 0.5]) },
|
|
26
|
+
...solid(BODY, { fill: 'grey', top: 'white', front: 'white' }, 4),
|
|
27
|
+
{ d: quad(top, 0.12, 0.08, 0.76, 0.36, 3), fill: 'ink', line: false },
|
|
28
|
+
{ d: quad(top, 0.7, 0.62, 0.22, 0.28, 3), fill: 'tint' },
|
|
29
|
+
{ d: dot(top, 0.76, 0.76, 0.03, 0.05), fill: 'ok' },
|
|
30
|
+
{ d: dot(top, 0.86, 0.76, 0.03, 0.05), fill: 'main' },
|
|
31
|
+
{ d: stroke(front, [0.1, 0.62], [0.9, 0.62]) },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
parent: 'pr',
|
|
36
|
+
m: slide(ISO([0, -70, 0]), 20, 70, 40),
|
|
37
|
+
shapes: [
|
|
38
|
+
...solid(SHEET, { fill: 'paper', top: 'white' }),
|
|
39
|
+
...[0.3, 0.5, 0.7].map((t, i) => ({
|
|
40
|
+
d: stroke(sheet, [0.18, t], [i === 2 ? 0.6 : 0.82, t]),
|
|
41
|
+
})),
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
glow('pr', [170, -170], 22, [twinkle(60), twinkle(140, true)]),
|
|
45
|
+
],
|
|
46
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a QR code for signing in, a scan line sweeping it.
|
|
2
|
+
import { jolt, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
// three finder squares, then a fixed scatter of modules on an 11 by 11 grid of 20 units
|
|
6
|
+
const finder = (x, y) => [
|
|
7
|
+
{ d: rect(x, y, 64, 64, 10), fill: 'deep', line: false },
|
|
8
|
+
{ d: rect(x + 12, y + 12, 40, 40, 6), fill: 'white', line: false },
|
|
9
|
+
{ d: rect(x + 22, y + 22, 20, 20, 4), fill: 'deep', line: false },
|
|
10
|
+
];
|
|
11
|
+
const finderZone = (i, j) => (i < 4 && j < 4) || (i > 6 && j < 4) || (i < 4 && j > 6);
|
|
12
|
+
const MODULES = Array.from({ length: 121 }, (_, n) => {
|
|
13
|
+
const [i, j] = [n % 11, Math.floor(n / 11)];
|
|
14
|
+
const on = (i * 7 + j * 13 + ((i * j) % 5)) % 3 === 0;
|
|
15
|
+
return on && !finderZone(i, j)
|
|
16
|
+
? [{ d: rect(-110 + i * 20, -110 + j * 20, 16, 16, 3), fill: 'deep', line: false }]
|
|
17
|
+
: [];
|
|
18
|
+
}).flat();
|
|
19
|
+
export const qrCode = {
|
|
20
|
+
name: 'qr-code',
|
|
21
|
+
frames: 150,
|
|
22
|
+
line: LINE,
|
|
23
|
+
extrude: EXT,
|
|
24
|
+
layers: [
|
|
25
|
+
{ id: 'root', a: [0, 130], p: [250, 376], m: jolt([-3, 8]), shapes: [] },
|
|
26
|
+
{
|
|
27
|
+
id: 'plate',
|
|
28
|
+
parent: 'root',
|
|
29
|
+
tilt: FACE,
|
|
30
|
+
shapes: [
|
|
31
|
+
{ d: rect(-130, -130, 260, 260, 24), fill: 'white', depth: 1 },
|
|
32
|
+
...finder(-110, -110),
|
|
33
|
+
...finder(46, -110),
|
|
34
|
+
...finder(-110, 46),
|
|
35
|
+
...MODULES,
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
parent: 'plate',
|
|
40
|
+
m: slide([0, 216], 20, 6, 50),
|
|
41
|
+
shapes: [{ d: rect(-130, -116, 260, 10, 5), fill: 'ok' }],
|
|
42
|
+
},
|
|
43
|
+
glow('root', [150, -150], 22, [twinkle(70), twinkle(130, true)]),
|
|
44
|
+
],
|
|
45
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers after the network diagrams of Protocol Explorer, modelled in 3d (see iso.ts).
|
|
2
|
+
import { deal, fall } from '../motions.js';
|
|
3
|
+
import { block, dot, faceOf, quad, solid, stroke } from '../iso.js';
|
|
4
|
+
import { LINE } from './shared.js';
|
|
5
|
+
// Stacked servers: dealt in from the bottom unit up, then dropped one after another before the loop
|
|
6
|
+
const W = 300;
|
|
7
|
+
const D = 190;
|
|
8
|
+
const U = 54;
|
|
9
|
+
const unit = (level, start, front, top, light) => {
|
|
10
|
+
const b = block([-W / 2, -D / 2, level * (U + 4)], [W, 0, 0], [0, D, 0], [0, 0, U]);
|
|
11
|
+
const f = faceOf(b, 'front');
|
|
12
|
+
return {
|
|
13
|
+
parent: 'rack',
|
|
14
|
+
ip: start,
|
|
15
|
+
op: 168 + start / 4,
|
|
16
|
+
m: [deal([0, -70], 0, start), fall([0, 20], 132 + start / 2)],
|
|
17
|
+
shapes: [
|
|
18
|
+
...solid(b, { fill: 'deep', front, top }, 3),
|
|
19
|
+
{ d: quad(f, 0.06, 0.24, 0.4, 0.52, 3), fill: 'tint' },
|
|
20
|
+
{ d: stroke(f, [0.11, 0.5], [0.4, 0.5]) },
|
|
21
|
+
{ d: dot(f, 0.76, 0.5, 0.025, 0.14), fill: light },
|
|
22
|
+
{ d: dot(f, 0.87, 0.5, 0.025, 0.14), fill: 'ok' },
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export const rack = {
|
|
27
|
+
name: 'rack',
|
|
28
|
+
frames: 180,
|
|
29
|
+
line: LINE,
|
|
30
|
+
extrude: [0, 0],
|
|
31
|
+
still: 120,
|
|
32
|
+
// drawn bottom first, so each unit sits on the one under it
|
|
33
|
+
layers: [
|
|
34
|
+
{ id: 'rack', p: [250, 326], shapes: [] },
|
|
35
|
+
unit(0, 4, 'deep', 'main', 'ok'),
|
|
36
|
+
unit(1, 20, 'main', 'tint', 'ok'),
|
|
37
|
+
unit(2, 36, 'deep', 'main', 'gold'),
|
|
38
|
+
],
|
|
39
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a rain cloud slab, drops falling from it in two waves and cut as they land.
|
|
2
|
+
import { fall, hop, twinkle } from '../motions.js';
|
|
3
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
4
|
+
import { cloud, drop } from './sky-kit.js';
|
|
5
|
+
const DROPS = [-70, -10, 50].flatMap((x, i) => [
|
|
6
|
+
[x, 8 + i * 12],
|
|
7
|
+
[x + 20, 78 + i * 12],
|
|
8
|
+
]);
|
|
9
|
+
export const rainCloud = {
|
|
10
|
+
name: 'rain-cloud',
|
|
11
|
+
frames: 160,
|
|
12
|
+
line: LINE,
|
|
13
|
+
extrude: EXT,
|
|
14
|
+
layers: [
|
|
15
|
+
{ id: 'rc', p: [250, 220], m: { ...hop, k: 0.3 }, shapes: [] },
|
|
16
|
+
...DROPS.map(([x, at]) => ({
|
|
17
|
+
parent: 'rc',
|
|
18
|
+
p: [x, 64],
|
|
19
|
+
ip: at,
|
|
20
|
+
op: at + 34,
|
|
21
|
+
m: fall([0, 110], at, 34),
|
|
22
|
+
shapes: [{ d: drop(0, 0), fill: 'main', depth: 0.5 }],
|
|
23
|
+
})),
|
|
24
|
+
{
|
|
25
|
+
parent: 'rc',
|
|
26
|
+
tilt: FACE,
|
|
27
|
+
shapes: [{ d: cloud(0, 0), fill: 'tint', side: 'main', depth: 1.2, crease: false }],
|
|
28
|
+
},
|
|
29
|
+
glow('rc', [150, -110], 22, [twinkle(30), twinkle(130, true)]),
|
|
30
|
+
],
|
|
31
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a rainbow arching out of two cloud slabs, its bands growing in from the middle.
|
|
2
|
+
import { hop, SNAP, twinkle } from '../motions.js';
|
|
3
|
+
import { poly } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
import { arcPts, cloud } from './sky-kit.js';
|
|
6
|
+
const BASE = 60;
|
|
7
|
+
const BANDS = [
|
|
8
|
+
[160, 132, 'hot'],
|
|
9
|
+
[132, 106, 'gold'],
|
|
10
|
+
[106, 80, 'ok'],
|
|
11
|
+
[80, 54, 'main'],
|
|
12
|
+
];
|
|
13
|
+
const band = (outer, inner) => poly([...arcPts(0, BASE, outer, 180, 360, 48), ...arcPts(0, BASE, inner, 360, 180, 48)]);
|
|
14
|
+
export const rainbow = {
|
|
15
|
+
name: 'rainbow',
|
|
16
|
+
frames: 160,
|
|
17
|
+
still: 100,
|
|
18
|
+
line: LINE,
|
|
19
|
+
extrude: EXT,
|
|
20
|
+
layers: [
|
|
21
|
+
{ id: 'rb', p: [250, 270], m: { ...hop, k: 0.4 }, shapes: [] },
|
|
22
|
+
{ id: 'face', parent: 'rb', tilt: FACE, shapes: [] },
|
|
23
|
+
...BANDS.map(([o, i, fill], n) => ({
|
|
24
|
+
parent: 'face',
|
|
25
|
+
a: [0, BASE],
|
|
26
|
+
p: [0, BASE],
|
|
27
|
+
m: {
|
|
28
|
+
s: [
|
|
29
|
+
[4 + n * 6, [0, 0], SNAP],
|
|
30
|
+
[34 + n * 6, [100, 100], 0],
|
|
31
|
+
[118 + n * 3, [100, 100], SNAP],
|
|
32
|
+
[146 + n * 3, [0, 0]],
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
shapes: [{ d: band(o, i), fill, depth: 0.6, crease: false }],
|
|
36
|
+
})),
|
|
37
|
+
{
|
|
38
|
+
parent: 'face',
|
|
39
|
+
shapes: [
|
|
40
|
+
{ d: cloud(-118, BASE, 0.42), fill: 'white', side: 'tint', depth: 1, crease: false },
|
|
41
|
+
{ d: cloud(118, BASE, 0.42), fill: 'white', side: 'tint', depth: 1, crease: false },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
glow('rb', [170, -150], 24, [twinkle(40), twinkle(130, true)]),
|
|
45
|
+
],
|
|
46
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a receipt printer; the slip feeds up out of the slot, line by line.
|
|
2
|
+
import { press, slide, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, poly, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
// a strip of paper with a torn zigzag top, long enough that its foot stays inside the printer
|
|
6
|
+
const TEETH = 7;
|
|
7
|
+
const PAPER = [
|
|
8
|
+
[-72, 110],
|
|
9
|
+
[-72, -96],
|
|
10
|
+
...Array.from({ length: TEETH * 2 - 1 }, (_, i) => [
|
|
11
|
+
-72 + ((i + 1) * 144) / (TEETH * 2),
|
|
12
|
+
i % 2 ? -96 : -108,
|
|
13
|
+
]),
|
|
14
|
+
[72, -96],
|
|
15
|
+
[72, 110],
|
|
16
|
+
];
|
|
17
|
+
const ROWS = [-70, -48, -26, -4, 18].map((y, i) => ({
|
|
18
|
+
d: line([-50, y], [i % 2 ? 10 : 30, y]),
|
|
19
|
+
}));
|
|
20
|
+
export const receipt = {
|
|
21
|
+
name: 'receipt',
|
|
22
|
+
frames: 180,
|
|
23
|
+
still: 100,
|
|
24
|
+
line: LINE,
|
|
25
|
+
extrude: EXT,
|
|
26
|
+
layers: [
|
|
27
|
+
{ id: 'pr', p: [255, 300], shapes: [] },
|
|
28
|
+
{ id: 'face', parent: 'pr', tilt: FACE, shapes: [] },
|
|
29
|
+
{
|
|
30
|
+
parent: 'face',
|
|
31
|
+
m: slide([0, -72], 12, 60, 48),
|
|
32
|
+
shapes: [
|
|
33
|
+
{ d: poly(PAPER), fill: 'white', depth: 0.2 },
|
|
34
|
+
...ROWS,
|
|
35
|
+
...[-70, -48, -26, -4, 18].map((y) => ({ d: line([38, y], [52, y]) })),
|
|
36
|
+
{ d: line([-50, 44], [52, 44]) },
|
|
37
|
+
{ d: rect(16, 56, 36, 14, 4), fill: 'ok', line: false },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
parent: 'face',
|
|
42
|
+
shapes: [
|
|
43
|
+
{ d: rect(-116, -24, 232, 150, 26), fill: 'deep', depth: 1.2 },
|
|
44
|
+
{ d: rect(-92, -10, 184, 12, 6), fill: 'ink', line: false },
|
|
45
|
+
{ d: rect(-80, 30, 160, 56, 12), fill: 'tint', depth: 0.2 },
|
|
46
|
+
{ d: ellipse(88, 100, 8), fill: 'ok' },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
parent: 'face',
|
|
51
|
+
m: { ...press, at: 4, k: 0.3 },
|
|
52
|
+
shapes: [{ d: rect(-90, 96, 60, 16, 6), fill: 'gold', depth: 0.4 }],
|
|
53
|
+
},
|
|
54
|
+
glow('pr', [150, -170], 24, [twinkle(64), twinkle(140, true)]),
|
|
55
|
+
],
|
|
56
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a Redmi Note 9S / 9 Pro style phone seen from the back, on a leaned face. No logo.
|
|
2
|
+
import { jolt, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
// The back: a square camera block in the middle with four lenses, the flash under it, the fingerprint power key
|
|
6
|
+
const LENSES = [
|
|
7
|
+
[-22, -128],
|
|
8
|
+
[22, -128],
|
|
9
|
+
[-22, -84],
|
|
10
|
+
[22, -84],
|
|
11
|
+
];
|
|
12
|
+
export const redmiNote9sPro = {
|
|
13
|
+
name: 'redmi-note-9s-pro',
|
|
14
|
+
frames: 180,
|
|
15
|
+
line: LINE,
|
|
16
|
+
extrude: EXT,
|
|
17
|
+
layers: [
|
|
18
|
+
{ id: 'ph', p: [250, 255], m: jolt([8, 12]), shapes: [] },
|
|
19
|
+
{
|
|
20
|
+
parent: 'ph',
|
|
21
|
+
tilt: FACE,
|
|
22
|
+
shapes: [
|
|
23
|
+
{ d: rect(80, -96, 14, 40, 4), fill: 'grey', depth: 0.8 },
|
|
24
|
+
{ d: rect(80, -40, 14, 34, 4), fill: 'deep', depth: 0.8 },
|
|
25
|
+
{ d: rect(-88, -172, 176, 344, 30), fill: 'deep', depth: 0.8 },
|
|
26
|
+
{ d: rect(-50, -154, 100, 96, 22), fill: 'grey', depth: 0.4 },
|
|
27
|
+
...LENSES.flatMap(([x, y], i) => [
|
|
28
|
+
{ d: ellipse(x, y, i === 0 ? 17 : 14), fill: 'ink' },
|
|
29
|
+
{ d: ellipse(x - 4, y - 4, 3), fill: 'white', line: false },
|
|
30
|
+
]),
|
|
31
|
+
{ d: rect(-16, -42, 32, 12, 6), fill: 'white' },
|
|
32
|
+
{ d: rect(-44, 120, 88, 14, 7), fill: 'main', line: false },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
glow('ph', [140, -200], 24, [twinkle(46), twinkle(140, true)]),
|
|
36
|
+
],
|
|
37
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Drawn for @20baht/stickers: a sign-up form on a clipboard, a plus badge hopping on its corner.
|
|
2
|
+
import { hop, twinkle } from '../motions.js';
|
|
3
|
+
import { ellipse, line, rect } from '../sticker.js';
|
|
4
|
+
import { EXT, FACE, glow, LINE } from './shared.js';
|
|
5
|
+
export const register = {
|
|
6
|
+
name: 'register',
|
|
7
|
+
frames: 160,
|
|
8
|
+
line: LINE,
|
|
9
|
+
extrude: EXT,
|
|
10
|
+
layers: [
|
|
11
|
+
{ id: 'root', a: [0, 150], p: [244, 390], m: hop, shapes: [] },
|
|
12
|
+
{
|
|
13
|
+
id: 'card',
|
|
14
|
+
parent: 'root',
|
|
15
|
+
tilt: FACE,
|
|
16
|
+
shapes: [
|
|
17
|
+
{ d: rect(-120, -150, 240, 300, 22), fill: 'white', depth: 1 },
|
|
18
|
+
{ d: rect(-50, -170, 100, 40, 12), fill: 'deep', depth: 0.6 },
|
|
19
|
+
{ d: ellipse(0, -72, 44), fill: 'tint', depth: 0.3 },
|
|
20
|
+
{ d: ellipse(0, -86, 15), fill: 'main' },
|
|
21
|
+
{ d: rect(-26, -66, 52, 26, 13), fill: 'main' },
|
|
22
|
+
{ d: rect(-84, -4, 168, 30, 10), fill: 'tint' },
|
|
23
|
+
{ d: rect(-84, 42, 168, 30, 10), fill: 'tint' },
|
|
24
|
+
{ d: rect(-50, 94, 100, 32, 16), fill: 'main', depth: 0.3 },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
parent: 'card',
|
|
29
|
+
a: [104, -132],
|
|
30
|
+
p: [104, -132],
|
|
31
|
+
m: { ...hop, at: 5, k: 1.3 },
|
|
32
|
+
shapes: [
|
|
33
|
+
{ d: ellipse(104, -132, 34), fill: 'ok', depth: 0.6 },
|
|
34
|
+
{ d: line([88, -132], [120, -132]) },
|
|
35
|
+
{ d: line([104, -148], [104, -116]) },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
glow('root', [-160, -110], 24, [twinkle(30), twinkle(130, true)]),
|
|
39
|
+
],
|
|
40
|
+
};
|