Vorion Posted January 18, 2018 Share Posted January 18, 2018 Hi, is it possible to use Babylon Animations for GUI Controls? For example, I would need to animate the alpha value of a textblock, or move a container out of the display, while fading out. And another question: Will you add more controls to the gui, like a progressbar (maybe with the ability to set an image as the bar, and a background image), or a container with tabs that you can switch? A grid container might also be useful. Thank you Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 18, 2018 Share Posted January 18, 2018 51 minutes ago, Vorion said: For example, I would need to animate the alpha value of a textblock https://www.babylonjs-playground.com/#XCPP9Y#414 The grid container you can already make with stack panels. I was asking also about more controls in this thread - you can find progress bars in the Playground:http://www.html5gamedevs.com/topic/34274-more-gui-controls-ie-menu/ Vorion 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 18, 2018 Share Posted January 18, 2018 Regarding new controls: please create issues on the repo to track them Quote Link to comment Share on other sites More sharing options...
Vorion Posted January 18, 2018 Author Share Posted January 18, 2018 Thanks, this does work, but what got me asking this question was IntelliJ (or Typescript Compiler) warning me, that Property 'animations' does not exist on type 'Control', so I haven't tried it until now. Is there a solution for this in typescript without using the any type for control elements, but a proper type? And I will have a look at your link, maybe I don't even need any more new control, otherwise I will create a github issue EDIT: Maybe my setup is wrong, because the playground does suggest animations as a property for a Gui.Control element. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 19, 2018 Share Posted January 19, 2018 You can do control['animations'] to get to property hopefully or cast to <any>. I don't think Control does have an animations property, so warning looks correct. It's used by BabylonJS to do the animation - it's a dynamic language trying to be typed. Vorion 1 Quote Link to comment Share on other sites More sharing options...
Vorion Posted February 3, 2018 Author Share Posted February 3, 2018 Thanks, I guess I will be using the cast to any then. 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.