Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(desktop-gpui): add camera loading glass with a shimmering script

Richie McIlroy4ec2473ae774
diff --git a/apps/desktop-gpui/src/camera_loading.rs b/apps/desktop-gpui/src/camera_loading.rs
new file mode 100644
index 000000000..ef9bbf4ec
--- /dev/null
+++ b/apps/desktop-gpui/src/camera_loading.rs
@@ -0,0 +1,376 @@
+mod script_outline;
+
+use std::cell::RefCell;
+use std::time::Instant;
+
+use gpui::{
+ Bounds, BoxShadow, ContentMask, Corners, FillOptions, FillRule, Hsla, IntoElement, Path,
+ PathBuilder, PathStyle, Pixels, Styled, Window, canvas, fill, hsla, linear_color_stop,
+ linear_gradient, point, px, size,
+};
+
+use script_outline::{SCRIPT_BOUNDS, SCRIPT_OUTLINE};
+
+const STATIC_PHASE_SECONDS: f32 = 3.;
+const FADE_IN_SECONDS: f32 = 0.3;
+/// The first pass starts this far in, so the band is already entering the
+/// word on the first frame: most cameras deliver within a second.
+const SWEEP_LEAD_SECONDS: f32 = 0.15;
+const SWEEP_SECONDS: f32 = 1.;
+const SWEEP_PERIOD_SECONDS: f32 = 1.6;
+const SWEEP_HALF_WIDTH: f32 = 0.26;
+const SCRIPT_REST_ALPHA: f32 = 0.12;
+const SCRIPT_PEAK_ALPHA: f32 = 0.42;
+
+enum Segment {
+ Move(f32, f32),
+ Line(f32, f32),
+ Quad(f32, f32, f32, f32),
+ Close,
+}
+
+struct Cloud {
+ lightness: f32,
+ alpha: f32,
+ speed: f32,
+ phase: f32,
+ reach: f32,
+ blur: f32,
+}
+
+const CLOUDS: [Cloud; 4] = [
+ Cloud {
+ lightness: 0.5,
+ alpha: 0.2,
+ speed: -0.13,
+ phase: 1.,
+ reach: 0.26,
+ blur: 0.22,
+ },
+ Cloud {
+ lightness: 0.75,
+ alpha: 0.16,
+ speed: -0.19,
+ phase: 2.1,
+ reach: 0.28,
+ blur: 0.2,
+ },
+ Cloud {
+ lightness: 0.95,
+ alpha: 0.18,
+ speed: 0.25,
+ phase: 0.,
+ reach: 0.24,
+ blur: 0.18,
+ },
+ Cloud {
+ lightness: 1.,
+ alpha: 0.12,
+ speed: 0.42,
+ phase: 3.,
+ reach: 0.14,
+ blur: 0.09,
+ },
+];
+
+fn ease_out(progress: f32) -> f32 {
+ let progress = progress.clamp(0., 1.);
+ 1. - (1. - progress).powi(3)
+}
+
+fn ease_in_out(progress: f32) -> f32 {
+ let progress = progress.clamp(0., 1.);
+ 0.5 - 0.5 * (progress * std::f32::consts::PI).cos()
+}
+
+/// The camera bubble's loading state until the first frame lands: dark glass
+/// with soft drifting light and a quiet handwritten "loading" that a soft
+/// highlight passes across. `radius` is the bubble's corner radius; zero is
+/// the background-cutout mode, whose window is transparent, so a feathered
+/// glass disc stands in for the bubble. With `animate` off it paints one still
+/// frame and requests nothing.
+pub(crate) fn camera_loading(
+ started: Instant,
+ radius: f32,
+ opacity: f32,
+ animate: bool,
+ show_script: bool,
+) -> impl IntoElement {
+ canvas(
+ |_, _, _| {},
+ move |bounds, _, window, cx| {
+ let animate = animate && !cx.reduce_motion();
+ let elapsed = if animate {
+ started.elapsed().as_secs_f32()
+ } else {
+ f32::INFINITY
+ };
+ let opacity = if animate {
+ opacity * ease_out(elapsed / FADE_IN_SECONDS)
+ } else {
+ opacity
+ };
+ let seconds = if animate {
+ elapsed + STATIC_PHASE_SECONDS
+ } else {
+ STATIC_PHASE_SECONDS
+ };
+ if opacity > 0. {
+ let script_area = if radius > 0. {
+ let corners = Corners::all(px(radius)).clamp_radii_for_quad_size(bounds.size);
+ paint_glass(bounds, corners, None, seconds, opacity, window);
+ let extent = f32::from(bounds.size.width).min(f32::from(bounds.size.height));
+ Bounds::centered_at(bounds.center(), size(px(extent * 0.62), px(extent * 0.3)))
+ } else {
+ paint_feathered(bounds, seconds, opacity, window)
+ };
+ if show_script {
+ paint_script(script_area, elapsed, opacity, window);
+ }
+ }
+ if animate {
+ window.request_animation_frame();
+ }
+ },
+ )
+ .absolute()
+ .inset_0()
+}
+
+/// Where the highlight band's centre sits across the word, as a fraction
+/// of its width: an eased sweep from off the left edge to off the right, then
+/// a rest before the next pass.
+fn sweep_center(elapsed: f32) -> Option<f32> {
+ if !elapsed.is_finite() {
+ return None;
+ }
+ let time = (elapsed + SWEEP_LEAD_SECONDS) % SWEEP_PERIOD_SECONDS;
+ (time < SWEEP_SECONDS).then(|| {
+ let reach = 1. + 2. * SWEEP_HALF_WIDTH;
+ -SWEEP_HALF_WIDTH + reach * ease_in_out(time / SWEEP_SECONDS)
+ })
+}
+
+fn sweep_alpha(position: f32, center: f32) -> f32 {
+ ease_in_out(1. - (position - center).abs() / SWEEP_HALF_WIDTH)
+}
+
+/// The glyph contours overlap where the letters join; a non-zero fill
+/// tessellates them as one union, so the translucent word never doubles up.
+fn script_path(origin: (f32, f32), scale: f32) -> Option<Path<Pixels>> {
+ thread_local! {
+ static CACHE: RefCell<Option<([u32; 3], Path<Pixels>)>> = const { RefCell::new(None) };
+ }
+ let key = [origin.0.to_bits(), origin.1.to_bits(), scale.to_bits()];
+ CACHE.with_borrow_mut(|cache| {
+ if let Some((cached, path)) = cache.as_ref()
+ && *cached == key
+ {
+ return Some(path.clone());
+ }
+ let place = |x: f32, y: f32| point(px(origin.0 + x * scale), px(origin.1 - y * scale));
+ let mut builder = PathBuilder::fill().with_style(PathStyle::Fill(
+ FillOptions::default()
+ .with_fill_rule(FillRule::NonZero)
+ .with_tolerance(0.02),
+ ));
+ for segment in SCRIPT_OUTLINE {
+ match *segment {
+ Segment::Move(x, y) => builder.move_to(place(x, y)),
+ Segment::Line(x, y) => builder.line_to(place(x, y)),
+ Segment::Quad(cx, cy, x, y) => builder.curve_to(place(x, y), place(cx, cy)),
+ Segment::Close => builder.close(),
+ }
+ }
+ let path = builder.build().ok()?;
+ *cache = Some((key, path.clone()));
+ Some(path)
+ })
+}
+
+fn paint_script(area: Bounds<Pixels>, elapsed: f32, opacity: f32, window: &mut Window) {
+ let ((min_x, min_y), (max_x, max_y)) = SCRIPT_BOUNDS;
+ let word_width = max_x - min_x;
+ let word_height = max_y - min_y;
+ let scale =
+ (f32::from(area.size.width) / word_width).min(f32::from(area.size.height) / word_height);
+ if scale <= 0. || opacity <= 0. {
+ return;
+ }
+ let origin = (
+ f32::from(area.center().x) - (min_x + word_width / 2.) * scale,
+ f32::from(area.center().y) + (min_y + word_height / 2.) * scale,
+ );
+ let Some(path) = script_path(origin, scale) else {
+ return;
+ };
+ window.paint_path(path.clone(), hsla(0., 0., 1., SCRIPT_REST_ALPHA * opacity));
+
+ let Some(center) = sweep_center(elapsed) else {
+ return;
+ };
+ let left = f32::from(path.bounds.left());
+ let width = f32::from(path.bounds.size.width).max(1.);
+ let band = |position: f32| -> Hsla {
+ hsla(
+ 0.,
+ 0.,
+ 1.,
+ SCRIPT_PEAK_ALPHA * opacity * sweep_alpha(position, center),
+ )
+ };
+ for (from, to) in [
+ (center - SWEEP_HALF_WIDTH, center),
+ (center, center + SWEEP_HALF_WIDTH),
+ ] {
+ let (start, end) = (from.max(0.), to.min(1.));
+ if end <= start {
+ continue;
+ }
+ let mask = Bounds {
+ origin: point(px(left + start * width), path.bounds.top()),
+ size: size(px((end - start) * width), path.bounds.size.height),
+ };
+ // Path gradients are measured against the path's bounds clipped to the
+ // content mask, so each half's stops span its own mask, 0 to 1.
+ window.with_content_mask(Some(ContentMask { bounds: mask }), |window| {
+ window.paint_path(
+ path.clone(),
+ linear_gradient(
+ 90.,
+ linear_color_stop(band(start), 0.),
+ linear_color_stop(band(end), 1.),
+ ),
+ );
+ });
+ }
+}
+
+/// The cutout window is transparent, so the glass becomes a disc whose edge
+/// feathers away instead of ending on a hard rim. Drop shadows are not
+/// clipped to a rounded mask, so the disc and its blur stay inside the
+/// window's inscribed circle. Returns the area the script sits in.
+fn paint_feathered(
+ bounds: Bounds<Pixels>,
+ seconds: f32,
+ opacity: f32,
+ window: &mut Window,
+) -> Bounds<Pixels> {
+ let extent = f32::from(bounds.size.width).min(f32::from(bounds.size.height));
+ let center = bounds.center();
+ let bloom = 1. + 0.08 * (1. - opacity);
+ let disc = |diameter: f32, offset: (f32, f32), blur: f32, color: Hsla| {
+ let diameter = diameter * extent * bloom;
+ (
+ Bounds::centered_at(
+ point(
+ center.x + px(offset.0 * extent),
+ center.y + px(offset.1 * extent),
+ ),
+ size(px(diameter), px(diameter)),
+ ),
+ Corners::all(px(diameter / 2.)),
+ BoxShadow {
+ color,
+ offset: point(px(0.), px(0.)),
+ blur_radius: px(blur * extent),
+ spread_radius: px(0.),
+ inset: false,
+ },
+ )
+ };
+ let drift = (seconds * 0.35).sin_cos();
+ let layers = [
+ disc(
+ 0.6,
+ (0., 0.),
+ 0.065,
+ hsla(240. / 360., 0.06, 0.06, 0.88 * opacity),
+ ),
+ disc(
+ 0.3,
+ (drift.1 * 0.05, drift.0 * 0.04 - 0.05),
+ 0.07,
+ hsla(0., 0., 1., 0.06 * opacity),
+ ),
+ ];
+ for (bounds, corners, shadow) in layers {
+ window.paint_drop_shadows(bounds, corners, &[shadow]);
+ }
+ Bounds::centered_at(center, size(px(extent * 0.46), px(extent * 0.24)))
+}
+
+/// Every cloud is an inset shadow, which the shader clips to the shape's own
+/// rounded rect, so nothing spills past its edge even though gpui content
+/// masks are rectangular.
+fn paint_glass(
+ shape: Bounds<Pixels>,
+ corners: Corners<Pixels>,
+ scale: Option<f32>,
+ seconds: f32,
+ opacity: f32,
+ window: &mut Window,
+) {
+ let width = f32::from(shape.size.width);
+ let height = f32::from(shape.size.height);
+ if width <= 0. || height <= 0. {
+ return;
+ }
+ let extent = scale.unwrap_or(width.min(height));
+
+ window.paint_quad(
+ fill(
+ shape,
+ linear_gradient(
+ 170. + 10. * (seconds * 0.2).sin(),
+ linear_color_stop(hsla(0., 0., 0.12, opacity), 0.),
+ linear_color_stop(hsla(0., 0., 0.03, opacity), 1.),
+ ),
+ )
+ .corner_radii(corners),
+ );
+
+ let clouds = CLOUDS.map(|cloud| {
+ let angle = cloud.phase + seconds * cloud.speed;
+ let reach = cloud.reach * (1. + 0.12 * (seconds * 0.9 + cloud.phase * 1.7).sin());
+ BoxShadow {
+ color: hsla(0., 0., cloud.lightness, cloud.alpha * opacity),
+ offset: point(
+ px(angle.cos() * reach * width),
+ px(angle.sin() * reach * height),
+ ),
+ blur_radius: px(cloud.blur * extent),
+ spread_radius: px(0.),
+ inset: true,
+ }
+ });
+ window.paint_inset_shadows(shape, corners, &clouds);
+
+ window.paint_inset_shadows(
+ shape,
+ corners,
+ &[
+ BoxShadow {
+ color: hsla(0., 0., 0., 0.35 * opacity),
+ offset: point(px(0.), px(-extent * 0.08)),
+ blur_radius: px(extent * 0.1),
+ spread_radius: px(0.),
+ inset: true,
+ },
+ BoxShadow {
+ color: hsla(0., 0., 1., 0.16 * opacity),
+ offset: point(px(0.), px(extent * 0.025)),
+ blur_radius: px(extent * 0.03),
+ spread_radius: px(0.),
+ inset: true,
+ },
+ BoxShadow {
+ color: hsla(0., 0., 1., 0.1 * opacity),
+ offset: point(px(0.), px(0.)),
+ blur_radius: px(0.75),
+ spread_radius: px(1.),
+ inset: true,
+ },
+ ],
+ );
+}
diff --git a/apps/desktop-gpui/src/camera_loading/script_outline.rs b/apps/desktop-gpui/src/camera_loading/script_outline.rs
new file mode 100644
index 000000000..29a94bc74
--- /dev/null
+++ b/apps/desktop-gpui/src/camera_loading/script_outline.rs
@@ -0,0 +1,356 @@
+// "loading" set in Damion, shaped with HarfBuzz and flattened to outlines in
+// font units (2048 per em, y up). Damion is Copyright 2014 The Damion Project
+// Authors (https://github.com/googlefonts/damionFont), licensed under the
+// SIL Open Font License 1.1 (https://openfontlicense.org).
+
+use super::Segment::{self, Close, Line, Move, Quad};
+
+pub(super) const SCRIPT_BOUNDS: ((f32, f32), (f32, f32)) = ((51., -594.), (5923., 1323.9));
+
+pub(super) const SCRIPT_OUTLINE: &[Segment] = &[
+ Move(194., -25.),
+ Quad(112., -25., 81.5, 16.),
+ Quad(51., 57., 51., 116.),
+ Quad(51., 165., 65.5, 216.5),
+ Quad(80., 268., 100., 311.),
+ Quad(135., 389., 171., 466.),
+ Quad(207., 543., 237., 607.),
+ Line(540., 1252.),
+ Quad(563., 1302., 609., 1317.),
+ Quad(655., 1332., 693.5, 1314.5),
+ Quad(732., 1297., 732., 1251.),
+ Quad(732., 1233., 723.5, 1213.),
+ Quad(715., 1193., 702., 1170.),
+ Quad(666., 1102., 610.5, 991.),
+ Quad(555., 880., 488., 741.),
+ Quad(415., 588., 365.5, 484.5),
+ Quad(316., 381., 273., 289.),
+ Quad(262., 266., 251.5, 235.5),
+ Quad(241., 205., 241., 181.),
+ Quad(241., 148., 270., 148.),
+ Quad(302., 148., 355.5, 174.5),
+ Quad(409., 201., 467., 241.),
+ Quad(526., 280., 581., 322.5),
+ Quad(636., 365., 683., 405.),
+ Quad(699., 418., 721., 418.),
+ Quad(767., 418., 767., 367.),
+ Quad(767., 346., 753., 320.),
+ Quad(739., 294., 704., 269.),
+ Quad(640., 210., 575.5, 157.5),
+ Quad(511., 105., 446., 64.),
+ Quad(382., 24., 318., -0.5),
+ Quad(254., -25., 194., -25.),
+ Close,
+ Move(779., -25.),
+ Quad(739., -25., 688.5, -3.5),
+ Quad(638., 18., 601., 65.),
+ Quad(564., 112., 564., 189.),
+ Quad(564., 251., 593.5, 341.),
+ Quad(623., 431., 684., 519.),
+ Quad(746., 608., 843., 667.5),
+ Quad(940., 727., 1068., 727.),
+ Quad(1119., 727., 1176.5, 708.),
+ Quad(1234., 689., 1275., 644.5),
+ Quad(1316., 600., 1316., 522.),
+ Quad(1316., 458., 1284., 373.),
+ Quad(1302., 351., 1335., 351.),
+ Quad(1366., 351., 1407., 376.),
+ Quad(1448., 401., 1488., 437.),
+ Quad(1529., 473., 1562.5, 509.),
+ Quad(1596., 545., 1615., 567.),
+ Quad(1622., 574., 1632., 574.),
+ Quad(1654., 574., 1664., 546.),
+ Quad(1674., 518., 1660., 475.5),
+ Quad(1646., 433., 1595., 388.),
+ Quad(1565., 356., 1521.5, 309.5),
+ Quad(1478., 263., 1427.5, 227.5),
+ Quad(1377., 192., 1325., 192.),
+ Quad(1272., 192., 1225., 226.),
+ Quad(1151., 110., 1037., 42.5),
+ Quad(923., -25., 779., -25.),
+ Close,
+ Move(866., 150.),
+ Quad(929., 150., 984., 192.),
+ Quad(1039., 234., 1073., 298.),
+ Quad(1107., 362., 1107., 429.),
+ Quad(1107., 455., 1101.5, 483.5),
+ Quad(1096., 512., 1077., 531.5),
+ Quad(1058., 551., 1016., 551.),
+ Quad(954., 551., 899., 511.5),
+ Quad(844., 472., 809.5, 409.5),
+ Quad(775., 347., 775., 279.),
+ Quad(775., 254., 781., 223.5),
+ Quad(787., 193., 806.5, 171.5),
+ Quad(826., 150., 866., 150.),
+ Close,
+ Move(1637., -25.),
+ Quad(1603., -25., 1556., -6.),
+ Quad(1509., 13., 1473.5, 57.),
+ Quad(1438., 101., 1438., 175.),
+ Quad(1438., 237., 1466., 330.),
+ Quad(1494., 423., 1554., 513.),
+ Quad(1614., 605., 1707.5, 666.),
+ Quad(1801., 727., 1924., 727.),
+ Quad(1968., 727., 2001., 716.),
+ Quad(2034., 705., 2057., 692.),
+ Quad(2070., 684., 2081.5, 675.5),
+ Quad(2093., 667., 2103., 657.),
+ Line(2138., 674.),
+ Quad(2153., 681., 2169.5, 686.5),
+ Quad(2186., 692., 2198., 692.),
+ Quad(2236., 692., 2260., 671.),
+ Quad(2284., 650., 2284., 625.),
+ Quad(2284., 617., 2283., 614.),
+ Quad(2276., 586., 2257.5, 537.),
+ Quad(2239., 488., 2218., 428.),
+ Quad(2197., 370., 2182.5, 316.),
+ Quad(2168., 262., 2168., 227.),
+ Quad(2168., 197., 2178., 177.5),
+ Quad(2188., 158., 2212., 158.),
+ Quad(2241., 158., 2290., 191.5),
+ Quad(2339., 225., 2391., 271.),
+ Quad(2419., 296., 2449., 324.5),
+ Quad(2479., 353., 2510., 385.),
+ Quad(2526., 398., 2541., 398.),
+ Quad(2561., 398., 2574.5, 378.5),
+ Quad(2588., 359., 2588., 335.),
+ Quad(2588., 307., 2569., 288.),
+ Quad(2529., 251., 2487., 209.),
+ Quad(2445., 167., 2371., 106.),
+ Quad(2305., 52., 2235., 13.5),
+ Quad(2165., -25., 2109., -25.),
+ Quad(2039., -25., 2007., 29.5),
+ Quad(1975., 84., 1975., 146.),
+ Quad(1975., 191., 1988., 226.),
+ Quad(1947., 171., 1891., 112.5),
+ Quad(1835., 54., 1770., 14.5),
+ Quad(1705., -25., 1637., -25.),
+ Close,
+ Move(1717., 151.),
+ Quad(1749., 151., 1797.5, 192.),
+ Quad(1846., 233., 1891., 288.),
+ Quad(1941., 348., 1970., 397.),
+ Quad(1999., 446., 1999., 463.),
+ Quad(1999., 501., 1955., 523.5),
+ Quad(1911., 546., 1876., 546.),
+ Quad(1814., 546., 1758.5, 506.),
+ Quad(1703., 466., 1668., 403.5),
+ Quad(1633., 341., 1633., 274.),
+ Quad(1633., 235., 1647.5, 193.),
+ Quad(1662., 151., 1717., 151.),
+ Close,
+ Move(2583., -25.),
+ Quad(2510., -25., 2462., 16.5),
+ Quad(2414., 58., 2414., 155.),
+ Quad(2414., 278., 2469., 385.),
+ Quad(2524., 492., 2608., 568.),
+ Quad(2691., 644., 2783.5, 685.5),
+ Quad(2876., 727., 2949., 727.),
+ Quad(3008., 727., 3047., 708.),
+ Quad(3069., 696., 3084., 681.),
+ Line(3092., 698.),
+ Line(3110., 740.),
+ Line(3121., 765.),
+ Quad(3123., 773., 3147., 829.),
+ Quad(3171., 885., 3211., 980.),
+ Quad(3248., 1068., 3272., 1129.5),
+ Quad(3296., 1191., 3297., 1195.),
+ Quad(3311., 1245., 3344., 1284.),
+ Quad(3377., 1323., 3433., 1323.),
+ Quad(3471., 1323., 3496., 1306.5),
+ Quad(3521., 1290., 3521., 1243.),
+ Quad(3521., 1207., 3505., 1166.),
+ Quad(3489., 1125., 3477., 1093.),
+ Quad(3429., 997., 3373.5, 880.),
+ Quad(3318., 763., 3263., 640.),
+ Quad(3208., 517., 3159., 403.5),
+ Quad(3110., 290., 3074., 203.),
+ Quad(3073., 202., 3073., 198.),
+ Quad(3073., 194., 3072., 193.),
+ Quad(3072., 175., 3081., 155.5),
+ Quad(3090., 136., 3110., 136.),
+ Quad(3116., 136., 3122., 138.),
+ Quad(3196., 160., 3274., 215.),
+ Quad(3352., 270., 3418.5, 333.5),
+ Quad(3485., 397., 3525., 445.),
+ Quad(3539., 462., 3556., 462.),
+ Quad(3571., 462., 3582.5, 448.),
+ Quad(3594., 434., 3594., 410.),
+ Quad(3594., 391., 3583.5, 365.),
+ Quad(3573., 339., 3549., 309.),
+ Quad(3471., 223., 3387., 146.5),
+ Quad(3303., 70., 3219., 22.5),
+ Quad(3135., -25., 3055., -25.),
+ Quad(2982., -25., 2940., 16.5),
+ Quad(2898., 58., 2898., 141.),
+ Line(2898., 152.),
+ Quad(2898., 159., 2899., 162.),
+ Quad(2853., 79., 2761.5, 27.),
+ Quad(2670., -25., 2583., -25.),
+ Close,
+ Move(2657., 152.),
+ Quad(2718., 152., 2773., 189.),
+ Quad(2828., 226., 2874., 284.),
+ Quad(2920., 342., 2954.5, 405.),
+ Quad(2989., 468., 3011., 520.),
+ Line(3025., 551.),
+ Line(3044., 594.),
+ Quad(2985., 593., 2918., 568.),
+ Quad(2803., 529., 2717.5, 430.5),
+ Quad(2632., 332., 2623., 192.),
+ Quad(2623., 152., 2657., 152.),
+ Close,
+ Move(3788., 794.),
+ Quad(3726., 794., 3701., 813.5),
+ Quad(3676., 833., 3673., 865.),
+ Quad(3673., 912., 3707.5, 957.5),
+ Quad(3742., 1003., 3810., 1003.),
+ Quad(3868., 1003., 3891., 980.5),
+ Quad(3914., 958., 3914., 924.),
+ Quad(3914., 886., 3884.5, 840.),
+ Quad(3855., 794., 3788., 794.),
+ Close,
+ Move(3543., -25.),
+ Quad(3462., -25., 3415.5, 16.5),
+ Quad(3369., 58., 3369., 146.),
+ Quad(3369., 207., 3391.5, 267.5),
+ Quad(3414., 328., 3441.5, 381.5),
+ Quad(3469., 435., 3485., 475.),
+ Quad(3490., 488., 3502.5, 515.),
+ Quad(3515., 542., 3529., 570.),
+ Line(3563., 640.),
+ Quad(3580., 668., 3602., 680.),
+ Quad(3624., 692., 3647., 692.),
+ Quad(3685., 692., 3712.5, 667.5),
+ Quad(3740., 643., 3740., 605.),
+ Quad(3739., 596., 3737.5, 587.),
+ Quad(3736., 578., 3731., 569.),
+ Quad(3709., 529., 3693., 494.5),
+ Quad(3677., 460., 3660., 425.),
+ Quad(3646., 396., 3625., 354.),
+ Quad(3604., 312., 3588., 269.5),
+ Quad(3572., 227., 3572., 194.),
+ Quad(3572., 167., 3585.5, 158.5),
+ Quad(3599., 150., 3624., 150.),
+ Quad(3664., 150., 3712.5, 175.),
+ Quad(3761., 200., 3805., 237.),
+ Quad(3851., 274., 3890., 312.5),
+ Quad(3929., 351., 3948., 375.),
+ Quad(3967., 394., 3988., 394.),
+ Quad(4006., 394., 4017.5, 378.),
+ Quad(4029., 362., 4029., 337.),
+ Quad(4029., 314., 4017.5, 288.),
+ Quad(4006., 262., 3980., 239.),
+ Quad(3914., 172., 3842., 111.5),
+ Quad(3770., 51., 3694.5, 13.),
+ Quad(3619., -25., 3543., -25.),
+ Close,
+ Move(3899., -25.),
+ Quad(3864., -25., 3844., -3.),
+ Quad(3824., 19., 3824., 51.),
+ Quad(3824., 77., 3854., 148.5),
+ Quad(3884., 220., 3924., 302.),
+ Quad(3975., 409., 4014., 487.5),
+ Quad(4053., 566., 4072., 607.),
+ Quad(4092., 650., 4122., 671.),
+ Quad(4152., 692., 4181., 692.),
+ Quad(4205., 692., 4224., 674.5),
+ Quad(4243., 657., 4243., 623.),
+ Quad(4243., 610., 4240., 595.),
+ Quad(4237., 580., 4229., 563.),
+ Quad(4260., 602., 4321., 639.5),
+ Quad(4382., 677., 4453., 702.),
+ Quad(4524., 727., 4584., 727.),
+ Quad(4637., 727., 4672.5, 701.5),
+ Quad(4708., 676., 4708., 615.),
+ Quad(4708., 563., 4685., 502.5),
+ Quad(4662., 442., 4630., 386.),
+ Quad(4596., 327., 4566.5, 282.5),
+ Quad(4537., 238., 4521., 209.),
+ Quad(4508., 193., 4508., 172.),
+ Quad(4508., 152., 4529., 152.),
+ Quad(4536., 152., 4545., 153.5),
+ Quad(4554., 155., 4567., 164.),
+ Quad(4642., 192., 4716.5, 235.),
+ Quad(4791., 278., 4853.5, 324.),
+ Quad(4916., 370., 4954., 405.),
+ Quad(4970., 418., 4985., 418.),
+ Quad(5021., 418., 5021., 372.),
+ Quad(5021., 341., 5001.5, 303.),
+ Quad(4982., 265., 4940., 232.),
+ Quad(4867., 180., 4803.5, 135.5),
+ Quad(4740., 91., 4669., 55.),
+ Quad(4598., 19., 4500., -9.),
+ Quad(4449., -25., 4413., -25.),
+ Quad(4311., -25., 4311., 87.),
+ Quad(4311., 94., 4311.5, 100.5),
+ Quad(4312., 107., 4313., 115.),
+ Quad(4316., 160., 4345., 219.5),
+ Quad(4374., 279., 4408., 337.),
+ Quad(4442., 393., 4469., 442.),
+ Quad(4496., 491., 4496., 515.),
+ Quad(4496., 551., 4462., 551.),
+ Quad(4399., 551., 4341.5, 514.),
+ Quad(4284., 477., 4233.5, 420.5),
+ Quad(4183., 364., 4141., 302.5),
+ Quad(4099., 241., 4067., 191.),
+ Quad(4044., 153., 4022.5, 102.),
+ Quad(4001., 51., 3972.5, 13.),
+ Quad(3944., -25., 3899., -25.),
+ Close,
+ Move(5012., -594.),
+ Quad(4973., -594., 4950.5, -567.),
+ Quad(4928., -540., 4928., -502.),
+ Quad(4928., -462., 4947.5, -408.5),
+ Quad(4967., -355., 5001., -294.),
+ Quad(5070., -171., 5193., -28.),
+ Line(5317., 130.),
+ Quad(5240., 59., 5171., 29.5),
+ Quad(5102., 0., 5056., 0.),
+ Quad(4976., 0., 4923.5, 70.),
+ Quad(4871., 140., 4871., 246.),
+ Quad(4871., 356., 4913.5, 445.),
+ Quad(4956., 534., 5023., 597.),
+ Quad(5089., 659., 5169.5, 693.),
+ Quad(5250., 727., 5327., 727.),
+ Quad(5371., 727., 5404., 716.),
+ Quad(5437., 705., 5460., 692.),
+ Quad(5473., 684., 5484.5, 675.5),
+ Quad(5496., 667., 5506., 657.),
+ Quad(5522., 668., 5536., 674.),
+ Quad(5550., 681., 5567., 686.5),
+ Quad(5584., 692., 5601., 692.),
+ Quad(5645., 692., 5669., 674.),
+ Quad(5693., 656., 5693., 631.),
+ Quad(5693., 618., 5686., 605.),
+ Line(5452., 162.),
+ Line(5471., 179.),
+ Quad(5589., 248., 5665., 287.5),
+ Quad(5741., 327., 5786., 346.),
+ Quad(5821., 361., 5844., 367.5),
+ Quad(5867., 374., 5875., 374.),
+ Quad(5898., 374., 5910.5, 356.5),
+ Quad(5923., 339., 5923., 313.),
+ Quad(5923., 284., 5906.5, 254.),
+ Quad(5890., 224., 5856., 211.),
+ Quad(5797., 181., 5714.5, 144.5),
+ Quad(5632., 108., 5542.5, 59.5),
+ Quad(5453., 11., 5373., -56.),
+ Line(5179., -407.),
+ Quad(5133., -517., 5097., -557.),
+ Quad(5064., -594., 5012., -594.),
+ Close,
+ Move(5130., 168.),
+ Quad(5161., 168., 5208., 206.5),
+ Quad(5255., 245., 5298., 297.),
+ Quad(5342., 349., 5372., 396.),
+ Quad(5402., 443., 5402., 463.),
+ Quad(5402., 507., 5360.5, 529.),
+ Quad(5319., 551., 5289., 551.),
+ Quad(5226., 551., 5170.5, 511.5),
+ Quad(5115., 472., 5080.5, 408.5),
+ Quad(5046., 345., 5046., 274.),
+ Quad(5046., 240., 5060., 204.),
+ Quad(5074., 168., 5130., 168.),
+ Close,
+];
diff --git a/apps/desktop-gpui/src/main.rs b/apps/desktop-gpui/src/main.rs
index 98a6b1b2b..1e7e64c98 100644
--- a/apps/desktop-gpui/src/main.rs
+++ b/apps/desktop-gpui/src/main.rs
@@ -13,6 +13,7 @@ mod camera_bench;
mod camera_blur;
#[cfg(any(not(target_os = "macos"), test))]
mod camera_blur_portable;
+mod camera_loading;
mod camera_window;
mod controls_window;
mod deeplink;