Is it possible to rotate a mesh by clicking a buttons placed in different html page from where the canvas is located?

I’m facing a problem for quite while, I have some mesh loaded in a page and I set a button to rotate the mesh, the buttons work well while inside the html where the canvas are located, but when I remove the buttons from the html page where the canvas live and place it in other html page it stop work and I get an erros in my console: Uncaught TypeError: Cannot read properties of undefined (reading ‘trackUbosInFrame’)
at new e (uniformBuffer.ts:256:36)
at t.createSceneUniformBuffer (scene.ts:2395:26)
at Ar.createSceneUniformBuffer (engine.multiview.ts:203:12)
at t._createUbo (scene.ts:1923:41)
at new t (scene.ts:1680:14)
at HTMLDocument. (game_admin.js?v=:12:17)
Anyone have any idea on how to avercame this problem?

I believe the first thing is to check why you get undefined variable.

Thanks labris
I’m trying to find it out. The variable is defined for sure, and works well when the html buttons are inside the template where the canvas lives.
It only shows the undefined variable error when I move the html buttons out from the template where the canvas is being rendered to any other html template in my project

As I see currently your “html buttons” work well in the scope of “canvas template” but fail outside this scope.
I believe you need to pass some variables to “other templates” (or use global ones).

Separate HTML page meaning your canvas is in an iframe? I suspect you are going to have to use postMessage to control the scene running in an iframe. What are you trying to achieve by having your canvas in an iframe?

closing this as a duplicate of Scene/canvas loaded in a Djando app template and buttons loaded in a second Django app template in same Django project, how to connect it? - #4 by sebavan Please @lucio_amaral do not multiply the threads for the same subjects as it is harder to follow. I ll reopen if I am mistaken but at a quick glance it looks like the same issue.