Class RecastJSPlugin
Hierarchy
- RecastJSPlugin
Implements
Index
Constructors
Properties
Methods
- build
From Navmesh Data - compute
Path - create
Crowd - create
Debug Nav Mesh - create
Nav Mesh - dispose
- get
Closest Point - get
Closest Point ToRef - get
Default Query Extent - get
Default Query Extent ToRef - get
Maximum Sub Step Count - get
Navmesh Data - get
Random Point Around - get
Random Point Around ToRef - get
Time Step - is
Supported - move
Along - move
Along ToRef - set
Default Query Extent - set
Maximum Sub Step Count - set
Time Step
Constructors
constructor
-
Initializes the recastJS plugin
Parameters
-
Optional recastInjection: any
can be used to inject your own recast reference
Returns RecastJSPlugin
-
Properties
bjsRECASTSearch playground for bjsRECAST
Reference to the Recast library
nameSearch playground for name
plugin name
nav MeshSearch playground for navMesh
the first navmesh created. We might extend this to support multiple navmeshes
Methods
build From Navmesh DataSearch playground for buildFromNavmeshData
-
build the navmesh from a previously saved state using getNavmeshData
Parameters
-
data: Uint8Array
the Uint8Array returned by getNavmeshData
Returns void
-
compute PathSearch playground for computePath
create CrowdSearch playground for createCrowd
create Debug Nav MeshSearch playground for createDebugNavMesh
create Nav MeshSearch playground for createNavMesh
-
Creates a navigation mesh
Parameters
-
meshes: Array<Mesh>
array of all the geometry used to compute the navigatio mesh
-
parameters: INavMeshParameters
bunch of parameters used to filter geometry
Returns void
-
disposeSearch playground for dispose
-
Disposes
Returns void
get Closest PointSearch playground for getClosestPoint
get Closest Point ToRefSearch playground for getClosestPointToRef
get Default Query ExtentSearch playground for getDefaultQueryExtent
-
Get the Bounding box extent specified by setDefaultQueryExtent
Returns Vector3
the box extent values
get Default Query Extent ToRefSearch playground for getDefaultQueryExtentToRef
-
Get the Bounding box extent result specified by setDefaultQueryExtent
Parameters
-
result: Vector3
output the box extent values
Returns void
-
get Maximum Sub Step CountSearch playground for getMaximumSubStepCount
-
Get the maximum number of iterations per navigation tick update
Returns number
the maximum number of iterations
get Navmesh DataSearch playground for getNavmeshData
-
returns the navmesh data that can be used later. The navmesh must be built before retrieving the data
Returns Uint8Array
data the Uint8Array that can be saved and reused
get Random Point AroundSearch playground for getRandomPointAround
get Random Point Around ToRefSearch playground for getRandomPointAroundToRef
get Time StepSearch playground for getTimeStep
-
Get the time step of the navigation tick update.
Returns number
the current time step
is SupportedSearch playground for isSupported
-
If this plugin is supported
Returns boolean
true if plugin is supported
move AlongSearch playground for moveAlong
move Along ToRefSearch playground for moveAlongToRef
set Default Query ExtentSearch playground for setDefaultQueryExtent
-
Set the Bounding box extent for doing spatial queries (getClosestPoint, getRandomPointAround, ...) The queries will try to find a solution within those bounds default is (1,1,1)
Parameters
-
extent: Vector3
x,y,z value that define the extent around the queries point of reference
Returns void
-
set Maximum Sub Step CountSearch playground for setMaximumSubStepCount
-
If delta time in navigation tick update is greater than the time step a number of sub iterations are done. If more iterations are need to reach deltatime they will be discarded. A value of 0 will set to no maximum and update will use as many substeps as needed
Parameters
-
Optional newStepCount: number
the maximum number of iterations
Returns void
-
set Time StepSearch playground for setTimeStep
-
Set the time step of the navigation tick update. Default is 1/60. A value of 0 will disable fixed time update
Parameters
-
Optional newTimeStep: number
the new timestep to apply to this world.
Returns void
-
RecastJS navigation plugin