Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

test(cursor): count Glass Lens in the theme picker, and document glass cursors

EtienneLescot5cf2db3d09c0
diff --git a/crates/compositor/src/compositor_linux.rs b/crates/compositor/src/compositor_linux.rs
index df834af4c..10e4c90c5 100644
--- a/crates/compositor/src/compositor_linux.rs
+++ b/crates/compositor/src/compositor_linux.rs
@@ -6165,7 +6165,8 @@ mod tests {
}
let c = [c[0] / body.max(1) as f32, c[1] / body.max(1) as f32];
println!(
- "glass-lens/{state} a plat : unite {u:.1} px, corps {body} px, a {near:.1} px du hotspot {tip:?}, centroide {c:?}, {through} px laissent voir l'ecran, {line} px de trait, {moved} px deplaces"
+ "glass-lens/{state} a plat : unite {u:.1} px, corps {body} px, a {near:.1} px du hotspot {tip:?}, \
+ centroide {c:?}, {through} px laissent voir l'ecran, {line} px de trait, {moved} px deplaces"
);
if (body as f32) < 0.12 * u * u {
failures.push(format!("glass-lens/{state}: {body} px de corps pour {u:.0} px d'unite"));
diff --git a/crates/compositor/src/frame_geometry.rs b/crates/compositor/src/frame_geometry.rs
index 4845cb823..0decdb21f 100644
--- a/crates/compositor/src/frame_geometry.rs
+++ b/crates/compositor/src/frame_geometry.rs
@@ -4567,7 +4567,8 @@ mod tests {
assert!(BackgroundKey::of(None, blur, fallback, size).is_some(), "fond de repli");
}
- /// Les modèles 3D, et eux seuls, passent par la variante « modèles » du shader de calque.
+ /// Les modèles 3D et le verre à plat qui en reprend les formes, eux seuls, passent par la
+ /// variante « modèles » du shader de calque.
#[test]
fn only_the_3d_models_need_the_models_shader() {
for mode in 0..=19 {
diff --git a/src/components/ai-edition/CursorPane.preview.test.tsx b/src/components/ai-edition/CursorPane.preview.test.tsx
index fa222938f..0aa86791f 100644
--- a/src/components/ai-edition/CursorPane.preview.test.tsx
+++ b/src/components/ai-edition/CursorPane.preview.test.tsx
@@ -38,7 +38,7 @@ afterEach(() => {
describe("CursorPane theme picker", () => {
it("shows the original cursor themes beside the default", () => {
- expect(CURSOR_THEMES).toHaveLength(5);
+ expect(CURSOR_THEMES).toHaveLength(6);
render(
<I18nProvider>
<CursorPane />
diff --git a/technical-documentation/architecture/cursor.md b/technical-documentation/architecture/cursor.md
index b603f2610..bd8db12a8 100644
--- a/technical-documentation/architecture/cursor.md
+++ b/technical-documentation/architecture/cursor.md
@@ -22,6 +22,8 @@ flowchart LR
N --> E["Export"]
```
+Glass cursors read the picture under them. When the cursor is the Prism Glow crystal or Glass Lens (`CursorPlan::glass`), each backend copies the frame as composed so far, footage and privacy blurs included, just before drawing the cursor, and the shader refracts that copy. Glass Lens does this with the 3D option off as well: its sprite names a glass model (`glass` in `cursorSprites`), and mode 19 (`cursor_glass_cb`) draws that model face on instead of the PNG, which only serves the theme picker.
+
## Settings
The cursor settings pane is `CursorPane` in `src/components/ai-edition/RightPanes.tsx`; the current v4 inspector exposes it through the cursor facet in `src/components/ai-edition/v4/FloatingInspector.tsx:57-63,1073`. It controls showing the cursor, clipping it to the canvas, theme, size, smoothing, motion blur, and click bounce. `RightPanes.tsx:1592-1692` binds those controls to editor settings and forwards the rendering parameters to the native compositor. Preview and export both render through that compositor, so a change shows in both.