Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscripten rework #286

Merged
merged 8 commits into from
Sep 14, 2017
Merged

Emscripten rework #286

merged 8 commits into from
Sep 14, 2017

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Sep 13, 2017

No description provided.

thiolliere and others added 5 commits February 15, 2017 15:12
this pull request contain a partial but working implementation of emscripten backend

some implementations may be controversial.

here some implementation detail:

* cursor state:
  * on grab: emscripten request pointer lock deferred and also set a callback when pointer lock change
             the callback request pointer lock deferred.
  * on hide: `emscripten_hide_mouse` exist but not `emscripten_show_mouse`
             a pull request has been open on october 2016 but never been merged
             so I copied the javascript function and put it in emscripten_asm_const function

* fullscreen: if fullscreen is requested then it request fullscreen deferred and set a callback on fullscreen change
              the callback request fullscreen deferred

* run forever: this method use emscripten main loop to run an infinite loop

* keyboard callback doesn't consume the event. I think it is more apopriate as in desktop environment it is the same, is it ?

* emscripten dir is added in example and contains html pages

Some things that are not implemented:

* lots of events

* min and max dimension can be implemented with a callback that listen to size change and resize if dimension out of bound

* title may be implemented using javascript to change document.title
@gui1117
Copy link

gui1117 commented Sep 13, 2017

you may also be interested by the work made to implement emscipten in glutin rust-windowing/glutin#857

@tomaka
Copy link
Contributor Author

tomaka commented Sep 13, 2017

I think the best course of action right now is to just merge this PR (so that something is working), and then iterate over it.
(I purposely didn't add or fix anything because of that)

@tomaka tomaka merged commit 769d4fe into master Sep 14, 2017
@tomaka tomaka deleted the emscripten-rework branch September 14, 2017 14:31
tmfink pushed a commit to tmfink/winit that referenced this pull request Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants