User Tools

Site Tools


proton:html5_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
proton:html5_setup [2015/09/09 07:09]
seth
proton:html5_setup [2018/04/12 01:24] (current)
seth
Line 1: Line 1:
 ====Compiling the examples for HTML5 with Enscripten from Windows ==== ====Compiling the examples for HTML5 with Enscripten from Windows ====
  
 +
 +====WARNING:​ This page is out of date, html5 is currently being actively worked on, after it's stable this page will get updated ====
 == About and situation == == About and situation ==
  
Line 84: Line 86:
 Proton'​s NetHTTP class to get/post to web sites is emulated behind the scenes with NetHTTP_HTML5.cpp,​ a special version for emscripten that uses emscripten_async_wget2_data. No code changes necessary. Proton'​s NetHTTP class to get/post to web sites is emulated behind the scenes with NetHTTP_HTML5.cpp,​ a special version for emscripten that uses emscripten_async_wget2_data. No code changes necessary.
  
-Screen size:  This can be overridden in App::​PreInitVideo by changing the globals g_winVideoScreenX and Y.  By default, in HTML5Main.cpp it gets set to this:+Screen size:  This can be overridden in App::​PreInitVideo by changing the globals g_winVideoScreenX and Y. (You may need to declare them as extern first (ie, extern int g_winVideoScreenX;​ extern int g_winVideoScreenY;​ yeah, I know, the whole thing is weird but I'm afraid of changing anything now due to backwards compatibility) ​By default, in HTML5Main.cpp it gets set to this:
  
 <​code>​g_winVideoScreenX = 480; <​code>​g_winVideoScreenX = 480;
 g_winVideoScreenY = 320;</​code>​ g_winVideoScreenY = 320;</​code>​
 +
   
-There is some weirdness to work out with screen scaling and mouse click locations turning wonky when sizes are changed in realtime. ​Right now I'm using enterSoftFullscreen(EMSCRIPTEN_FULLSCREEN_SCALE_ASPECT,​ EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_STDDEF,​ EMSCRIPTEN_FULLSCREEN_FILTERING_NEAREST) but these can be changed for different behaviorstweak as needed for now. (it's in the same file)+There is some weirdness to work out with screen scaling and mouse click locations turning wonky when sizes are changed in realtime. ​By default it will start in a window, but you can actually get it to start in fullscreen by default by uncommenting ​enterSoftFullscreen(EMSCRIPTEN_FULLSCREEN_SCALE_ASPECT,​ EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_STDDEF,​ EMSCRIPTEN_FULLSCREEN_FILTERING_NEAREST) but if you do this the mouse clicks are off a bitI don't know why.
  
 Size: There is also the issue of a 102 kb default .html file that is generated that is doing stuff we probably don't need, I've looked in there and it is possible to remove a lot of it (the emscripten logo is in there for instance), hopefully emscripten html generator will have more options in the future, otherwise you can hand edit it and adjust your batch files I guess.  ​ Size: There is also the issue of a 102 kb default .html file that is generated that is doing stuff we probably don't need, I've looked in there and it is possible to remove a lot of it (the emscripten logo is in there for instance), hopefully emscripten html generator will have more options in the future, otherwise you can hand edit it and adjust your batch files I guess.  ​
proton/html5_setup.1441782579.txt.gz ยท Last modified: 2015/09/09 07:09 by seth