Skip to content

Web: improve custom cursor handling and add animated cursors#3384

Merged
daxpedda merged 7 commits intorust-windowing:masterfrom
daxpedda:web-custom-cursor-async
Jan 12, 2024
Merged

Web: improve custom cursor handling and add animated cursors#3384
daxpedda merged 7 commits intorust-windowing:masterfrom
daxpedda:web-custom-cursor-async

Conversation

@daxpedda
Copy link
Copy Markdown
Member

@daxpedda daxpedda commented Jan 11, 2024

  • Added something similar to futures::future::Abortable to abort Futures as soon as possible.
  • Custom cursors are now await per window with a wasm_bindgen_futures::spawn_local() instead of going through a custom event loop event.
  • Conditionally removed dependencies that aren't necessary in single-threaded Wasm (atomic-waker and concurrent-queue).
  • Add CustomCursorBuilder::build_async(), to allow users to wait until a cursor has actually loaded and receive an appropriate error if loading wasn't successful.
  • Add CustomCursor::from_animation() to create animated cursors from CustomCursors using the Web Animations API.

Addresses #3306.

@daxpedda daxpedda added the DS - web Affects the Web backend (WebAssembly/WASM) label Jan 11, 2024
@daxpedda daxpedda force-pushed the web-custom-cursor-async branch from b68911b to 24f7621 Compare January 11, 2024 23:32
@daxpedda daxpedda mentioned this pull request Jan 11, 2024
25 tasks
@daxpedda daxpedda force-pushed the web-custom-cursor-async branch from 24f7621 to 8a25ce2 Compare January 11, 2024 23:40
@daxpedda daxpedda force-pushed the web-custom-cursor-async branch from 8a25ce2 to af6271c Compare January 11, 2024 23:46
@daxpedda daxpedda force-pushed the web-custom-cursor-async branch from af6271c to d8d3243 Compare January 12, 2024 10:39
@daxpedda daxpedda merged commit 169cd39 into rust-windowing:master Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DS - web Affects the Web backend (WebAssembly/WASM)

Development

Successfully merging this pull request may close these issues.

1 participant