fromJSON method
Restores this instance from the given JSON object.
Implementation
Path fromJSON(Map<String,dynamic> json ) {
loop = json['loop'];
_index = json['_index'];
// waypoints
final waypointsJSON = json['_waypoints'];
for ( int i = 0, l = waypointsJSON.length; i < l; i ++ ) {
final waypointJSON = waypointsJSON[ i ];
waypoints.add( Vector3().fromArray( waypointJSON ) );
}
return this;
}