1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Web: Add godot_pool_size/emscripten_pool_size config

This commit is contained in:
Marcos Casagrande
2025-03-21 20:01:48 +01:00
parent 209a446e36
commit a7d18f51a2
8 changed files with 50 additions and 2 deletions

View File

@@ -133,6 +133,16 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
* @type {Array.<string>}
*/
fileSizes: [],
/**
* @ignore
* @type {number}
*/
emscriptenPoolSize: 8,
/**
* @ignore
* @type {number}
*/
godotPoolSize: 4,
/**
* A callback function for handling Godot's ``OS.execute`` calls.
*
@@ -259,6 +269,8 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
this.serviceWorker = parse('serviceWorker', this.serviceWorker);
this.gdextensionLibs = parse('gdextensionLibs', this.gdextensionLibs);
this.fileSizes = parse('fileSizes', this.fileSizes);
this.emscriptenPoolSize = parse('emscriptenPoolSize', this.emscriptenPoolSize);
this.godotPoolSize = parse('godotPoolSize', this.godotPoolSize);
this.args = parse('args', this.args);
this.onExecute = parse('onExecute', this.onExecute);
this.onExit = parse('onExit', this.onExit);
@@ -278,6 +290,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
'thisProgram': this.executable,
'noExitRuntime': false,
'dynamicLibraries': [`${loadPath}.side.wasm`].concat(this.gdextensionLibs),
'emscriptenPoolSize': this.emscriptenPoolSize,
'instantiateWasm': function (imports, onSuccess) {
function done(result) {
onSuccess(result['instance'], result['module']);
@@ -350,6 +363,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
'locale': locale,
'persistentDrops': this.persistentDrops,
'virtualKeyboard': this.experimentalVK,
'godotPoolSize': this.godotPoolSize,
'focusCanvas': this.focusCanvas,
'onExecute': this.onExecute,
'onExit': function (p_code) {