-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Early version of the recast-navigation-js navigation plugin #16612
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
base: master
Are you sure you want to change the base?
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16612/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16612/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/16612/merge#BCU1XR#0 |
You have made possible changes to the playground. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16612/merge/ The snapshot playground with the CDN snapshot (only when available): Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly. |
You have changed file(s) that made possible changes to the sandbox. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16612/merge/ |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
You have changed file(s) that made possible changes to the sandbox. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16612/merge/ |
You have made possible changes to the playground. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16612/merge/ The snapshot playground with the CDN snapshot (only when available): Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly. |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
You have changed file(s) that made possible changes to the sandbox. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16612/merge/ |
You have made possible changes to the playground. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16612/merge/ The snapshot playground with the CDN snapshot (only when available): Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly. |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
You have made possible changes to the playground. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/16612/merge/ The snapshot playground with the CDN snapshot (only when available): Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly. |
You have changed file(s) that made possible changes to the sandbox. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/16612/merge/ |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
/** | ||
* | ||
*/ | ||
export interface INavigationEnginePlugin extends INavigationEnginePlugin0 { |
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.
why extending INavigationEnginePlugin0 and not simply adding members/methods to INavigationEnginePlugin ?
@@ -392,7 +493,7 @@ export interface IAgentParameters { | |||
/** | |||
* Configures the navigation mesh creation | |||
*/ | |||
export interface INavMeshParameters { | |||
export interface INavMeshParameters0 { |
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.
Does it need a name change as members are just added?
/** | ||
* If set to true, intermediate objects used during the generation process will be retained. | ||
* This is useful for debugging purposes or if you want to process the intermediate data in any other way. | ||
* For example you can use it to trace countours, calculate heightfields, etc. |
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.
Are functions used to get contours, heightfields exposed by the plugin?
*/ | ||
public constructor(recastInjection: any = Recast) { | ||
public constructor(recastInjection: any = Recast, recastGeneratorsInjection: any = RecastGenerators) { |
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.
Is it possible to log the version here or in recast js to make the difference between old and new navigation
|
||
private _worker: Nullable<Worker> = null; | ||
|
||
// TODO: Nullable? |
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.
yes, when plugin just constructed but no navmesh. I'm wondering if it's possible to delegate this storage to recast.js instead.
@@ -70,7 +178,17 @@ export class RecastJSPlugin implements INavigationEnginePlugin { | |||
*/ | |||
public setWorkerURL(workerURL: string | URL): boolean { | |||
if (window && window.Worker) { | |||
this._worker = new Worker(workerURL); | |||
this._worker = new Worker(workerURL, { |
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.
got an error when testing PG #TN7KNN#2
#X5XCVT#873