Skip to content

Commit 589b8c3

Browse files
committed
run_in_worker -> runInWebWorker
1 parent f534779 commit 589b8c3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

nge-web/src/main/resources/launcher.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,17 @@ function showFullscreenButton(config, canvas, show){
8181

8282
function tweakConfig(config){
8383
if(!config) config = {};
84+
if(typeof config.run_in_worker !== "undefined" && typeof config.runInWebWorker === "undefined"){
85+
config.runInWebWorker = config.run_in_worker;
86+
}
8487
if(typeof config.is_capacitor === "undefined"){
8588
config.is_capacitor = typeof Capacitor !== "undefined" && Capacitor.getPlatform
8689
};
87-
if(typeof config.run_in_worker === "undefined"){
88-
config.run_in_worker = !config.is_capacitor;
90+
if(typeof config.runInWebWorker === "undefined"){
91+
config.runInWebWorker = !config.is_capacitor;
8992
}
9093
if(typeof config.use_offscreen_canvas === "undefined"){
91-
config.use_offscreen_canvas = config.run_in_worker;
94+
config.use_offscreen_canvas = config.runInWebWorker;
9295
}
9396
if(typeof config.canvasSelector === "undefined"){
9497
config.canvasSelector = 'canvas#nge';
@@ -162,7 +165,7 @@ export default async function launch(config){
162165
canvas.style.visibility = 'visible';
163166
console.log("Starting nge...");
164167
renderLoadingAnimation();
165-
if (config.run_in_worker) {
168+
if (config.runInWebWorker) {
166169
Binds.addEventListener("ready", () => {
167170
console.log("NGE worker is ready");
168171
Binds.fireEvent("main", []).then(() => {

0 commit comments

Comments
 (0)