mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03: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:
@@ -3,11 +3,13 @@
|
||||
Import("env")
|
||||
Import("env_modules")
|
||||
|
||||
# Thirdparty source files
|
||||
|
||||
env_ws = env_modules.Clone()
|
||||
|
||||
if env["builtin_wslay"] and not env["platform"] == "javascript": # already builtin for javascript
|
||||
if env["platform"] == "javascript":
|
||||
# Our JavaScript/C++ interface.
|
||||
env.AddJSLibraries(["library_godot_websocket.js"])
|
||||
elif env["builtin_wslay"]:
|
||||
# Thirdparty source files
|
||||
wslay_dir = "#thirdparty/wslay/"
|
||||
wslay_sources = [
|
||||
"wslay_net.c",
|
||||
|
||||
Reference in New Issue
Block a user