Initial commit
This commit is contained in:
commit
05c65aad4d
155 changed files with 93617 additions and 0 deletions
10
viewer/viewer-settings.js
Normal file
10
viewer/viewer-settings.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export const loadSettings = async () => {
|
||||
const moduleUrl = new URL(import.meta.url);
|
||||
const settingsPath = moduleUrl.pathname.includes('/assets/')
|
||||
? '../viewer-settings.json'
|
||||
: './viewer-settings.json';
|
||||
const url = new URL(settingsPath, moduleUrl);
|
||||
const res = await fetch(url);
|
||||
console.log("Fetched viewer-settings.json", res);
|
||||
return await res.json();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue