FVector.fromJson constructor

FVector.fromJson(
  1. Map<String, dynamic> json
)

Implementation

FVector.fromJson(Map<String, dynamic> json)
    : nRows = (json["rows"] as int),
      columnData = Float32List.fromList((json["data"] as List)
              .cast<double>()
              .followedBy([0.0, 0.0, 0.0]).toList(growable: false))
          .buffer
          .asFloat32x4List(
              0, ((json["data"] as List<dynamic>).length + 3) ~/ 4);