diff --git a/modules/rnetwork/components/folk-graph-viewer.ts b/modules/rnetwork/components/folk-graph-viewer.ts index a05ca6e..fc1b4fe 100644 --- a/modules/rnetwork/components/folk-graph-viewer.ts +++ b/modules/rnetwork/components/folk-graph-viewer.ts @@ -542,8 +542,8 @@ class FolkGraphViewer extends HTMLElement { this.graphContainer = container; try { - const ForceGraph3DModule = await import("3d-force-graph"); - const ForceGraph3D = ForceGraph3DModule.default || ForceGraph3DModule; + const ForceGraph3D = (window as any).ForceGraph3D; + if (!ForceGraph3D) throw new Error("ForceGraph3D not loaded — check UMD script tag"); const graph = ForceGraph3D({ controlType: "orbit" })(container) .backgroundColor("rgba(0,0,0,0)") diff --git a/modules/rnetwork/mod.ts b/modules/rnetwork/mod.ts index 1b341bd..fa6f226 100644 --- a/modules/rnetwork/mod.ts +++ b/modules/rnetwork/mod.ts @@ -12,14 +12,14 @@ import { getModuleInfoList } from "../../shared/module"; import type { RSpaceModule } from "../../shared/module"; import { renderLanding } from "./landing"; -// ── CDN importmap for Three.js + 3d-force-graph ── -const GRAPH3D_IMPORTMAP = ` +`; @@ -439,7 +439,7 @@ routes.get("/", (c) => { moduleId: "rnetwork", spaceSlug: space, modules: getModuleInfoList(), - head: GRAPH3D_IMPORTMAP, + head: GRAPH3D_HEAD, body: `
Open CRM
`, scripts: ``,