|
@@ -271,12 +271,13 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
|
|
*/
|
|
*/
|
|
Config.prototype.getModuleConfig = function (loadPath, response) {
|
|
Config.prototype.getModuleConfig = function (loadPath, response) {
|
|
let r = response;
|
|
let r = response;
|
|
|
|
+ const gdext = this.gdextensionLibs;
|
|
return {
|
|
return {
|
|
'print': this.onPrint,
|
|
'print': this.onPrint,
|
|
'printErr': this.onPrintError,
|
|
'printErr': this.onPrintError,
|
|
'thisProgram': this.executable,
|
|
'thisProgram': this.executable,
|
|
'noExitRuntime': false,
|
|
'noExitRuntime': false,
|
|
- 'dynamicLibraries': [`${loadPath}.side.wasm`],
|
|
|
|
|
|
+ 'dynamicLibraries': [`${loadPath}.side.wasm`].concat(this.gdextensionLibs),
|
|
'instantiateWasm': function (imports, onSuccess) {
|
|
'instantiateWasm': function (imports, onSuccess) {
|
|
function done(result) {
|
|
function done(result) {
|
|
onSuccess(result['instance'], result['module']);
|
|
onSuccess(result['instance'], result['module']);
|
|
@@ -300,6 +301,8 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
|
|
return `${loadPath}.audio.worklet.js`;
|
|
return `${loadPath}.audio.worklet.js`;
|
|
} else if (path.endsWith('.js')) {
|
|
} else if (path.endsWith('.js')) {
|
|
return `${loadPath}.js`;
|
|
return `${loadPath}.js`;
|
|
|
|
+ } else if (path in gdext) {
|
|
|
|
+ return path;
|
|
} else if (path.endsWith('.side.wasm')) {
|
|
} else if (path.endsWith('.side.wasm')) {
|
|
return `${loadPath}.side.wasm`;
|
|
return `${loadPath}.side.wasm`;
|
|
} else if (path.endsWith('.wasm')) {
|
|
} else if (path.endsWith('.wasm')) {
|