How jonobr1/patatap works
Patatap lets a user trigger two-dimensional animations with sound, primarily through keyboard and touch input; the entry point also supports MIDI. The controller maps input to registered animations, which draw on the Two.js canvas and may play associated sounds. The README describes the product at a high level; sampled code confirms animation registration, palette updates and audio loading. Several animation implementations are represented by their exact files, while the broader animation catalog is grouped by its source directory. Some UI and dispatch details are not visible in the excerpts, so those links are omitted or marked unverified.
Main entry points: animations/index.js Animation registry · palette.js Color palettes · src/index.js Input and UI · bubbles.js Bubbles
Components 15
Interaction
- Input and UI
src/index.js - MIDI input
src/index.js
Animation system
- Animation registry
src/animations/index.js - Bubbles
src/animations/bubbles.js - Clay
src/animations/clay.js - Confetti
src/animations/confetti.js - Corona
src/animations/corona.js - Pistons
src/animations/pistons.js - Pinwheel
src/animations/pinwheel.js - Other animations
src/animations - Color palettes
src/animations/palette.js
Rendering
- Canvas setup
src/common.js
Audio
- Sound engine
src/sound.js - Sound assets
assets
Other components
- User
Connections 20
- User → Input and UI: provides input
src/index.js - User → MIDI input: plays MIDI
- Input and UI → Animation registry: loads audio
src/index.js - Input and UI → Animation registry: dispatches animation
src/index.js - Input and UI → Canvas setup: attaches canvas
src/index.js - Bubbles → Animation registry: registers with
src/animations/bubbles.js - Clay → Animation registry: registers with
src/animations/clay.js - Confetti → Animation registry: registers with
src/animations/confetti.js - Corona → Animation registry: registers with
src/animations/corona.js - Pistons → Animation registry: registers with
src/animations/pistons.js - Pinwheel → Animation registry: registers with
src/animations/pinwheel.js - Other animations → Animation registry: registers with
src/animations/corona.js - Bubbles → Color palettes: uses colors
src/animations/bubbles.js - Clay → Color palettes: uses colors
src/animations/clay.js - Confetti → Color palettes: uses colors
src/animations/confetti.js - Corona → Color palettes: uses colors
src/animations/corona.js - Pistons → Color palettes: uses colors
src/animations/pistons.js - Pinwheel → Color palettes: uses colors
src/animations/pinwheel.js - Animation registry → Sound engine: creates sounds
src/animations/index.js - Sound engine → Sound assets: loads audio