Hi, I’m an experienced Java and OSS developer, but I’m just getting my feet wet with game code and being OSS Java, JME seems right up my alley. I’m still in the beginning/tutorial stages, but I have noted one spot so far where I would request/recommend an addition to make the API friendlier, namely DirectionalLight
currently offers only a default constructor and defaults its sole property, direction
, so if one wants to create a DirectionalLight
using a different direction it is necessary to use:
DirectionalLight directionalLight = new DirectionalLight();
directionalLight.setDirection(new Vector3f(-0.1f, -0.7f, -1f));
It would seem a comfortable enhancement to add:
public DirectionalLight(Vector3f direction) {
setDirection(direction);
}
public DirectionalLight() {
this(new Vector3f(0f, -1f, 0f));
}
Existing code should keep working as always, while new code can declare the DirectionalLight
inline:
new DirectionalLight(new Vector3f(-0.1f, -0.7f, -1f))
Per the contributing instructions I am raising the matter for discussion before I submit any pull requests, but I’d like for this thread to serve as an example, proactively covering any similar, non-invasive suggestions I may make.
Thanks,
Matt