fromFlatbuffer static method
Implementation
static Material fromFlatbuffer(
fb.Material fbMaterial, List<gpu.Texture> textures) {
switch (fbMaterial.type) {
case fb.MaterialType.kUnlit:
return UnlitMaterial.fromFlatbuffer(fbMaterial, textures);
case fb.MaterialType.kPhysicallyBased:
return PhysicallyBasedMaterial.fromFlatbuffer(fbMaterial, textures);
default:
throw Exception('Unknown material type');
}
}