Jump to content

Borgel

Members
  • Content Count

    10
  • Joined

  • Last visited

  • Days Won

    1
  1. For anyone looking at similar problems in the future: I have resolved the performance issues I was having, but I have already moved away from having interactive tiles, opting instead to calculate the tile hit by a click event. While the interaction manager did cause a performance issue, it was not the main issue I had. And to be fair I had more buttons in the scene then was reasonable. The main issue I was having was a lack of understanding of how The PIXI.Graphics class works. I was working under the false impression that 1 shape should be 1 graphics object. I thought this would
  2. Ill add a issue for it. I created a fiddle for the issue as well: https://jsfiddle.net/ngutc5ob/ The blue arrow point to the graphics object that the texture is rendered to. The black arrows point to the artifacts crated on the original texture. Not running beginTextureFill will leave the texture corrupted.
  3. Temporarily im forcing the drawcall back to clamp by intercepting 'packAttributes', as its the next function to be called after that. Super hacky, ill see about a better solution later. But what about the texture getting corrupted? I can understand that the graphics object might want to tile its texture, but that should not alter the supplied texture. Surly this is a bug?
  4. I have found at least where the issue is introduced, but now yet why the texture becomes corrupted. GraphicsGeometry - buildDrawCalls - line 728: nextTexture.wrapMode = 10497; (repeat) When changing this to mirror or clamp at runtime the texture corruption does not happen.
  5. I tracked down the issue to a specific event. This line: m_graphics.beginTextureFill( { texture: t_texture, matrix: new PIXI.Matrix().translate( -m_radius, -m_height / 2 ) } ); For some reason this corrupts the texture producing the effect. This feels like a bug to me, but i have not had time to investigate it yet. Ill look further into it later. Note that the effect appears both in the graphics shape and the sprite created with the texture, so it is the texture that is changed.
  6. Perhaps its not a wrapping issue? Sprite, not tilingSprite. var brt = new PIXI.BaseRenderTexture( 128, 128, PIXI.SCALE_MODES.LINEAR, 1 ); var rt = new PIXI.RenderTexture( brt ); var sprite = new PIXI.Sprite( rt ); rt.baseTexture.wrapMode = PIXI.WRAP_MODES.CLAMP; renderer.wrapMode = PIXI.WRAP_MODES.CLAMP; containerOne.addChild( sprite ); renderer.render( containerTwo, rt, true, new PIXI.Matrix().translate( x, y ) );
  7. Setting the RenderTexture.baseTexture.wrapMode = PIXI.WRAP_MODES.CLAMP did not work. I stepped through the render code and in TextureSystem.updateTextureStyle the warapMode is set to clamp (33071) Im working in V5.2.1. Im not very familiar with the pixi codebase, so im not sure what im looking for. Do you have a rough idea of where you would want me to start debugging?
  8. I am rendering a container to a texture. Following this tutorial: http://scottmcdonnell.github.io/pixi-examples/index.html?s=basics&f=render-texture.js&title=Render Texture From what i can tell my code is identical, but i get a border spill artifact where the edge pixels on one side spills over to the other. What could be causing this? The texture size is pow2 and i have tried setting different WRAP_MODES.
  9. Im not sure i understand. I did add a PIXI.Circle to my containers hitArea. Is this not enough? Because when i test it does seam to work. I added a counter to the containsPoint function on my PIXI.Graphics and i logged ~16 total checks per 3 minutes while hovering over a tile, ie no extra checks. I also checked unique calls to containsPoint and i got a one to one hit for what i was hovering over. @Antriel I am looking at a math based solution, but i wanted to understand what i was doing wrong.
  10. Im working with PixiJS 5.2.1 - WebGL 2 creating a hexgrid tile editor. The grid is composed of smaller segments of 'hexagon shaped' grids of hexagons. Essentially, my current testing environment is made up of 36 individual hexagon grids that make up the larger grid. Each sub grid is composed of ~200 hexagons. Each hexagon is a interactive button. Here i ran into some performance issues, when moving the mouse over the grid. When im not interacting with the scene, i have a stable 60 fps, but i dip down to ~20 fps when i move the mouse. I have taken steps to improve the hit de
×
×
  • Create New...