50% chance of second foreground

This commit is contained in:
j 2023-10-10 10:19:47 +01:00
parent d625ad8f4c
commit a5957fc3b2

View file

@ -62,9 +62,14 @@ def compose(clips, target=150, base=1024):
break
length += clip['duration']
fg = clip['foreground']
if 'foreground2' in clip:
if chance(seq, 0.5):
fg = clip['foreground2']
scene['front']['V1'].append({
'duration': clip['duration'],
'src': clip['foreground'],
'src': fg,
"filter": {
'transparency': seq() / 10,
}
@ -110,7 +115,7 @@ def compose(clips, target=150, base=1024):
})
scene['audio']['A2'].append({
'duration': clip['duration'],
'src': clip['foreground'],
'src': fg,
})
return scene