|
| 1 | +// _theme_art.scss — motion for the theme illustrations (_includes/theme_art.html), on Home and /research/. |
| 2 | +// Same vocabulary as the animated home figure: one 5 s loop per theme, travelling packets, nodes lighting up, |
| 3 | +// pulse rings. Overlays (.ta) stay invisible unless motion is allowed, so reduced motion shows the still art. |
| 4 | + |
| 5 | +$loop: 5s; |
| 6 | + |
| 7 | +// A dash runs the length of a path (pathLength="100") between two points of the loop. |
| 8 | +@mixin packet($name, $from, $to) { |
| 9 | + @keyframes #{$name} { |
| 10 | + 0%, #{$from} { opacity: 0; stroke-dashoffset: 14; } |
| 11 | + #{$from + 1%} { opacity: 1; } |
| 12 | + #{$to - 1%} { opacity: 1; } |
| 13 | + #{$to}, 100% { opacity: 0; stroke-dashoffset: -100; } |
| 14 | + } |
| 15 | +} |
| 16 | +// A node lights up briefly. |
| 17 | +@mixin flash($name, $at, $peak: 1) { |
| 18 | + @keyframes #{$name} { |
| 19 | + 0%, #{$at} { opacity: 0; } |
| 20 | + #{$at + 3%} { opacity: $peak; } |
| 21 | + #{$at + 14%}, 100% { opacity: 0; } |
| 22 | + } |
| 23 | +} |
| 24 | +// A ring expands and fades. |
| 25 | +@mixin pulse($name, $at, $scale: 1.9) { |
| 26 | + @keyframes #{$name} { |
| 27 | + 0%, #{$at} { opacity: 0; transform: scale(1); } |
| 28 | + #{$at + 1.2%} { opacity: 0.8; transform: scale(1.04); } |
| 29 | + #{$at + 12%} { opacity: 0; transform: scale($scale); } |
| 30 | + 100% { opacity: 0; transform: scale(1); } |
| 31 | + } |
| 32 | +} |
| 33 | + |
| 34 | +.ta { opacity: 0; } |
| 35 | + |
| 36 | +// Swarm: the leader pulses, then messages hop to its neighbours and on to theirs. |
| 37 | +@include pulse(ta-sw-ring, 0%); |
| 38 | +@include packet(ta-sw-p1, 4%, 26%); |
| 39 | +@include flash(ta-sw-n1, 24%); |
| 40 | +@include packet(ta-sw-p2, 32%, 54%); |
| 41 | +@include flash(ta-sw-n2, 52%); |
| 42 | +// Edge–cloud: the cloud sends down through the hub to the devices, then one device reports back up. |
| 43 | +@include packet(ta-ed-p0, 0%, 12%); |
| 44 | +@include pulse(ta-ed-ring, 11%); |
| 45 | +@include packet(ta-ed-p1, 14%, 30%); |
| 46 | +@include flash(ta-ed-n1, 28%); |
| 47 | +@include packet(ta-ed-p2, 32%, 46%); |
| 48 | +@include flash(ta-ed-n2, 44%); |
| 49 | +@include packet(ta-ed-up, 58%, 86%); |
| 50 | +@include flash(ta-ed-cloud, 84%, 0.9); |
| 51 | +// Neuro-symbolic: frames are read left to right, evidence climbs the logic tree, the verdict pulses. |
| 52 | +@include flash(ta-ns-f1, 0%); |
| 53 | +@include flash(ta-ns-f2, 7%); |
| 54 | +@include flash(ta-ns-f3, 14%); |
| 55 | +@include packet(ta-ns-p, 24%, 46%); |
| 56 | +@include pulse(ta-ns-ring, 45%); |
| 57 | +// Trust: a check runs around the shield, then the tick is drawn and the shield pulses. |
| 58 | +@include packet(ta-tr-trace, 0%, 40%); |
| 59 | +@include pulse(ta-tr-ring, 52%, 1.3); |
| 60 | +@keyframes ta-tr-check { |
| 61 | + 0%, 40% { stroke-dashoffset: 100; opacity: 1; } |
| 62 | + 52% { stroke-dashoffset: 0; } |
| 63 | + 90% { opacity: 1; } |
| 64 | + 98%, 100% { stroke-dashoffset: 0; opacity: 0; } |
| 65 | +} |
| 66 | +// Time series: a cursor reads the history, the present point pulses, the forecast unrolls. |
| 67 | +@include packet(ta-ts-trace, 0%, 40%); |
| 68 | +@include pulse(ta-ts-ring, 40%); |
| 69 | +@keyframes ta-ts-fc { |
| 70 | + 0%, 42% { clip-path: inset(0 100% 0 0); opacity: 1; } |
| 71 | + 70% { clip-path: inset(0 0 0 0); } |
| 72 | + 92% { opacity: 1; } |
| 73 | + 100% { clip-path: inset(0 0 0 0); opacity: 0; } |
| 74 | +} |
| 75 | + |
| 76 | +@media (prefers-reduced-motion: no-preference) { |
| 77 | + @each $n in sw-ring, sw-p1, sw-n1, sw-p2, sw-n2, ed-p0, ed-ring, ed-p1, ed-n1, ed-p2, ed-n2, ed-up, ed-cloud, |
| 78 | + ns-f1, ns-f2, ns-f3, ns-p, ns-ring, tr-trace, tr-ring, tr-check, ts-trace, ts-ring, ts-fc { |
| 79 | + .ta-#{$n} { animation: ta-#{$n} $loop linear infinite; } |
| 80 | + } |
| 81 | + .ta-sw-ring, .ta-ed-ring, .ta-ns-ring, .ta-tr-ring, .ta-ts-ring { transform-box: fill-box; transform-origin: center; } |
| 82 | + .ta-tr-check { stroke-dasharray: 100; } |
| 83 | +} |
0 commit comments