How do I read the API?

I was reading through the Phaser 3 API (https://photonstorm.github.io/phaser3-docs/) and I am so lost on how to read it.

None of it looks like code and I really don’t know how I’m supposed to use it effectively.
Any help would be much appreciated.

What are you looking for specifically?

I’ve found the API docs to be very helpful, but I guess I kind of know what I’m looking for before I dive in.

The API docs talk about how the individual methods work in Phaser, but if you’re looking for guides on how to do certain things, the examples are a better place to start. Take a look at https://labs.phaser.io for those.

1 Like

I was looking for all the methods the input class has.

For example, based on looking at code samples, I know that input.on() is a thing and input.once() is another thing it can do. But how can I see everything else it has?

image

that link brings me to https://photonstorm.github.io/phaser3-docs/Phaser.Input.InputPlugin.html which lists out every property on the input object

Ah thank you. Now, if I wanted to implement it in code, would I just do “this.Class.method()”?

well, it depends on what Class is in your example. All the links in that dropdown in the image are accessible off of the this object of a scene. So this.add.XYZ or this.input.ABC.