mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-20 14:37:03 +01:00
Initial commit
This commit is contained in:
25
src/settings.ts
Normal file
25
src/settings.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user