Start a breathing session
breatheGenerate an animated breathing session as a self-contained HTML page, save it to your computer, and open it in your browser. The session stays still until you press Begin, providing a calm visual guide for your breath.
Instructions
Creates an animated VirWave breathing session as a self-contained HTML page, saves it on this computer, and returns its file path. Unless out_dir is given, the page also opens in the person's default browser (they can turn that off in settings). The page opens at rest and starts when the person presses Begin, so nothing moves without their say-so. With no inputs, it plays the default Circle 4-8 Breathing session, which has no breath holds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shape | No | Shape to draw. Each pattern lists the shapes it can use; defaults to the pattern's first. box: A square whose outline draws itself once per breath cycle. triangle: A triangle whose outline draws itself once per breath cycle. circle: A ring that draws itself once per breath cycle, with no corners to turn. focus-point: A calm point drifting slowly across the field. infinity: A continuous figure-eight with no start or end. ripple: Rings spreading out from a point of contact. color-field: Slow colour folding into itself. | |
| cycles | No | Exact number of breath cycles. Takes precedence over minutes. | |
| minutes | No | Approximate session length; rounded to whole breath cycles. | |
| out_dir | No | Directory to write the page into, for a client that shows the page itself (for example, by publishing it as an Artifact). When set, the page is not opened in the browser. When left out, the page is saved to the person's chosen folder (by default a VirWave Breathe folder in the system temp directory) and opened in their browser. | |
| pattern | No | Pattern id from list_patterns. Defaults to in-out-extended-exhale. list_patterns marks each hold-free pattern with "holdFree": true. |