saveToFile()

in src/core/Scene.ts [94:110]


    saveToFile(name: string | null = null, format: "splat" | "ply" = "splat") {
        if (!document) return;

        if (!name) {
            const now = new Date();
            name = `scene-${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}.${format}`;
        }

        const mergedData = this.getMergedSceneDataBuffer(format);

        const blob = new Blob([mergedData], { type: "application/octet-stream" });

        const link = document.createElement("a");
        link.download = name;
        link.href = URL.createObjectURL(blob);
        link.click();
    }