update method

void update()

Implementation

void update() {
  if (color != null) {
    material?.color.setFrom(color!);
  }
  else {
    material?.color.setFrom(light.color!);
  }
}