I just wanted to know, how do I pass multiple clips to animation-mixer?
The extension GitHub mentions that the clip parameter accepts clips(s). I have tried to add multiple clip names separated by comma and in array, but nothing works. How does it work?
model.setAttribute('animation-mixer', {
clip: '["Idle", "Laugh"]',
loop: 'once',
crossFadeDuration: 0.4,
timeScale: 1,
})
The animation-mixer component does not support multiple animation names. However, if you use the asterisk(*) at the end of the word. Then, it will generate a Regexp that will match every clip that starts with the word before the * and everything after it.
E.g.
Idle* will be converted into ^Idle.*$ Regexp, therefore, any clip that starts with word "Idle" will be matched.