dimforge / dimforge/kiss3d

Consider switching to winit for WASM target

Open
#243 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
1.8k
Forks
194
Avg merge
1d 14h
Merged PRs (30d)
2

Description

[`winit`](https://github.com/rust-windowing/winit) supports both `stdweb` and `web-sys` by using a `` element for the "window". Using `winit` for WASM may simplify some of the canvas handling code as `glutin` also uses `winit` behind the the scene (however `glutin` itself does not work on WASM so only the `winit` parts can be shared).

### Potential blockers:

- [ ] Works only with `PointerEvent` and not `MouseEvent` (fixed on master by https://github.com/rust-windowing/winit/pull/1630 but unreleased)
- [x] Mouse capturing (https://github.com/rust-windowing/winit/issues/1660)
- [ ] Canvas size is fixed and can't use CSS layout (https://github.com/rust-windowing/winit/issues/1661)
- [x] Change of hidpi factor not handled (https://github.com/rust-windowing/winit/pull/1690)
- [x] Cleanup on event loop end (https://github.com/rust-windowing/winit/issues/1688)
- [ ] Touch event support on web (https://github.com/rust-windowing/winit/issues/1673)
- [ ] Able to start event loop on web and return to caller (https://github.com/rust-windowing/winit/issues/1714)
- [ ] Update `winit` and change `kiss3d` code flow and API to use event loop v2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing kiss3d's current WASM canvas and event-loop handling alongside winit's listed web blockers. Done means the remaining blockers are addressed and kiss3d uses winit's event loop v2 and revised API for the WASM target.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
computer-graphics, web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.