I'm getting mad trying to figure out how to put an animated image into a Bodies.rectangle
. I've animated the image with CSS and I have a gif version of the image that I want to use. How can I do it?
var char = Bodies.rectangle(90, 549, 84, 78, {
isStatic: true,
render: {
sprite: {
texture: 'http://i57.tinypic.com/3343zwi.png'
}
}
});
This is my declaration of the body that I want to use. Should I use Matter.js for this kind of thing?