highvrahos Posted March 7, 2015 Share Posted March 7, 2015 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 Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 7, 2015 Share Posted March 7, 2015 Just a thought, have you tried attaching the camera to the canvas again? Quote Link to comment Share on other sites More sharing options...
spritefire Posted March 7, 2015 Share Posted March 7, 2015 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.