T
T
Triborg-3332019-10-04 19:04:27
JavaScript
Triborg-333, 2019-10-04 19:04:27

How to make animation like zooming in and out of a canvas image?

Hello, sorry for the wording

Maybe someone knows the game "Mope.io" where the objects seem to breathe. Top - down
here I want to make the caterpillar animated.
zoom in and out of the picture.

for(var i = 0; i < this.caterpillar.length; i++){
        
        this.caterpillar[i].sz++;

        if(this.caterpillar.sz >= 100){
          this.caterpillar.sz--;
        }
      }

I don't know how to do it right. Help =)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question