enricosapicco Posted July 2, 2021 Share Posted July 2, 2021 I am working on an advert game and at the end of the game I need to rout the player to the website of the company that gives the ad. Since I've never done such a thing, I have no idea how to do it. I want to cover the viewport with an image at the end of the game and when user clicks on it, I want to open the web page on the next tab. Any ideas? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 2, 2021 Share Posted July 2, 2021 what if you put whole canvas in <a> but call preventDefault in all canvas events (pixi interaction la-la-la, read the examples, read the source code), except when its really time to open that new tab Quote Link to comment Share on other sites More sharing options...
enricosapicco Posted July 2, 2021 Author Share Posted July 2, 2021 I got it. On click event, I run window.open(link, "__blank") ivan.popelyshev 1 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.