Is it possible to implement sprite looping animation?
JeongWuk opened this issue · comments
JeongWuk_99 commented
const guideLine = Matter.Bodies.rectangle(
render.options.width / 2,
render.options.height / 2,
5,
render.options.height / 2,
{
name: 'guideLine',
isStatic: true,
isSensor: true,
collisionFilter: { group: -1 },
render: {
sprite: {
texture: dotted[0].image,
xScale: game_wrap.clientWidth / 450,
yScale: game_wrap.clientHeight / 1226
}
}
}
)
I made a guideLine object which is a dotted line image, i want to make the sprite animate like a infinite swiper.
Is it possible?
ggorlen commented
Please see matter.js: is there any way to animate my sprite on Stack Overflow. If this doesn't work for you, share a complete example of your code and use case.