Kreeba Posted July 31, 2017 Share Posted July 31, 2017 Hi. Is there a guide/tutorial/best-practice on using HTML DOM controls as a GUI overlayed ontop of Babylon? I tried experimenting with it before. I found using jquery quite easy to work with Babylon, however when I had the overlay enabled (the div containing the GUI elements set to show()) no touch events triggered within Babylon, either my own coded ones or the ones attached to the ArcCamera. Whats the best way to set this up? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 31, 2017 Share Posted July 31, 2017 Hey, this is kind of tricky as you will need to have your DOM elements not covering the rendering surface (in order to let events reach the canvas) You may end up using pointer events: https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events Quote Link to comment Share on other sites More sharing options...
Kreeba Posted August 1, 2017 Author Share Posted August 1, 2017 Thanks Deltakosh, I will wait a little and use the Babylon.GUI extension Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 1, 2017 Share Posted August 1, 2017 5 hours ago, Kreeba said: I will wait a little and use the Babylon.GUI extension It is currently usable and available. What do you expect ? Quote Link to comment Share on other sites More sharing options...
Kreeba Posted August 1, 2017 Author Share Posted August 1, 2017 Hi Dad72, I am using TypeScript and NPM. There is an issue with BabylonJS.GUI as an extension. I am not too versed in the technicalities of how TypeScript and NPM interact, but I am keenly following this issue: https://github.com/BabylonJS/Babylon.js/issues/2569 Can you offer any guidance on using Babylon.GUI with TypeScript by referencing a CDN? I have tried every combination I can think of and I can't get it to work. I am using SystemJS as my module loader. Kind Regards 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.