charlie_says

Members
  • Content Count

    267
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by charlie_says

  1. Thanks both - when I looked again I realised my click wasn't actually working in the way I'd described... I think this is such an odd use case that actually trying to rework PIXI is not the correct approach...
  2. This is going to sound a bit silly... I've got two sprites; one has a mouseclick event listener, the other has a mouseover event listener. The second sprite (mouseover) has to be under the first (mouseclick) but, I *really* want the mouseover event to still fire. Is this possible? (I've got another sprite under the first, which also has a mouseclick event listener, and on click, they will both fire, but the mouseover I'm having less luck with!)
  3. Typically, I couldn't get that working immediately, and I've got limited time on this project until next week. Do you know when it's likely to be released?
  4. Apologies for the dunce follow up, can I install the dev branch via NPM?
  5. I'm trying to create a PIXI Rope with animation. I've put my textures into an array, and was trying to set the texture by setting it directly. strip.texture = textures[n]; But, whilst the texture updates, it doesn't work properly - not updating for every value in the array, and only being correct on the first texture. Is it possible to create a Rope with animation? And, if so, how can you do it?
  6. Hi, I've read through quite a lot of posts about masking, and I'm still a little unclear. I have been able to successfully use a mask with either another Sprite or a Graphics. But, I read that masking using a Sprite won't work if webgl isn't available, and I am using PIXI legacy to cover that as a possible target platform limitation. So, the question is: is masking using Graphics universally supported? Thanks, Charlie
  7. Just in case anyone comes here for information - using sound sprites actually works much better for loops, probably for the reasons relayed in the above posts.
  8. Thanks @Exca that's really useful stuff.
  9. hmmm thanks, on testing m4a (I was using mp3 deliberately as I know it performs worse) that does work better, but it's not seemless and peformance between browsers is a bit variable too. I think what this means is I'll need to work on a different way of organising my sounds :S
  10. I was just working on a test, using PIXI sound with an MP3 loop. The issue is there's a small pause before the loop re-plays, meaning it doesn't really loop properly. The loop is currently repeated by calling a replay function in the onComplete parameter in the options, but I get the same result if I replace that with loop:true (I expect that under the hood it works the same way, but I didn't check yet.) This isn't exclusively a PIXI sound issue, I remember having the same problems with MP3s in Flash - so what I'm really interested in is ideas to work around the issue?
  11. I had a similar issue, I was (and am) using webpack - but I'm not sure I'm working in the same way as you (I'm not using require in my project) I hope this helps:
  12. Ok multi pointers as a feature it is then!
  13. Hi, I'm just working on a drag & drop demo, which is working prety well - but, when testing on a touch device, I realised I could drag & drop more than one item at a time. This may be a feature I want to keep, but, I wasn''t sure how I could remove it if I didn't. In Phaser, it's possible to set maxPointers, but in PIXI I'm not sure - I've had a look through the interaction manager docs, and didn't see anything I thought was similar... Is it possible to limit the number of pointers on a touch device? Or, any way to work round this? Thanks! Charlie
  14. Currently I'm using VSCode...
  15. Thanks @ivan.popelyshev I almost replied immediately, explaining that was exactly what I had been trying... Then when I reviewed the code, it transpired I need glasses (actually, I do), I'd made a typo in "event", so of course it didn't work...
  16. The title is a bt misleasing - it's trivial to use Graphics as a button, but, I'm having trouble with a particular setup. My button class is a PIXI.Container which has a PIXI.Graphic child. The interactivity and listener are attached to the Graphic (I do this so I can control the shape of the hit area, and use any Sprite I need.) Again this works fine, but when I capture the click I need to get a reference to the Container and this is the part that is proving difficult. When I look at the event target from the lick I get a refernce to the canvas - I can't see a way to get a reference to the Graphic or Container... Can anyone advise?
  17. Just as an update, if anyone else is interested. In ES6 you don't need prototype PIXI.Point.interpolate = function (a, b, f, out) { if (typeof out === "undefined") { out = new PIXI.Point(); } return out.set(a.x + (b.x - a.x) * f, a.y + (b.y - a.y) * f); }; PIXI.ObservablePoint.interpolate = function (a, b, f, out) { if (typeof out === "undefined") { out = new PIXI.ObservablePoint(); } return out.set(a.x + (b.x - a.x) * f, a.y + (b.y - a.y) * f); }; works fine for me.
  18. PIXI.Point doesn't have point.interpolate.
  19. Apologies for the basic question, i don't want to extend from a PIXI Class, in this case PIXI.Point, I want to add some functionality to the existing class (if possible) But, I've not got very far - can anyone give me a hint as to how to do it? Thanks
  20. Apologies for answering my own question - but just in case anyone comes across this issue. You do still need to import the pixi projection module - but you don't use it directly. I import like this: import * as PIXI from 'pixi.js'; import unused_pixi_projection from 'pixi-projection'; and then just use as per the examples this.sprt =new PIXI.projection.Sprite2d(PIXI.Texture.from('playBtn')); If there is a better/proper way to do this, I'd be happy to hear it!
  21. Hi @ivan.popelyshev, apologies for resurrecting this post. I noticed that npm had been updated and thought I'd get back on this... but, I'm still not having any luck at getting it working. If I try import {PIXI_projection} from 'pixi-projection'; and try this: console.log(PIXI_projection) // returns undefined I get nothing, similarly any reference to Sprite2D etc. just generates an error. I can see the code is there in the node modules, so it must be a referencing error... (Also, as a further sanity check, is PIXI.projection compatible with pixi.js-legacy?)
  22. I was just trying some experiments with PIXI Projection, but am not able to get it working... I think it could be to do with the imports, I know I had to do something a little different than I expected with PIXI.Sound Can anyone give me any pointers? (trying this as an import: import * as Projection from 'pixi-projection' gives this error: TypeError: PIXI.BatchShaderGenerator is not a constructor ) Thanks!
  23. This does look good, and I completely agree with your assessment of the tech. I didn't get 60fps I got more like 44, but I'm on a lower spec machine. I think 'your problem' is that the patterns are solids, which makes the scene really complex, rather than a texture applied to the base plane. I'm not certain with Three about applying textures to your curved edges (I expect you can do it, I'm a little rusty with it.)