Commit graph

10 commits

Author SHA1 Message Date
Fabio Alessandrelli
cc4612277b [HTML5] PWA service worker prefers cached version.
Use an offline first approach, where we prefer the cached version over
the network one.
This forces games using PWA to always re-export the project and not just
the PCK, so that the service worker version gets updated correctly, and
the end-user cache is correctly cleared on update.
2022-02-06 18:46:22 +01:00
Fabio Alessandrelli
6d3d17651a Revert "[HTML5] Better engine config parsing."
This reverts commit 2f509f1b12.

Breaks closure compiler builds.
And adds a warning for future readers.
2022-02-03 19:17:51 +01:00
Fabio Alessandrelli
2f509f1b12 [HTML5] Better engine config parsing. 2022-01-31 14:56:40 +01:00
Fabio Alessandrelli
c12fca57f4 [HTML5] Add option to focus canvas on start.
Enabled by default.
2021-06-25 19:07:17 +02:00
Fabio Alessandrelli
f1e810adcb [HTML5] Drag and drop zip in project manager.
With a very nice hack, a new hidden configuration option that delays
dropped files removal at exit.

This still leaks while the project manager is running, but will clear
memory as soon as it exits or load something.
(reminder, dropped files are reguarly removed after the signal is
emitted specifically to avoid leaks, but I prefer hacking the HTML5
config then the project manager).
2021-03-12 10:16:02 +01:00
Fabio Alessandrelli
3416f7b521 [HTML5] Opt-in virtual keyboard support.
Added as an export option "Experimental Virtual Keyboard".
There is no zoom, so text/line edit must be in the top part of the
screen, or it will get hidden by the virtual keyboard.
UTF8/Latin-1 only (I think regular UTF-8 should work out of the box in
4.0 but I can't test it).
It uses an hidden textarea or input, based on the multiline variable,
and only gets activated if the device has a touchscreen.
This could cause problems on devices with both touchscreen and a real
keyboard (although input should still work in general with some minor
focus issues). I'm thinking of a system to detect the first physical
keystroke and disable it in case, but it might do more harm then good,
so it must be well thought.
2021-03-11 23:08:08 +01:00
Fabio Alessandrelli
cb1b89dac5 [HTML5] Export process writes sizes in template.
This allow the loading bar to be much more reliable, even in cases where
realible stream loading status is not detectable (server-side
compression, chunked encoding).
2021-03-05 20:15:38 +01:00
Fabio Alessandrelli
272e491f52 [HTML5] Preloader fetch, streaming instantiation. 2021-03-05 20:11:18 +01:00
Fabio Alessandrelli
018ee5a4dc [HTML5] Document Engine and EngineConfig (jsdoc).
This commit also removes the utils.js engine file, moving some of it's
content to config.js and some to engine.js .
2021-02-26 11:33:59 +01:00
Fabio Alessandrelli
2972ea3229 [HTML5] Easier HTML templates, better deinit/cleanup. 2021-02-19 05:12:32 +01:00