whizzkid

Members
  • Content Count

    17
  • Joined

  • Last visited

About whizzkid

  • Rank
    Member

Contact Methods

  • Twitter
    whizzkid74
  1. whizzkid

    Newbie

    Yeah, firstly, don't type in all caps. You can get the most out of PIXI by doing lots of cool stuff with it and get to know the engine! got a game idea? make it. if you run into trouble about specific stuff.. come back here :-)
  2. The 4.x pixi definitions are in the 4.x branch https://github.com/pixijs/pixi-typescript/tree/v4.x
  3. Cool, that works. Too bad its an extra step though.. thanks.
  4. I'm upgrading an existing project from pixi 2 to pixi 3. In pixi 2 I could load an assets several times and it would automatically: load it the 1st time but use the cached version on subsequent loads. (and simulated a load complete as well, so everything works nicely) this was very handy. Now with Pixi 3, a second load of the same asset triggers an error : Resource with name bla.png already exists. So now I need to fix ALL my loads to check if an asset has already been loaded or not (while the loader itself also does this, but only throws an error) I know in the examples you only load something once, so its an issue you don't really encounter. and I'm hoping this is just a little missed feature or something. or was this change in behaviour on purpose? (i.e. having the programmer implement lots of extra checks which were previously done by the loader)
  5. Just tested with 50k bunnies on desktop, then the performance increase is what you'd expect. 45 for pixi 2 60 for pixi 3 with Particle container 53 for pixi 3 with DisplayObjectContainer so it seems that for mobile webgl.. something isn't running as fast as the pixi2 version
  6. I'll try. I forgot to mention that I noticed the performance hit on an iPad air. FPS on Ipad Air with 15k bunnies 29 fps Pixi2 using DisplayObjectContainer : http://jsfiddle.net/whizzkid74/3205m4mr/ 26 fps Pixi3 using DisplayObjectContainer: http://jsfiddle.net/whizzkid74/qgj5qq46/ 57 fps Pixi3 using ParticleContainer: http://jsfiddle.net/whizzkid74/3205m4mr/
  7. Performance in Pixi3 using a particleContainer is blazingly fast, however, performance of bunnymark using a normal DisplayObjectContainer (useful if you have particles that also do stuff like Tint) is worse than in pixi2.. thats a shame :\
  8. No you can't. Pixi throws an error as soon as you have a mesh in your animation. It only has code to support the basic 'region' type
  9. I created hitareas in another way (draw poly's using exported data from flash), but it turns out that its a lot slower than checking pixels. I've got 45 hitArea polygons on screen, which highlight the roads on mouseover's, but its responding slower than doing the pixel check.
  10. I'd still like to know if the method I'm using of getting pixels from a webgl-rendered sprite is correct, or if there's a better way ? thanks!
  11. Ah, I thought you could only use a Rectangle there.. That's good to know. unfortunately the roads (about 45 of em in total) are detailed enough to be a pain to convert to polygons by hand.. I'll try to see if I can get the html-output of flash (xml or easelJS) converted to pixi polygons..
  12. That works if you have a prerendered image, which I don't my question was about how to get pixels for something I rendered in pixi in webGL (or rather, if the method I used is the way to go for this, or if there's a better way)
  13. Hi people, I'm porting something from flash where I have a drawn map with roads, and I want to be able to select each road individually with the mouse. now in Flash I could simply use the hittest on the shapes of the roads, but in PIXI I can't. My solution was to draw all the roads, each with an unique RGB color, and do a get pixel on your mousecoords to see which road you've selected. Now my problem is, how do i get pixeldata from my sprite when I'm using a webgl renderer ? What I've come up with so far is creating a separate canvasrenderer and a separate stage to render my map to, and from that canvas (renderer.view) get the 2d context and get pixeldata.. // create separate canvas and canvasRenderer for this pixel mapvar canvasStage = new PIXI.Stage(0x000000);var canvasRenderer = new PIXI.CanvasRenderer(1024, 598, null, true);// create a texture that holds the mapvar texture = new PIXI.RenderTexture(1024, 598, this.canvasRenderer);texture.render(map);// create a sprite on our separate stage, otherwise the texture won't be renderedvar textureSprite = new PIXI.Sprite(texture);canvasStage.addChild(textureSprite);// render the stagecanvasRenderer.render(canvasStage);after that is done, I can use this to get my pixels var pixelData = canvasRenderer.view.getContext(("2d")).getImageData(posX, posY, 1, 1).data;Is this the correct way to do it? or is there a better way? regards, Martijn
  14. Any info/developments on this yet? This seems to me to be a key feature which is missing in PIXI.. would be very useful to be able to add an ID to loaded spritesheets or something.. especially if you have several skins in separate atlases for the same character.
  15. Hm indeed it works. I see now that the text I pasted here, copied back again has a different character in place than the one I copied from my datafile (which contains the texts) So my own example works for me now, once I copied it back from this webpage how nice. Ok, so something is wonky in my data and pixi can display the characters correctly, thats good to know. I should be able to fix that when I get the actual text from our database instead of an export file (which I'm using right now) thanks!