Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


charlie_says last won the day on April 26

charlie_says had the most liked content!

About charlie_says

  • Rank
    Advanced Member
  • Birthday 12/12/1972

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location

Recent Profile Visitors

3095 profile views
  1. Apologies for the rather basic nature of the question - I thought this would be easy ish to do, but I've not found any answers, and not had any success in my tests. What I would like to do is create a new PIXI.Texture from an existing texture. More specifically - I have a texture 100x20px, and I want to make a new texture 500x20px by laying the original texture side by side. Is there a way of doing this?
  2. Thanks @rich_earth I'll take a look at that, although, in the end I took a slightly different direction (I implemented a version of Potrace which I then use to trace the Bitmap and export the SVG shape.)
  3. Updated the project to particle container, large test works at 30fps smaller one works at 60fps - both perfectly acceptable for what I'm doing. Thanks!
  4. I thought about this a little, and realised there were some set up issues (mainly that my sprite was in a container for historic reasons) once I started working with the sprite directly I was able to achieve about a 3x performance improvement on both tests. My project isn't performance driven, so, if it works at 15fps it's ok, it just makes the controls a little unresponsive, but anything lower and they're not really useable. I still don't really understand why when I'm only updating 100 of the sprites I get such different speeds between the 2 tests. Any performance tips would s
  5. I've got a really odd problem with performance, which is not something I've had with PIXI before... And it appears to be to do with rendering. What I have is 15000 sprites, which are initially pixel sized, from that100 of these are updated every frame (so that could be size, position, tint), doing this gets me about 7fps. If I do a smaller test say 2000 sprites I'll get 30fps, but I'm still only updating 100 of them per frame - so, it seems to me to be the renderer (also, just creating the image, and not doing anything on the update performs the same way.) So, the question is: what c
  6. I've been working on some bezier controllers for my current project, and it is a bit of a minefield. The problem is you can get the x & y values from the value f (f is in the range 0,1) which represents how far it is along the curve, but, what is difficult and/or impossible depending on the complexity of your bezier is how to calculate the y value from the x. My curves are simple so I just did a brute force solution, but, for complex beziers there's more than one solution for a given x value.
  7. As per my other topic about loading blob data - I wasn't able to get this to wotk. In the end I loaded the SVG with a fetch which lets me keep my data and create the texture for a sprite.
  8. Despite a bit of experimenting I couldn't get this to work. In the end my solution was to not use the PIXI loader, and just use a fetch() to get my SVG - I can then keep the original data and create a texture from it.
  9. Thanks @ivan.popelyshev I'd actually gone with this this._texture.on('update', () => { if (this._texture.valid) { this.contOpen()} }); which I think is more or less the same as yours. The only thing to note is that with mine this.contOpen() gets called twice. I'm going to try your Promise example in the morning.
  10. Actually, I made a little progress on this, with setting the xhrType property on the loader object - but, it still converts the SVG to an image... so it's not really imported just as data,.
  11. Apologies this question feels a little basic: I'm creating a Texture from data, which works fine - but there's a delay in the texture being ready. I've worked around this for now by using a timeout, Is there a way to use Promises to capture this (I've looked at some examples but it wasn't clear how.) Thanks, Charlie
  12. Further from my query about working with SVG, I'd like to load the image just as data, then I can work around this - whilst I can do this by renaming myFile.svg to myFile.txt it would suite me better to use the original file. I thought you could specify an XHR type in the loader, but this doesn't seem to work for me now (I'm sure I've used it in the past.) Is there a way to load a file as data or a blob?
  13. I had a quick look, and didn't see anything that would allow loading from text - can you point me to a line? I did find: (this as any).svg = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`; which would seem likely to overwrite any path data...
  • Create New...