Jump to content

Keyboard and iframes


highvrahos
 Share

Recommended Posts

Hello,

 

We are building a web app around a canvas element rendering BabylonJS/Webgl. All the interface is being handled with jQuery.

 

When we load an iframe for a custom menu upon the canvas and close it with jQuery, keyboard events are lost. The camera stops working using keyboard arrows, mouse controls continue to work normally.

 

We tried returning focus to html,body,window,canvas with no success. Any points?

 

Thank you in advance,

Leonidas

Link to comment
Share on other sites

Is it just the camera or is it all keyboard controls are no longer accessible in the canvas?

I've created a few things using babylonjs and iframes interacting with each other (don't use iframes any more tho).

Without seeing the code itself (and assuming the keyboard controls don't work while accessing/focusing the iframe) you could create keyboard functions within the iframe itself that target and interact with the babylonjs code (and vice versa), might not be the best solution for what you need but will definitely work. You could also utilise it to create macros that you can access via the iframe (ie rotate and face the front of the object in one click).

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...