attribFromJson method

VertexAttrib attribFromJson (String name, Map<String, Object> json)

Implementation

static VertexAttrib attribFromJson(String name, Map<String, Object> json) {
  final Object jsonSize = json["size"];
  final Object jsonType = json["type"];
  final Object jsonStride = json["stride"];
  final Object jsonOffset = json["offset"];
  if (jsonSize is int &&
      jsonType is String &&
      jsonStride is int &&
      jsonOffset is int) {
    return new VertexAttrib._internal(
        name, jsonSize, jsonType, jsonStride, jsonOffset);
  } else {
    return null;
  }
}