NavNode(index, position, userData)

Class for representing navigation nodes.

Constructs a new navigation node.

Parameters:
Name Type Description
index Number

The unique index of this node.

position Vector3

The position of the node in 3D space.

userData Object

Custom user data connected to this node.

Author:

Extends

Members

index :Number

The unique index of this node. The default value -1 means invalid index.

Overrides:
Default Value:
  • -1

position :Vector3

The position of the node in 3D space.

userData :Object

Custom user data connected to this node.

Methods

fromJSON(json) → {Node}

Restores this instance from the given JSON object.

Parameters:
Name Type Description
json Object

The JSON object.

Returns:
Node -

A reference to this node.

Overrides:

toJSON() → {Object}

Transforms this instance into a JSON object.

Returns:
Object -

The JSON object.

Overrides: