Age | Commit message (Collapse) | Author |
|
Happy new year to the wonderful Godot community!
|
|
(Ignore trailing slash when creating the temporary directory)
|
|
The code to populate the input data for WebAssembly was incorrectly
overriding values when multiple touches were present due to wrong
indexing.
|
|
This actually makes sense(?), when running inside an iframe the active
element might be our canvas, while the iframe itself is not active in
the parent window. Since we consume the event, the iframe does not get
focused in Firefox (but does in Chromium-based browsers), so we must
always call focus to handle such occasions.
|
|
In some conditions the events might be generated even when the `gamepad`
object is not accessible due to Security Context requirements.
This commit adds a check to avoid firing the handler in those cases.
|
|
mousedown and touchstart should focus the canvas to ensure correct
application lifecycle.
|
|
|
|
|
|
Removes more emscripten HTML5 library dependencies.
|
|
Removes more emscripten HTML5 library dependencies.
|
|
Removes more emscripten HTML5 library dependencies.
|
|
This makes us more independent from emscripten libraries, giving us more
control on the application lifecycle.
|
|
It used an old vendored version of acorn.js which seems to choke on this
trailing comma. This is not a problem for more recent Emscripten versions.
We disable the `comma-dangle` check in ESLint to prevent this issue.
|
|
Performances are not great in general, bad on Firefox, on Chrome, well,
it could be an improvement. Leave it as a fallback for now, but can be
forced via project settings if desired (or custom JavaScript logic via
the "args" option).
I'm actually surprised this works, it involves so many allocations, but
there's no way around it when SharedArrayBuffer is not available :(.
|
|
[HTML5] Use browser mix rate by default on the Web.
|
|
Would attempt an out of bounds read, causing an exception.
|
|
Browsers doesn't really like forcing the mix rate, e.g. Firefox does not
allow input (microphone) if the mix rate is not the default one, Chrom*
will exhibit worse performances, etc.
|
|
Update Godot Javascript FS library to manually depend on ERRNO_CODES.
|
|
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
|
|
Enabled by default.
|
|
JavaScript callbacks created via the `JavaScript.create_callback` method
used to always return void.
With this patch they return the value returned by the Godot function as
one would expect.
|
|
|
|
|
|
New `JavaScript.download_buffer` method to create a prompt that let the
user download a file.
|
|
[HTML5] Implement Godot <-> JavaScript interface.
|
|
|
|
Using codespell 2.0.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
|
|
According to project settings and when WebGL2 is not available.
This does nothing in current master, as we have no rendering yet!
|
|
We were using `Content-Length` from the server when `Content-Encoding`
was not set (i.e. response was not compressed).
Sadly, in CORS requests accessing headers is restricted, and while
`Content-Length` is enabled by default, `Content-Encoding` is not.
This results in the impossibility of knowing if the content was
compressed, unless the server explicitly enabled the encoding header
via `Access-Control-Expose-Headers`.
To keep maximum compatibility we must disable `body_size` completely.
|
|
Regression from the library refactoring, binding and not calling is
pretty useless 'o_o.
|
|
Promise chaining the emscripten module `then` function breaks it badly,
causing an infinite loop.
I'm unsure about the source of the issue, but most likely at this point
is due to the old emscripten version (I remember very old html5 builds
having issue with promise chaining too).
With this commit, we no longer use the module as a promise, and
instantiate it using `Promise` objects directly for compatibility.
|
|
`WebAssembly.instantiateStreaming` requires the mime-type to be
`application/wasm`, but some servers (including most debug servers) do
not provide the content-type header.
This commit forces it via JavaScript, by creating a `Response` object
with the `wasm` content, and explicitly defined `content-type` header.
|
|
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).
|
|
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.
|
|
It used to be updated before the first iteration, causing the
window/viewport size values to be incorrect during the initialization
phase (e.g. during the first `_ready` notification).
|
|
The option was forced to `true` before, unlike on other platforms.
|
|
Which could happen if the worklet was not fully loaded, or the audio
context had already aborted.
|
|
This has some advantages:
- Streaming/chunked response support.
- Broader headers support.
|
|
New heapCopy function copies a TypedArray to the heap.
|
|
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).
|
|
|
|
A template for `jsdoc` that generat the HTML5 public classref.
The script can be run via `npm run docs` to print to stdout.
You can dry run via `npm run docs -- --d dry-run` or write to file via
`npm run docs -- -d /path/to/file.rst`
Also update Makefile in `doc/` and add dry run test to CI.
|
|
This commit also removes the utils.js engine file, moving some of it's
content to config.js and some to engine.js .
|
|
Three canvas resize policies:
- `None`: Godot window settings are ignored.
- `Project`: Godot handles the canvas like a native app (resizing it
when setting the window size).
- `Adaptive`: Canvas size will always adapt to browser window size.
Use `None` if you want to control the canvas size with custom JavaScript
code.
|
|
|
|
|
|
`OS.get_screen_scale` will now return the `window.devicePixelRatio`
value, `OS.get_screen_dpi` uses CSS media queries to find approximate
DPI value for the current display.
`OS.get_screen_size` also return the actual screen size (not the CSS
pixel size).
|
|
[HTML5] Fix HTTPClient request_raw.
|
|
Now send data according to the spec, properly handle null data.
Simplify JS code since we are at it.
|
|
This way they are automatically cleaned up when the engine exits,
landing a hand to browsers garbage collectors.
|