feature (3d): embed 3d viewer anywhere

This contains a bunch of things packaged in 1:

1) UI improvements for the 3D viewer to support all sort of file types
   and create a nice rendering in a clean way with all sort of options

2) enable people to use Filestash as an SDK so we can embed the 3d viewer
   elsewhere
This commit is contained in:
MickaelK
2024-12-23 08:02:12 +11:00
parent 43d07e8555
commit 71b14e6eaf
19 changed files with 1417 additions and 106 deletions

View File

@ -0,0 +1,15 @@
// feature detection if we're using Filestash as a standalone app or as an SDK
// see: ../index.js
export function isSDK() {
const importURL = new URL(import.meta.url);
return location.origin !== importURL.origin;
}
export function urlSDK(url) {
const importURL = new URL(import.meta.url);
if (new RegExp("^/").test(url) === false) {
url = "/" + url
}
return importURL.origin + url;
}