aseptik Posted November 11, 2015 Share Posted November 11, 2015 Hi there, I am trying to get a click through a transparent pixi stage, on a dom element that sit behind the pixi stage.Am i missing some parameters, or this is not possible ?the stage is interactive. that means that i have clickable elements in pixi as well, and stage have to be interactive. Quote Link to comment Share on other sites More sharing options...
xerver Posted November 11, 2015 Share Posted November 11, 2015 Not possible, forget about pixi. You are clicking a DOM element (canvas) in front of your underlying element, the event wont reach it. Same as if you has a link, and put a transparent div atop it. You can no longer click the link. Quote Link to comment Share on other sites More sharing options...
aseptik Posted November 20, 2015 Author Share Posted November 20, 2015 ah cool thanks. I managed to invert things. so now i have the dom element on the top of pixi. I need to let the click through the dom element. s there any method i can call on pixi ?I tried to detect the element, via document.elementFromPoint, then doing element.click() but it doesn't look pixi get it.Any idea? thanks Quote Link to comment Share on other sites More sharing options...
xerver Posted November 20, 2015 Share Posted November 20, 2015 Not right now, we are expecting to allow users to input events into the interaction system in v4 of pixi. Right now we listen for events ourselves on canvas, the only way to input events into the system manually is to dispatchEvent directly on the canvas element. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted November 21, 2015 Share Posted November 21, 2015 You can use pointer events in evergreen browsers to allow 'click-through' transparent divs. Its not going to help you with the interactive stage thing though, its an all-or-nothing at the DOM element level. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.