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

TypeError: NavMesh.buildPolysFromGridMap is not a function #37

Closed
Wenish opened this issue Jun 19, 2021 · 5 comments
Closed

TypeError: NavMesh.buildPolysFromGridMap is not a function #37

Wenish opened this issue Jun 19, 2021 · 5 comments

Comments

@Wenish
Copy link

Wenish commented Jun 19, 2021

import * as NavMesh from 'navmesh'

const gridWidth = 5
const gridHeight = 4
const matrix2d =  new Array(gridHeight).fill(0).map(() => new Array(gridWidth).fill(0));
const meshPolygonPoints = NavMesh.buildPolysFromGridMap<number>(matrix2d)

Running this code gives the error:
TypeError: NavMesh.buildPolysFromGridMap is not a function

i think something woth the exports dosnt work

@mikewesthad
Copy link
Owner

Ahh, thanks! I think I added that feature but then never created a new publish. I'll take a look today.

@Wenish
Copy link
Author

Wenish commented Jun 21, 2021

very kind of you :)

@Wenish
Copy link
Author

Wenish commented Jun 22, 2021

with navmesh 2.2.1 its still the same problem :(

@mikewesthad
Copy link
Owner

Only after publishing that new release earlier did I realize the root cause is a misconfigured webpack output which only ever grabs the "default" export and ignores the rest of the exports 🤦. Fix is in the works, just testing before publishing.

@mikewesthad
Copy link
Owner

Alright, v2.3.0 should be live now for all the packages with the fixed exports!

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

2 participants