castJSON static method
Implementation
static BufferGeometry castJSON(
Map<String, dynamic> json, Map<String, dynamic> rootJSON) {
String _type = json["type"];
if (_type == "BufferGeometry") {
return BufferGeometry.fromJSON(json, rootJSON);
} else if (_type == "ShapeBufferGeometry") {
return ShapeGeometry.fromJSON(json, rootJSON);
} else if (_type == "ExtrudeBufferGeometry") {
return ExtrudeGeometry.fromJSON(json, rootJSON);
} else {
throw (" BufferGeometry castJSON _type: $_type is not support yet ");
}
}