How to make mouse events being handled by a html page underneath PlayCanvas?

In my situation PlayCanvas is a layer above a standard html page. When the game is not started yet, all mouse events should go to this standard html layer. And when the game starts, PlayCanvas should be able to process the mouse events. How can I do that?

When I do not create a mouse object like this:

canvas = document.getElementById('screen-canvas');
screenCanvasApp = new pc.Application(canvas, {
    //mouse: new pc.Mouse(canvas),
    touch: new pc.TouchDevice(canvas),
    keyboard: new pc.Keyboard(window),
    graphicsDeviceOptions: { alpha: true },
});

the mouse events still are not processed by the underlaying html page.

Sorry, I didn’t realize I asked this a while ago before. But the solution given did not work for me and I worked on other parts of the project after that. Now I’m back to this problem, I remembered to late I asked it before.
So I will continue that posting:

(I tried to delete this post, but that didn’t work)

1 Like