feat(web): the mark frames the page, its rings out into the margins (refs #167) 5501b1c657b2
The rings are sized from the window (a fifth of its width, at most 42% of its height) with their centres 1.1 radii either side of the middle, as the mark draws them, so they frame the page instead of hiding behind it; 1,400 dots keep them as dense as the sky.
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-10-13 20:31 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
5501b1c657b282af52ee33f594c4f7aabd7965bda9d50ae67c4c0ab42d3b12db- Depends on
- 17ca6cddc534 6246d1e51f4f f993f792537e
- Depended on by
- da8f7826a645
- In bookmarks
- api-unknown-fields cancel-landed-runs diffusion-pin-bookmark draft-ready main oh-comment-body-file proposal-list-fast
- In tags
- v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
- Edits
- 6 atoms, 0 tree operations, 2 files
Browse the tree at this change
replaced assets/backdrop/backdrop_bg.wasm +0 −0
No line changes.
modified crates/backdrop/src/mark.rs +6 −4
| … | 8 unchanged lines |
||
| 9 | 9 | use std::f32::consts::TAU; |
|
| 10 | 10 | ||
| 11 | 11 | /// Dots on the two rings. |
|
| 12 | - | const DOTS: usize = 900; |
|
| 12 | + | const DOTS: usize = 1400; |
|
| 13 | 13 | /// How fast the rings turn, at their rim, in CSS pixels a second. |
|
| 14 | 14 | const RIM_SPEED: f32 = 9.0; |
|
| 15 | 15 | ||
| … | 45 unchanged lines |
||
| 61 | 61 | m |
|
| 62 | 62 | } |
|
| 63 | 63 | ||
| 64 | - | /// The rings' radius and centres for this view. |
|
| 64 | + | /// The rings' radius and centres for this view: large enough to frame |
|
| 65 | + | /// the page, out into its margins, their centres 1.1 radii either side |
|
| 66 | + | /// of the middle, as the mark draws them. |
|
| 65 | 67 | fn rings(&self) -> (f32, [(f32, f32); 2]) { |
|
| 66 | - | let r = (self.w.min(self.h * 1.6) * 0.17).clamp(110.0, 330.0); |
|
| 68 | + | let r = (self.w * 0.2).min(self.h * 0.42).clamp(110.0, 560.0); |
|
| 67 | 69 | let (cx, cy) = (self.w / 2.0, self.h / 2.0); |
|
| 68 | - | (r, [(cx - r, cy), (cx + r, cy)]) |
|
| 70 | + | (r, [(cx - r * 1.1, cy), (cx + r * 1.1, cy)]) |
|
| 69 | 71 | } |
|
| 70 | 72 | ||
| 71 | 73 | fn place(&mut self) { |
|
| … | 76 unchanged lines |