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

Documentation update needed? #68

Open
bsgbryan opened this issue Mar 15, 2021 · 0 comments
Open

Documentation update needed? #68

bsgbryan opened this issue Mar 15, 2021 · 0 comments

Comments

@bsgbryan
Copy link

I'm not sure if this is a documentation problem, or a problem with my understanding.

The example code provided in the project's README does not work. I copy/pasted the code in the README, but instead of using frame.time.update({ in the update method, I needed to use frame.c.time.update({ as I got the error that frame.time was undefined.

Similarly, when modifying the example Gravity system, I noticed that:

const vector = entity.getOne('Vector')
vector.my += 9.807 * frame.time.deltaTime * .01
vector.update()

Seems to have two separate errors:

  1. frame should be frameInfo
  2. frame.time seems like it should be frameInfo.c.time

Similarly, the vector.my line in the above code looks like it should actually be vector.vector.my as the vector variable seems to be a wrapper. There is no my property on vector.

I just started exploring this library today, but these issues are extremely confusing. Any help would be greatly appreciated.

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

1 participant