Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import init, { init_wasm, main_wasm } from '@/../public/castledEngine/CastledEngine';
import init, { init_wasm, main_wasm } from './CastledEngine.js';

let isReady = false;

Expand All @@ -8,13 +8,13 @@ init().then(() => {
executeCommandStack();
});

const commandStack: string[] = [];
const commandStack = [];

// /**
// * Handles incoming messages and finds the opening name based on the provided PGN.
// * @param {MessageEvent} message - The message event containing the PGN data.
// */
self.onmessage = (message: MessageEvent<string>) => {
self.onmessage = (message) => {
if (!isReady) {
return commandStack.push(message.data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const Engines: Engine[] = [
isMultiThreaded: false,
name: 'Castled Engine Single-Threaded',
value: 'castledEngine/CastledEngine.js',
workerURL: new URL('../workers/engine.ts', import.meta.url),
workerURL: 'castledEngine/castledEngineWorker.js',
cache: 'castledEngine/CastledEngine_bg.wasm',
},
];
Expand Down
Loading