[3d] add preview 3d for saveGlb (#3156)

This commit is contained in:
Terry Jia
2025-03-19 22:00:59 -04:00
committed by GitHub
parent 4899a1d8f6
commit d49815fcb4
3 changed files with 96 additions and 0 deletions

View File

@@ -7,6 +7,11 @@ import { api } from '@/scripts/api'
class Load3DConfiguration {
constructor(private load3d: Load3d) {}
configureForSaveMesh(loadFolder: 'input' | 'output', filePath: string) {
this.setupModelHandlingForSaveMesh(filePath, loadFolder)
this.setupDefaultProperties()
}
configure(
loadFolder: 'input' | 'output',
modelWidget: IWidget,
@@ -33,6 +38,17 @@ class Load3DConfiguration {
}
}
private setupModelHandlingForSaveMesh(
filePath: string,
loadFolder: 'input' | 'output'
) {
const onModelWidgetUpdate = this.createModelUpdateHandler(loadFolder)
if (filePath) {
onModelWidgetUpdate(filePath)
}
}
private setupModelHandling(
modelWidget: IWidget,
loadFolder: 'input' | 'output',