getProperty method

dynamic getProperty(
  1. String propertyName
)

Implementation

dynamic getProperty(String propertyName) {
  if (propertyName == "id") {
    return id;
  } else if (propertyName == "name") {
    return name;
  } else if (propertyName == "scale") {
    return scale;
  } else if (propertyName == "position") {
    return position;
  } else if (propertyName == "quaternion") {
    return quaternion;
  } else if (propertyName == "material") {
    return material;
  } else if (propertyName == "opacity") {
    return null;
  } else if (propertyName == "morphTargetInfluences") {
    return morphTargetInfluences;
  } else if (propertyName == "castShadow") {
    return castShadow;
  } else if (propertyName == "receiveShadow") {
    return receiveShadow;
  } else if (propertyName == "visible") {
    return visible;
  } else {
    throw ("Object3D.getProperty type: $type propertyName: $propertyName is not support ");
  }
}