Hi,
I have character skeleton. It has multiple face parts and multiple animations : blink, laugh, speaking etc. The speaking animation only works with mouth slot and the blink animation only works with the eyes slot and the brows slot.
What I am trying to do is, mix 2 animations so that they run together. For example, I want to mix the blink and the speaking animations so that they run together and make it look like the character is blinking while speaking.
I tried setMix
without any luck. I am not sure I have correctly implemented it though.
animationStateData.setMix("blink", "speak", 0.8)
animationState.setAnimation(0, "blink", true);
Thanks
Ok. I figured it out. Looks like I have to play the 2nd animation in different track.
I have one other question. How do I change the canvas background to transparent? Its currently gray. I tried clearColor
but its still gray.
canvas = document.getElementById("canvas");
var config = { alpha: true };
gl = canvas.getContext("webgl", config) || canvas.getContext("experimental-webgl", config);
gl.clearColor(1, 0, 0, 1);