Commit graph

4 commits

Author SHA1 Message Date
Kelvin Ly 192bd798e3 Implement virtual key translation for emscripten (#289)
* Implement virtual key translation

* Remove unused std::mem import from the right file

* Install git on CircleCI instances

* Fix CircleCI config script

* Fix type error in emscripten keyboard events
2017-09-16 15:46:53 +02:00
tomaka 769d4fe897 Emscripten rework (#286)
* partial implementation for emscripten

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

* Use std::os::raw in the emscripten bindings

* Fix emscripten code

* Update code

* Add CI

* Remove the emscripten-specific examples

* Add some information to the README
2017-09-14 16:31:34 +02:00
Pierre Krieger 8f04d6d4d0 Fix caching 2017-07-25 10:16:46 +02:00
Pierre Krieger 3ccee6c2f1 Use circle-ci for Android 2017-07-25 10:13:45 +02:00