If i want to control a simple animation, I can set it to header
variable and then do header.play()
like this:
let header= element.animate({
transform: ['scale(1)', 'scale(1.5)']
}, {
duration: 1000,
fill: 'both'
});
header.play();
but when I chain it so that different animations happen together using composite
, that won't work since it's multiple definitions:
element.animate({
transform: ['scale(1)', 'scale(1.5)']
}, {
duration: 1000,
fill: 'both'
});
element.animate({
transform: ['rotate(0deg)', 'rotate(180deg)']
}, {
duration: 1500,
fill: 'both',
composite: 'add'
});
how would I control these together to make use of play()
, pause()
?