50% chance of second foreground
This commit is contained in:
parent
d625ad8f4c
commit
a5957fc3b2
1 changed files with 7 additions and 2 deletions
|
@ -62,9 +62,14 @@ def compose(clips, target=150, base=1024):
|
||||||
break
|
break
|
||||||
length += clip['duration']
|
length += clip['duration']
|
||||||
|
|
||||||
|
fg = clip['foreground']
|
||||||
|
if 'foreground2' in clip:
|
||||||
|
if chance(seq, 0.5):
|
||||||
|
fg = clip['foreground2']
|
||||||
|
|
||||||
scene['front']['V1'].append({
|
scene['front']['V1'].append({
|
||||||
'duration': clip['duration'],
|
'duration': clip['duration'],
|
||||||
'src': clip['foreground'],
|
'src': fg,
|
||||||
"filter": {
|
"filter": {
|
||||||
'transparency': seq() / 10,
|
'transparency': seq() / 10,
|
||||||
}
|
}
|
||||||
|
@ -110,7 +115,7 @@ def compose(clips, target=150, base=1024):
|
||||||
})
|
})
|
||||||
scene['audio']['A2'].append({
|
scene['audio']['A2'].append({
|
||||||
'duration': clip['duration'],
|
'duration': clip['duration'],
|
||||||
'src': clip['foreground'],
|
'src': fg,
|
||||||
})
|
})
|
||||||
return scene
|
return scene
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue