minor fixes & mix node sample
This commit is contained in:
@@ -31,6 +31,20 @@ export const PATTERN_OPTIONS = [
|
||||
{ label: 'White solid', value: 'white' },
|
||||
]
|
||||
|
||||
export const MIX_MODE_OPTIONS = [
|
||||
{ label: 'Fade', value: 'fade' },
|
||||
{ label: 'Dissolve', value: 'dissolve' },
|
||||
{ label: 'Wipe', value: 'wipe' },
|
||||
{ label: 'A/B', value: 'ab' },
|
||||
]
|
||||
|
||||
export const TRANSITION_OPTIONS = [
|
||||
{ label: 'Cut', value: 'cut' },
|
||||
{ label: 'Cross', value: 'cross' },
|
||||
{ label: 'Slide', value: 'slide' },
|
||||
{ label: 'Push', value: 'push' },
|
||||
]
|
||||
|
||||
// Format params shown on source nodes; values go into edge format (not node params)
|
||||
const FORMAT_PARAMS: ParamDef[] = [
|
||||
{ key: 'res', label: 'Resolution', type: 'select', options: RESOLUTION_OPTIONS, default: '1920x1080', isFormat: true },
|
||||
@@ -114,6 +128,23 @@ export const NODE_TYPES: Record<string, NodeTypeDef> = {
|
||||
{ key: 'file', label: 'File', type: 'input', default: '0.ts' }
|
||||
],
|
||||
},
|
||||
mix: {
|
||||
type: 'mix',
|
||||
label: 'Mix',
|
||||
ports: [
|
||||
{ id: 'video-in-1', kind: 'video', direction: 'in' },
|
||||
{ id: 'video-in-2', kind: 'video', direction: 'in' },
|
||||
{ id: 'audio-in-1', kind: 'audio', direction: 'in' },
|
||||
{ id: 'audio-in-2', kind: 'audio', direction: 'in' },
|
||||
{ id: 'video-out', kind: 'video', direction: 'out' },
|
||||
{ id: 'audio-out', kind: 'audio', direction: 'out' },
|
||||
],
|
||||
params: [
|
||||
{ key: 'mode', label: 'Mode', type: 'select', options: MIX_MODE_OPTIONS, default: 'fade' },
|
||||
{ key: 'transition', label: 'Transition', type: 'select', options: TRANSITION_OPTIONS, default: 'cut' },
|
||||
{ key: 'duration', label: 'Duration', type: 'number', default: 500, min: 0, max: 10000 },
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
// Default params for a new node of the given type
|
||||
|
||||
Reference in New Issue
Block a user