mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Summary Fully Refactored the Load3D module to improve architecture and maintainability by consolidating functionality into a centralized composable pattern and simplifying component structure. and support VueNodes system Changes - Architecture: Introduced new useLoad3d composable to centralize 3D loading logic and state management - Component Simplification: Removed redundant components (Load3DAnimation.vue, Load3DAnimationScene.vue, PreviewManager.ts) - Support VueNodes - improve config store - remove lineart output due Animation doesnot support it, may add it back later - remove Preview screen and keep scene in fixed ratio in load3d (not affect preview3d) - improve record video feature which will already record video by same ratio as scene Need BE change https://github.com/comfyanonymous/ComfyUI/pull/10025 https://github.com/user-attachments/assets/9e038729-84a0-45ad-b0f2-11c57d7e0c9a ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5765-refactor-refactor-load3d-2796d73d365081728297cc486e2e9052) by [Unito](https://www.unito.io)
50 lines
1.3 KiB
Vue
50 lines
1.3 KiB
Vue
<template>
|
|
<div class="relative rounded-lg bg-smoke-700/30">
|
|
<div class="flex flex-col gap-2">
|
|
<Button class="p-button-rounded p-button-text" @click="openIn3DViewer">
|
|
<i
|
|
v-tooltip.right="{
|
|
value: t('load3d.openIn3DViewer'),
|
|
showDelay: 300
|
|
}"
|
|
class="pi pi-expand text-lg text-white"
|
|
/>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Button from 'primevue/button'
|
|
|
|
import Load3DViewerContent from '@/components/load3d/Load3dViewerContent.vue'
|
|
import { t } from '@/i18n'
|
|
import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
|
|
import { useLoad3dService } from '@/services/load3dService'
|
|
import { useDialogStore } from '@/stores/dialogStore'
|
|
|
|
const { node } = defineProps<{
|
|
node: LGraphNode
|
|
}>()
|
|
|
|
const openIn3DViewer = () => {
|
|
const props = { node: node }
|
|
|
|
useDialogStore().showDialog({
|
|
key: 'global-load3d-viewer',
|
|
title: t('load3d.viewer.title'),
|
|
component: Load3DViewerContent,
|
|
props: props,
|
|
dialogComponentProps: {
|
|
style: 'width: 80vw; height: 80vh;',
|
|
maximizable: true,
|
|
onClose: async () => {
|
|
await useLoad3dService().handleViewerClose(props.node)
|
|
}
|
|
}
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<style scoped></style>
|