Suggestion to the predefined materials and shaders

Yes, he is an elder with IntelliJ IDEA he must know what he does.

@nehon are you going to add the Materials class or you are waiting for someone to make a pull request?

I can’t do it until tonight. France time.
If you feel like doing it. Go ahead

Alright then I will do it now.

1 Like

@nehon I have created the pull request

Btw, what’s wrong with putting it into the Material class?

Having an additional one named Materials just for constants makes it so much more confusing and less likely to be found and used by anyone except whoever saw this thread.


Well, that’s standard java convention to differentiate the utility class from the instantiable class.
I don’t have a strong opinion on this, it’s just how it’s done in the jdk

Material is independent from these constants. It does not make sense to promote them to Material-specific by putting them right in the class. A separate class is ok… it keeps the separation explicit. Some day maybe there are other utility methods, etc. on the Materials class and it will make even more sense then.

In reality, these are material definitions anyway and neither is truly “right”.

Edit: but if you imagine that someday the Materials class is a collection of constants and utility methods for messing with standard JME materials then it makes more sense. Like Collection is the thing and Collections is the utilities for operating on the thing.