• Content Count

  • Joined

  • Last visited

  1. I would like to bump this thread, as I am having the same question!
  2. I would code it as follows: var rightDown = false; // Left button down app.stage.on("mousedown", function() { if (rightDown){ // both buttons are down // only need this functionality of course on one button } }); // Right button down app.stage.on("rightdown", function() { rightDown = true; }); // Right button up app.stage.on("rightup", function() { rightDown = false; });
  3. Yup that's exactly right. My Container is larger than the canvas size in the DOM, and potentionally also larger than the maximal canvas size of all major browsers. I was mostly wondering whether another approach would be better. Like, can I circumvent using the canvas, which is the limiting factor here, at all? However, I decided that this approach is probably the easiest after all. (filling containers and rendering them on the fly while exporting)
  4. This seems like the perfect job for a fragment shader. While I do not have the time right now to write it for you, I am sure someone here can help you out.
  5. This looks extremely cool, and appears to run on IE11 just fine. The latter makes this website a lot more useful than jsfiddle Thanks a lot, I will make sure to sure this for bug reports on github and or sharing implementation details!
  6. Hi Guys, I am working on a large scale interactive data visualization dashboard using the latest version of Pixi. For this project I am aiming to support IE11, and the latest versions of the popular browsers. As of now I am stuck on extracting/exporting the bar chart, which can easily contain a thousand rows (and uses a self made scrollbar). A bar chart basically is a container and a row in the chart is a sprite with a height of 30px. I tried the following approach: However, I am limited by the maximum size of the canvas. (see here: https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element). For now I am considering building new containers (< max height of the canvas) and filling them with row sprites. However, I would prefer to export the chart as a single file. Does anyone have ideas as to how they would approach this? Thanks a lot! Wilco
  7. This works, but crashes on larger Containers. (Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.) I will try to use a webworker and report back later. Any other advice is welcome, of course!
  8. Which advice would you offer if I were to need textures of a different color? Right now I am generating a texture for each color. Edit: Aha that's what the tints are for. For anyone interested, this was my code for doing so before: generateColoredTexture: function(hexColor) { let painter = new PIXI.Graphics(true); painter.beginFill(hexColor); painter.drawRect(0, 0, 2, 2); //(0, 0, 1, 1); does not work painter.endFill(); let texture = painter.generateCanvasTexture(); painter.destroy(); return texture; },
  9. This worked great. However, in order to preserve interactivity of sprites within the masked container, I had to change your code snippet to the following: // MASK (clip things outside the background border) var px_mask_outter_bounds = new PIXI.Graphics(); px_mask_outter_bounds.beginFill(0xFFFFFF); px_mask_outter_bounds.drawRect(0, 0, worldWidth, worldHeight); // In this case it is 8000x8000 px_mask_outter_bounds.endFill(); app.stage.addChild(px_mask_outter_bounds); app.stage.mask = px_mask_outter_bounds;