registerType method

SteeringManager registerType(
  1. String type,
  2. Function constructor
)

Registers a custom type for deserialization. When calling {@link SteeringManager#fromJSON} the steering manager is able to pick the correct constructor in order to create custom steering behavior.

Implementation

SteeringManager registerType(String type, Function constructor ) {
	_typesMap[type] =  constructor;
	return this;
}