fuzzyworld

bubbles / files / README.md

README.md

Blame: the commit that last changed each line ยท file ยท history

dcc4757f 2026-04-09 Pavel Safronov1# Bubbles
2
3Your phone is a glass of water.
4
5Tilt to slosh. Tap to drop things in. Some float. Some sink.
6
c71d2317 2026-10-27 Pavel Safronov7**Live demo:** https://apps.fuzzyworld.net/bubbles/
dcc4757f 2026-04-09 Pavel Safronov8
c71d2317 2026-10-27 Pavel Safronov9**Repository:** https://code.fuzzyworld.net/bubbles/ (`git clone https://code.fuzzyworld.net/bubbles.git`)
dcc4757f 2026-04-09 Pavel Safronov10
11---
12
13## What it does
14
15| Action | Result |
16| --------------------- | -------------------------------------------- |
17| Tilt phone left/right | Water sloshes toward the low side |
18| Tilt past ~45ยฐ | Water spills over the rim (permanently lost) |
19| Tap anywhere | A random object drops into the water |
20| Desktop | Move mouse left/right to simulate tilt |
21
22### Objects
23
24| Icon | Density | Behaviour |
25| ----------- | ------- | -------------------------- |
26| ๐Ÿ“ Ping pong | 0.10 | Bobs wildly on the surface |
27| ๐Ÿฆ† Duck | 0.50 | Floats high |
28| ๐ŸŽ Apple | 0.80 | Floats |
29| ๐Ÿ‹ Lemon | 0.85 | Floats |
30| ๐ŸงŠ Ice | 0.92 | Barely floats |
31| ๐ŸŸ Fish | 1.05 | Barely sinks |
32| ๐Ÿชจ Rock | 2.60 | Sinks |
33| ๐Ÿ’Ž Gem | 3.50 | Sinks |
34| โš“ Anchor | 7.50 | Sinks fast |
35| ๐Ÿ”ฉ Bolt | 7.80 | Sinks fast |
36
37Max 12 objects at a time โ€” the oldest is removed when you add a 13th.
38
39---
40
41## Tech
42
43- TypeScript + Canvas 2D API (no framework, no WebGL)
44- Vite for bundling
45- pnpm for package management
c71d2317 2026-10-27 Pavel Safronov46- Static hosting at apps.fuzzyworld.net (no server)
dcc4757f 2026-04-09 Pavel Safronov47
48Physics:
49- 1-D column wave simulation (80 columns, spring-coupled)
50- Buoyancy via submerged fraction of circle cross-section
51- Elastic damped circle vs. circle + wall collisions
52- `DeviceOrientationEvent` for real tilt; mouse fallback on desktop
53
54---
55
56## Development
57
58```sh
59# Install dependencies
60pnpm install
61
62# Generate favicons and og-image from wind.png
63pnpm gen-assets
64
65# Start dev server
66pnpm dev
67
68# Type-check + production build
69pnpm build
70```
71
c71d2317 2026-10-27 Pavel Safronov72Output goes to `dist/`.
dcc4757f 2026-04-09 Pavel Safronov73
74---
75
76## Deploy
77
c71d2317 2026-10-27 Pavel Safronov78```bash
79pnpm run deploy
80```
81
82`fw deploy` (from [fuzzyworld-tools](https://code.fuzzyworld.net/fuzzyworld-tools/)) builds a fresh clone of `main`:
dcc4757f 2026-04-09 Pavel Safronov83
84```
c71d2317 2026-10-27 Pavel Safronov85pnpm install โ†’ pnpm gen-assets โ†’ pnpm build โ†’ upload dist/
dcc4757f 2026-04-09 Pavel Safronov86```
87
c71d2317 2026-10-27 Pavel Safronov88and publishes it at https://apps.fuzzyworld.net/bubbles/
dcc4757f 2026-04-09 Pavel Safronov89
90---
91
92## Attribution
93
94Wind icon by [Icongeek26](https://www.flaticon.com/authors/icongeek26) from [Flaticon](https://www.flaticon.com/).