setProperty method

void setProperty(
  1. String propertyName,
  2. dynamic value
)

Implementation

void setProperty(String propertyName, dynamic value) {
  if (propertyName == "color") {
    color = value;
  } else if (propertyName == "opacity") {
    opacity = value;
  } else if (propertyName == "emissive") {
    emissive = value;
  } else if (propertyName == "flatShading") {
    flatShading = value;
  } else if (propertyName == "wireframe") {
    wireframe = value;
  } else if (propertyName == "vertexColors") {
    vertexColors = value;
  } else if (propertyName == "transparent") {
    transparent = value;
  } else if (propertyName == "depthTest") {
    depthTest = value;
  } else if (propertyName == "depthWrite") {
    depthWrite = value;
  } else if (propertyName == "visible") {
    visible = value;
  } else if (propertyName == "blending") {
    blending = value;
  } else if (propertyName == "side") {
    side = value;
  } else if (propertyName == "roughness") {
    roughness = value;
  } else if (propertyName == "metalness") {
    metalness = value;
  } else {
    throw ("Material.setProperty type: $type propertyName: $propertyName is not support ");
  }
}