You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

38 lines
1.5 KiB

import type { NodeType } from "@/types";
export type NodeDimensions = { width: number; height: number };
export const defaultNodeDimensions: Record<NodeType, NodeDimensions> = {
imageInput: { width: 300, height: 280 },
smartImage: { width: 300, height: 280 },
audioInput: { width: 300, height: 280 },
videoInput: { width: 300, height: 280 },
annotation: { width: 300, height: 280 },
smartVideo: { width: 300, height: 280 },
prompt: { width: 300, height: 280 },
array: { width: 300, height: 280 },
promptConstructor: { width: 300, height: 280 },
nanoBanana: { width: 300, height: 280 },
generateVideo: { width: 300, height: 280 },
generate3d: { width: 300, height: 300 },
generateAudio: { width: 300, height: 280 },
llmGenerate: { width: 300, height: 280 },
splitGrid: { width: 300, height: 320 },
output: { width: 300, height: 280 },
outputGallery: { width: 300, height: 280 },
imageCompare: { width: 400, height: 360 },
videoStitch: { width: 400, height: 280 },
easeCurve: { width: 340, height: 280 },
videoTrim: { width: 360, height: 360 },
videoFrameGrab: { width: 320, height: 320 },
router: { width: 200, height: 80 },
switch: { width: 220, height: 120 },
conditionalSwitch: { width: 260, height: 180 },
glbViewer: { width: 360, height: 380 },
};
export const DEFAULT_NODE_DIMENSIONS: NodeDimensions = { width: 300, height: 280 };
export function getDefaultNodeDimensions(type: NodeType): NodeDimensions {
return defaultNodeDimensions[type] ?? DEFAULT_NODE_DIMENSIONS;
}