Jump to content

flipX()


Lamberto
 Share

Recommended Posts

Thank you for the explanation, I tried on Entity and it works just fine but on Sprite it don't working as expected: the sprite now don't disappears but it don't flips

http://www.officinepixel.com/test/testCase_flip/

I've not found any mention of this new way on documentation. There is still Sprite.flipX() Sprite.flipY() in Sprite page with no mention of the fact it's deprecated in favor of a new way and in Renderable page there is any flip function available.

Link to comment
Share on other sites

ouch indeed... the fault at the new matrix transform mechanism, and it seems that the `autoTransform` flag is not enabled for me.Sprite (where it should be), but is for me.Entity.

for now you can just add the following line in your object constructor and it should solve your issue :

this.autoTransform = true;

I'll add a proper fix in melonJS later this week, but anyway it will more or less be the same, so no worries if you forget to remove it later as well :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...