mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Update webclient hosting documentation
This commit is contained in:
parent
024833621a
commit
ce2c3a9607
@ -71,15 +71,7 @@ if __name__ == "__main__":
|
|||||||
</div>
|
</div>
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
// need to load IndexedDB before running the game
|
// need to load IndexedDB before running the game
|
||||||
function preloadIndexedDB() {
|
function preloadIndexedDB() { _interop_LoadIndexedDB(); }
|
||||||
addRunDependency('load-idb');
|
|
||||||
FS.mkdir('/classicube');
|
|
||||||
FS.mount(IDBFS, {}, '/classicube');
|
|
||||||
FS.syncfs(true, function(err) {
|
|
||||||
if (err) window.cc_idbErr = err;
|
|
||||||
removeRunDependency('load-idb');
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function resizeGameCanvas() {
|
function resizeGameCanvas() {
|
||||||
var cc_canv = $('canvas#canvas');
|
var cc_canv = $('canvas#canvas');
|
||||||
@ -96,8 +88,8 @@ if __name__ == "__main__":
|
|||||||
if (canv_w % 2) { canv_w = canv_w - 1; }
|
if (canv_w % 2) { canv_w = canv_w - 1; }
|
||||||
|
|
||||||
{% if mobile_mode %}
|
{% if mobile_mode %}
|
||||||
var screen_h = window.outerHeight || window.innerHeight;
|
var screen_h = Math.min(window.innerHeight, window.outerHeight || window.innerHeight);
|
||||||
canv_h = Math.min(canv_h, screen_h);
|
canv_h = screen_h;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
cc_canv[0].width = canv_w * dpi;
|
cc_canv[0].width = canv_w * dpi;
|
||||||
cc_canv[0].height = canv_h * dpi;
|
cc_canv[0].height = canv_h * dpi;
|
||||||
|
@ -27,15 +27,7 @@ You are required to have this HTML code somewhere in the page:
|
|||||||
|
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
// need to load IndexedDB before running the game
|
// need to load IndexedDB before running the game
|
||||||
function preloadIndexedDB() {
|
function preloadIndexedDB() { _interop_LoadIndexedDB(); }
|
||||||
addRunDependency('load-idb');
|
|
||||||
FS.mkdir('/classicube');
|
|
||||||
FS.mount(IDBFS, {}, '/classicube');
|
|
||||||
FS.syncfs(true, function(err) {
|
|
||||||
if (err) window.cc_idbErr = err;
|
|
||||||
removeRunDependency('load-idb');
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
var Module = {
|
var Module = {
|
||||||
preRun: [ preloadIndexedDB ],
|
preRun: [ preloadIndexedDB ],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user