feat : add multi threaded stockfish 16
This commit is contained in:
@@ -5,6 +5,34 @@
|
||||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
|
||||
"cleanUrls": true,
|
||||
"trailingSlash": false,
|
||||
"predeploy": ["npm run lint", "npm run build"]
|
||||
"predeploy": ["npm run lint", "npm run build"],
|
||||
"headers": [
|
||||
{
|
||||
"source": "/",
|
||||
"headers": [
|
||||
{
|
||||
"key": "Cross-Origin-Embedder-Policy",
|
||||
"value": "require-corp"
|
||||
},
|
||||
{
|
||||
"key": "Cross-Origin-Opener-Policy",
|
||||
"value": "same-origin"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "/engines/stockfish-wasm/stockfish-nnue-16.js",
|
||||
"headers": [
|
||||
{
|
||||
"key": "Cross-Origin-Embedder-Policy",
|
||||
"value": "require-corp"
|
||||
},
|
||||
{
|
||||
"key": "Cross-Origin-Opener-Policy",
|
||||
"value": "same-origin"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,44 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: "export",
|
||||
trailingSlash: false,
|
||||
reactStrictMode: true,
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
};
|
||||
const { PHASE_PRODUCTION_BUILD } = require("next/constants");
|
||||
|
||||
const nextConfig = (phase) =>
|
||||
/** @type {import('next').NextConfig} */ ({
|
||||
output: phase === PHASE_PRODUCTION_BUILD ? "export" : undefined,
|
||||
trailingSlash: false,
|
||||
reactStrictMode: true,
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
headers:
|
||||
phase === PHASE_PRODUCTION_BUILD
|
||||
? undefined
|
||||
: () => [
|
||||
{
|
||||
source: "/",
|
||||
headers: [
|
||||
{
|
||||
key: "Cross-Origin-Embedder-Policy",
|
||||
value: "require-corp",
|
||||
},
|
||||
{
|
||||
key: "Cross-Origin-Opener-Policy",
|
||||
value: "same-origin",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
source: "/engines/stockfish-wasm/stockfish-nnue-16.js",
|
||||
headers: [
|
||||
{
|
||||
key: "Cross-Origin-Embedder-Policy",
|
||||
value: "require-corp",
|
||||
},
|
||||
{
|
||||
key: "Cross-Origin-Opener-Policy",
|
||||
value: "same-origin",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
14
public/engines/stockfish-wasm/stockfish-nnue-16.js
Normal file
14
public/engines/stockfish-wasm/stockfish-nnue-16.js
Normal file
File diff suppressed because one or more lines are too long
BIN
public/engines/stockfish-wasm/stockfish-nnue-16.wasm
Normal file
BIN
public/engines/stockfish-wasm/stockfish-nnue-16.wasm
Normal file
Binary file not shown.
@@ -6,7 +6,7 @@ export class Stockfish16 extends UciEngine {
|
||||
const isWasmSupported = Stockfish16.isWasmSupported();
|
||||
|
||||
const enginePath = isWasmSupported
|
||||
? "engines/stockfish-wasm/stockfish-nnue-16-single.js"
|
||||
? "engines/stockfish-wasm/stockfish-nnue-16.js"
|
||||
: "engines/stockfish.js";
|
||||
|
||||
super(EngineName.Stockfish16, enginePath);
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function EvaluationBar({ height }: Props) {
|
||||
alignItems="center"
|
||||
width="2rem"
|
||||
height={height}
|
||||
border={`1px solid black`}
|
||||
border="1px solid black"
|
||||
borderRadius="5px"
|
||||
>
|
||||
<Box
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function Accuracies() {
|
||||
lineHeight={1}
|
||||
padding={1}
|
||||
fontWeight="bold"
|
||||
border={`1px solid #424242`}
|
||||
border="1px solid #424242"
|
||||
>
|
||||
{`${gameEval?.accuracy.white.toFixed(1)} %`}
|
||||
</Typography>
|
||||
@@ -37,7 +37,7 @@ export default function Accuracies() {
|
||||
lineHeight={1}
|
||||
padding={1}
|
||||
fontWeight="bold"
|
||||
border={`1px solid #424242`}
|
||||
border="1px solid #424242"
|
||||
>
|
||||
{`${gameEval?.accuracy.black.toFixed(1)} %`}
|
||||
</Typography>
|
||||
|
||||
Reference in New Issue
Block a user