API Documentation

Hi Guys/Gals,
This must have been asked before but I could not locate searching …
Is there a listing of the API so one can click on an object or “class” and find a list of all the methods, properties?

something similar to this

Do you mean something like this?


No. I mean something like the API documentation in the link I put in my question…

Not sure what you mean. Describe it better. As far as I can tell, what you’ve already described already exists at https://threejs.org/docs, but if it doesn’t then we’re not sure what you’re describing.

The documentation at EaselJS is systematic and complete - I’m not sure if that’s the case for threejs ?
However the link you provide is a lot better than the one I was using. This latter, that was in the main distribution folder, looked very similar but was far more incomplete/buggy - for example clicking on the Object3D link didn’t do anything!

I’m still finding it tricky - particularly in the area of memory management. How do I find a description of dispose() for example? It would be good to have a full example of how to clean up different types of entity.

I agree, that could be better! It would be nice of you to open a feature request with what stuff from docs is missing that you’d like (on GitHub), like this memory stuff.

In general though, you can re-use a single geometry and material (for example) across many meshes, and you’d want to clean up the geometry and material once there are no meshes using it and if they will not be used again (or maybe after a timeout).

Some things, like geometries and materials, get sent to the GPU, so losing a reference to them in JavaScript is not enough to clean them up. They need to be explicitly removed from the GPU when they are not needed any more.

A “How to completely clean up a Three.js scene from the a web app once the scene is no longer needed” guide would be nice for sure. :+1:

This has been discussed before in an issue on github not long ago. What you want is effectively generated documentation that is based on the source code. I’ve made such a suggestion before and it got dismissed because it was “too much work”.

Also, the way threejs is written isn’t exactly ‘friendly’ to API doc generator tools. Not to speak that there isn’t a single properly written jsdoc in the source code. I think this will never happen, unfortunately.

I’ve done that. But I’m afraid I just couldn’t find the label for feature request! Where the @@!@ is it guys?

It would be made on GitHub, not here, and you wouldn’t be able to label it. You can just put something like [feature request] in the title or similar.