Window animation styles
A style is one *.motion.json file of at most 64 KB. It says what happens to a window in one or more moments of its life: going to the taskbar and back, filling the screen, being dragged, snapped, opened or closed. This page is written from the program's own code, so every range here is the one it enforces.
The shape of a file
{
"$schema": "https://stillwarddisplay.com/schema/motion.json",
"version": 2,
"name": "Pour",
"minimize": {
"effect": {
"kind": "pour",
"bend": 0.7,
"squeeze": 0.6,
"slices": 64,
"fade": 0.3,
"sway": 0.4,
"waist": 0.5
},
"duration_ms": 480,
"ease": {
"bezier": [0, 0, 1, 1]
}
},
"knobs": "… 3 settings people can turn"
}Shortened here; the whole file is under Download.
| Field | What it is |
|---|---|
$schema | Optional. Where the format's JSON Schema is, for your editor. |
version | The format's version, 5 now. A file from a newer version is refused, and says so, rather than half understood. |
name | Up to 64 characters. Required. |
about | Up to 1000 characters for its Workshop page. Text only. |
| an event | One object per moment the style draws, below. A moment left out is drawn by Windows. |
A style belongs to the moment of the first event it writes, and a person chooses one style for each moment. A file may write events of several moments; each is taken from the style chosen for its own.
Events
| Event | When | Effects it can have |
|---|---|---|
minimize | A window going to its taskbar button. | windows, none, transform, funnel, pour, blinds, flip, fold, shatter, mesh |
restore | Coming back from it. Left out, the way down is played backwards. | windows, none, transform, funnel, pour, blinds, flip, fold, shatter, mesh |
maximize | Filling the screen. | windows, none, mesh, swell, squash, wobble, spring, tip, sweep |
unmaximize | Coming back from full screen. Left out, the maximize is played backwards. | windows, none, mesh, swell, squash, wobble, spring, tip, sweep |
drag | While a window is carried by its title bar. | windows, none, jelly, tilt, lift, card |
resize | Let go of after an edge or a corner was pulled to a new size. | windows, none, mesh, swell, squash, wobble, spring, tip, sweep |
snap | Pulled against an edge or into a corner. | windows, none, mesh, swell, squash, wobble, spring, tip, sweep |
monitor | Carried to another screen with Win+Shift and an arrow. | windows, none, hourglass, mesh, swell, squash, wobble, spring, tip, sweep |
arrange | Put in place by a layout, a preset or tidying. | windows, none, glide |
switch | Brought to the front. | windows, none, mesh, swell, squash, wobble, tip, sweep |
open | A window appearing. | windows, none, mesh, swell, squash, wobble, tip, sweep |
close | A window closed with its close button, going into its own middle. | windows, none, transform, blinds, flip, fold, shatter, mesh |
Writing an effect for an event that cannot draw it, a jelly for a minimize say, is refused. Every effect is written as the way from where the window stands to where it goes, and the way back plays it backwards unless the file writes its own.
Timing
Every event is {"effect": …, "duration_ms": …, "ease": …}. The duration is 80 to 1500 ms, 260 when left out. The ease is one of:
- a curve of the program's, by name:
smooth,snappy,spring,gentle; {"bezier": [x1, y1, x2, y2]}, as in CSS, with x held to 0 to 1 and y allowed from -1 to 2;{"spring": {"bounce": b}}, a spring that takes the duration as how long it looks, with bounce from 0 (settles without passing the mark) to 0.6. A spring keeps its speed when a window is called back halfway, which is why the program's own styles use one.
Effects
Every number is brought into its range when it is outside it, and is the value under Left out when it is missing.
windows
Windows' own animation, left alone. For: minimize, restore, maximize, unmaximize, drag, resize, snap, monitor, arrange, switch, open, close.
none
No animation at all. For: minimize, restore, maximize, unmaximize, drag, resize, snap, monitor, arrange, switch, open, close.
transform
The whole window as one picture moving toward the target, growing or shrinking and fading through up to eight key moments. For: minimize, restore, close.
Its keys are up to 8 moments, each t (when, 0 to 1), toward (how far the picture's middle is from the window's to the target's, 0 to 1), scale (0.02 to 1.5) and opacity (0 to 1). A key at the start and one at the end are put in when left out.
funnel
The window pours into the target through a narrowing neck, the part nearest the taskbar first. For: minimize, restore.
| Field | Range | Left out | What it does |
|---|---|---|---|
bend | 0 to 1 | 0.6 | How far ahead the part nearest the taskbar runs. |
squeeze | 0 to 1 | 0.5 | How much sooner the width gives way than the height. |
fade | 0 to 1 | 0.3 | How transparent it is by the end. |
slices | 4 to 96 (whole) | 48 | The most strips it is cut into where pictures cannot bend. |
pour
A funnel that sways and pinches on its way. For: minimize, restore.
| Field | Range | Left out | What it does |
|---|---|---|---|
bend | 0 to 1 | 0.7 | How far ahead the part nearest the taskbar runs. |
squeeze | 0 to 1 | 0.6 | How much sooner the width gives way than the height. |
fade | 0 to 1 | 0.3 | How transparent it is by the end. |
sway | 0 to 1 | 0.4 | How far the stream swings to the side on its way. |
waist | 0 to 1 | 0.5 | How thin it pinches in the middle of the way. |
slices | 4 to 96 (whole) | 48 | The most strips it is cut into where pictures cannot bend. |
hourglass
Runs out of one screen through a narrow neck between the two and gathers again on the other, like sand in an hourglass. For: monitor.
| Field | Range | Left out | What it does |
|---|---|---|---|
bend | 0 to 1 | 0.7 | How far ahead the part nearest the neck runs. |
squeeze | 0 to 1 | 0.6 | How much sooner the width gives way than the height. |
fade | 0 to 1 | 0.3 | How transparent it is in the neck. |
sway | 0 to 1 | 0.4 | How far the stream swings to the side on its way. |
waist | 0 to 1 | 0.5 | How thin it pinches on its way to the neck. |
slices | 4 to 96 (whole) | 48 | The most strips it is cut into where pictures cannot bend. |
blinds
The window as strips that leave one after another, the one nearest the taskbar first. For: minimize, restore, close.
| Field | Range | Left out | What it does |
|---|---|---|---|
slices | 4 to 32 (whole) | 12 | How many strips. |
stagger | 0 to 0.9 | 0.5 | How much of the time the strips spend waiting for one another. |
turn | 0 to 1 | 0 | How far each strip turns edge-on as it leaves, like a slat. Version 3. |
flip
The window tips back as it goes, the side away from the taskbar first, like a card laid down. For: minimize, restore, close.
| Field | Range | Left out | What it does |
|---|---|---|---|
tilt | 0 to 1 | 0.7 | How far it tips back: 1 is nearly flat. |
fade | 0 to 1 | 0.4 | How transparent it is by the end. |
fold
The window folds up like a fan, then goes into the target. For: minimize, restore, close.
| Field | Range | Left out | What it does |
|---|---|---|---|
panels | 2 to 8 (whole) | 4 | How many panels it folds into. |
fade | 0 to 1 | 0.3 | How transparent it is by the end. |
shatter
The window breaks into a grid of pieces that fly into the target one after another, turning as they go. For: minimize, restore, close.
| Field | Range | Left out | What it does |
|---|---|---|---|
pieces | 3 to 8 (whole) | 5 | Pieces across and down: a grid of that many squared. |
scatter | 0 to 1 | 0.5 | How far the pieces fly apart and how much they turn. |
mesh
The window as a grid whose every point the author places at each key moment. See the mesh section. For: minimize, restore, maximize, unmaximize, resize, snap, monitor, switch, open, close.
jelly
A dragged window that bends and settles like jelly. For: drag.
| Field | Range | Left out | What it does |
|---|---|---|---|
stiffness | 0.05 to 1 | 0.5 | How firm it is. |
damping | 0.05 to 1 | 0.5 | How quickly it settles. |
grid | 4 to 16 (whole) | 8 | Points across and down the jelly is moved by. |
tilt
A dragged window leans with the speed it is carried at, and swings straight when let go. For: drag.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | 0 to 1 | 0.5 | How far it leans. |
lift
A dragged window lifts off the desk while held: a little larger, the desk showing through. For: drag.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | 0 to 1 | 0.5 | How much it lifts. |
card
A dragged window carried as a card: leaning with its speed, banking into its way, lifted, drawn out along its speed. For: drag.
| Field | Range | Left out | What it does |
|---|---|---|---|
lean | 0 to 1 | 0 | How far it leans with its speed across, about where it is held. |
bank | 0 to 1 | 0 | How far it turns in depth into the way it is carried. |
lift | 0 to 1 | 0 | How far it lifts off the desk while held. |
stretch | 0 to 1 | 0 | How far it is drawn out along its speed, its area kept. |
swell
The window, where it now stands, takes a breath: a little larger and back. For: maximize, unmaximize, resize, snap, monitor, switch, open.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | 0 to 1 | 0.5 | How much it moves: 1 is as much as reads as a settle and not a jump. |
squash
The window squashes and stretches on its bottom edge, as a thing set down with some weight. For: maximize, unmaximize, resize, snap, monitor, switch, open.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | 0 to 1 | 0.5 | How much it moves. |
wobble
A ripple runs through the window and dies away. For: maximize, unmaximize, resize, snap, monitor, switch, open.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | 0 to 1 | 0.5 | How much it moves. |
spring
The edges that moved run on a little and spring back: those a resize pulled, a window filling, leaving or snapping to its screen recoiling off the screen's edges, or one carried to another screen running on the way it went. For: maximize, unmaximize, resize, snap, monitor.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | 0 to 1 | 0.5 | How far the edges run on. |
tip
The window nods in depth about one edge and settles: the bottom, a snapped window's screen side, or the edge opposite the one pulled. For: maximize, unmaximize, resize, snap, monitor, switch, open.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | -1 to 1 | 0.5 | How far it nods: above 0 the far edge leans away, below it toward. |
sweep
One swell crosses the window once, from the edge it nods about to the other. For: maximize, unmaximize, resize, snap, monitor, switch, open.
| Field | Range | Left out | What it does |
|---|---|---|---|
amount | 0 to 1 | 0.5 | How much the passing swell widens it. |
glide
The windows a layout places fly to their places: at once or one after another, straight or along an arc. For: arrange.
| Field | Range | Left out | What it does |
|---|---|---|---|
stagger | 0 to 0.9 | 0 | How much of the flight the windows spend setting off one after another. |
arc | 0 to 1 | 0 | How far each bows from the straight line: a quarter of its way at most. |
lift | 0 to 1 | 0 | How far each rises toward the eye on its way. Version 3. |
dip | 0 to 1 | 0 | How far each sinks back and dims on its way. Version 3. |
bank | 0 to 1 | 0 | How far each turns in depth toward where it is going. Version 3. |
The mesh
A mesh is the window as a grid of cols × rows cells, 1 to 8 each way, whose every point the author places at up to 16 key moments. It is the effect to use for a movement of your own.
The grid is written as if the taskbar were below the window, and the program turns it for a taskbar at any edge. Across runs left to right; along runs from the side of the window away from the taskbar (0) to the side nearest it (1). Points are listed row by row along the way, each row across, so point i across and j along is number j × (cols + 1) + i.
Each point is three numbers, [toward, across, along]:
toward, -0.5 to 1.5: how far it is on its way from its place on the window (0) to the same place on the target (1). The target is the window's taskbar button, or for a close the window's own middle. A point at1has arrived whatever the size and place of the window, which is what lets one mesh look the same on every desk.acrossandalong, -1.5 to 1.5: how far off its way it is, as a share of the window's width and height where it is now (the window's size attoward0, the target's at 1). Use them for a swing or a bulge; a point on its way has 0 for both.
Each key is {"t": …, "opacity": …, "points": [...]}: when (0 to 1, a share of the duration), how solid the grid is (0 to 1), and every point. A key with any other number of points than (cols + 1) × (rows + 1) is refused, since guessing which point is which would draw something its author never saw.
The first moment is always the window where it stands, whatever the file says, so a mesh starts exactly where the window is and its way back lands exactly there. A mesh whose last key comes before t 1 holds that shape and fades out.
Between keys every number moves on a cubic curve through the keys around it, so a point passes a key without a corner in its path. The event's ease is laid over that, as for every effect.
Where the desk can bend pictures, each cell is drawn in perspective between its four points. Where it cannot, the grid is read as thin strips across the way.
The example below is a 4 × 4 mesh whose corner nearest the button leads the way; beside it, what the program draws from it.
{
"$schema": "https://stillwarddisplay.com/schema/motion.json",
"version": 2,
"name": "Corner first",
"minimize": {
"effect": {
"kind": "mesh",
"cols": 4,
"rows": 4,
"keys": [
{
"t": 0,
"opacity": 1,
"points": [
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]
]The first 40 lines; the whole file is under Download.
Checking a file
stillward-display.exe --check file.motion.json prints whether the program takes the file, what it draws for each event, every number it changed on the way in, and whether the Workshop card can play it. Add --gif picture.gif to write the picture its Workshop page will have. Nothing else of the program starts.