Skip to content

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

docs(cursor): drop the last references to the deleted nativeCursor.ts

EtienneLescot74f60b1671e3
diff --git a/crates/compositor/src/cursor.rs b/crates/compositor/src/cursor.rs
index 2e508b543..667c5d4f3 100644
--- a/crates/compositor/src/cursor.rs
+++ b/crates/compositor/src/cursor.rs
@@ -165,9 +165,9 @@ impl CursorTrack {
/// Facteur d'échelle « click bounce ». Cette fonction est la SEULE référence de la courbe :
/// son ancien jumeau TS (`nativeCursor.ts`) a été supprimé avec pixi.js, et
- /// `scripts/inspect-native-cursor-click-bounce.mjs` ne fait que la recopier. Le curseur PRESSE (rétrécit
- /// jusqu'à 0.76, 0..38% de la fenêtre d'animation) PUIS REBONDIT (grossit jusqu'à 1.16,
- /// 38..100%), pas un simple pop qui ne fait que grossir puis redécroître. Seul le clic le
+ /// `scripts/inspect-native-cursor-click-bounce.mjs` ne fait que la recopier. Le curseur
+ /// PRESSE (rétrécit jusqu'à 0.76, 0..38% de la fenêtre d'animation) PUIS REBONDIT (grossit
+ /// jusqu'à 1.16, 38..100%), pas un simple pop qui ne fait que grossir puis redécroître. Seul le clic le
/// plus récent précédant `t` compte (au-delà de la fenêtre, un clic antérieur n'a plus
/// aucun effet — contrairement à l'ancienne décroissance exponentielle à queue infinie qui
/// masquait ce bug). L'amplitude utilisateur (clickBounce) s'applique dans `plan_cursor`.
diff --git a/scripts/generate-default-cursor-sprites.mjs b/scripts/generate-default-cursor-sprites.mjs
index 94db9237c..d98b2180e 100644
--- a/scripts/generate-default-cursor-sprites.mjs
+++ b/scripts/generate-default-cursor-sprites.mjs
@@ -29,9 +29,9 @@ const OUT_SIZE = 128;
/**
* cursorType -> { file, hotspotX, hotspotY } in the 32-logical reference.
- * Hotspots are copied from PRETTY_NATIVE_CURSOR_ASSETS in src/lib/cursor/nativeCursor.ts,
- * which is the live web renderer's table and stays the source of truth; this generator
- * only re-expresses them for the native path.
+ * Hotspots were copied from the web renderer's table (src/lib/cursor/nativeCursor.ts), which
+ * was deleted with pixi.js. This table is now their source of truth: the table this script
+ * prints for DEFAULT_CURSOR_SPRITES (src/lib/cursor/cursorThemes.ts) comes from it.
*/
const SPRITES = {
arrow: { file: "Cursor=Default.svg", hotspotX: 16.25, hotspotY: 15.03 },
diff --git a/technical-documentation/architecture/cursor.md b/technical-documentation/architecture/cursor.md
index dda597905..71d0e3bce 100644
--- a/technical-documentation/architecture/cursor.md
+++ b/technical-documentation/architecture/cursor.md
@@ -31,7 +31,7 @@ Cursor telemetry also drives camera focus for auto-follow zooms. `src/lib/zoomMa
## Bundled assets
-The themed cursor packs are stored under `public/cursors/<id>/` and contain arrow and pointer PNGs registered in `src/lib/cursor/cursorThemes.ts`. The built-in native replacement SVG set is under `src/assets/cursors/` and is selected by `src/lib/cursor/nativeCursor.ts`, which maps captured cursor types to render assets and hotspots.
+The themed cursor packs are stored under `public/cursors/<id>/` and contain arrow and pointer PNGs registered in `src/lib/cursor/cursorThemes.ts`. The built-in native replacement SVG set is under `src/assets/cursors/`; `DEFAULT_CURSOR_SPRITES` in `src/lib/cursor/cursorThemes.ts` maps each captured cursor type to its rasterized asset and hotspot.
The same built-in art also exists as PNGs under `public/cursors/default/`, generated from those SVGs by `scripts/generate-default-cursor-sprites.mjs`. The native compositor decodes png/jpeg from a real path and cannot read the SVGs, which exist only as bundler URLs in the renderer — so without the PNG set it had no default art and drew a placeholder dot-and-ring instead of a pointer. Regenerate rather than hand-editing: the script also emits the `DEFAULT_CURSOR_SPRITES` hotspot table, which would otherwise drift from the images.