Improving API Browsing

Recommended Posts

I'm new to BJS, so I'm using the docs to learn. I've noticed some typos, so I forked the docs github and pushed fixes. Nice and simple.

However, when using the API to find more info about classes or methods, it's a pain to scroll through and seek the right one. Even with a page-search (ctrl+f) there's multiple partial results.

So, I wondered if I could add Alphabet linking to Classes, Properties, and Methods - the big lists. So, the top of each list has A, B, C... Z. You click H, and you see all that start with H. Each letter group has a minimalist separation from the others. I searched the github for where to edit and how, but got lost.

Is this possible with the currently used typedocs? Any tips on how to do it? I've read from the typedocs website already, and searched about the docs github, to no avail.

Share this post

Link to post
Share on other sites
On 8/6/2018 at 11:42 AM, Deltakosh said:

I'm not an expert of TypeDoc but this seems unlikely to me :(

Tsk. Would the person who setup the TypeDoc for BJS know anything about this? Can you tag them? This seems doable but non-trivial.

Share this post

Link to post
Share on other sites

Because we talking about API doc improvement, is there a way to download a local version of the API  (without having to build or compile or whatever not easy for a non-dev) ? In the same way of Blender Python API for example:


This allow very fast access & searches ('cause sometimes I have to wait the loading/reloading and that's frustrating when you just want to check a little thing).

Share this post

Link to post
Share on other sites
1 hour ago, V!nc3r said:

without having to build or compile

I apologize if this is too far off topic, but I wanted to share an option for API offline viewing that does not require build/compile - at least it may help people in the meantime.

I didn't see a way in TypeDoc to generate a full ZIP.  Obviously this is a more involved answer and possibly not for non-devs, but I just want to add that really the best documentation is the source that TypeDoc uses to generate the API docs.  In 2 steps:
1. click download ZIP (or use git -  more difficult to setup, but makes it easy to update your local copy)
2. in VS Code open folder where you unzipped source from #1.

If you don't know where a class is hit "ctrl-t" and type the name.  ie: "environ" will show:

Enable the "outline" (option enabled by right-click on top Explorer bar) - can also use ctrl-shift-o. When you open ie: /src/babylon.scene.ts or Ctrl-T "scene" - you can see the full API (and hidden/private stuff as well that are NOT part of API) in the Outline.  Click the function (ie: createPickingRay) and it brings you right to the source code and API doc in the description.  You can click on methods in the source to navigate, find usages, etc..  It's a bit more work, but very fast and portable. With a couple of hotkeys it's the API + Internals. If you need some offline viewer in the meantime while there is no .ZIP download for docs maybe it will work for you! :)


Share this post

Link to post
Share on other sites

Interesting, I will test that.

However, it's still less convenient that only html static pages (cloning a github repo' can be easy to do thanks to Github Desktop - but needs a github account, and Visual Studio isn't opening as fast as an already opened browser) ; but it looks like allowing quick searches when all is set up ;)

[edit] erf, my note about github account needed is wrong, 'cause as you say we can dl the zip directly

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.