Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

mousedown triggers two events instead of one


lunarovich
 Share

Recommended Posts

I'm developing a game framework and I've just migrated to Pixi.js V3. After some bumps on the road - undocumented loader & interaction management changes - I've managed to put it in the working state.

 

However, one problem is pestering me: every time I press a mouse button on the sprite or container, or release it, two events are registered instead of one - two on the 'mousedown' and two on the 'mouseup'. This happens with left as well as with right mouse button. Now, I did not change anything in my code and everything was working fine with Pixi.js V2.

 

Does someone know what is going on here?

 

Thank you in advance!

 

UPDATE:

I've just realized that two events are produced because I have manually instantiated InteractionManager with

new PIXI.interaction.InteractionManager(renderer);

Apparantly, pixi automatically creates an interaction manager. However, I do not know how to find the reference to that manager.

I need to read out container mouse position in every tick...

 

UPDATE:

I've just opened a new topic here, because this issue is resolved initself, but my problem of reading a mouse position in every frame in pixi V3 isn't.

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...