mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
[HTML5] Port JavaScript inline code to libraries.
The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
This commit is contained in:
parent
a7ecb3c048
commit
e52ed6d89e
31 changed files with 2016 additions and 1502 deletions
|
@ -19,3 +19,9 @@ def create_engine_file(env, target, source, externs):
|
|||
if env["use_closure_compiler"]:
|
||||
return env.BuildJS(target, source, JSEXTERNS=externs)
|
||||
return env.Textfile(target, [env.File(s) for s in source])
|
||||
|
||||
|
||||
def add_js_libraries(env, libraries):
|
||||
if "JS_LIBS" not in env:
|
||||
env["JS_LIBS"] = []
|
||||
env.Append(JS_LIBS=env.File(libraries))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue