• Content Count

  • Joined

  • Last visited

  1. @themoonrat @ivan.popelyshev I have managed to add a 'fix' into my version of the library that I'm using. I made one minor addition to the processPointerUp in the condition that deletes the trackedPointers based on id. It now appears to work as expected. Yet to see if this has any other implications, here's hoping not. But will come back if there still ends up being a problem. Thank you for taking the time to help and I appreciate the advice.
  2. Ok. I haven't had the chance to look at it much in the last day or so due to other deadlines. I will continue to look at it. @themoonrat The up does fire on them all it's the tap/click that doesn't based on the information that is in the up portion. I have a play around with what you have mentioned.
  3. @ivan.popelyshev ok. I will look into providing a minimal fiddle whilst continuing to debug at my end and yeah they are time consuming and difficult. I am looking into being able to scrape a hack together too but worry about breaking other items by doing it that way. Am sure will figure out some solution eventually.
  4. Thanks @ivan.popelyshev Still picking my way through it, can see an issue in the tracking data only so far. Don't really want to be in a position where we have to override anything but if have to guess we will. Not found the root of the issue yet. I have looked at the sections you suggested. When processing the pointer down, on buttons that don't work, 1 out 4 of the buttons doesn't have any tracking data and when it processes the pointer up it then only had data for the last rendered button (which is processed first) and that has the flag 2. When processing the pointer down, on buttons that do work, it has tracking data for all buttons and when it processes the pointer up you can still see tracking data for all of them. The last rendered btn has a flag of 3 and the rest have flag of 1. Can't seem to track down the flag of 3 and what that represents, guessing I've just overlooked it, as the default flags are 0, 1, 2 and 4 are they not? I'll keep plugging at it and hope I can follow it through to root issue.
  5. I've been working with Pixi for quite sometime with V3 up until now. Recently decided it was time to move some code over to version 4 but have been experiencing some issues with interaction events. I have a button class that originally used both listeners for touch and mouse events to a.) change the visual state of the button on up/down etc b.) perform an action on click/tap. This had been working perfectly fine in version 3 and I could have multiple buttons in a class/container. Switching to version 4 this caused issues with click/tap area where only the last button to be added to a particular class/container will fire this event. All buttons will fire the up/dwn start/end events still though. On upon researching I tried converting them all pointer events and still experience the issue. I'm currently using V4.7.0. I've been trying to pick my way through the PIXI source trying to figure out why the event doesn't fire but it's not clear to me. All I can see is that it doesn't seem to have 'trackingData' when processing the up portion when it does on the one that does fire the tap/click. I've being using Chrome only at this point for Dev tools and tried but desktop and mobile/tablet emulator, both having the same result. I know interaction was reworked for v4 but can anyone give me any pointers as to why those changes have affected my code thus. I don't understand well enough the changes to be able to find the right place to look for a solution. I can't provide the exact code at the moment as it's not a personal project and corporate rules prevent me from doing so. But can give an overview. The class is structured with a parent container (essentially a stage) to add class container to and a class container to display the current button state (current button state can be a graphic, sprite, animation). The current button state container has all the interaction events attached to it. These call binded functions within the class which either change the current state sprite or call a function on click/tap that has been passed in the settings on instantiation (event data is sent to this function). As stated if the event is fired, which it is on the last button added, the function is fired but event doesn't trigger for click/tap on the others. All other events fire normally on each button. I've possibly just overlooked something simple as you get to that 'wood for the trees' state. Any thoughts, suggestions would be grateful.
  6. I posted in I have managed to convert this for PIXI v3
  7. I believe I know why my original solution didn't work and how to fix it. Yet to test though but believe the solution will work ok. Will update once testing complete, and will present solution if it works.
  8. @xerver I was looking to use a glowfilter in V3 also recently and tried to use the ones you mentioned, but they didn't work, it wasn't converted right. It wasn't able to apply the parameters to the Frag code correctly. I've not tried it since so don't know if it has been fixed since. I amended it myself in the end that worked on the setup I created. I added markers in the frag code for string replace as it's was still trying to run javascript in it to get values. quality / distance).toFixed(7) replaced with %ANGLE% distance.toFixed(7) replaced with %DISTANCE% I then loaded modified vert and frag as resources to be passed. And next extracted the filter itself and put it in it's own class, where I applied the string replace on the frag/vert. Modified Vert/Frag: Modified Filter: Please be aware this is setup to use requireJS as I use that for my script loading. I was gonna do a bug report/pullrequest and fix it on the original (but obviously in the way that version is setup) but haven't had time.
  9. So scene setting.... I'm relatively new to Pixi JS but am an experienced developer (although be it in Flash not JS). I've managed pretty well so far and am in the process of converting another very basic game from Flash to JS as I have before. I've created a button class that aside from a few data options like colour etc, passes 2 functions in the constructor. 1) bindFunction and 2) clickFunction. The button has a usual 3 state system of Up, Over and Down; which each have their own image. The bind function is used to respond to all the following events : mousedown, touchstart, mouseover, mouseup, mouseout, mouseupoutside in the format : this.on('eventType', this.bindFunction.bind({dataobject})); In the bind function it reads the event type and then sets the appropriate image for the state. The dataobject passed to the bind function contains the other mentioned function clickFunction. In the bind function the appropriate click events then call the clickFunction. All make sense? Then stay with me. So I wished to have these buttons changeable on the fly i.e. the clickFunction and label could be changed, but I seem to be having issues unbinding the clickFunction part. I've created 2 functions to add and remove the event listeners and numerous functions to do the inbetween parts like update the label and clickFunction. When I run this, I can see it disable the buttons, see the new stored function and labels (via log), but when I then click it with the new label/function applied, it still calls the original function as well. I'm removing the function with the following format :'evenType', this.bindFunction); this.clickFunction = null; this.bindFunction = null; I've tried multiple ways of writing this and am still unable to remove the data passed from the original binding. Any thoughts? Can provide more details if necessary but hope this is detailed enough. Essentially the steps currently are: 1) Button bound with bindFunction1 and passed clickFunction1 2) Button clicked and bindFunction1 is called and it calls clickFunction1 3) Then clickFunction1 removes bindFunction1 from button and then nulls bindFunction1 and clickFunction1 on button 4) Button updated with bindFunction2 (which is actually bindFunction1 - only doing as having issues and thought removal and reset might help) and clickFunction2 5) Button bound with bindFunction2 and passed clickFunction2 6) Button clicked and bindFunction2 is called and it calls clickFunction2 but also clickFunction1 which it should not. I presume that there is some sort of ordering or way I'm doing this (context) that is obviously not removing clickFunction1 from the instance. I have checked it with just remove and no reassign, it does remove the listener but I don't think it's removing the object passed bind correctly. I've googled a lot for this and not found anything conclusive, hence posting this. I'm sure it's something glaringly obvious too hehe. Any assistance would be greatly appreciated. I'd really rather not have to clear and recreate the buttons, when it's only a label and click function that need changing. UPDATE: Yes I know I can solve this by separating the click function onto a separate event handler (I know this works), but this it more being interested how binding can work (or be troublesome) and reducing the number of handlers to deal with.