Breathing tiles
Turn a grid of squares in a looping wave with Oscillate.
Static preview at 1.5 seconds. Open the scene in the editor and press Play to see the motion.
Animation · Rectangle → Clone → Oscillate → Transform
Download scene JSON · Open SVG preview
Try it in the editor
Section titled “Try it in the editor”Download the JSON file and open it in svertik with Open or by dragging it onto the editor. The scene is complete and editable.
Build it step by step
Section titled “Build it step by step”- Create an outlined Rectangle, 30 × 30 px, with no fill, a turquoise stroke and Stroke width 2.
- Add Clone in Grid mode: Columns 11, Rows 8, Spacing [1.5, 1.5].
- Add Oscillate after Clone: Wave Sine, Frequency 0.5, Amplitude 1, Element phase 8. Its Time follows scene.time.
- Nest Transform inside Oscillate with Rotation 45. Oscillate swings the rotation around 0, and Element phase delays each square a little after the previous one.
- Set the document duration to 8 seconds with Loop enabled. At 0.5 Hz that is four full cycles, so the loop is seamless.
Render it from the terminal
Section titled “Render it from the terminal”Run this from the main svertik checkout, replacing the input path with the downloaded file:
pnpm svertik render breathing-tiles.json -o breathing-tiles.svg --time 1.5Without --time the render is the first frame, where every square is upright.
Complete scene
Section titled “Complete scene”{ "version": 1, "notes": "A grid of squares that turn in a wave. Oscillate drives a nested Transform, offset per element.", "document": { "width": 640, "height": 480 }, "animation": { "duration": 8, "loop": true, "fps": 60, "tracks": [] }, "objects": [ { "kind": "shape", "id": "tiles", "name": "Tiles", "shape": "rectangle", "params": { "width": 30, "height": 30, "fill": false, "stroke": true, "strokeColor": "#09fdd1", "strokeWidth": 2 }, "stack": [ { "id": "tiles-clone", "type": "clone", "params": { "mode": "grid", "columns": 11, "rows": 8, "spacing": [ 1.5, 1.5 ] } }, { "id": "tiles-oscillate", "type": "oscillate", "params": { "wave": "sine", "time": { "$expr": "scene.time", "fallback": 0 }, "frequency": 0.5, "amplitude": 1, "elementPhase": 8 }, "children": [ { "id": "tiles-transform", "type": "transform", "params": { "rotation": 45 } } ] } ] } ]}