• Content count

  • Joined

  • Last visited

  1. Pixi and Hammer.js integration

    Hello guys, please, does anybody have working example of Pixi and Hammer.js (gestures) integration? I was not able to find anything useful neither here in the forum, nor using google...thanks in advance...
  2. Found it by myself - so in case anyone will find it handy, you have to use also - along with autoPreventDefault = false:['touch-action'] = 'auto'; or any other value according to CSS touch-action to overwrite the default value 'none'
  3. Is there any possibility, how to achieve scrolling or zooming of whole HTML body by making a swipe on canvas on Android (Chrome)? The only thing I was able to find when searching over internet and Pixi docs is using a property "autoPreventDefault()". But even when I set it to false, it does not work. What Am I missing here? Is there any simple code example of autoPreventDefault? When you try to zoom-in the page outside the canvas and then move over it (canvas fill whole view port) - you are now in a trap, because there is no way how to move the canvas or zoom-out back. example: var renderer = autoDetectRenderer(800, 500,{antialias: true, transparent: false, resolution: 1}); renderer.plugins.interaction.autoPreventDefault = false; = "1px dashed black"; renderer.backgroundColor = 0xDDDDDD; renderer.autoResize = true; document.body.appendChild(renderer.view); renderer.render(stage);
  4. interactive/clickable line

    Hello Ivan, haah, ok, I'll try to implement rectangles instead of lines then. Thanks for your quick answer anyway.
  5. interactive/clickable line

    Hello, Pixi.js experienced developers! I'm flash developer and I'm here to kindly ask for your help. I'm trying to port my complex project from flash to JS using Pixi, but stacked now... I have a problem shown on image in attachment: i am playing with a few circle points, which you can move around using drag and drop (mouse), they are connected with lines, which are dynamically redrawn as you move the points around. Everything on the stage is created using PIXI.Graphics class. So far easy. But I need to make not only blue points but also the lines mouse interactive. Is there any trick or workaround, how to force a Line shape created using Graphics class to fire mouse events (mouseOver/Click)? It was enough in old flash to put the Line shape into MovieClip or Sprite and then assign event to that movieClip/sprite, but here - this trick does not work at all - still no mouse events fired. Setting a rectangle hitarea for the line segment works, but is not usefull, as the position, angle and also a width of the line segments are changed dynamically at runtime. Searching in this forum brings no answers to me, so trying it this way... thanks.