Skip to content

Companion: idle gestures, a stroke of the finger and its own sounds (#40) - #45

Open
cmena92 wants to merge 1 commit into
mainfrom
feat/40-gestos
Open

cmena92 wants to merge 1 commit into
mainfrom
feat/40-gestos

Conversation

@cmena92

@cmena92 cmena92 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Closes #40

Gestures

  • Left alone, every 8 to 15 s it stretches, yawns, waves, dances or looks around: CSS on the body or the face, no new art.
  • Never while the page is hidden, under reduced motion, asleep, or in the middle of a reaction. Falling asleep ends a running gesture, so it cannot wake it.

Touch

  • A stroke of the finger is a cuddle: hearts follow the finger, and the bond counts it as acariciar under the 30 s rule. The click that ends a stroke is not a touch.
  • A double tap is a jump and a laugh. The card keeps touch-action: pan-y, so a vertical swipe still scrolls.

Sounds

  • www/games/companero/sonidos.js synthesises a crunch, bubbles, a bounce, a laugh and a yawn with WebAudio: no files, no network.
  • Nothing plays unless the app's sound setting is on (read, never written). A touch opens the AudioContext; the idle yawn never opens it by itself.

Checks run locally

  • node tools/test-companero.js: 280 green, five runs.
  • The browser group injects a probe before load (idle waits a hundredth as long, a hidden flag, every oscillator and buffer counted). It counts sounds, not contexts, because the core opens its own AudioContext on the first touch even with sound off.
  • Checks: idle gestures, none while hidden or under reduced motion; a stroke gives +1 bond and hearts, a second within 30 s adds nothing; double tap; no sound with sound off; a laugh with sound on.
  • node tools/test.js: 5,610 green · ./tools/browser-check.sh: 52 of 52.

)

Left alone, every 8 to 15 s it stretches, yawns, waves, dances or looks
around: CSS on the body or the face, no new art. Never while the page
is hidden, under reduced motion, asleep or in the middle of a reaction;
a touch starts the wait over, and falling asleep ends a gesture so it
cannot wake it.

A stroke of the finger across it is a cuddle: hearts follow the finger
and the bond counts it as «acariciar» under the 30 s rule; the click
that ends a stroke is not a touch. A double tap is a jump and a laugh.

www/games/companero/sonidos.js synthesises a crunch, bubbles, a bounce,
a laugh and a yawn with WebAudio: no files and no network. Nothing plays
unless the app's sound setting is on (read, never written); a touch
opens the AudioContext, and the idle yawn never opens it by itself.

The browser checks inject a probe before the page loads, so the app
carries no test hook. They count sounds, not contexts: the core opens
its own AudioContext on the first touch even with sound off.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compañero: gestos en reposo, caricias con el dedo y sonidos

1 participant