Sign in to follow this  
tomer

[babylonjs gui] feature suggestion - different border radius for different corners

Recommended Posts

Hello,

What do you guys think about adding the option for setting a different border-radius (corner radius) for each corner?

Furthermore, I think that it might be better to try and follow as much as possible the CSS specification, for example - instead of calling the 'cornerRadius" property it should have been called "borderRadius", obviously I don't think you can implement all the CSS specification, I just think that when we do implement a feature the API should be based upon CSS.

 

Share this post


Link to post
Share on other sites

Hey,

nine patch images are great but won't do the trick for me, I need some sort of control over the border-radius, sometimes I need it on the left sometimes I need it on the right and sometimes I don't need it at all.

About renaming public properties I don't think you should change the name right now, but if you think that following the CSS spec is a good idea there are a few things you can do:

- rename cornerRadius to borderRadius, and add cornerRadius as an alias for borderRadius.

- mark "cornerRadius" as deprecated for the upcoming releases and when enough time has passed delete it.

- enforce that new features will be based upon CSS spec.

I also think that you should follow "semver" it can be useful when you want to break the API. (and maybe create a deprecation manifest, for example, we promise that the API won't break for at least 3 versions, so if something like this happens you can mark it as deprecated and remove it "safely" after 3 versions)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.