This commit is contained in:
Bill 2024-06-20 16:43:59 -04:00
parent 8d3c16b624
commit eb865730bb
2 changed files with 16 additions and 6 deletions

View File

@ -52,14 +52,15 @@ export const App: FC<{}> = (props) =>
throw new Error('NitroConfig is not defined!'); throw new Error('NitroConfig is not defined!');
const renderer = await PrepareRenderer({ const renderer = await PrepareRenderer({
width, width: Math.floor(width),
height, height: Math.floor(height),
resolution: window.devicePixelRatio, resolution: window.devicePixelRatio,
autoDensity: true, autoDensity: true,
backgroundAlpha: 0, backgroundAlpha: 0,
preference: 'webgl', preference: 'webgl',
eventMode: 'none', eventMode: 'none',
failIfMajorPerformanceCaveat: false, failIfMajorPerformanceCaveat: false,
roundPixels: true
}); });
await GetConfiguration().init(); await GetConfiguration().init();
@ -143,7 +144,7 @@ export const App: FC<{}> = (props) =>
return ( return (
<div <div
className={classNames( className={classNames(
'w-full h-full overflow-hidden text-base', 'w-full h-full overflow-hidden text-base bg-black',
!(window.devicePixelRatio % 1) && '[image-rendering:pixelated]', !(window.devicePixelRatio % 1) && '[image-rendering:pixelated]',
)} )}
> >

View File

@ -2,7 +2,11 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": "./src", "baseUrl": "./src",
"target": "es2022", "target": "es2022",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"esModuleInterop": true, "esModuleInterop": true,
@ -18,8 +22,13 @@
"noEmit": true, "noEmit": true,
"jsx": "react-jsx", "jsx": "react-jsx",
"paths": { "paths": {
"@layout/*": ["layout/*"] "@layout/*": [
"layout/*"
]
} }
}, },
"include": ["src", "node_modules/@nitrots/nitro-renderer/src/**/*.ts"] "include": [
"src",
"node_modules/@nitrots/nitro-renderer/src/**/*.ts"
]
} }