NodeMap

platypus.components. NodeMap

new NodeMap()

This component sets up a NodeMap to be used by the NodeResident component on this entity's child entities.

Source:
Fires:
Listens to Events:

Methods

getClosestNode(point, includingopt, excludingopt)

Finds the closest node to a given point, with respect to any inclusion or exclusion lists.

Source:
Parameters:
Name Type Attributes Description
point platypus.Vector

A location for which a closest node is being found.

including Array <optional>

A list of nodes to include in the search. If not set, the entire map is searched.

excluding Array <optional>

A list of nodes to exclude from the search.

getNode(id)

Gets a node by node id.

Source:
Parameters:
Name Type Description
id String | Array | Node

This id of the node to retrieve. If an array or more than one parameter is supplied, values are concatenated with "|" to create a single string id. Supplying a node returns the same node (useful for processing a mixed list of nodes and node ids).