How would I even start to create a GUI in Babylon JS with an animating gradient border

Hi,
I have recently started programming in BabylonJS and am stuck trying to figure out how to create a GUI component that has a gradient, animating border as seen in the image below:

If anyone could help point me in the right direction or has suggestions, please let me know.

Regards,
Taha

Hi. Highlight a Mesh - Babylon.js Documentation

hey, thanks for the reply. however, I am not looking to highlight a mesh. I want to create a custom border around my UI and then apply a gradient color to the border that animates.

If you want do it for 2d gui you can draw, drive and animate all what you need on dynamic texture and add this texture to your gui element as regular texture Use Dynamic Texture - Babylon.js Documentation
Sorry. its wrong way but maybe some clarify how read pixels from dynamic texture and use with gui. or maybe you can try use raw canvas as gui image. And you always can use animation sheet https://www.babylonjs-playground.com/#K60448#10
Use the Babylon GUI - Babylon.js Documentation

1 Like