-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Recast Navigation plugin V2 #16180
base: master
Are you sure you want to change the base?
Recast Navigation plugin V2 #16180
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
package.json
Outdated
@@ -108,5 +108,8 @@ | |||
"nextVersion": "Unreleased", | |||
"ignoreCommitters": [], | |||
"feature": "New Feature" | |||
}, | |||
"dependencies": { | |||
"recast-navigation": "^0.39.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this so it wouldn't be merged - please don't add dependencies on the main package.json (only dev-dependencies needed for the monorepo). If it is a dependency for a specific package, add it to the specific package, however, as mentioned offline - it would be good not to have any dependency added to our core library. Instead, handle dependencies like we handle draco/havok/csg2/recast1
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
@@ -0,0 +1,1770 @@ | |||
/* eslint-disable no-console */ | |||
|
|||
import * as Recast2 from "recast-navigation"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be imported, but injected in the constructor
import type { SoloNavMeshGeneratorConfig, SoloNavMeshGeneratorIntermediates, TiledNavMeshGeneratorConfig, TiledNavMeshGeneratorIntermediates } from "recast-navigation/generators"; | ||
import type { NavMesh, QueryFilter, TileCache } from "recast-navigation"; | ||
import { generateSoloNavMesh, generateTileCache, generateTiledNavMesh } from "recast-navigation/generators"; | ||
import { Crowd, Detour, exportNavMesh, getNavMeshPositionsAndIndices, getRandomSeed, importNavMesh, NavMeshQuery, setRandomSeed } from "recast-navigation"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting issue we have not solved yet. These types need to be declared and not imported, as it messes up the UMD declaration file. Is it optimal? nope. Is it safer for dev/core - yep :-)
Anything you need to import (and not import type) from the package needs to be injected. It can be an entire namespace, if needed.
@RaananW Hello! Thanks for the comments, but this PR is still in Draft mode and not ready for review yet :-) I responded to your message on the forum. |
Uses the recast-navigation-js library