Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to implement sprite looping animation? #1291

Open
JeongWuk opened this issue May 14, 2024 · 1 comment
Open

Is it possible to implement sprite looping animation? #1291

JeongWuk opened this issue May 14, 2024 · 1 comment

Comments

@JeongWuk
Copy link

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
Copy link

ggorlen commented Jul 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants