Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What defines the public API? #24

Closed
sourcenouveau opened this issue Aug 19, 2014 · 2 comments
Closed

What defines the public API? #24

sourcenouveau opened this issue Aug 19, 2014 · 2 comments

Comments

@sourcenouveau
Copy link
Contributor

I am new to Javascript APIs and I'm having trouble distinguishing the engine's public API from its private code.

There seems to be quite a lot of undocumented functionality in the engine which does not show up under the API Reference (such as pc.scene.RENDERSTYLE_WIREFRAME). I've been browsing the source code, but then I encounter areas like src/core which seem to be internal code.

This makes it difficult to tell what I am or am not supposed to call in client code.

Is there any way we can make this clearer? If the API Reference is indeed the canonical definition of the public API, are there any guidelines I can follow to determine whether to submit a patch for missing documentation?

@daredevildave
Copy link
Contributor

Generally speaking anything included in the API reference is the public API. The API docs are automatically generated from the stable branch, so should always match the current latest engine.

Regarding internal code:

Private methods/vars should be be prefixed by _
Work-in-progress functionality may be included, but should not be documented.
Released code should always be documented and included in the API reference.

I'm working on a CONTRIB file which will include details of how to submit patches and I'll include a coding standards section in that too.

@daredevildave
Copy link
Contributor

Added a contributor file.

Anything else we can add to help here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants