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

Improved docs regarding custom events usage #842

Merged
merged 5 commits into from
Apr 5, 2024

Conversation

JSLegendDev
Copy link
Contributor

In the Kaboom.js docs, it's not clear how to use the on() function used to define custom events.
I tried to improve the docs to make usage more clear.

@lajbel lajbel self-requested a review April 5, 2024 00:33
Copy link
Contributor

@lajbel lajbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a mention here about that there's no only custom events, there's also default events, ground is one, and there's others. So maybe I would change it and also mention what are the defaults events.

It's a fact that we don't expose the events very well, maybe another PR for the repo

@JSLegendDev JSLegendDev requested a review from lajbel April 5, 2024 03:23
@JSLegendDev
Copy link
Contributor Author

I opted to just add to the existing doc that you can have custom events with an example instead of removing what was there before.

Copy link
Contributor

@lajbel lajbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few things, but looking good

src/types.ts Show resolved Hide resolved
src/types.ts Outdated
* on("talk", (message, posX, posY) => {
* add([text(message), pos(posX, posY - 100)])
* })
* onKeyPress("Space", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space in lowercase

@JSLegendDev JSLegendDev requested a review from lajbel April 5, 2024 15:33
@JSLegendDev
Copy link
Contributor Author

@lajbel Addressed feedback and fixed spacing issues.

Copy link
Contributor

@lajbel lajbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good!

@lajbel lajbel merged commit b77477e into replit:master Apr 5, 2024
2 checks passed
@lajbel
Copy link
Contributor

lajbel commented Apr 5, 2024

Thank you for your contribution to documentation! 🔥

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

Successfully merging this pull request may close these issues.

2 participants