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 ");
}
}