import * as vscode from 'vscode'; /** Folder of the bundled webview scripts; webviews may load files from it. */ export function viewerRoots(extensionUri: vscode.Uri): vscode.Uri[] { return [vscode.Uri.joinPath(extensionUri, 'dist')]; } /** Page option that adds the 3D viewer to an Archify page. */ export function viewer3dOption(webview: vscode.Webview, extensionUri: vscode.Uri): { scriptUri: string; defaultView: '2d' | '3d' } { const defaultView = vscode.workspace.getConfiguration('archify').get('defaultView', '2d') === '3d' ? '3d' : '2d'; return { scriptUri: webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, 'dist', 'viewer3d.js')).toString(), defaultView, }; }