fix(rsplat): use three/addons/ import path to match importmap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8cdaf77e9a
commit
c233f1338b
|
|
@ -698,8 +698,8 @@ export class FolkSplatViewer extends HTMLElement {
|
||||||
|
|
||||||
private async initGlbViewer(container: HTMLElement, loading: HTMLElement | null) {
|
private async initGlbViewer(container: HTMLElement, loading: HTMLElement | null) {
|
||||||
const THREE = await import("three");
|
const THREE = await import("three");
|
||||||
const { OrbitControls } = await import("three/examples/jsm/controls/OrbitControls.js");
|
const { OrbitControls } = await import("three/addons/controls/OrbitControls.js");
|
||||||
const { GLTFLoader } = await import("three/examples/jsm/loaders/GLTFLoader.js");
|
const { GLTFLoader } = await import("three/addons/loaders/GLTFLoader.js");
|
||||||
|
|
||||||
const w = container.clientWidth || 800;
|
const w = container.clientWidth || 800;
|
||||||
const h = container.clientHeight || 600;
|
const h = container.clientHeight || 600;
|
||||||
|
|
|
||||||
|
|
@ -605,7 +605,7 @@ routes.get("/", async (c) => {
|
||||||
`,
|
`,
|
||||||
scripts: `
|
scripts: `
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkSplatViewer } from '/modules/rsplat/folk-splat-viewer.js?v=2';
|
import { FolkSplatViewer } from '/modules/rsplat/folk-splat-viewer.js?v=3';
|
||||||
const gallery = document.getElementById('gallery');
|
const gallery = document.getElementById('gallery');
|
||||||
gallery.splats = ${splatsJSON};
|
gallery.splats = ${splatsJSON};
|
||||||
gallery.spaceSlug = '${spaceSlug}';
|
gallery.spaceSlug = '${spaceSlug}';
|
||||||
|
|
@ -669,7 +669,7 @@ routes.get("/view/:id", async (c) => {
|
||||||
`,
|
`,
|
||||||
scripts: `
|
scripts: `
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { FolkSplatViewer } from '/modules/rsplat/folk-splat-viewer.js?v=2';
|
import { FolkSplatViewer } from '/modules/rsplat/folk-splat-viewer.js?v=3';
|
||||||
</script>
|
</script>
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue