toJson method
Converts this ModelMaterialOverride to its JSON representation, keyed by name.
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (modelColor != null) {
json["model-color"] = modelColor?.toRGBA();
}
if (modelColorMixIntensity != null) {
json["model-color-mix-intensity"] = modelColorMixIntensity;
}
if (modelEmissiveStrength != null) {
json["model-emissive-strength"] = modelEmissiveStrength;
}
if (modelOpacity != null) {
json["model-opacity"] = modelOpacity;
}
return json;
}