fuzzyworld

nuts / shampoo / files / README.md

Branch shampoo · default branch · all branches

README.md

1.3 KB · history · blame

nuts

A phone-focused full-screen toy: a box of hex nuts bouncing around with haptic feedback.

Play with it!

Features

Tech stack

Development

pnpm install
pnpm dev        # http://localhost:5173
pnpm build      # production bundle → dist/
pnpm preview    # preview dist/ build

Deployment

Hosted on GitLab Pages via .gitlab-ci.yml. Pushes to the default branch trigger a build and publish dist/ as the Pages site.

If your project is in a GitLab group/subgroup the Vite base: './' config ensures assets resolve correctly under the Pages sub-path.

Source
1# nuts
2
3> A phone-focused full-screen toy: a box of hex nuts bouncing around with haptic feedback.
4
5[Play with it!](https://pavelsafronov.gitlab.io/nuts)
6
7## Features
8
9- **Physics** — [Matter.js](https://brm.io/matter-js/) 2D rigid-body simulation
10- **Haptics** — Web Vibration API fires on every wall impact (intensity scales with collision speed)
11- **Tilt gravity** — Device orientation rotates the gravity vector so nuts roll as you tilt your phone
12- **Shake** — DeviceMotion events detect shakes and punt all nuts with a random impulse + double-vibrate
13- **Configurable** — Slider to set 1–50 nuts; reset positions on demand
14- **Offline-ready** — No server, no data, runs entirely in the browser
15
16## Tech stack
17
18- [pnpm](https://pnpm.io/) + [TypeScript](https://www.typescriptlang.org/)
19- [Vite](https://vitejs.dev/) — dev server and bundler
20- [Matter.js](https://brm.io/matter-js/) — 2D physics engine
21
22## Development
23
24```bash
25pnpm install
26pnpm dev # http://localhost:5173
27pnpm build # production bundle → dist/
28pnpm preview # preview dist/ build
29```
30
31## Deployment
32
33Hosted on GitLab Pages via `.gitlab-ci.yml`. Pushes to the default branch trigger a build and publish `dist/` as the Pages site.
34
35If your project is in a GitLab group/subgroup the Vite `base: './'` config ensures assets resolve correctly under the Pages sub-path.