Light constructor

Light(
  1. int? color, [
  2. double? intensity
])

color - (optional) hexadecimal color of the light. Default is 0xffffff (white).

intensity - (optional) numeric value of the light's strength/intensity. Default is 1.

Creates a new name. Note that this is not intended to be called directly (use one of derived classes instead).

Implementation

Light(int? color, [double? intensity]) : super() {
  if(color != null){
    this.color = Color.fromHex32(color);
  }
  this.intensity = intensity ?? 1.0;
  type = "Light";
}