[3d] support mtl for obj file (#3933)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Terry Jia
2025-05-19 23:48:57 -04:00
committed by GitHub
parent 07f0b88e30
commit 49d32f4809
11 changed files with 552 additions and 9 deletions

View File

@@ -76,7 +76,7 @@ const eventConfig = {
emit('recordingStatusChange', value)
} as const
watchEffect(async () => {
watchEffect(() => {
if (load3d.value) {
const rawLoad3d = toRaw(load3d.value) as Load3d
@@ -86,10 +86,20 @@ watchEffect(async () => {
rawLoad3d.setFOV(props.fov)
rawLoad3d.toggleCamera(props.cameraType)
rawLoad3d.togglePreview(props.showPreview)
await rawLoad3d.setBackgroundImage(props.backgroundImage)
}
})
watch(
() => props.backgroundImage,
async (newValue) => {
if (load3d.value) {
const rawLoad3d = toRaw(load3d.value) as Load3d
await rawLoad3d.setBackgroundImage(newValue)
}
}
)
watch(
() => props.upDirection,
(newValue) => {