thothbot / parallax

Cross-platform Java 3D SDK
http://thothbot.github.io
MIT License
84 stars 26 forks source link

API Suggestions #62

Closed ghost closed 8 years ago

ghost commented 8 years ago

These are just suggestions to consider.

1) I know WebGL specification uses float but In Java defining a floating variable requires an extra "f", such as

float a=1.4f;

Moving floats to doubles may be considered. Outcome wont change. For example,

public void glUniform2f(int location, float x, float y);

to

public void glUniform2f(int location, double x, double y);

you may recast doubles to floats inside the method if needed.

2) The main class of the API is named "App". It may be vague. You may merge App and RenderingContext, and use RenderingContext as the main class. The exit may be renamed to "dispose".

3) Instead of ApplicationType enum, make getType method to return a String. It may be more portable for others to adapt the API for their own platform.

ghost commented 8 years ago

Update to item 2;

or you may rename the "App" to "Platform" and access it from the RenderingContext using a getPlatform() method.

ghost commented 8 years ago

It is pretty close to release. I think these suggestions are irrelevant at the stage.