Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Thanks a lot, this really clarified my view
  2. I use PixiJS but i don't think that context matters considering my question. Suppose we have a sprite of a face and we going to make it's eyes blinkning. According to this topic it's up to me how to implement one: >there's no "proper way" of animating sprites So i decided to use sprite mask and create a function which moves mask. Velocity of closing/opening eyes depends on game loop's update frequency (60 in PixiJS by default) and delta coords which i can easily configure in the function. When i used this approach it eventually looked pretty nice and mask moved smooth, but w
  3. Obviously i didn't read docs attentively, but what is the practice difference between setting x/y directly spriteObj.x = 3; and using setter spriteObj.position.set(3, spriteObj.y); ? I looked to me like nothing was affected, but i'm afraid that further there appears smthn suddenly. Also in case if the second one is really more correct way, how can i set only x coord in beautiful way? For instance, moving obj: spriteObj.x += 10; // looking nice but omits setter spriteObj.position.set(spriteObj.x + 10, spriteObj.y); // too long as for me and requires both coords, he
  • Create New...