Itch.io puts my game in an iFrame. This means that event listeners don't work unless the iFrame has been clicked on (so no keyboard input). But clicking on the WebGL area within the iFrame doesn't focus the iFrame! If I make the iFrame larger than the rendering area, then click on the border(area between WebGL rendering area and iFrame edge), then my iFrame is focused, and keyboard input works again. But I can't ask players to click on the border before playing! It should be that the player lands on my page, clicks on the WebGL rendering area, and starts playing. And since this is on itch.io, I can't change the .html of the parent window (the one that contains my iFrame). I'm using hexi, so I'm using pixi v3.
↧