Initial commit

This commit is contained in:
Yeicor
2024-01-29 21:48:33 +01:00
parent ff629bc006
commit 24d9af17ee
9 changed files with 202 additions and 118 deletions

25
src/settings.ts Normal file
View File

@@ -0,0 +1,25 @@
// @ts-ignore
import skyboxUrl from './../img/st_peters_square_night_8k.jpg';
export const settings = {
arModes: 'webxr scene-viewer quick-look',
shadowIntensity: 1,
background: skyboxUrl,
}
// Auto-override any settings from the URL
const url = new URL(window.location.href);
url.searchParams.forEach((value, key) => {
if (key in settings) {
switch (typeof settings[key]) {
case 'boolean':
settings[key] = value === 'true';
break;
case 'number':
settings[key] = Number(value);
break;
default:
settings[key] = value;
}
}
})