mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 07:30:11 +00:00
[cleanup] Remove unused viewport culling settings and variables
- Remove ViewportCulling and CullingMargin settings from coreSettings - Remove isViewportCullingEnabled and cullingMargin from useFeatureFlags - Clean up unused imports and variables in GraphCanvas.vue - Culling is no longer configurable as per design decision
This commit is contained in:
@@ -179,12 +179,7 @@ const selectionToolboxEnabled = computed(() =>
|
||||
)
|
||||
|
||||
// Feature flags
|
||||
const {
|
||||
shouldRenderVueNodes,
|
||||
// isViewportCullingEnabled, // Unused
|
||||
// cullingMargin: featureCullingMargin, // Unused
|
||||
isDevModeEnabled
|
||||
} = useFeatureFlags()
|
||||
const { shouldRenderVueNodes, isDevModeEnabled } = useFeatureFlags()
|
||||
|
||||
// TransformPane enabled when Vue nodes are enabled OR debug override
|
||||
const debugOverrideVueNodes = ref(true) // Default to true for development
|
||||
@@ -322,8 +317,6 @@ watch(
|
||||
// Transform state for viewport culling
|
||||
const { syncWithCanvas } = useTransformState()
|
||||
|
||||
// const cullingMargin = 0.2 // 20% margin outside viewport (unused)
|
||||
|
||||
// Replace problematic computed property with proper reactive system
|
||||
const nodesToRender = computed(() => {
|
||||
// Access performanceMetrics to trigger on RAF updates
|
||||
|
||||
@@ -33,18 +33,6 @@ export const useFeatureFlags = () => {
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Enable viewport culling for performance
|
||||
* When disabled, all Vue nodes render regardless of viewport
|
||||
*/
|
||||
const isViewportCullingEnabled = computed(() => {
|
||||
try {
|
||||
return settingStore.get('Comfy.VueNodes.ViewportCulling' as any) ?? true
|
||||
} catch {
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Development mode features (debug panel, etc.)
|
||||
* Automatically enabled in development builds
|
||||
@@ -71,23 +59,10 @@ export const useFeatureFlags = () => {
|
||||
true
|
||||
)
|
||||
|
||||
/**
|
||||
* Get culling margin setting
|
||||
*/
|
||||
const cullingMargin = computed(() => {
|
||||
try {
|
||||
return settingStore.get('Comfy.VueNodes.CullingMargin' as any) ?? 0.2
|
||||
} catch {
|
||||
return 0.2
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
isVueNodesEnabled,
|
||||
isVueWidgetsEnabled,
|
||||
isViewportCullingEnabled,
|
||||
isDevModeEnabled,
|
||||
shouldRenderVueNodes,
|
||||
cullingMargin
|
||||
shouldRenderVueNodes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -887,30 +887,5 @@ export const CORE_SETTINGS: SettingParams[] = [
|
||||
tooltip: 'Render widgets as Vue components within Vue nodes.',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
},
|
||||
{
|
||||
id: 'Comfy.VueNodes.ViewportCulling' as any,
|
||||
category: ['Comfy', 'Vue Nodes', 'Performance'],
|
||||
experimental: true,
|
||||
name: 'Enable viewport culling',
|
||||
tooltip:
|
||||
'Only render Vue nodes visible in viewport for better performance.',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
},
|
||||
{
|
||||
id: 'Comfy.VueNodes.CullingMargin' as any,
|
||||
category: ['Comfy', 'Vue Nodes', 'Performance'],
|
||||
experimental: true,
|
||||
name: 'Viewport culling margin',
|
||||
tooltip:
|
||||
'Percentage of viewport to extend culling bounds (0.2 = 20% margin).',
|
||||
type: 'slider',
|
||||
defaultValue: 0.2,
|
||||
attrs: {
|
||||
min: 0,
|
||||
max: 1,
|
||||
step: 0.05
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user