One canvas controlled by another canvas

I’m just wondering if it’s possible to control one canvas by another one.

For example, there are two canvases and one is only for display scene and the other one is to control it.

Let’s name the canvas for scene as ‘Scene Canvas’ and the other as ‘Control Canvas’.

If someone does any action on the control canvas( drag or multi touch like zoom in and out), then scene canvas response to the action.

I’ve tried to find any example or api references, but no luck so far.

Can you guys give me any hint??

Are the canvas’ on the same web page or are they iframed?

They are on a different browser window…or they might be on different machine.

If they are going to be on different machines, you will need to use a third party networking service or library to hook them together.

We don’t have an example/documents for this as it’s third party API/libraries but something like a peer 2 peer WebRTC connection could work well for this: WebRTC data channels - Game development | MDN

Here’s a library that could help you get started too: https://peerjs.com/ and Beginner's Tutorial to WebRTC using PeerJS | Toptal