diff --git a/modules/rnetwork/mod.ts b/modules/rnetwork/mod.ts index 1a9669c..2a592ae 100644 --- a/modules/rnetwork/mod.ts +++ b/modules/rnetwork/mod.ts @@ -420,7 +420,7 @@ routes.get("/api/graph", async (c) => { for (const v of viewers) { const edgeCount = 2 + (rng() < 0.4 ? 1 : 0); const targets = [...mems, ...admins].sort(() => rng() - 0.5).slice(0, edgeCount); - let remaining = Math.min(v[weightIdx], 0.9); + let remaining = Math.min(v[weightIdx] as number, 0.9); for (let i = 0; i < targets.length && remaining > 0.02; i++) { const w = i < targets.length - 1 ? Math.round(rng() * remaining * 0.6 * 100) / 100 : Math.round(remaining * 100) / 100; const clamped = Math.min(w, remaining); @@ -436,7 +436,7 @@ routes.get("/api/graph", async (c) => { for (const m of mems) { const edgeCount = 3 + (rng() < 0.3 ? 1 : 0); const targets = [...admins].sort(() => rng() - 0.5).slice(0, edgeCount); - let remaining = Math.min(m[weightIdx], 0.95) - (outboundSum.get(m[0]) || 0); + let remaining = Math.min(m[weightIdx] as number, 0.95) - (outboundSum.get(m[0]) || 0); for (let i = 0; i < targets.length && remaining > 0.02; i++) { const w = i < targets.length - 1 ? Math.round(rng() * remaining * 0.5 * 100) / 100 : Math.round(remaining * 100) / 100; const clamped = Math.min(w, remaining); @@ -452,7 +452,7 @@ routes.get("/api/graph", async (c) => { for (const a of admins) { const edgeCount = 1 + (rng() < 0.4 ? 1 : 0); const targets = admins.filter(t => t[0] !== a[0]).sort(() => rng() - 0.5).slice(0, edgeCount); - let remaining = Math.min(a[weightIdx] * 0.4, 0.5) - (outboundSum.get(a[0]) || 0); + let remaining = Math.min((a[weightIdx] as number) * 0.4, 0.5) - (outboundSum.get(a[0]) || 0); for (let i = 0; i < targets.length && remaining > 0.02; i++) { const w = Math.round(Math.min(rng() * 0.3 + 0.05, remaining) * 100) / 100; if (w > 0.01) { diff --git a/modules/rsplat/components/folk-splat-viewer.ts b/modules/rsplat/components/folk-splat-viewer.ts index b304278..766e0a4 100644 --- a/modules/rsplat/components/folk-splat-viewer.ts +++ b/modules/rsplat/components/folk-splat-viewer.ts @@ -1035,8 +1035,10 @@ export class FolkSplatViewer extends HTMLElement { } private async initGlbViewer(container: HTMLElement, loading: HTMLElement | null) { - const THREE = await import("three"); + const THREE: any = await import("three"); + // @ts-expect-error — three.js addons loaded via CDN importmap, no bundled types const { OrbitControls } = await import("three/addons/controls/OrbitControls.js"); + // @ts-expect-error — three.js addons loaded via CDN importmap, no bundled types const { GLTFLoader } = await import("three/addons/loaders/GLTFLoader.js"); // Wait for layout if container has no dimensions yet diff --git a/modules/rtube/mod.ts b/modules/rtube/mod.ts index dcf10fc..1460eaf 100644 --- a/modules/rtube/mod.ts +++ b/modules/rtube/mod.ts @@ -215,7 +215,7 @@ routes.post("/api/360split", async (c) => { // Build multipart form for 360split const form = new FormData(); - form.append("video", new Blob([bytes.buffer]), videoName); + form.append("video", new Blob([bytes as unknown as BlobPart]), videoName); if (numViews) form.append("num_views", String(numViews)); if (hFov) form.append("h_fov", String(hFov)); if (vFov) form.append("v_fov", String(vFov));