mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-26 16:05:11 +00:00
## Summary implement fbx export, using our own lib fbx-exporter-three ## Screenshots (if applicable) https://github.com/user-attachments/assets/80012338-d065-4a00-a9a0-0a2e73d67db4 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-12323-FE-719-feat-load3d-add-FBX-export-support-3656d73d365081ef901ffe880ae9568a) by [Unito](https://www.unito.io)
55 lines
1.3 KiB
Vue
55 lines
1.3 KiB
Vue
<template>
|
|
<div class="space-y-4">
|
|
<Select v-model="exportFormat">
|
|
<SelectTrigger size="md">
|
|
<SelectValue />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectItem
|
|
v-for="fmt in exportFormats"
|
|
:key="fmt.value"
|
|
:value="fmt.value"
|
|
>
|
|
{{ fmt.label }}
|
|
</SelectItem>
|
|
</SelectContent>
|
|
</Select>
|
|
|
|
<Button
|
|
variant="muted-textonly"
|
|
class="rounded-full"
|
|
@click="exportModel(exportFormat)"
|
|
>
|
|
{{ $t('load3d.export') }}
|
|
</Button>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
import Select from '@/components/ui/select/Select.vue'
|
|
import SelectContent from '@/components/ui/select/SelectContent.vue'
|
|
import SelectItem from '@/components/ui/select/SelectItem.vue'
|
|
import SelectTrigger from '@/components/ui/select/SelectTrigger.vue'
|
|
import SelectValue from '@/components/ui/select/SelectValue.vue'
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'exportModel', format: string): void
|
|
}>()
|
|
|
|
const exportFormats = [
|
|
{ label: 'GLB', value: 'glb' },
|
|
{ label: 'OBJ', value: 'obj' },
|
|
{ label: 'STL', value: 'stl' },
|
|
{ label: 'FBX', value: 'fbx' }
|
|
]
|
|
|
|
const exportFormat = ref('obj')
|
|
|
|
const exportModel = (format: string) => {
|
|
emit('exportModel', format)
|
|
}
|
|
</script>
|